Example #1
0
        public static void GenerateWorld()
        {
            ThingIDMakerPatch.stopID = true;

            ThinkTreeKeyAssigner.Reset();

            foreach (var def in DefDatabase <ThinkTreeDef> .AllDefsListForReading)
            {
                ThinkTreeKeyAssigner.AssignKeys(def.thinkRoot, 0);
            }


            if (SyncTickData.cliendID == 0)
            {
                Find.WindowStack.Add(new Dialog_SaveFileList_Load());
            }
            else
            {
                LongEventHandler.QueueLongEvent(() =>
                {
                    NetDemo.LoadFromRemoteSFD();
                    for (; NetDemo.GetSFD() == null;)
                    {
                    }
                }, "Downloading savefile".Translate(), true, e => { RimLog.Error(e.ToString()); });
            }
        }
Example #2
0
        public virtual ThinkNode DeepCopy(bool resolve = true)
        {
            ThinkNode thinkNode = (ThinkNode)Activator.CreateInstance(base.GetType());

            for (int i = 0; i < this.subNodes.Count; i++)
            {
                thinkNode.subNodes.Add(this.subNodes[i].DeepCopy(resolve));
            }
            thinkNode.priority = this.priority;
            thinkNode.leaveJoinableLordIfIssuesJob = this.leaveJoinableLordIfIssuesJob;
            thinkNode.uniqueSaveKeyInt             = this.uniqueSaveKeyInt;
            if (resolve)
            {
                thinkNode.ResolveSubnodesAndRecur();
            }
            ThinkTreeKeyAssigner.AssignSingleKey(thinkNode, 0);
            return(thinkNode);
        }