From 75349d9119bbe564923c15268c202fa84e6e7014 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sat, 15 Feb 2020 11:44:25 -0700 Subject: [PATCH 1/6] Merge pull request #11040 from Ghommie/Ghommie-cit573 Further mob holder fixes. --- code/datums/elements/mob_holder.dm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/datums/elements/mob_holder.dm b/code/datums/elements/mob_holder.dm index 9b9bc6f9..8b725350 100644 --- a/code/datums/elements/mob_holder.dm +++ b/code/datums/elements/mob_holder.dm @@ -102,6 +102,8 @@ target.forceMove(src) var/image/I = new //work around to retain the same appearance to the mob idependently from inhands/worn states. I.appearance = target.appearance + I.layer = FLOAT_LAYER //So it doesn't get screwed up by layer overrides. + I.plane = FLOAT_PLANE //Same as above but for planes. I.override = TRUE add_overlay(I) name = target.name @@ -131,7 +133,7 @@ if(AM == held_mob) held_mob.reset_perspective() held_mob = null - qdel(src) + QDEL_IN(src, 1) //To avoid a qdel loop. /obj/item/clothing/head/mob_holder/Entered(atom/movable/AM, atom/newloc) . = ..() @@ -161,7 +163,7 @@ /obj/item/clothing/head/mob_holder/container_resist() if(isliving(loc)) var/mob/living/L = loc - L.visible_message("[src] escapes from [L]!", "[src] escapes your grip!") + L.visible_message("[held_mob] escapes from [L]!", "[held_mob] escapes your grip!") release() /obj/item/clothing/head/mob_holder/assume_air(datum/gas_mixture/env) @@ -173,7 +175,7 @@ location = location.loc if(ismob(location)) return location.loc.assume_air(env) - return loc.assume_air(env) + return location.assume_air(env) /obj/item/clothing/head/mob_holder/remove_air(amount) var/atom/location = loc @@ -184,4 +186,4 @@ location = location.loc if(ismob(location)) return location.loc.remove_air(amount) - return loc.remove_air(amount) + return location.remove_air(amount) From 399daa1b208e8a19f23508a6b866222787be4d56 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 19 Feb 2020 19:02:34 -0700 Subject: [PATCH 2/6] Merge pull request #11117 from Citadel-Station-13/Ghommie-patch-1 --- code/datums/elements/mob_holder.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/datums/elements/mob_holder.dm b/code/datums/elements/mob_holder.dm index 8b725350..c2389f91 100644 --- a/code/datums/elements/mob_holder.dm +++ b/code/datums/elements/mob_holder.dm @@ -94,7 +94,7 @@ lefthand_file = left_hand if(right_hand) righthand_file = right_hand - slot_flags = slots + slot_flags = slots /obj/item/clothing/head/mob_holder/proc/assimilate(mob/living/target) target.setDir(SOUTH) @@ -117,16 +117,14 @@ w_class = WEIGHT_CLASS_BULKY if(MOB_SIZE_LARGE) w_class = WEIGHT_CLASS_HUGE - RegisterSignal(src, COMSIG_CLICK_SHIFT, .proc/examine_held_mob, override = TRUE) /obj/item/clothing/head/mob_holder/Destroy() if(held_mob) release() return ..() -/obj/item/clothing/head/mob_holder/proc/examine_held_mob(datum/source, mob/user) - held_mob.ShiftClick(user) - return COMPONENT_DENY_EXAMINATE +/obj/item/clothing/head/mob_holder/examine(mob/user) + return held_mob?.examine(user) || ..() /obj/item/clothing/head/mob_holder/Exited(atom/movable/AM, atom/newloc) . = ..() From 51d2913161f33aee13ed42e6ee028d11d1d289af Mon Sep 17 00:00:00 2001 From: Lin Date: Sat, 29 Feb 2020 00:13:58 -0600 Subject: [PATCH 3/6] more refactor --- code/datums/elements/mob_holder.dm | 3 ++- code/modules/mob/living/silicon/pai/pai_shell.dm | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code/datums/elements/mob_holder.dm b/code/datums/elements/mob_holder.dm index c2389f91..38c62f4f 100644 --- a/code/datums/elements/mob_holder.dm +++ b/code/datums/elements/mob_holder.dm @@ -153,7 +153,8 @@ L.forceMove(get_turf(L)) L.reset_perspective() L.setDir(SOUTH) - qdel(src) + if(!QDELETED(src)) + qdel(src) /obj/item/clothing/head/mob_holder/relaymove(mob/user) return diff --git a/code/modules/mob/living/silicon/pai/pai_shell.dm b/code/modules/mob/living/silicon/pai/pai_shell.dm index 9a4a1439..ba997b72 100644 --- a/code/modules/mob/living/silicon/pai/pai_shell.dm +++ b/code/modules/mob/living/silicon/pai/pai_shell.dm @@ -86,12 +86,10 @@ if(resting) icon_state = "[chassis]_rest" to_chat(src, "You switch your holochassis projection composite to [chassis]") + current_mob_holder?.Detach(src) + current_mob_holder = null if(possible_chassis[chassis]) current_mob_holder = AddElement(/datum/element/mob_holder, chassis, 'icons/mob/pai_item_head.dmi', 'icons/mob/pai_item_rh.dmi', 'icons/mob/pai_item_lh.dmi', SLOT_HEAD) - else - current_mob_holder?.Detach(src) - current_mob_holder = null - return /mob/living/silicon/pai/lay_down() ..() From e7fcbd07cb68889f3e1bc62bc4dde0e30dba271d Mon Sep 17 00:00:00 2001 From: Dip Date: Mon, 5 Oct 2020 09:57:07 -0300 Subject: [PATCH 4/6] monkeys holding monkeys --- code/datums/elements/mob_holder.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/datums/elements/mob_holder.dm b/code/datums/elements/mob_holder.dm index 38c62f4f..1d2cf442 100644 --- a/code/datums/elements/mob_holder.dm +++ b/code/datums/elements/mob_holder.dm @@ -76,6 +76,7 @@ lefthand_file = 'icons/mob/animals_held_lh.dmi' icon_state = "" w_class = WEIGHT_CLASS_BULKY + dynamic_hair_suffix = "" var/mob/living/held_mob var/can_head = FALSE @@ -165,6 +166,11 @@ L.visible_message("[held_mob] escapes from [L]!", "[held_mob] escapes your grip!") release() +/obj/item/clothing/head/mob_holder/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE) + if(!ishuman(M)) //monkeys holding monkeys holding monkeys... + return FALSE + return ..() + /obj/item/clothing/head/mob_holder/assume_air(datum/gas_mixture/env) var/atom/location = loc if(!loc) From 52eaf9ed92dddfdf4db12985697da4a1d3c1e324 Mon Sep 17 00:00:00 2001 From: Dip Date: Mon, 5 Oct 2020 11:07:52 -0300 Subject: [PATCH 5/6] BOY --- code/__DEFINES/dcs/signals.dm | 2 ++ hyperstation/code/datums/elements/holder_micro.dm | 7 +++++++ hyperstation/code/modules/resize/resizing.dm | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 4036bab9..8f02e79e 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -192,6 +192,8 @@ #define COMPONENT_NO_MOUSEDROP 1 #define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" + +#define COMSIG_MICRO_PICKUP_FEET "micro_force_grabbed" //From /datum/element/mob_holder/micro // /area signals ///from base of area/Entered(): (atom/movable/M) diff --git a/hyperstation/code/datums/elements/holder_micro.dm b/hyperstation/code/datums/elements/holder_micro.dm index 84940bcc..d784db0c 100644 --- a/hyperstation/code/datums/elements/holder_micro.dm +++ b/hyperstation/code/datums/elements/holder_micro.dm @@ -15,6 +15,13 @@ RegisterSignal(target, COMSIG_CLICK_ALT, .proc/mob_try_pickup_micro, override = TRUE) RegisterSignal(target, COMSIG_PARENT_EXAMINE, .proc/on_examine, override = TRUE) + RegisterSignal(target, COMSIG_MICRO_PICKUP_FEET, .proc/mob_pickup_micro_feet) + +/datum/element/mob_holder/micro/Detach(datum/source, force) + . = ..() + UnregisterSignal(source, COMSIG_CLICK_ALT) + UnregisterSignal(source, COMSIG_PARENT_EXAMINE) + UnregisterSignal(source, COMSIG_MICRO_PICKUP_FEET) /datum/element/mob_holder/micro/proc/mob_pickup_micro(mob/living/source, mob/user) var/obj/item/clothing/head/mob_holder/micro/holder = new(get_turf(source), source, worn_state, alt_worn, right_hand, left_hand, inv_slots) diff --git a/hyperstation/code/modules/resize/resizing.dm b/hyperstation/code/modules/resize/resizing.dm index 4ff4e9b0..a5621f14 100644 --- a/hyperstation/code/modules/resize/resizing.dm +++ b/hyperstation/code/modules/resize/resizing.dm @@ -162,10 +162,12 @@ mob/living/get_effective_size() else if(istype(H) && H.dna.features["taur"] == "Naga" || H.dna.features["taur"] == "Tentacle") tmob.visible_message("[src] snatches up [tmob] underneath their tail!", "[src]'s tail winds around you and snatches you in its coils!") - //tmob.mob_pickup_micro_feet(H) //These two procs have been disabled. Hopefully temporarily. + //tmob.mob_pickup_micro_feet(H) + SEND_SIGNAL(tmob, COMSIG_MICRO_PICKUP_FEET, H) else tmob.visible_message("[src] stomps down on [tmob], curling their toes and picking them up!", "[src]'s toes pin you down and curl around you, picking you up!") //tmob.mob_pickup_micro_feet(H) + SEND_SIGNAL(tmob, COMSIG_MICRO_PICKUP_FEET, H) return 1 if(abs(tmob.get_effective_size()/get_effective_size()) >= 2) From 18a97324d0af695e8d9477971b37bdd8a8baa558 Mon Sep 17 00:00:00 2001 From: Dip Date: Mon, 5 Oct 2020 11:48:11 -0300 Subject: [PATCH 6/6] runtime --- code/modules/mob/living/carbon/human/human_movement.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 64b66c5c..4dc63308 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -46,7 +46,7 @@ for(var/datum/mutation/human/HM in dna.mutations) HM.on_move(src, NewLoc) - if(shoes) + if(shoes && shoes.type != /obj/item/clothing/head/mob_holder/micro) if(!lying && !buckled) if(loc == NewLoc) if(!has_gravity(loc))