Space Engineers

Space Engineers

Warship Manager
 此主题已被置顶,因此可能具有重要性
ZerothAngel  [开发者] 2016 年 5 月 15 日 下午 1:10
Inventory Stock Manager
This is a group-based inventory manager that maintains a minimum number of certain item(s) in certain blocks.

For example, I use this to maintain at least 10 missiles in every missile turret & rocket launcher, 10 ammo containers in every gatling turret, along with 5 steel plates/interior plates/construction components in every welder.

This helps alleviate some bugs self-repairing ships run into in survival mode.

Usage

First, select all cargo blocks and create a block group around them named StockSource. The script will only pull items from these blocks.

Next, select the blocks you want to manage inventory for. For example, missile turrets & rocket launchers. Then create a block group around them with the name:

Stock<subtypeId>:<count>

Where <subtypeId> is a normal inventory item subtype ID. Some common ones:
  • Missile200mm
  • NATO_25x184mm
  • NATO_5p56x45mm
  • BulletproofGlass
  • Computer
  • Construction
  • Detector
  • Display
  • Explosives
  • Girder
  • GravityGenerator
  • InteriorPlate
  • LargeTube
  • Medical
  • MetalGrid
  • Motor
  • PowerCell
  • RadioCommunication
  • Reactor
  • SmallTube
  • SolarCell
  • SteelPlate
  • Superconductor
  • Thrust
So using the missile example, StockMissile200mm:10 would maintain 10 missiles in the missile turrets & rocket launchers.

Note that while the word "Stock" can be any letter case, the <subtypeId> must match the letter case above exactly.

And that's it. Create as many groups as you want for as many subtype IDs as you want. This module runs every 2 seconds and is fairly optimized, i.e. does nothing if you have no StockSource group defined, skips scanning inventory if all blocks have their minimum number, etc.
最后由 ZerothAngel 编辑于; 2016 年 5 月 16 日 下午 12:00