Exemplo n.º 1
0
        private void AddStatsFromUpgrade(Comp_ShieldUpgrade comp)
        {
            CompProperties_ShieldUpgrade _Properties = ((CompProperties_ShieldUpgrade)comp.props);

            Patch.Patcher.LogNULL(_Properties, "_Properties");

            this.m_FieldIntegrity_Max   += _Properties.FieldIntegrity_Increase;
            this.m_FieldRadius_Avalable += _Properties.Range_Increase;

            //Power
            this.m_PowerRequired += _Properties.PowerUsage_Increase;

            if (_Properties.DropPodIntercept)
            {
                this.m_InterceptDropPod_Avalable = true;
            }

            if (_Properties.IdentifyFriendFoe)
            {
                //Log.Message("Setting IFF");
                this.m_IdentifyFriendFoe_Avalable = true;
            }

            if (_Properties.SlowDischarge)
            {
                this.SlowDischarge_Active = true;
            }
        }
Exemplo n.º 2
0
        public override void PostSpawnSetup(bool respawningAfterLoad)
        {
            base.PostSpawnSetup(respawningAfterLoad);

            this.Properties = ((CompProperties_ShieldUpgrade)this.props);

            this.parent.Map.GetComponent <ShieldManagerMapComp>().RecalaculateAll();
        }