Space Engineers

Space Engineers

评价数不足
Inventory Light
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
126.765 KB
2023 年 4 月 18 日 下午 6:36
2024 年 2 月 6 日 下午 10:19
9 项改动说明 ( 查看 )

订阅以下载
Inventory Light

描述
This simple script monitors the fill level of your cargo. As inventory fills or empties, the script changes the color of any light you have tagged. Color progresses from green (empty) to red (cargo full) to flashing red (now you are filling other things like connectors). The script will also display a simple percentage on any tagged LCD.

This is one of the very first scripts I wrote years ago.

Performance is adaptive to minimize sim impact. Below, 95%, the script only runs once every 100 frames. Above 95%, the script runs once very 10 frames.

Customization
After adding the script to a Programmable Block, check the Custom Data to adjust settings. Recompile the block after making changes.

SCRIPT TAG
Place this text anywhere in the custom name field of any light or LCD that you want this script to manage. Default value: [INVLT]

CARGO KEYWORD
Place this text anywhere in the custom name field of any cargo you want this script to monitor. Default value: cargo
Note: this is not a "tag" so it is not wrapped in brackets. It is a keyword so it just needs to appear anywhere in the block's Display Name. By using "cargo" the script will monitor all cargo containers.

INCLUDE DRILLS
Determines if drill inventory is included in the calculations. Default value: false

COLOR STEPS
This is the number of steps between the "empty" color (green) and the "full" color (red). This count includes both the "empty" and "full" color. So if you want "green -> yellow -> red," then you would put 3. Default value: 5.
Must be at least 2. Works best with small values, such as 3 or 5.

Other Mods You Might Like

Other Scripts You Might Like

Bugs, Suggestions, Questions, and Comments -> Discord[discord.gg]
I don't troubleshoot, give technical advice, or have discussions in the comment section. That's what the Discord is for. Comments get lost to time, but discord histories can be searched and referenced.
1 条留言
Will.Exe 2024 年 8 月 31 日 下午 2:01 
Can I add this to cockpit screens for mining ships?