예제 #1
0
 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;
     }
 }
예제 #3
0
 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);
 }
예제 #4
0
 public static void newday()
 {
     try
     {
         if (lastcyclenumber != LuaFunctions.GetCycleNumber())
         {
             ScriptingCore.OnEvent("newday");
             lastcyclenumber = LuaFunctions.GetCycleNumber();
         }
     }
     catch { }
 }
예제 #5
0
        public static void delayedupdategame()
        {
            int delaydelta = delay++ % 100;

            if (delaydelta == 1)
            {
                ScriptingCore.OnEvent("updategame");
            }
            if (delaydelta == 20)
            {
                onchangegame();
            }
        }
예제 #6
0
 public static void noon()
 {
     try
     {
         if (lastcyclenumber2 != LuaFunctions.GetCycleNumber())
         {
             if (LuaFunctions.GetCycleTime() < 50)
             {
                 ScriptingCore.OnEvent("noon");
                 lastcyclenumber2 = LuaFunctions.GetCycleNumber();
             }
         }
     }
     catch { }
 }
예제 #7
0
        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");
 }
예제 #10
0
 public static void onchangegame()
 {
     ScriptingCore.OnEvent("onchangegame");
 }
예제 #11
0
 public static void Prefix()
 {
     ScriptingCore.OnEvent("directupdate");
     delayedupdate();
 }
예제 #12
0
 public static void Prefix()
 {
     ScriptingCore.OnEvent("newgame");
 }
예제 #13
0
 public static void Postfix()
 {
     ScriptingCore.DebugLog("loadbuildings");
     ScriptingCore.OnEvent("loadbuildings");
 }
예제 #14
0
 public static void Prefix()
 {
     ScriptingCore.ScriptInit();
     ScriptingCore.DebugLog("preloadbuildings");
     ScriptingCore.OnEvent("preloadbuildings");
 }