From d2e092c899cadcc3c6cc55e78ad9eda4bdc86ecd Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 20 Nov 2015 17:45:07 +1030 Subject: [PATCH] Diona nymphs and fruit are now able to be holstered. --- code/modules/hydroponics/grown.dm | 1 + code/modules/mob/holder.dm | 4 ++-- code/modules/mob/living/living.dm | 20 +++++++++++++------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 5433361bbd..17a4d36569 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -5,6 +5,7 @@ icon = 'icons/obj/hydroponics_products.dmi' icon_state = "blank" desc = "Nutritious! Probably." + slot_flags = SLOT_HOLSTER var/plantname var/datum/seed/seed diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 97bdb5ab04..39c8270c6a 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -5,7 +5,7 @@ var/list/holder_mob_icon_cache = list() name = "holder" desc = "You shouldn't ever see this." icon = 'icons/obj/objects.dmi' - slot_flags = SLOT_HEAD + slot_flags = SLOT_HEAD | SLOT_HOLSTER sprite_sheets = list( "Vox" = 'icons/mob/species/vox/head.dmi', @@ -62,7 +62,7 @@ var/list/holder_mob_icon_cache = list() //Mob specific holders. /obj/item/weapon/holder/diona origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 5) - slot_flags = SLOT_HEAD | SLOT_OCLOTHING + slot_flags = SLOT_HEAD | SLOT_OCLOTHING | SLOT_HOLSTER /obj/item/weapon/holder/drone origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 5) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 88193d1895..ef7a33fd40 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -604,18 +604,24 @@ default behaviour is: if(istype(M)) M.drop_from_inventory(H) - M << "[H] wriggles out of your grip!" - src << "You wriggle out of [M]'s grip!" - else if(istype(H.loc,/obj/item)) - src << "You struggle free of [H.loc]." - H.forceMove(get_turf(H)) + M << "\The [H] wriggles out of your grip!" + src << "You wriggle out of \the [M]'s grip!" - if(istype(M)) + // Update whether or not this mob needs to pass emotes to contents. for(var/atom/A in M.contents) if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder)) return + M.status_flags &= ~PASSEMOTES - M.status_flags &= ~PASSEMOTES + else if(istype(H.loc,/obj/item/clothing/accessory/holster)) + var/obj/item/clothing/accessory/holster/holster = H.loc + if(holster.holstered == H) + holster.clear_holster() + src << "You extricate yourself from \the [holster]." + H.forceMove(get_turf(H)) + else if(istype(H.loc,/obj/item)) + src << "You struggle free of \the [H.loc]." + H.forceMove(get_turf(H)) /mob/living/proc/escape_buckle() if(buckled)