Ejemplo n.º 1
0
        private static void AddAirTurretTurretSettings()
        {
            var turretSettings = new Turret.TurretSetting
            {
                TurretItem = Turret.TurretTypes[AIRTURRET],
                Ammo       = new List <InventoryItem> {
                    new InventoryItem(AirStone.Item.ItemIndex)
                },
                AmmoValue           = 0.02f,
                AmmoReloadValue     = 0.5f,
                DurabilityPerDoWork = 0.008f,
                FuelPerDoWork       = 0.02f,
                Name           = AIRTURRET,
                OnShootAudio   = AIRTURRET_NAMESPACE,
                OnHitAudio     = AIRTURRET_NAMESPACE,
                Range          = 25,
                WorkTime       = 13f,
                RefuelTime     = 15,
                ReloadTime     = 15,
                RepairTime     = 20,
                RequiredForFix = new Dictionary <float, List <InventoryItem> >
                {
                    {
                        75f,
                        new List <InventoryItem>
                        {
                            new InventoryItem(BuiltinBlocks.StoneBricks, 10),
                            new InventoryItem(Mana.Item.ItemIndex, 1),
                            new InventoryItem(BuiltinBlocks.CopperNails, 1)
                        }
                    },
                    {
                        50f,
                        new List <InventoryItem>
                        {
                            new InventoryItem(BuiltinBlocks.StoneBricks, 10),
                            new InventoryItem(Mana.Item.ItemIndex, 2),
                            new InventoryItem(BuiltinBlocks.CopperNails, 2)
                        }
                    },
                    {
                        30f,
                        new List <InventoryItem>
                        {
                            new InventoryItem(BuiltinBlocks.StoneBricks, 15),
                            new InventoryItem(BuiltinBlocks.Planks, 1),
                            new InventoryItem(Mana.Item.ItemIndex, 3),
                            new InventoryItem(BuiltinBlocks.CopperNails, 3),
                            new InventoryItem(Esper.Item.ItemIndex, 1)
                        }
                    },
                    {
                        10f,
                        new List <InventoryItem>
                        {
                            new InventoryItem(BuiltinBlocks.StoneBricks, 20),
                            new InventoryItem(BuiltinBlocks.Planks, 1),
                            new InventoryItem(Mana.Item.ItemIndex, 4),
                            new InventoryItem(BuiltinBlocks.CopperNails, 4),
                            new InventoryItem(Esper.Item.ItemIndex, 2)
                        }
                    }
                },
                ProjectileAnimation = AnimationManager.AnimatedObjects[AnimationManager.LEADBULLET]
            };

            turretSettings.Damage[DamageType.Air]      = 400;
            turretSettings.Damage[DamageType.Physical] = 100;

            Turret.TurretSettings[AIRTURRET] = turretSettings;
        }
Ejemplo n.º 2
0
 public TurretRegister(Turret.TurretSetting setting)
 {
     name      = setting.Name;
     WorkTime  = setting.WorkTime;
     ItemIndex = ItemId.GetItemId(Turret.TurretTypes[setting.Name].ItemIndex);
 }
Ejemplo n.º 3
0
        private static void AddAirTurretTurretSettings()
        {
            var turretSettings = new Turret.TurretSetting
            {
                TurretItem = Turret.TurretTypes[AIRTURRET_NAMESPACE],
                Ammo       = new List <InventoryItem> {
                    new InventoryItem(AirStone.Item.ItemIndex)
                },
                AmmoValue           = 0.02f,
                AmmoReloadValue     = 0.5f,
                DurabilityPerDoWork = 0.008f,
                FuelPerDoWork       = 0.02f,
                Name           = AIRTURRET_NAMESPACE,
                OnShootAudio   = AIRTURRET_NAMESPACE,
                OnHitAudio     = AIRTURRET_NAMESPACE,
                Range          = 25,
                WorkTime       = 13f,
                RefuelTime     = 15,
                ReloadTime     = 15,
                RepairTime     = 20,
                RequiredForFix = new Dictionary <float, List <InventoryItem> >
                {
                    {
                        75f,
                        new List <InventoryItem>
                        {
                            new InventoryItem(ColonyBuiltIn.ItemTypes.STONEBRICKS.Name, 10),
                            new InventoryItem(SettlersBuiltIn.ItemTypes.MANA.Name, 1),
                            new InventoryItem(ColonyBuiltIn.ItemTypes.COPPERNAILS.Name, 1)
                        }
                    },
                    {
                        50f,
                        new List <InventoryItem>
                        {
                            new InventoryItem(ColonyBuiltIn.ItemTypes.STONEBRICKS.Name, 10),
                            new InventoryItem(SettlersBuiltIn.ItemTypes.MANA.Name, 2),
                            new InventoryItem(ColonyBuiltIn.ItemTypes.COPPERNAILS.Name, 2)
                        }
                    },
                    {
                        30f,
                        new List <InventoryItem>
                        {
                            new InventoryItem(ColonyBuiltIn.ItemTypes.STONEBRICKS.Name, 15),
                            new InventoryItem(ColonyBuiltIn.ItemTypes.PLANKS.Name, 1),
                            new InventoryItem(SettlersBuiltIn.ItemTypes.MANA.Name, 3),
                            new InventoryItem(ColonyBuiltIn.ItemTypes.COPPERNAILS.Name, 3),
                            new InventoryItem(Esper.Item.ItemIndex, 1)
                        }
                    },
                    {
                        10f,
                        new List <InventoryItem>
                        {
                            new InventoryItem(ColonyBuiltIn.ItemTypes.STONEBRICKS.Name, 20),
                            new InventoryItem(ColonyBuiltIn.ItemTypes.PLANKS.Name, 1),
                            new InventoryItem(SettlersBuiltIn.ItemTypes.MANA.Name, 4),
                            new InventoryItem(ColonyBuiltIn.ItemTypes.COPPERNAILS.Name, 4),
                            new InventoryItem(Esper.Item.ItemIndex, 2)
                        }
                    }
                },
                ProjectileAnimation = AnimationManager.AnimatedObjects[AnimationManager.LEADBULLET]
            };

            turretSettings.Damage[DamageType.Air]      = 400;
            turretSettings.Damage[DamageType.Physical] = 100;

            Turret.TurretSettings[AIRTURRET_NAMESPACE] = turretSettings;
        }