Coder Social home page Coder Social logo

mflink3012 / spaceengineers-ingamescript-cargowatch Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 503 KB

An ingame-script for Space Engineers watching the grids cargo (mass and volume) with watermarks and activates another block on reach. I needed this, because my big drilling-machine got overloaded. With this script one is able to get a signal that mass and/or volume is critical.

C# 80.90% PowerShell 19.10%
spaceengineers ingame-script vscode steamworkshop

spaceengineers-ingamescript-cargowatch's Introduction

Thumbnail

Short description

An ingame-script for Space Engineers watching the grids cargo (loaded mass and volume) with watermarks and activates another block on reach.

With this script one is able to get a signal that loaded mass and/or volume is getting critical on the current grid (docked grids and non-functional inventory-blocks will be ignored).

I needed this, because my big drilling-machine got overloaded and my grinding-machine got full. Now I have a LCD or a blinking light activated to warn me.

This script will output some details on current loaded mass and volume to the display of the programmable block.

It will give extra details (like defined blocks) in the debugging-section of the programmable block.

Example

Add to Custom Data on a programmable block attached to a vehicle:

Mass.Watermark.Value=1400000
Mass.Watermark.Activate=Chisel.LCD

That will activate the LCD named Chisel.LCD (preconfigured with what you like - an exlamation mark for example) when the total mass of the vehicle the programmable block is attached to will increase to more than 1.4 tons (because you might overload it with the drill).

Custom Data (Properties)

If you change the Custom Data of the programmable block the script is running on, you need to recompile the script to get the changes active.

Watermark for mass

To watch the mass-load of the grid, give Mass.Watermark.Value and Mass.Watermark.Activate.

Mass.Watermark.Value (long)

This long-property will define the value for critical mass in kg (kilograms). Once this value is reached (or exceeded) and Mass.Watermark.Activate is defined, the defined block will be enabled. If the current mass is below the watermark, the defined block will be disabled.

Mass.Watermark.Activate (string)

This string-property will hold the name of the functional block to enable or disable (depending on Mass.Watermark.Value).

Watermark for volume

To watch the volume-load of the grid, give Volume.Watermark.Value and Volume.Watermark.Activate.

Volume.Watermark.Value (long)

This long-property will define the value for critical volume in L (liters). Once this value is reached (or exceeded) and Volume.Watermark.Activate is defined, the defined block will be enabled. If the current volume is below the watermark, the defined block will be disabled.

Volume.Watermark.Activate (string)

This string-property will hold the name of the functional block to enable or disable (depending on Volume.Watermark.Value).

Steam Workshop

https://steamcommunity.com/sharedfiles/filedetails/?id=2447352453

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.