Skip to content

Commit

Permalink
- Fix for server error while mining from empty tile (#501)
Browse files Browse the repository at this point in the history
Co-authored-by: Dolzhukov, Viktor <[email protected]>
  • Loading branch information
Sellafield and Dolzhukov, Viktor authored Sep 27, 2024
1 parent ee0906f commit 72da7ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Perpetuum/Modules/DrillerModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ public void DoExtractMinerals(IZone zone)
0,
ErrorCodes.NoMineralOnTile,
(PerpetuumException ex) =>
(ParentRobot as RemoteControlledCreature)
.ProcessIndustrialTarget(terrainLock.Location.Center, 0));
{
RemoteControlledCreature creature = ParentRobot as RemoteControlledCreature;
creature?.ProcessIndustrialTarget(terrainLock.Location.Center, 0);
});
extractedMaterials
.AddRange(rareMaterialHandler.GenerateRareMaterials(materialInfo.EntityDefault.Definition));
CreateBeam(terrainLock.Location, BeamState.AlignToTerrain);
Expand Down

0 comments on commit 72da7ae

Please sign in to comment.