private void ReloadCosmicEntity(CosmicEntity entity) { var currentFavor = entity.PlayerFavor; var currentDiscovery = entity.discovered; //Remove entity DeityCache.Remove(entity); //New deity var x = new CosmicEntity(entity.def); x.AffectFavor(currentFavor); x.discovered = currentDiscovery; DeityCache.Add(x, x.Version); //Destroy deity entity.Destroy(); //Cthulhu.Utility.DebugReport("Reloaded " + entity.Label); }
public void ReloadCosmicEntity(CosmicEntity entity) { float currentFavor = entity.PlayerFavor; bool currentDiscovery = entity.discovered; //Remove entity DeityCache.Remove(entity); //New deity CosmicEntity x = new CosmicEntity(entity.def); x.AffectFavor(currentFavor); x.discovered = currentDiscovery; DeityCache.Add(x, x.Version); //Destroy deity entity.Destroy(0); //Cthulhu.Utility.DebugReport("Reloaded " + entity.Label); return; }