From 0ee26f53104a737889605384f94b52c2c156908f Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Wed, 16 Apr 2025 20:23:27 +0900 Subject: [PATCH] . --- PHI-CL/control.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index 14515cc..259e2bd 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -109,10 +109,13 @@ if settings.startup['PHI-CT'].value or settings.startup['PHI-MI'].value or (sett function space_white_science() local surface = game.surfaces['space-platform'] - local hub_init = surface.can_place_entity{name='space-platform-hub', position={0, 0}, force='neutral'} - if hub_init then - surface.create_entity{name='space-platform-hub', position={0, 0}, force='neutral'} + if surface then + local hub_init = surface.can_place_entity{name='space-platform-hub', position={0, 0}, force='neutral'} + + if hub_init then + surface.create_entity{name='space-platform-hub', position={0, 0}, force='neutral'} + end end end