From 0fc58330cd2e302fbaa405a908e5e319db7bd5ad Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Wed, 17 Apr 2019 12:57:32 +0200 Subject: [PATCH] Fixes species transformations not retaining items correctly --- code/game/gamemodes/changeling/powers/mutations.dm | 9 --------- code/modules/mob/living/carbon/human/human.dm | 7 +++++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index 6288bed2964..3c84e0d6ab5 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -132,15 +132,6 @@ throw_range = 0 throw_speed = 0 -/obj/item/melee/arm_blade/New() - ..() - if(ismob(loc)) - loc.visible_message("A grotesque blade forms around [loc.name]\'s arm!", "Our arm twists and mutates, transforming it into a deadly blade.", "You hear organic matter ripping and tearing!") - -/obj/item/melee/arm_blade/dropped(mob/user) - user.visible_message("With a sickening crunch, [user] reforms [user.p_their()] blade into an arm!", "We assimilate the blade back into our body.", "You hear organic matter ripping and tearing!") - . = ..() - /obj/item/melee/arm_blade/afterattack(atom/target, mob/user, proximity) if(!proximity) return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index bd5817e8867..2b027cc833e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1317,11 +1317,13 @@ var/list/thing_to_check = list(slot_wear_mask, slot_head, slot_shoes, slot_gloves, slot_l_ear, slot_r_ear, slot_glasses, slot_l_hand, slot_r_hand) var/list/kept_items[0] - + var/list/item_flags[0] for(var/thing in thing_to_check) var/obj/item/I = get_item_by_slot(thing) if(I) kept_items[I] = thing + item_flags[I] = I.flags + I.flags = 0 // Temporary set the flags to 0 if(retain_damage) //Create a list of body parts which are damaged by burn or brute and save them to apply after new organs are generated. First we just handle external organs. @@ -1387,8 +1389,9 @@ else dna.species.create_organs(src) - for(var/thing in kept_items) + for(var/obj/item/thing in kept_items) equip_to_slot_if_possible(thing, kept_items[thing], redraw_mob = 0) + thing.flags = item_flags[thing] // Reset the flags to the origional ones //Handle default hair/head accessories for created mobs. var/obj/item/organ/external/head/H = get_organ("head")