Space Engineers

Space Engineers

Not enough ratings
Projector Block "Needed" Property For Programmable Block Integration
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Production, Other
File Size
Posted
Updated
4.332 KB
19 Aug, 2023 @ 7:09pm
20 Aug, 2023 @ 9:07pm
3 Change Notes ( view )

Subscribe to download
Projector Block "Needed" Property For Programmable Block Integration

Description
Adds a "Needed" property to projectors containing a "ComponentID_1:Amount,ComponentID_N:Amount" formatted string that can be given to assemblers to produce the parts needed for the projected blueprint.

Ex:

```
int Index = 0;

foreach (var Pair in Data.Split(','))
{
var Split = Pair.Split(':');

var Name = Split[0];
var Amount = float.Parse(Split[1]);

MyDefinitionId ID;

if (MyDefinitionId.TryParse(Name, out ID))
{
Assembler.InsertQueueItem(Index++, ID, Amount);
}
}
```