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 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 bool AddHelpInfo(string Functionnameinlua, string Helptext = "", bool log = true) { if (log) { ScriptingCore.LuaDebugLog("AddHelpInfo: " + Functionnameinlua); } if (ScriptingCore.helpdict.ContainsKey(Functionnameinlua)) { ScriptingCore.InfoLog("The info " + Functionnameinlua + " is already registered skipping it! "); } else { ScriptingCore.helpdict.Add(Functionnameinlua, Helptext); } return(true); }
public static void Postfix() { ScriptingCore.LuaDebugLog("loadbuildings"); ScriptingCore.OnEvent("loadbuildings"); }