8000 Fix overriden mindhack removal by JORJ949 · Pull Request #23765 · goonstation/goonstation · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix overriden mindhack removal #23765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions code/obj/item/implant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,7 @@ ABSTRACT_TYPE(/obj/item/implant/revenge)
scan_category = IMPLANT_SCAN_CATEGORY_SYNDICATE
var/uses = 1
var/expire = TRUE
var/inactive = FALSE //Has this implant been overriden on the current implantee
var/mob/implant_hacker = null // who is the person mindhacking the implanted person
var/custom_orders = null // ex: kill the captain, dance constantly, don't speak, etc

Expand Down Expand Up @@ -892,12 +893,6 @@ ABSTRACT_TYPE(/obj/item/implant/revenge)
H.show_text("<b>You resist [implant_hacker]'s attempt to mindhack you!</b>", "red")
logTheThing(LOG_COMBAT, H, "resists [constructTarget(implant_hacker,"combat")]'s attempt to mindhack them at [log_loc(H)].")
return FALSE
// Same here, basically. Multiple active implants is just asking for trouble.
H.mind?.remove_antagonist(ROLE_MINDHACK, ANTAGONIST_REMOVAL_SOURCE_OVERRIDE)
for (var/obj/item/implant/mindhack/MS in H.implant)
var/obj/item/implant/mindhack/Inew = new MS.type(H)
H.implant += Inew
qdel(MS)
return TRUE

implanted(var/mob/M, var/mob/I)
Expand All @@ -909,6 +904,14 @@ ABSTRACT_TYPE(/obj/item/implant/revenge)
M.changeStatus("stunned", 10 SECONDS)
M.changeStatus("knockdown", 8000 10 SECONDS)

//Remove any existing mindhack statuses and override existing implants
var/mob/living/carbon/human/H = M
H.mind?.remove_antagonist(ROLE_MINDHACK, ANTAGONIST_REMOVAL_SOURCE_OVERRIDE)
for (var/obj/item/implant/mindhack/MS in H.implant)
if(MS != src)
MS.inactive = TRUE
src.inactive = FALSE

if(M == I)
boutput(M, SPAN_ALERT("You feel utterly strengthened in your resolve! You are the most important person in the universe!"))
tgui_alert(M, "You feel utterly strengthened in your resolve! You are the most important person in the universe!", "YOU ARE REALY GREAT!!")
Expand All @@ -920,8 +923,10 @@ ABSTRACT_TYPE(/obj/item/implant/revenge)
on_remove(var/mob/M)
..()
src.former_implantee = M
M.delStatus("mindhack")
M.mind?.remove_antagonist(ROLE_MINDHACK, ANTAGONIST_REMOVAL_SOURCE_SURGERY)
if(!src.inactive) //If this isn't the implant currently mindhacking the owner don't remove antag status
M.delStatus("mindhack")
M.mind?.remove_antagonist(ROLE_MINDHACK, ANTAGONIST_REMOVAL_SOURCE_SURGERY)
src.inactive = FALSE //Set back to normal incase its used again
return

proc/add_orders(var/orders)
Expand All @@ -931,6 +936,11 @@ ABSTRACT_TYPE(/obj/item/implant/revenge)
if (!(copytext(src.custom_orders, -1) in list(".", "?", "!")))
src.custom_orders += "!"

/obj/item/implant/mindhack/super
name = "mindhack DELUXE implant"
expire = FALSE
uses = 2

/obj/item/implant/marionette
name = "marionette implant"
desc = "This thing looks really complicated."
Expand Down Expand Up @@ -1351,11 +1361,6 @@ ABSTRACT_TYPE(/obj/item/implant/revenge)
user.playsound_local(user, "sound/machines/tone_beep.ogg", 30)
return TRUE

/obj/item/implant/mindhack/super
name = "mindhack DELUXE implant"
expire = 0
uses = 2

/obj/item/implant/projectile
name = "bullet"
icon = 'icons/obj/scrap.dmi'
Expand Down
0