Пример #1
0
        public ShipModule SourceObject()
        {
            if (this.CraftMaterials == null)
            {
                this.CraftMaterials = new Dictionary <string, int>();
            }

            ShipModule result = new ShipModule(
                (ShipModelSlotType)this.SlotType,
                this.ModuleId,
                this.Level,
                this.Name,
                (Workshop)this.Workshop,
                this.TemplateId,
                this.CraftMaterials,
                Difficulty.none
                );

            result.SetPrefab(this.Prefab);
            result.SetHP(this.HP);
            result.SetHold(this.Hold);
            result.SetCommonResist(this.Resist);
            result.SetAcidResist(this.acidResist);
            result.SetLaserResist(this.laserResist);
            result.SetRocketResist(this.rocketResist);
            result.SetSpeed(this.Speed);
            result.SetDamageBonus(this.DamageBonus);
            result.SetColor((ObjectColor)this.Color);
            result.SetSkill(this.Skill);
            result.SetSet(this.SetID);
            result.SetCritChance(this.CritChance);
            result.SetCritDamage(this.CritDamage);
            result.SetEnergyBonus(this.energyBonus);
            result.SetSpeedBonus(this.speedBonus);
            result.SetHoldBonus(this.holdBonus);

            return(result);
        }