Exemple #1
0
        private void OnAttach()
        {
            BuffController buff = BuffController.MakeNewIfNone(this.block.tank);

            buff.AddBuff(this);
            base.block.tank.AnchorEvent.Subscribe(new Action <ModuleAnchor, bool, bool>(this.OnAnchor));
        }
Exemple #2
0
            static bool Prefix(ref ModuleBooster __instance)
            {
                BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank);

                buff.AddBooster(__instance);
                return(true);
            }
Exemple #3
0
            static bool Prefix(ref ModuleWheels __instance)
            {
                BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank);

                buff.RemoveWheels(__instance);
                return(true);
            }
Exemple #4
0
            static bool Prefix(ref ModuleWeaponGun __instance)
            {
                BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank);

                buff.AddWeapon(__instance);
                return(true);
            }
Exemple #5
0
            static bool Prefix(ref ModuleItemStore __instance)
            {
                BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank);

                buff.AddItemStore(__instance);
                return(true);
            }
Exemple #6
0
            static bool Prefix(ref ModuleItemProducer __instance)
            {
                BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank);

                buff.RemoveItemPro(__instance);
                return(true);
            }
Exemple #7
0
        private void OnAnchor(ModuleAnchor anchor, bool anchored, bool fromAfterTechPopulate)
        {
            BuffController buff = BuffController.MakeNewIfNone(this.block.tank);
            List <string>  list = new List <string>();

            list.AddRange(m_BuffType);
            list.Add("Anchor");
            buff.Update(list.ToArray());
        }
        private void OnDetach()
        {
            BuffController buff = BuffController.MakeNewIfNone(this.block.tank);

            if (this.pointer.GetType() == typeof(ModuleRemoteCharger))
            {
                buff.RemoveCharger((ModuleRemoteCharger)this.pointer);
            }
        }
Exemple #9
0
        private void OnDetach()
        {
            BuffController buff = BuffController.MakeNewIfNone(this.block.tank);

            buff.RemoveBuff(this);
            if (base.block.tank != null)
            {
                base.block.tank.AnchorEvent.Unsubscribe(new Action <ModuleAnchor, bool, bool>(this.OnAnchor));
            }
        }
Exemple #10
0
            static void Postfix(ref ModuleWeaponGun __instance)
            {
                BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank);

                buff.RemoveWeapon(__instance);
            }