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)); }
static bool Prefix(ref ModuleBooster __instance) { BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank); buff.AddBooster(__instance); return(true); }
static bool Prefix(ref ModuleWheels __instance) { BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank); buff.RemoveWheels(__instance); return(true); }
static bool Prefix(ref ModuleWeaponGun __instance) { BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank); buff.AddWeapon(__instance); return(true); }
static bool Prefix(ref ModuleItemStore __instance) { BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank); buff.AddItemStore(__instance); return(true); }
static bool Prefix(ref ModuleItemProducer __instance) { BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank); buff.RemoveItemPro(__instance); return(true); }
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); } }
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)); } }
static void Postfix(ref ModuleWeaponGun __instance) { BuffController buff = BuffController.MakeNewIfNone(__instance.block.tank); buff.RemoveWeapon(__instance); }