diff --git a/code/datums/action.dm b/code/datums/action.dm index e9856250d2e..3c5ca9b0021 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -540,16 +540,18 @@ /datum/action/innate/overdrive/Activate() var/mob/living/silicon/robot/robot = owner - if(!used) - if(do_after(robot, 10 SECONDS)) - robot.rejuvenate() - robot.opened = FALSE - robot.locked = TRUE - robot.SetEmagged(TRUE) - robot.SetLockdown(FALSE) - robot.UnlinkSelf() - used = TRUE - Remove(robot) + if(used) + return + + if(do_after(robot, 10 SECONDS)) + robot.rejuvenate() + robot.opened = FALSE + robot.locked = TRUE + robot.SetEmagged(TRUE) + robot.SetLockdown(FALSE) + robot.UnlinkSelf() + used = TRUE + Remove(robot) /datum/action/innate/overdrive/ApplyIcon() button.cut_overlays() diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 9fdd14b50c4..d7f0539d0c4 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -382,10 +382,7 @@ forceMove(new_borg) new_borg.robot_suit = src - if(new_borg.mmi.syndiemmi) - var/obj/item/mmi/syndie/syndiemmi = new_borg.mmi - if(!syndiemmi.overdrive.used) - syndiemmi.overdrive.Grant(new_borg) + new_borg.mmi.apply_effects(new_borg) if(new_borg.mmi.clock) // so robots created from vessel have magic new_borg.UnlinkSelf() diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index d76277ab331..1b6d08f7f84 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -212,6 +212,8 @@ QDEL_NULL(radio) QDEL_NULL(radio_action) +/obj/item/mmi/proc/apply_effects(mob/living/silicon/robot) + return /obj/item/mmi/emp_act(severity) if(!brainmob) @@ -255,8 +257,15 @@ desc = "Syndicate's own brand of MMI. It enforces laws designed to help Syndicate agents achieve their goals upon cyborgs created with it, but doesn't fit in Nanotrasen AI cores." origin_tech = "biotech=4;programming=4;syndicate=2" syndiemmi = 1 - var/datum/action/innate/overdrive/overdrive = new() + var/datum/action/innate/overdrive/overdrive = new +/obj/item/mmi/syndie/apply_effects(mob/living/silicon/robot/borg) + if(!overdrive.used) + overdrive.Grant(borg) + +/obj/item/mmi/syndie/Destroy() + QDEL_NULL(overdrive) + return ..() /obj/item/mmi/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/target, special = ORGAN_MANIPULATION_DEFAULT) if(!brainmob)