improved fuel logic

This commit is contained in:
Monica Moniot
2022-12-08 14:35:45 -05:00
parent 3a6b4308ee
commit 3eed384058
4 changed files with 29 additions and 14 deletions

View File

@@ -26,6 +26,7 @@ local on_train_stuck = nil
local on_train_teleport_started = nil
local on_train_teleported = nil
local on_tick_init = nil
local on_mod_settings_changed = nil
local interface = {}
------------------------------------------------------------------
@@ -104,6 +105,10 @@ function interface.get_on_tick_init()
if not on_tick_init then on_tick_init = script_generate_event_name() end
return on_tick_init
end
function interface.get_on_mod_settings_changed()
if not on_mod_settings_changed then on_mod_settings_changed = script_generate_event_name() end
return on_mod_settings_changed
end
------------------------------------------------------------------
@@ -537,3 +542,8 @@ function interface_raise_tick_init()
})
end
end
function interface_raise_on_mod_settings_changed(e)
if on_mod_settings_changed then
raise_event(on_mod_settings_changed, e)
end
end