Skip to content
New issue

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

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

Already on GitHub? # to your account

Attack chain migration: laz injector. #28515

Open
wants to merge 1 commit 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
15 changes: 8 additions & 7 deletions code/modules/mining/equipment/lazarus_injector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@
var/loaded = 1
var/malfunctioning = 0
var/revive_type = SENTIENCE_ORGANIC //So you can't revive boss monsters or robots with it
new_attack_chain = TRUE

/obj/item/lazarus_injector/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag)
/obj/item/lazarus_injector/interact_with_atom(atom/target, mob/living/user, list/modifiers)
if(!loaded)
return
if(isliving(target) && proximity_flag)
return ITEM_INTERACT_COMPLETE
if(isliving(target))
if(isanimal(target))
var/mob/living/simple_animal/M = target
if(M.sentience_type != revive_type)
to_chat(user, "<span class='notice'>[src] does not work on this sort of creature.</span>")
return
return ITEM_INTERACT_COMPLETE
if(M.stat == DEAD)
M.faction = list("neutral")
M.revive()
Expand All @@ -47,13 +48,13 @@
user.visible_message("<span class='notice'>[user] injects [M] with [src], reviving it.</span>")
playsound(src,'sound/effects/refill.ogg',50,1)
icon_state = "lazarus_empty"
return
return ITEM_INTERACT_COMPLETE
else
to_chat(user, "<span class='notice'>[src] is only effective on the dead.</span>")
return
return ITEM_INTERACT_COMPLETE
else
to_chat(user, "<span class='notice'>[src] is only effective on lesser beings.</span>")
return
return ITEM_INTERACT_COMPLETE

/obj/item/lazarus_injector/emag_act(mob/user)
if(!malfunctioning)
Expand Down