Space Engineers

Space Engineers

Nanobot Build and Repair System Queuing / Display / Scripting
Dummy08  [developer] 10 Nov, 2017 @ 9:39am
Code Examples
Add a new discussion to share code snippets.
< >
Showing 1-4 of 4 comments
Dummy08  [developer] 10 Nov, 2017 @ 9:41am 
How to control the block that shoul be grinded (in case the build in block group is not fine enough)

Put the new function into the class BuildAndRepairAutoQueuing and call it where the existing
CheckAssemblerQueues() function is called.

private void ScriptControlledGrinding() { foreach (var groupData in _GroupData) { groupData.RepairSystems.ScriptControlled = true; var listGrindable = groupData.RepairSystems.PossibleGrindTargets(); //If nothing to grind or current grinding object no longer in list (allready ginded) if (groupData.RepairSystems.CurrentPickedGrindTarget == null || listGrindable.IndexOf(groupData.RepairSystems.CurrentPickedGrindTarget) < 0) { foreach (var entry in listGrindable) { var antenna = entry.FatBlock as IMyRadioAntenna; if (antenna != null) { groupData.RepairSystems.CurrentPickedGrindTarget = entry; break; } var reactor = entry.FatBlock as IMyReactor; if (reactor != null) { groupData.RepairSystems.CurrentPickedGrindTarget = entry; break; } var guns = entry.FatBlock as IMyUserControllableGun; if (guns != null) { groupData.RepairSystems.CurrentPickedGrindTarget = entry; break; } } } } }
Last edited by Dummy08; 10 Nov, 2017 @ 9:57am
KaneDraco 10 Nov, 2017 @ 7:22pm 
Thank you so much. I feel like a complete rude, because I didn't realize that the system had a native enable/disable support in the ui. This helps however as I can set the script to toggle between sets of lists. Makes it easier to change between capture and scrap modes.
IronE 7 Mar, 2020 @ 4:11pm 
Is there any way to see the status on any LCD display? Can't find how to do it, even if I make a display with the naming in the script. Do I have to enter more code?
mcbobbo 10 Feb, 2023 @ 8:51pm 
What would the code look like if it were checking for modded blocks to only grind those?
< >
Showing 1-4 of 4 comments
Per page: 1530 50