public static void Postfix() { if (!loaded) { ScriptingCore.OnEvent("loaded"); loaded = true; } }
public static void Prefix() { lastcyclenumber = LuaFunctions.GetCycleNumber(); if (LuaFunctions.GetCycleTime() > 50) { lastcyclenumber2 = LuaFunctions.GetCycleNumber(); } ScriptingCore.OnEvent("newgame"); }
public static void Prefix(ref MutatedWorldData worldData) { mworldData = worldData; ScriptingCore.OnEvent("worlddata"); if (modifiedworldData != null) { worldData = modifiedworldData; } }
public static void newday() { try { if (lastcyclenumber != LuaFunctions.GetCycleNumber()) { ScriptingCore.OnEvent("newday"); lastcyclenumber = LuaFunctions.GetCycleNumber(); } } catch { } }
public static void delayedupdategame() { int delaydelta = delay++ % 100; if (delaydelta == 10) { ScriptingCore.OnEvent("updategame"); } ScriptingCore.LuaDebugLog("delaydelta " + delaydelta); if (delaydelta == 20) { ScriptingCore.OnEvent("onchangegame"); } }
public static void noon() { try { if (lastcyclenumber2 != LuaFunctions.GetCycleNumber()) { if (LuaFunctions.GetCycleTime() > 50) { ScriptingCore.OnEvent("noon"); lastcyclenumber2 = LuaFunctions.GetCycleNumber(); } } } catch { } }
public override BuildingDef CreateBuildingDef() { if (thisbuildingdef == null) { newbuildingdef(1, 1, "heavywatttile_conductive_kanim", 10, 10, new float[] { 1 }, new string[] { "steel" }, 10); } if (instance == null) { return(thisbuildingdef); } instance.NewScript(ID, "loaded", "buildings", "CreateBuildingDef", thisbuildingdef); ScriptingCore.OnEvent(ID); ScriptingCore.LuaDebugLog("CreateBuildingDef " + ID); return(thisbuildingdef); }
public static void delayedupdate() { int delaydelta = delay2++ % 100; if (delaydelta == 1) { ScriptingCore.OnEvent("update"); } if (delaydelta == 10) { onchange(); } if (delaydelta == 20) { newday(); } if (delaydelta == 30) { noon(); } }
public static void Prefix() { ScriptingCore.OnEvent("directupdate"); delayedupdate(); }
public static void Prefix() { ScriptingCore.OnEvent("maploaded"); }
public static void Postfix() { ScriptingCore.LuaDebugLog("loadbuildings"); ScriptingCore.OnEvent("loadbuildings"); }
public static void Prefix() { ScriptingCore.OnEvent("DbInitialize"); }
public static void onchange() { ScriptingCore.OnEvent("onchange"); }