>> ORRR3 - v1-1 - sourcepack-132-1-0-1588505955\ORRR3 - v1-1 - source\mod_assets\patcher.lua
Code: Select all
-- This file is for handling updating old savegames to new versions of the mod.
local CURRENT_VERSION = 3 -- Version 1.1
-- To dynamically create a script entity that actually runs its code,
-- ScriptComponent:loadFile() must be called in the onInit hook of a component
-- that appears before the ScriptComponent.
defineObject{
name = "script_entity_patched",
placement = "floor",
components = {
{
class = "Null",
name = "hackyLoader",
onInit = function(self)
self.go.script:loadFile(GameMode.patchScriptFile)
GameMode.patchScriptFile = nil
end,
},
{
class = "Script",
},
{
class = "ScriptController",
name = "controller",
},
},
}