[MIRROR] Refactors species mutanthands into human component [MDB IGNORE] (#19355)

* Refactors species mutanthands into human component

* wew

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-10 03:39:41 +01:00
committed by GitHub
parent f48b604aff
commit 7f29afc8ec
18 changed files with 296 additions and 87 deletions
+6 -25
View File
@@ -1,36 +1,17 @@
/obj/item/zombie_hand
/obj/item/mutant_hand/zombie
name = "zombie claw"
desc = "A zombie's claw is its primary tool, capable of infecting \
humans, butchering all other living things to \
sustain the zombie, smashing open airlock doors and opening \
child-safe caps on bottles."
item_flags = ABSTRACT | DROPDEL | HAND_ITEM
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
icon = 'icons/effects/blood.dmi'
icon_state = "bloodhand_left"
var/icon_left = "bloodhand_left"
var/icon_right = "bloodhand_right"
hitsound = 'sound/hallucinations/growl1.ogg'
force = 21 // Just enough to break airlocks with melee attacks
sharpness = SHARP_EDGED
wound_bonus = -30
bare_wound_bonus = 15
damtype = BRUTE
sharpness = SHARP_EDGED
/obj/item/zombie_hand/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
/obj/item/zombie_hand/visual_equipped(mob/user, slot)
. = ..()
//these are intentionally inverted
var/i = user.get_held_index_of_item(src)
if(!(i % 2))
icon_state = icon_left
else
icon_state = icon_right
/obj/item/zombie_hand/afterattack(atom/target, mob/user, proximity_flag)
/obj/item/mutant_hand/zombie/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(!proximity_flag)
return
@@ -59,14 +40,14 @@
infection = new()
infection.Insert(target)
/obj/item/zombie_hand/suicide_act(mob/living/user)
/obj/item/mutant_hand/zombie/suicide_act(mob/living/user)
user.visible_message(span_suicide("[user] is ripping [user.p_their()] brains out! It looks like [user.p_theyre()] trying to commit suicide!"))
var/obj/item/bodypart/head = user.get_bodypart(BODY_ZONE_HEAD)
if(head)
head.dismember()
return BRUTELOSS
/obj/item/zombie_hand/proc/check_feast(mob/living/target, mob/living/user)
/obj/item/mutant_hand/zombie/proc/check_feast(mob/living/target, mob/living/user)
if(target.stat == DEAD)
var/hp_gained = target.maxHealth
target.investigate_log("has been devoured by a zombie.", INVESTIGATE_DEATHS)