Space Engineers

Space Engineers

Nanobot Build and Repair System Queuing / Display / Scripting
Dummy08  [開發人員] 2017 年 11 月 10 日 上午 9:39
Code Examples
Add a new discussion to share code snippets.
< >
目前顯示第 1-4 則留言,共 4
Dummy08  [開發人員] 2017 年 11 月 10 日 上午 9:41 
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; } } } } }
最後修改者:Dummy08; 2017 年 11 月 10 日 上午 9:57
KaneDraco 2017 年 11 月 10 日 下午 7:22 
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 2020 年 3 月 7 日 下午 4:11 
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 2023 年 2 月 10 日 下午 8:51 
What would the code look like if it were checking for modded blocks to only grind those?
< >
目前顯示第 1-4 則留言,共 4
每頁顯示: 1530 50