Space Engineers

Space Engineers

Automated Beam Drill
crazy_bad 20. juni 2016 kl. 15:04
Suggestions
1) Bed behavior, very ineffective.
This mod stadted parralel task even i have no any automated beam drills on this grid and i dont have any beam drill at all. Assiming this is incorrect behavior.
2) Ineffective.
Then game unloading, trapped power state changed and you running async cre detector task. Why? This is bug. If new state is disabled - you should not start ore scanning.

void OreDetectorGameLogic_IsWorkingChanged(IMyCubeBlock obj)
{
try
{
(Container.Entity as IMyTerminalBlock).RefreshCustomInfo();
m_physicsDirty = true;
if (MyAPIGateway.Multiplayer.IsServer)
ScanOre();
}
catch (Exception ex)
{
Logger.Instance.LogException(ex);
}
}

3) Workaround.
cause of temproary incompability with voxels - i have problems in my save.
voxelMap.Storage = null. So something looks broken, but you could check pointer before dereferencing. Of cource this can be fixed or not - you deal.

but atleast i recommend to fix first 2 cases, since it happens on all users as i suspect.

you can try to debug your code under MSVC. (basically it should allow any ingame compiled code). Files have temproary names and located inside {temp}/SpaceEngeneers\Mods\CompiledScripts\{mod}\"
https://github.com/StrukovS/SpaceEngineers/tree/scripts_improovements
but try this changes on your own risk :)
i playing/checking with this changes, but no any warranty that code not contains errors and that is not break something. Especially code contains temp files cleanup so it deleting entry folders of cource it should delete it only inside "{temp}/SpaceEngeneers/" but no warranty that some errors could occurs... Yuo could watch code changes before running.

temproary mod uninstalled from save.
Sidst redigeret af crazy_bad; 20. juni 2016 kl. 15:09