Esempio n. 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));
        }
Esempio n. 2
0
            static bool Prefix(ref ModuleBooster __instance)
            {
                BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank);

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

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

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

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

                buff.RemoveItemPro(__instance);
                return(true);
            }
Esempio n. 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);
            }
        }
Esempio n. 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));
            }
        }
Esempio n. 10
0
            static void Postfix(ref ModuleWeaponGun __instance)
            {
                BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank);

                buff.RemoveWeapon(__instance);
            }