public void saveValues() { springData savedData = this.parent.Map.GetComponent <Watcher>().activeSprings[this.getID()]; if (savedData != null) { savedData.biomeName = this.biomeName; savedData.makeAnotherAt = this.makeAnotherAt; savedData.age = this.age; savedData.status = this.status; savedData.width = this.width; } }
public override void PostSpawnSetup(bool respawningAfterLoad) { base.PostSpawnSetup(respawningAfterLoad); this.makeAnotherAt = this.Props.howOftenToChange * 4000; if (respawningAfterLoad) { springData savedData = this.parent.Map.GetComponent <Watcher>().activeSprings[this.getID()]; if (savedData != null) { this.biomeName = savedData.biomeName; this.makeAnotherAt = savedData.makeAnotherAt; this.age = savedData.age; this.status = savedData.status; this.width = savedData.width; } } else { this.status = "spawning"; this.biomeName = this.parent.Map.Biome.defName; this.width = this.Props.startingRadius; springData savedData = new springData(); savedData.springID = this.parent.ThingID; savedData.biomeName = this.biomeName; savedData.makeAnotherAt = this.makeAnotherAt; savedData.age = this.age; savedData.status = this.status; savedData.width = this.width; this.parent.Map.GetComponent <Watcher>().activeSprings.Add(this.getID(), savedData); } this.changeShape(); this.CompTickRare(); if (!respawningAfterLoad) { this.fillBorder(); } }