slime puddles look better and cant be abused by lings (#13567)
* perfect * further changes * no squeaking please * no more squeaking damnit * no more squeaking damnit * slower * they get broken armor * broken armor application * Apply suggestions from code review * add a comma * make crossed work properly * Update squeak.dm Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
713ed9018e
commit
46dbb9345d
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -20,5 +20,6 @@
|
||||
flags = IGNORE_NOSLOW
|
||||
|
||||
/datum/movespeed_modifier/slime_puddle
|
||||
multiplicative_slowdown = 2
|
||||
multiplicative_slowdown = 4.5
|
||||
flags = IGNORE_NOSLOW
|
||||
variable = TRUE
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 287 KiB After Width: | Height: | Size: 287 KiB |
Reference in New Issue
Block a user