From ab4911f0face4aaee9df570b9c9b7ad986019ed6 Mon Sep 17 00:00:00 2001 From: "Wowzewow (Wezzy)" <42310821+alsoandanswer@users.noreply.github.com> Date: Wed, 22 Jul 2020 00:00:00 +0800 Subject: [PATCH] Fixes lazarus injectors. (#9419) --- code/modules/mining/mine_items.dm | 16 ++++++-- html/changelogs/wezzy_lazarusinjectorfix.yml | 42 ++++++++++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 html/changelogs/wezzy_lazarusinjectorfix.yml diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 0f1bb34620d..4218c268207 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -768,6 +768,7 @@ throw_speed = 3 throw_range = 5 var/loaded = TRUE + var/emagged = FALSE var/malfunctioning = FALSE var/revive_type = TYPE_ORGANIC //So you can't revive boss monsters or robots with it origin_tech = list(TECH_BIO = 7, TECH_MATERIAL = 4) @@ -782,12 +783,14 @@ to_chat(user, SPAN_INFO("\The [src] does not work on this sort of creature.")) return if(M.stat == DEAD) - if(!malfunctioning) - M.faction = "neutral" + if(emagged) //if emagged, will set anything revived to the user's faction. convert station pets to the traitor side! + M.faction = user.faction + if(malfunctioning) //when EMP'd, will set the mob faction to its initial faction, so any taming will be reverted. + M.faction = initial(M.faction) M.revive() M.icon_state = M.icon_living loaded = FALSE - user.visible_message(SPAN_NOTICE("\The [user] injects \the [M] with \the [src], reviving it.")) + user.visible_message(SPAN_NOTICE("\The [user] revives \the [M] by injecting it with \the [src].")) feedback_add_details("lazarus_injector", "[M.type]") playsound(src, 'sound/effects/refill.ogg', 50, TRUE) return @@ -802,11 +805,16 @@ if(!malfunctioning) malfunctioning = TRUE +/obj/item/lazarus_injector/emag_act(mob/user) + if(!emagged) + to_chat(user, SPAN_WARNING("You overload \the [src]'s injection matrix.")) + emagged = TRUE + /obj/item/lazarus_injector/examine(mob/user) ..() if(!loaded) to_chat(user, SPAN_INFO("\The [src] is empty.")) - if(malfunctioning) + if(malfunctioning || emagged) to_chat(user, SPAN_INFO("The display on \the [src] seems to be flickering.")) /**********************Point Transfer Card**********************/ diff --git a/html/changelogs/wezzy_lazarusinjectorfix.yml b/html/changelogs/wezzy_lazarusinjectorfix.yml new file mode 100644 index 00000000000..31c42d20058 --- /dev/null +++ b/html/changelogs/wezzy_lazarusinjectorfix.yml @@ -0,0 +1,42 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Wowzewow (Wezzy) + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Lazarus injectors no longer set revived mobs to the neutral faction. Now when EMP'd, they set the mob to it's original faction." + - rscadd: "Emagged lazarus injectors set the faction of revived mob to yours."