示例#1
0
        public virtual void StageA()
        {
            //StageA performed after all ThingDefs are finalized.
            if (lastToProcess == null)
            {
                //Firstrun routine, required for proper StageB initialization.
                lastToProcess = DefDatabase<Redefine>.AllDefsListForReading.Last();
                Log.Warning("Static Stage 0");
            }

            //Both disabled and active redefines at this stage generate transactions.
            //After all transactions are generated, redefines registered for StageB
            //given chance to review and modify transactions.
            //After all changes are done, transactions merged following priority rules and then merged with database
            Log.Warning(this.ToString() + " Stage 1");

            if (this == lastToProcess)
            {
                //StageA is finished
                //Starting StageB
                Log.Warning("Static Stage 2");

                //ThingDef humanovveride = ThingDef.Named("Human");
                //humanovveride.thingClass = typeof(GazePawn);
            }
        }