public static void Postfix() { if (!loaded) { ScriptingCore.OnEvent("loaded"); loaded = true; } }
public static void Prefix(ref MutatedWorldData worldData) { mworldData = worldData; ScriptingCore.OnEvent("worlddata"); if (modifiedworldData != null) { worldData = modifiedworldData; } }
public override BuildingDef CreateBuildingDef() { if (thisbuildingdef == null) { newbuildingdef(1, 1, "heavywatttile_conductive_kanim", 10, 10, new float[] { 1 }, new string[] { "steel" }, 10); } ScriptingCore.OnEvent(ID); ScriptingCore.DebugLog("CreateBuildingDef " + ID); return(thisbuildingdef); }
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 == 1) { ScriptingCore.OnEvent("updategame"); } if (delaydelta == 20) { onchangegame(); } }
public static void noon() { try { if (lastcyclenumber2 != LuaFunctions.GetCycleNumber()) { if (LuaFunctions.GetCycleTime() < 50) { ScriptingCore.OnEvent("noon"); lastcyclenumber2 = LuaFunctions.GetCycleNumber(); } } } catch { } }
public static void delayedupdate() { int delaydelta = delay++ % 100; if (delaydelta == 1) { ScriptingCore.OnEvent("update"); } if (delaydelta == 10) { onchange(); } if (delaydelta == 20) { newday(); } if (delaydelta == 30) { noon(); } }
public static void Postfix() { ScriptingCore.OnEvent("update"); }
public static void Postfix() { ScriptingCore.OnEvent("maploaded"); }
public static void onchangegame() { ScriptingCore.OnEvent("onchangegame"); }
public static void Prefix() { ScriptingCore.OnEvent("directupdate"); delayedupdate(); }
public static void Prefix() { ScriptingCore.OnEvent("newgame"); }
public static void Postfix() { ScriptingCore.DebugLog("loadbuildings"); ScriptingCore.OnEvent("loadbuildings"); }
public static void Prefix() { ScriptingCore.ScriptInit(); ScriptingCore.DebugLog("preloadbuildings"); ScriptingCore.OnEvent("preloadbuildings"); }