mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
fixes mouse stored inside holder when killed (#92232)
## About The Pull Request Makes mice go where they were when you kill them, rather than being stored inside whatever mob was holding them. Mice on your shoulder fall off, instead. Also fixes unrelated runtime happening in parallel ## Why It's Good For The Game fixes #91057 ## Changelog 🆑 fix: mice stored on your person will no longer disappear when killed /🆑 --------- Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
This commit is contained in:
co-authored by
ArcaneMusic
parent
116c3962eb
commit
9ebd7c3cf1
@@ -142,9 +142,19 @@
|
||||
if(!gibbed)
|
||||
var/make_a_corpse = TRUE
|
||||
var/place_to_make_corpse = loc
|
||||
var/must_equip = FALSE
|
||||
var/equip_slot
|
||||
var/mob/holding_mob
|
||||
var/obj/item/mob_holder/found_holder
|
||||
if(istype(loc, /obj/item/mob_holder))//If our mouse is dying in place holder we want to put the dead mouse where the place holder was
|
||||
var/obj/item/mob_holder/found_holder = loc
|
||||
found_holder = loc
|
||||
place_to_make_corpse = found_holder.loc
|
||||
if(istype(found_holder.loc,/mob/living/carbon))
|
||||
holding_mob = found_holder.loc
|
||||
place_to_make_corpse = get_turf(holding_mob)
|
||||
equip_slot = holding_mob.get_slot_by_item(found_holder)
|
||||
if(equip_slot == ITEM_SLOT_HANDS || equip_slot == ITEM_SLOT_RPOCKET || equip_slot == ITEM_SLOT_LPOCKET)
|
||||
must_equip = TRUE
|
||||
if(istype(found_holder.loc, /obj/machinery/microwave))//Microwaves gib things that die when cooked, so we don't need to make a dead body too
|
||||
make_a_corpse = FALSE
|
||||
if(make_a_corpse)
|
||||
@@ -153,6 +163,11 @@
|
||||
if(HAS_TRAIT(src, TRAIT_BEING_SHOCKED))
|
||||
mouse.desc = "They're toast."
|
||||
mouse.add_atom_colour("#3A3A3A", FIXED_COLOUR_PRIORITY)
|
||||
found_holder?.release(FALSE)
|
||||
if(must_equip)
|
||||
if(equip_slot == ITEM_SLOT_HANDS)
|
||||
holding_mob.dropItemToGround(found_holder)
|
||||
holding_mob.equip_to_slot(mouse,equip_slot)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/basic/mouse/UnarmedAttack(atom/attack_target, proximity_flag, list/modifiers)
|
||||
|
||||
Reference in New Issue
Block a user