public DungeonOptions() { Restrictions = new DungeonRestrictions(); Rules = new DungeonRules(); Sounds = new DungeonSounds(); PetGiveDamageScalar = DefPetGiveDamageScalar; PetTakeDamageScalar = DefPetTakeDamageScalar; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); var version = reader.GetVersion(); switch (version) { case 1: { PetGiveDamageScalar = reader.ReadDouble(); PetTakeDamageScalar = reader.ReadDouble(); } goto case 0; case 0: { reader.ReadBlock(r => Restrictions = r.ReadTypeCreate <DungeonRestrictions>(r)); reader.ReadBlock(r => Rules = r.ReadTypeCreate <DungeonRules>(r)); reader.ReadBlock(r => Sounds = r.ReadTypeCreate <DungeonSounds>(r)); } break; } if (Restrictions == null) { Restrictions = new DungeonRestrictions(); } if (Rules == null) { Rules = new DungeonRules(); } if (Sounds == null) { Sounds = new DungeonSounds(); } }