Exemplo n.º 1
0
 protected override void PrepareDefense(DefenseDescription defense)
 {
     defense.Set(
         impact: 0.50,
         kinetic: 0.50,
         explosion: 0.60,
         heat: 0.80,
         cold: 0.65,
         chemical: 0.75,
         radiation: 0.75,
         psi: 0.70);
 }
Exemplo n.º 2
0
 protected override void PrepareDefense(DefenseDescription defense)
 {
     defense.Set(
         impact: 0.45,
         kinetic: 0.35,
         explosion: 0.40,
         heat: 0.25,
         cold: 0.50,
         chemical: 0.15,
         radiation: 0.15,
         psi: 0.0);
 }
Exemplo n.º 3
0
 protected override void PrepareDefense(DefenseDescription defense)
 {
     defense.Set(
         impact: 0.40,
         kinetic: 0.30,
         heat: 0.20,
         cold: 0.20,
         chemical: 0.10,
         electrical: 0.15,
         radiation: 0.15,
         psi: 0);
 }
Exemplo n.º 4
0
 protected override void PrepareDefense(DefenseDescription defense)
 {
     defense.Set(
         impact: 0.65,
         kinetic: 0.75,
         heat: 0.3,
         cold: 0.3,
         chemical: 0.4,
         electrical: 0.4,
         radiation: 0.3,
         psi: 0.0);
 }
Exemplo n.º 5
0
        protected override void PrepareDefense(DefenseDescription defense)
        {
            defense.Set(
                impact: 0.45,
                kinetic: 0.30,
                heat: 0.10,
                cold: 0.10,
                chemical: 0.25,
                electrical: 0.00,
                radiation: 0.25,
                psi: 0.0);

            // normal value override, we don't want it to be affected by armor multiplier later
            defense.Psi = 0.6 / defense.Multiplier;
        }
Exemplo n.º 6
0
        protected override void PrepareDefense(DefenseDescription defense)
        {
            defense.Set(
                impact: 0.0,
                kinetic: 0.0,
                explosion: 0.0,
                heat: 0.0,
                cold: 0.0,
                chemical: 0.0,
                radiation: 0.0,
                psi: 0.0);

            // normal value override, we don't want it to be affected by armor multiplier later
            defense.Chemical  = 0.2 / defense.Multiplier;
            defense.Radiation = 0.4 / defense.Multiplier;
        }
        protected sealed override void PrepareProtoWorldObject()
        {
            base.PrepareProtoWorldObject();

            var defaultTexture = this.PrepareDefaultTexture(this.GetType());

            if (defaultTexture is ITextureAtlasResource defaultTextureAtlas &&
                !(defaultTexture is ITextureAtlasChunkResource))
            {
                // use the first chunk of the atlas texture
                defaultTexture = defaultTextureAtlas.Chunk(0, 0);
            }

            this.DefaultTexture = defaultTexture;

            var layout = new StaticObjectLayout();

            this.CreateLayout(layout);
            this.Layout = layout.ToReadOnly();

            var defenseDescription = new DefenseDescription();

            // Set default defense for static objects. By default there is no defense except for psi and radiation which are set to Max.
            // Individual objects will override this value with some specific tier of defense in their own class.
            defenseDescription.Set(ObjectDefensePresets.Default);

            this.PrepareDefense(defenseDescription);
            var defense = defenseDescription.ToReadOnly();

            using (var effects = TempStatsCache.GetFromPool(isMultipliersSummed: true))
            {
                defense.FillEffects(this, effects, maximumDefensePercent: double.MaxValue);
                this.DefenseStats = effects.CalculateFinalStatsCache();
            }

            this.PrepareProtoStaticWorldObject();
        }
Exemplo n.º 8
0
 protected override void PrepareDefense(DefenseDescription defense)
 {
     defense.Set(ObjectDefensePresets.Tier5);
 }