From 8d914d0b21f8e5112ec608255bbcb79c30656605 Mon Sep 17 00:00:00 2001 From: BlackMajor Date: Sun, 10 Nov 2019 17:10:45 +1300 Subject: [PATCH 1/2] Number one --- code/__DEFINES/flags.dm | 1 + code/datums/elements/mob_holder.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 2 +- code/modules/mob/living/carbon/monkey/combat.dm | 8 +++----- code/modules/surgery/bodyparts/bodyparts.dm | 5 ++--- code/modules/surgery/bodyparts/dismemberment.dm | 2 +- code/modules/surgery/bodyparts/helpers.dm | 12 ++++++------ 7 files changed, 15 insertions(+), 17 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 84a359f6..bfea4412 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -60,6 +60,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define GROUND (1<<0) #define FLYING (1<<1) #define VENTCRAWLING (1<<2) +#define FLOATING (1<<3) //Fire and Acid stuff, for resistance_flags #define LAVA_PROOF (1<<0) diff --git a/code/datums/elements/mob_holder.dm b/code/datums/elements/mob_holder.dm index 1d2cf442..d3030fb3 100644 --- a/code/datums/elements/mob_holder.dm +++ b/code/datums/elements/mob_holder.dm @@ -167,7 +167,7 @@ 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... + if(M == held_mob || !ishuman(M)) //monkeys holding monkeys holding monkeys... return FALSE return ..() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index e08d93fe..715643a4 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -945,7 +945,7 @@ /mob/living/carbon/proc/update_disabled_bodyparts() for(var/B in bodyparts) var/obj/item/bodypart/BP = B - BP.update_disabled() + BP.update_disabled(silent) /mob/living/carbon/vv_get_dropdown() . = ..() diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index 37505e40..6fc76213 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -117,7 +117,7 @@ if(pickupTarget) if(restrained() || blacklistItems[pickupTarget] || HAS_TRAIT(pickupTarget, TRAIT_NODROP)) pickupTarget = null - else + else if(!isobj(loc) || istype(loc, /obj/item/clothing/head/mob_holder)) pickupTimer++ if(pickupTimer >= 4) blacklistItems[pickupTarget] ++ @@ -132,10 +132,8 @@ pickupTarget = null pickupTimer = 0 else if(ismob(pickupTarget.loc)) // in someones hand - if(istype(pickupTarget, /obj/item/clothing/head/mob_holder/)) - var/obj/item/clothing/head/mob_holder/h = pickupTarget - if(h && h.held_mob==src) - return//dont let them pickpocket themselves + if(istype(pickupTarget, /obj/item/clothing/head/mob_holder)) + return//dont let them pickpocket themselves or hold other monkys. var/mob/M = pickupTarget.loc if(!pickpocketing) pickpocketing = TRUE diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 496cb708..95bcab31 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -228,8 +228,6 @@ total += stamina_dam return total -//Checks disabled status thresholds - //Checks disabled status thresholds /obj/item/bodypart/proc/update_disabled() set_disabled(is_disabled()) @@ -257,11 +255,12 @@ /obj/item/bodypart/proc/set_disabled(new_disabled) if(disabled == new_disabled) - return + return FALSE disabled = new_disabled owner.update_health_hud() //update the healthdoll owner.update_body() owner.update_canmove() + return TRUE //Updates an organ's brute/burn states for use by update_damage_overlays() //Returns 1 if we need to update overlays. 0 otherwise. diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index 4d681c59..1a3ee625 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -291,6 +291,7 @@ O.Insert(C) update_bodypart_damage_state() + update_disabled() C.updatehealth() C.update_body() @@ -298,7 +299,6 @@ C.update_damage_overlays() C.update_canmove() - /obj/item/bodypart/head/attach_limb(mob/living/carbon/C, special) //Transfer some head appearance vars over if(brain) diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm index 37b6ecc1..91cf3474 100644 --- a/code/modules/surgery/bodyparts/helpers.dm +++ b/code/modules/surgery/bodyparts/helpers.dm @@ -110,14 +110,14 @@ /mob/proc/get_leg_ignore() return FALSE -/mob/living/carbon/alien/larva/get_leg_ignore() - return TRUE - -/mob/living/carbon/human/get_leg_ignore() - if((movement_type & FLYING) || floating) +/mob/living/carbon/get_leg_ignore() + if(movement_type & (FLYING|FLOATING)) return TRUE return FALSE +/mob/living/carbon/alien/larva/get_leg_ignore() + return TRUE + /mob/living/proc/get_missing_limbs() return list() @@ -348,4 +348,4 @@ . |= HAND_LEFT if(ARM_RIGHT) . |= HAND_RIGHT - . |= L.body_part \ No newline at end of file + . |= L.body_part From 3fe84d7fa6c662e21e46c398040c8de22cc04133 Mon Sep 17 00:00:00 2001 From: Dip Date: Tue, 10 Nov 2020 18:03:02 -0300 Subject: [PATCH 2/2] yeah no I'm fixing floating in another pr, fuck this --- code/__DEFINES/flags.dm | 1 - code/modules/surgery/bodyparts/helpers.dm | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index bfea4412..84a359f6 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -60,7 +60,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define GROUND (1<<0) #define FLYING (1<<1) #define VENTCRAWLING (1<<2) -#define FLOATING (1<<3) //Fire and Acid stuff, for resistance_flags #define LAVA_PROOF (1<<0) diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm index 91cf3474..35043c8a 100644 --- a/code/modules/surgery/bodyparts/helpers.dm +++ b/code/modules/surgery/bodyparts/helpers.dm @@ -111,7 +111,7 @@ return FALSE /mob/living/carbon/get_leg_ignore() - if(movement_type & (FLYING|FLOATING)) + if(movement_type & (FLYING|floating)) return TRUE return FALSE