Skip to content

Commit ae8deb6

Browse files
committed
Fix LuaEntity API call when LuaEntity was invalid.
1 parent 0778650 commit ae8deb6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mods/reactors-warm-up-faster-so-you-don_t-have-to-wait/control.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
local one_minute = 60 * 60
22

33
local function tick_reactor(struct)
4-
local entity = struct.entity
5-
local entity_name = entity.name
6-
7-
if entity.valid == false then
4+
if struct.entity.valid == false then
85
global.structs_count = global.structs_count - 1
96
global.structs[struct.unit_number] = nil
107
return
118
end
129

10+
local entity = struct.entity
11+
local entity_name = entity.name
12+
1313
if game.tick > struct.tick + one_minute then
1414
-- game.print('reactor timed out.')
1515
-- entity.surface.create_entity{

mods/reactors-warm-up-faster-so-you-don_t-have-to-wait/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "reactors-warm-up-faster-so-you-don_t-have-to-wait",
33
"title": "Reactors warm up faster so you don't have to wait",
44
"description": "Reactors use fuel quicker whilst their tempratures are below useful levels.",
5-
"version": "1.0.0",
5+
"version": "1.0.1",
66
"author": "Quezler",
77
"factorio_version": "1.1",
88
"dependencies": [

0 commit comments

Comments
 (0)