diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 520f205381..82302a2e06 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -208,10 +208,9 @@ #define TRAIT_FAST_PUMP "fast_pump" #define TRAIT_NO_PROCESS_FOOD "no-process-food" // You don't get benefits from nutriment, nor nutrition from reagent consumables #define TRAIT_NICE_SHOT "nice_shot" //hnnnnnnnggggg..... you're pretty good... -/// Prevents stamina buffer regeneration -#define TRAIT_NO_STAMINA_BUFFER_REGENERATION "block_stamina_buffer_regen" -/// Prevents stamina regeneration -#define TRAIT_NO_STAMINA_REGENERATION "block_stamina_regen" +#define TRAIT_NO_STAMINA_BUFFER_REGENERATION "block_stamina_buffer_regen" /// Prevents stamina buffer regeneration +#define TRAIT_NO_STAMINA_REGENERATION "block_stamina_regen" /// Prevents stamina regeneration +#define TRAIT_ARMOR_BROKEN "armor_broken" //acts as if you are wearing no clothing when taking damage, does not affect non-clothing sources of protection // mobility flag traits // IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it) diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm index b8191a377b..0552a791ea 100644 --- a/code/datums/components/squeak.dm +++ b/code/datums/components/squeak.dm @@ -46,6 +46,21 @@ if(isnum(use_delay_override)) use_delay = use_delay_override +/datum/component/squeak/UnregisterFromParent() + if(!isatom(parent)) + return + UnregisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY)) + if(ismovable(parent)) + UnregisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT, + COMSIG_MOVABLE_CROSSED, COMSIG_ITEM_WEARERCROSSED, COMSIG_MOVABLE_CROSS, + COMSIG_CROSS_SQUEAKED, COMSIG_MOVABLE_DISPOSING)) + if(isitem(parent)) + UnregisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT, COMSIG_ITEM_ATTACK_SELF, + COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED)) + if(istype(parent, /obj/item/clothing/shoes)) + UnregisterSignal(parent, COMSIG_SHOES_STEP_ACTION) + return ..() + /datum/component/squeak/proc/play_squeak() do_play_squeak() diff --git a/code/datums/mutations/_mutations.dm b/code/datums/mutations/_mutations.dm index 3bddfdaa63..b72874c329 100644 --- a/code/datums/mutations/_mutations.dm +++ b/code/datums/mutations/_mutations.dm @@ -150,7 +150,6 @@ overlays_standing[CM.layer_used] = mut_overlay apply_overlay(CM.layer_used) - /datum/mutation/human/proc/modify() //called when a genome is applied so we can properly update some stats without having to remove and reapply the mutation from someone if(modified || !power || !owner) return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 710d49c075..301a9bd7c8 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -212,6 +212,7 @@ // called when something steps onto a human // this could be made more general, but for now just handle mulebot /mob/living/carbon/human/Crossed(atom/movable/AM) + ..() var/mob/living/simple_animal/bot/mulebot/MB = AM if(istype(MB)) MB.RunOver(src) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 76a9c00ed1..10295a7de4 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -1,4 +1,6 @@ /mob/living/carbon/human/getarmor(def_zone, type) + if(HAS_TRAIT(src, TRAIT_ARMOR_BROKEN)) //trait that makes it act as if you have no armor at all, you take natural damage from all sources + return 0 var/armorval = 0 var/organnum = 0 @@ -18,7 +20,6 @@ organnum++ return (armorval/max(organnum, 1)) - /mob/living/carbon/human/proc/checkarmor(obj/item/bodypart/def_zone, d_type) if(!d_type || !def_zone) return 0 diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index a87c92bdb9..ecac5fda10 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -714,18 +714,25 @@ return FALSE /datum/action/innate/slime_puddle/Activate() + var/mob/living/carbon/human/H = owner + //if they have anything stuck to their hands, we immediately say 'no' and return + for(var/obj/item/I in H.held_items) + if(HAS_TRAIT(I, TRAIT_NODROP)) + to_chat(owner, "There's something stuck to your hand, stopping you from transforming!") + return if(isjellyperson(owner) && IsAvailable()) transforming = TRUE UpdateButtonIcon() - var/mob/living/carbon/human/H = owner var/mutcolor = "#" + H.dna.features["mcolor"] if(!is_puddle) - if(CHECK_MOBILITY(H, MOBILITY_USE)) - is_puddle = TRUE - owner.cut_overlays() + if(CHECK_MOBILITY(H, MOBILITY_USE)) //if we can use items, we can turn into a puddle + is_puddle = TRUE //so we know which transformation to use when its used + owner.cut_overlays() //we dont show our normal sprite, we show a puddle sprite var/obj/effect/puddle_effect = new puddle_into_effect(get_turf(owner), owner.dir) puddle_effect.color = mutcolor - H.Stun(in_transformation_duration, ignore_canstun = TRUE) + H.Stun(in_transformation_duration, ignore_canstun = TRUE) //cant move while transforming + + //series of traits that make up the puddle behaviour ADD_TRAIT(H, TRAIT_PARALYSIS_L_ARM, SLIMEPUDDLE_TRAIT) ADD_TRAIT(H, TRAIT_PARALYSIS_R_ARM, SLIMEPUDDLE_TRAIT) ADD_TRAIT(H, TRAIT_MOBILITY_NOPICKUP, SLIMEPUDDLE_TRAIT) @@ -733,19 +740,30 @@ ADD_TRAIT(H, TRAIT_SPRINT_LOCKED, SLIMEPUDDLE_TRAIT) ADD_TRAIT(H, TRAIT_COMBAT_MODE_LOCKED, SLIMEPUDDLE_TRAIT) ADD_TRAIT(H, TRAIT_MOBILITY_NOREST, SLIMEPUDDLE_TRAIT) + ADD_TRAIT(H, TRAIT_ARMOR_BROKEN, SLIMEPUDDLE_TRAIT) + H.update_disabled_bodyparts(silent = TRUE) //silently update arms to be paralysed + H.add_movespeed_modifier(/datum/movespeed_modifier/slime_puddle) - H.update_disabled_bodyparts(silent = TRUE) + H.layer -= 1 //go one layer down so people go over you - ENABLE_BITFIELD(H.pass_flags, PASSMOB) - squeak = H.AddComponent(/datum/component/squeak, custom_sounds = list('sound/effects/blobattack.ogg')) - sleep(in_transformation_duration) + ENABLE_BITFIELD(H.pass_flags, PASSMOB) //this actually lets people pass over you + squeak = H.AddComponent(/datum/component/squeak, custom_sounds = list('sound/effects/blobattack.ogg')) //blorble noise when people step on you + + //if the user is a changeling, retract their sting + H.unset_sting() + + sleep(in_transformation_duration) //wait for animation to end + + //set the puddle overlay up var/mutable_appearance/puddle_overlay = mutable_appearance(icon = puddle_icon, icon_state = puddle_state) puddle_overlay.color = mutcolor tracked_overlay = puddle_overlay owner.add_overlay(puddle_overlay) + transforming = FALSE UpdateButtonIcon() else + //like the above, but reverse everything done! owner.cut_overlay(tracked_overlay) var/obj/effect/puddle_effect = new puddle_from_effect(get_turf(owner), owner.dir) puddle_effect.color = mutcolor @@ -758,6 +776,7 @@ REMOVE_TRAIT(H, TRAIT_SPRINT_LOCKED, SLIMEPUDDLE_TRAIT) REMOVE_TRAIT(H, TRAIT_COMBAT_MODE_LOCKED, SLIMEPUDDLE_TRAIT) REMOVE_TRAIT(H, TRAIT_MOBILITY_NOREST, SLIMEPUDDLE_TRAIT) + REMOVE_TRAIT(H, TRAIT_ARMOR_BROKEN, SLIMEPUDDLE_TRAIT) H.update_disabled_bodyparts(silent = TRUE) H.remove_movespeed_modifier(/datum/movespeed_modifier/slime_puddle) H.layer += 1 //go one layer back above! diff --git a/code/modules/movespeed/modifiers/innate.dm b/code/modules/movespeed/modifiers/innate.dm index 946d93e96b..f5a599f940 100644 --- a/code/modules/movespeed/modifiers/innate.dm +++ b/code/modules/movespeed/modifiers/innate.dm @@ -20,5 +20,6 @@ flags = IGNORE_NOSLOW /datum/movespeed_modifier/slime_puddle - multiplicative_slowdown = 2 + multiplicative_slowdown = 4.5 flags = IGNORE_NOSLOW + variable = TRUE diff --git a/icons/mob/mob.dmi b/icons/mob/mob.dmi index 10b733bae4..3d1cbfa273 100644 Binary files a/icons/mob/mob.dmi and b/icons/mob/mob.dmi differ