Worms4Editor/LibW4M/Data/Schemes/SchemeData.cs

572 lines
35 KiB
C#

using LibXom.Data;
using LibXom.Streams;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LibW4M.Data.Schemes
{
public class SchemeData : SaveDataEntry
{
public override string FriendlyName
{
get
{
return this.Name.Value;
}
}
public XomString Name;
public bool Permanant;
public XomString Lock;
public WeaponSettingsData Airstrike;
public WeaponSettingsData BananaBomb;
public WeaponSettingsData BaseballBat;
public WeaponSettingsData Bazooka;
public WeaponSettingsData ClusterGrenade;
public WeaponSettingsData ConcreteDonkey;
public WeaponSettingsData CrateShower;
public WeaponSettingsData CrateSpy;
public WeaponSettingsData DoubleDamage;
public WeaponSettingsData Dynamite;
public WeaponSettingsData FirePunch;
public WeaponSettingsData GasCanister;
public WeaponSettingsData Girder;
public WeaponSettingsData Grenade;
public WeaponSettingsData HolyHandGrenade;
public WeaponSettingsData HomingMissile;
public WeaponSettingsData Jetpack;
public WeaponSettingsData Landmine;
public WeaponSettingsData NinjaRope;
public WeaponSettingsData OldWoman;
public WeaponSettingsData Parachute;
public WeaponSettingsData Prod;
public WeaponSettingsData SelectWorm;
public WeaponSettingsData Sheep;
public WeaponSettingsData Shotgun;
public WeaponSettingsData SkipGo;
public WeaponSettingsData SuperSheep;
public WeaponSettingsData Redbull;
public WeaponSettingsData Flood;
public WeaponSettingsData Armour;
public WeaponSettingsData WeaponFactoryWeapon;
public WeaponSettingsData AlienAbduction;
public WeaponSettingsData Fatkins;
public WeaponSettingsData Scouser;
public WeaponSettingsData NoMoreNails;
public WeaponSettingsData PoisonArrow;
public WeaponSettingsData SentryGun;
public WeaponSettingsData SniperRifle;
public WeaponSettingsData SuperAirstrike;
public WeaponSettingsData BubbleTrouble;
public WeaponSettingsData Starburst;
public WeaponSettingsData Surrender;
public WeaponSettingsData MineLayerMystery;
public WeaponSettingsData MineTripletMystery;
public WeaponSettingsData BarrelTripletMystery;
public WeaponSettingsData FloodMystery;
public WeaponSettingsData DisarmMystery;
public WeaponSettingsData TeleportMystery;
public WeaponSettingsData QuickWalkMystery;
public WeaponSettingsData LowGravityMystery;
public WeaponSettingsData DoubleTurnTimeMystery;
public WeaponSettingsData HealthMystery;
public WeaponSettingsData DamageMystery;
public WeaponSettingsData SuperHealthMystery;
public WeaponSettingsData SpecialWeaponMystery;
public WeaponSettingsData BadPoisonMystery;
public WeaponSettingsData GoodPoisonMystery;
public int ArtileryMode;
public int TeleportIn;
public int Wins;
public int WormSelect;
public int WormHealth;
public int RoundTime;
public int TurnTime;
public LandObjects Objects;
public int RandomCrateChancePerTurn;
public int MysteryChance;
public int WeaponChance;
public int UtilityChance;
public int HealthChance;
public int HealthInCrates;
public Stockpiling Stockpiling;
public SuddenDeath SuddenDeath;
public WaterSpeed WaterSpeed;
public int DisplayTime;
public int LandTime;
public int RopeTime;
public int FallDamage;
public int HotSeat;
public int Special;
public int MineFuse;
public int HelpPanelDelay;
public bool MineFactoryOn;
public bool TelepadsOn;
public int WindMaxStrength;
public SchemeData(W4SaveFile fileBelongs, XomContainer mainContainer, bool load=true) : base(fileBelongs, mainContainer, load)
{
}
public override void Load()
{
using (XomStreamReader reader = new XomStreamReader(new MemoryStream(this.mainContainer.GetData())))
{
reader.Skip(3);
this.Name = fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
this.Permanant = reader.ReadBool();
this.Lock = fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
// Read WeaponSettingsData
this.Airstrike = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.BananaBomb = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.BaseballBat = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Bazooka = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.ClusterGrenade = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.ConcreteDonkey = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.CrateShower = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.CrateSpy = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.DoubleDamage = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Dynamite = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.FirePunch = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.GasCanister = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Girder = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Grenade = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.HolyHandGrenade = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.HomingMissile = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Jetpack = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Landmine = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.NinjaRope = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.OldWoman = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Parachute = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Prod = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.SelectWorm = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Sheep = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Shotgun = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.SkipGo = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.SuperSheep = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Redbull = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Flood = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Armour = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.WeaponFactoryWeapon = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.AlienAbduction = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Fatkins = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Scouser = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.NoMoreNails = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.PoisonArrow = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.SentryGun = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.SniperRifle = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.SuperAirstrike = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.BubbleTrouble = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Starburst = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.Surrender = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.MineLayerMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.MineTripletMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.BarrelTripletMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.FloodMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.DisarmMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.TeleportMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.QuickWalkMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.LowGravityMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.DoubleTurnTimeMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.HealthMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.DamageMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.SuperHealthMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.SpecialWeaponMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.BadPoisonMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.GoodPoisonMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
this.ArtileryMode = reader.ReadInt32();
this.TeleportIn = reader.ReadInt32();
this.Wins = reader.ReadInt32();
this.WormSelect = reader.ReadInt32();
this.WormHealth = reader.ReadInt32();
this.RoundTime = reader.ReadInt32();
this.TurnTime = reader.ReadInt32();
this.Objects = (LandObjects)reader.ReadInt32();
this.RandomCrateChancePerTurn = reader.ReadInt32();
this.MysteryChance = reader.ReadInt32();
this.WeaponChance = reader.ReadInt32();
this.UtilityChance = reader.ReadInt32();
this.HealthChance = reader.ReadInt32();
this.HealthInCrates = reader.ReadInt32();
this.Stockpiling = (Stockpiling)reader.ReadInt32();
this.SuddenDeath = (SuddenDeath)reader.ReadInt32();
this.WaterSpeed = (WaterSpeed)reader.ReadInt32();
this.DisplayTime = reader.ReadInt32();
this.LandTime = reader.ReadInt32();
this.RopeTime = reader.ReadInt32();
this.FallDamage = reader.ReadInt32();
this.HotSeat = reader.ReadInt32();
this.Special = reader.ReadInt32();
this.MineFuse = reader.ReadInt32();
this.HelpPanelDelay = reader.ReadInt32();
this.MineFactoryOn = reader.ReadBool();
this.TelepadsOn = reader.ReadBool();
this.WindMaxStrength = reader.ReadInt32();
}
}
internal override void loadDefaults()
{
this.Name = this.fileBelongs.LookupString("Untitled Scheme");
this.Permanant = false;
this.Lock = this.fileBelongs.LookupString("");
this.Airstrike = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.BananaBomb = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.BaseballBat = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Bazooka = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.ClusterGrenade = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.ConcreteDonkey = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.CrateShower = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.CrateSpy = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.DoubleDamage = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Dynamite = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.FirePunch = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.GasCanister = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Girder = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Grenade = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.HolyHandGrenade = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.HomingMissile = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Jetpack = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Landmine = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.NinjaRope = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.OldWoman = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Parachute = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Prod = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.SelectWorm = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Sheep = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Shotgun = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.SkipGo = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.SuperSheep = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Redbull = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Flood = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Armour = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.WeaponFactoryWeapon = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.AlienAbduction = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Fatkins = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Scouser = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.NoMoreNails = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.PoisonArrow = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.SentryGun = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.SniperRifle = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.SuperAirstrike = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.BubbleTrouble = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Starburst = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Surrender = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.MineLayerMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.MineTripletMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.BarrelTripletMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.FloodMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.DisarmMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.TeleportMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.QuickWalkMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.LowGravityMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.DoubleTurnTimeMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.HealthMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.DamageMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.SuperHealthMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.SpecialWeaponMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.BadPoisonMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.GoodPoisonMystery = new WeaponSettingsData(this.fileBelongs, this.fileBelongs.CreateContainer("WeaponSettingsData"), false);
this.Surrender.Ammo = -1;
this.SkipGo.Ammo = -1;
this.CrateShower.Crate = 50;
this.CrateSpy.Crate = 50;
this.DoubleDamage.Crate = 50;
this.Armour.Crate = 50;
this.MineTripletMystery.Crate = 40;
this.MineLayerMystery.Crate = 30;
this.BarrelTripletMystery.Crate = 40;
this.FloodMystery.Crate = 50;
this.DisarmMystery.Crate = 40;
this.TeleportMystery.Crate = 60;
this.QuickWalkMystery.Crate = 70;
this.LowGravityMystery.Crate = 70;
this.DoubleTurnTimeMystery.Crate = 60;
this.SuperHealthMystery.Crate = 70;
this.DamageMystery.Crate = 40;
this.SuperHealthMystery.Crate = 70;
this.SpecialWeaponMystery.Crate = 50;
this.BadPoisonMystery.Crate = 20;
this.GoodPoisonMystery.Crate = 30;
this.ArtileryMode = 0;
this.TeleportIn = 0;
this.Wins = 2;
this.WormSelect = 0;
this.WormHealth = 100;
this.RoundTime = 1800000;
this.TurnTime = 30000;
this.Objects = LandObjects.Full;
this.RandomCrateChancePerTurn = 30;
this.MysteryChance = 20;
this.WeaponChance = 30;
this.UtilityChance = 20;
this.HealthChance = 30;
this.HealthInCrates = 25;
this.Stockpiling = Stockpiling.Normal;
this.SuddenDeath = SuddenDeath.OneHealth;
this.WaterSpeed = WaterSpeed.Medium;
this.DisplayTime = 1;
this.LandTime = 3000;
this.RopeTime = 5000;
this.FallDamage = 1;
this.HotSeat = 10000;
this.Special = 0;
this.HelpPanelDelay = 3000;
this.TelepadsOn = true;
this.MineFactoryOn = true;
this.WindMaxStrength = 10;
base.loadDefaults();
}
public override void DeleteEntries()
{
this.Airstrike.DeleteEntries();
this.BananaBomb.DeleteEntries();
this.BaseballBat.DeleteEntries();
this.Bazooka.DeleteEntries();
this.ClusterGrenade.DeleteEntries();
this.ConcreteDonkey.DeleteEntries();
this.CrateShower.DeleteEntries();
this.CrateSpy.DeleteEntries();
this.DoubleDamage.DeleteEntries();
this.Dynamite.DeleteEntries();
this.FirePunch.DeleteEntries();
this.GasCanister.DeleteEntries();
this.Girder.DeleteEntries();
this.Grenade.DeleteEntries();
this.HolyHandGrenade.DeleteEntries();
this.HomingMissile.DeleteEntries();
this.Jetpack.DeleteEntries();
this.Landmine.DeleteEntries();
this.NinjaRope.DeleteEntries();
this.OldWoman.DeleteEntries();
this.Parachute.DeleteEntries();
this.Prod.DeleteEntries();
this.SelectWorm.DeleteEntries();
this.Sheep.DeleteEntries();
this.Shotgun.DeleteEntries();
this.SkipGo.DeleteEntries();
this.SuperSheep.DeleteEntries();
this.Redbull.DeleteEntries();
this.Flood.DeleteEntries();
this.Armour.DeleteEntries();
this.WeaponFactoryWeapon.DeleteEntries();
this.AlienAbduction.DeleteEntries();
this.Fatkins.DeleteEntries();
this.Scouser.DeleteEntries();
this.NoMoreNails.DeleteEntries();
this.PoisonArrow.DeleteEntries();
this.SentryGun.DeleteEntries();
this.SniperRifle.DeleteEntries();
this.SuperAirstrike.DeleteEntries();
this.BubbleTrouble.DeleteEntries();
this.Starburst.DeleteEntries();
this.Surrender.DeleteEntries();
this.MineLayerMystery.DeleteEntries();
this.MineTripletMystery.DeleteEntries();
this.BarrelTripletMystery.DeleteEntries();
this.FloodMystery.DeleteEntries();
this.DisarmMystery.DeleteEntries();
this.TeleportMystery.DeleteEntries();
this.QuickWalkMystery.DeleteEntries();
this.LowGravityMystery.DeleteEntries();
this.DoubleTurnTimeMystery.DeleteEntries();
this.HealthMystery.DeleteEntries();
this.DamageMystery.DeleteEntries();
this.SuperHealthMystery.DeleteEntries();
this.SpecialWeaponMystery.DeleteEntries();
this.BadPoisonMystery.DeleteEntries();
this.GoodPoisonMystery.DeleteEntries();
base.DeleteEntries();
}
public override void Save()
{
// Save all WeaponSettingsData.
this.Airstrike.Save();
this.BananaBomb.Save();
this.BaseballBat.Save();
this.Bazooka.Save();
this.ClusterGrenade.Save();
this.ConcreteDonkey.Save();
this.CrateShower.Save();
this.CrateSpy.Save();
this.DoubleDamage.Save();
this.Dynamite.Save();
this.FirePunch.Save();
this.GasCanister.Save();
this.Girder.Save();
this.Grenade.Save();
this.HolyHandGrenade.Save();
this.HomingMissile.Save();
this.Jetpack.Save();
this.Landmine.Save();
this.NinjaRope.Save();
this.OldWoman.Save();
this.Parachute.Save();
this.Prod.Save();
this.SelectWorm.Save();
this.Sheep.Save();
this.Shotgun.Save();
this.SkipGo.Save();
this.SuperSheep.Save();
this.Redbull.Save();
this.Flood.Save();
this.Armour.Save();
this.WeaponFactoryWeapon.Save();
this.AlienAbduction.Save();
this.Fatkins.Save();
this.Scouser.Save();
this.NoMoreNails.Save();
this.PoisonArrow.Save();
this.SentryGun.Save();
this.SniperRifle.Save();
this.SuperAirstrike.Save();
this.BubbleTrouble.Save();
this.Starburst.Save();
this.Surrender.Save();
this.MineLayerMystery.Save();
this.MineTripletMystery.Save();
this.BarrelTripletMystery.Save();
this.FloodMystery.Save();
this.DisarmMystery.Save();
this.TeleportMystery.Save();
this.QuickWalkMystery.Save();
this.LowGravityMystery.Save();
this.DoubleTurnTimeMystery.Save();
this.HealthMystery.Save();
this.DamageMystery.Save();
this.SuperHealthMystery.Save();
this.SpecialWeaponMystery.Save();
this.BadPoisonMystery.Save();
this.GoodPoisonMystery.Save();
// Save scheme
using (MemoryStream ms = new MemoryStream())
{
using (XomStreamWriter writer = new XomStreamWriter(ms))
{
writer.Skip(3);
writer.WriteCompressedInt(this.Name.Id);
writer.WriteBool(this.Permanant);
writer.WriteCompressedInt(this.Lock.Id);
writer.WriteCompressedInt(this.Airstrike.mainContainer.Id);
writer.WriteCompressedInt(this.BananaBomb.mainContainer.Id);
writer.WriteCompressedInt(this.BaseballBat.mainContainer.Id);
writer.WriteCompressedInt(this.Bazooka.mainContainer.Id);
writer.WriteCompressedInt(this.ClusterGrenade.mainContainer.Id);
writer.WriteCompressedInt(this.ConcreteDonkey.mainContainer.Id);
writer.WriteCompressedInt(this.CrateShower.mainContainer.Id);
writer.WriteCompressedInt(this.CrateSpy.mainContainer.Id);
writer.WriteCompressedInt(this.DoubleDamage.mainContainer.Id);
writer.WriteCompressedInt(this.Dynamite.mainContainer.Id);
writer.WriteCompressedInt(this.FirePunch.mainContainer.Id);
writer.WriteCompressedInt(this.GasCanister.mainContainer.Id);
writer.WriteCompressedInt(this.Girder.mainContainer.Id);
writer.WriteCompressedInt(this.Grenade.mainContainer.Id);
writer.WriteCompressedInt(this.HolyHandGrenade.mainContainer.Id);
writer.WriteCompressedInt(this.HomingMissile.mainContainer.Id);
writer.WriteCompressedInt(this.Jetpack.mainContainer.Id);
writer.WriteCompressedInt(this.Landmine.mainContainer.Id);
writer.WriteCompressedInt(this.NinjaRope.mainContainer.Id);
writer.WriteCompressedInt(this.OldWoman.mainContainer.Id);
writer.WriteCompressedInt(this.Parachute.mainContainer.Id);
writer.WriteCompressedInt(this.Prod.mainContainer.Id);
writer.WriteCompressedInt(this.SelectWorm.mainContainer.Id);
writer.WriteCompressedInt(this.Sheep.mainContainer.Id);
writer.WriteCompressedInt(this.Shotgun.mainContainer.Id);
writer.WriteCompressedInt(this.SkipGo.mainContainer.Id);
writer.WriteCompressedInt(this.SuperSheep.mainContainer.Id);
writer.WriteCompressedInt(this.Redbull.mainContainer.Id);
writer.WriteCompressedInt(this.Flood.mainContainer.Id);
writer.WriteCompressedInt(this.Armour.mainContainer.Id);
writer.WriteCompressedInt(this.WeaponFactoryWeapon.mainContainer.Id);
writer.WriteCompressedInt(this.AlienAbduction.mainContainer.Id);
writer.WriteCompressedInt(this.Fatkins.mainContainer.Id);
writer.WriteCompressedInt(this.Scouser.mainContainer.Id);
writer.WriteCompressedInt(this.NoMoreNails.mainContainer.Id);
writer.WriteCompressedInt(this.PoisonArrow.mainContainer.Id);
writer.WriteCompressedInt(this.SentryGun.mainContainer.Id);
writer.WriteCompressedInt(this.SniperRifle.mainContainer.Id);
writer.WriteCompressedInt(this.SuperAirstrike.mainContainer.Id);
writer.WriteCompressedInt(this.BubbleTrouble.mainContainer.Id);
writer.WriteCompressedInt(this.Starburst.mainContainer.Id);
writer.WriteCompressedInt(this.Surrender.mainContainer.Id);
writer.WriteCompressedInt(this.MineLayerMystery.mainContainer.Id);
writer.WriteCompressedInt(this.MineTripletMystery.mainContainer.Id);
writer.WriteCompressedInt(this.BarrelTripletMystery.mainContainer.Id);
writer.WriteCompressedInt(this.FloodMystery.mainContainer.Id);
writer.WriteCompressedInt(this.DisarmMystery.mainContainer.Id);
writer.WriteCompressedInt(this.TeleportMystery.mainContainer.Id);
writer.WriteCompressedInt(this.QuickWalkMystery.mainContainer.Id);
writer.WriteCompressedInt(this.LowGravityMystery.mainContainer.Id);
writer.WriteCompressedInt(this.DoubleTurnTimeMystery.mainContainer.Id);
writer.WriteCompressedInt(this.HealthMystery.mainContainer.Id);
writer.WriteCompressedInt(this.DamageMystery.mainContainer.Id);
writer.WriteCompressedInt(this.SuperHealthMystery.mainContainer.Id);
writer.WriteCompressedInt(this.SpecialWeaponMystery.mainContainer.Id);
writer.WriteCompressedInt(this.BadPoisonMystery.mainContainer.Id);
writer.WriteCompressedInt(this.GoodPoisonMystery.mainContainer.Id);
writer.WriteInt32(this.ArtileryMode);
writer.WriteInt32(this.TeleportIn);
writer.WriteInt32(this.Wins);
writer.WriteInt32(this.WormSelect);
writer.WriteInt32(this.WormHealth);
writer.WriteInt32(this.RoundTime);
writer.WriteInt32(this.TurnTime);
writer.WriteInt32((int)this.Objects);
writer.WriteInt32(this.RandomCrateChancePerTurn);
writer.WriteInt32(this.MysteryChance);
writer.WriteInt32(this.WeaponChance);
writer.WriteInt32(this.UtilityChance);
writer.WriteInt32(this.HealthChance);
writer.WriteInt32(this.HealthInCrates);
writer.WriteInt32((int)this.Stockpiling);
writer.WriteInt32((int)this.SuddenDeath);
writer.WriteInt32((int)this.WaterSpeed);
writer.WriteInt32(this.DisplayTime);
writer.WriteInt32(this.LandTime);
writer.WriteInt32(this.RopeTime);
writer.WriteInt32(this.FallDamage);
writer.WriteInt32(this.HotSeat);
writer.WriteInt32(this.Special);
writer.WriteInt32(this.MineFuse);
writer.WriteInt32(this.HelpPanelDelay);
writer.WriteBool(this.MineFactoryOn);
writer.WriteBool(this.TelepadsOn);
writer.WriteInt32(this.WindMaxStrength);
ms.Seek(0x00, SeekOrigin.Begin);
mainContainer.SetData(ms.ToArray());
}
}
}
}
}