From 9d0c74b687c2d78f9456f1c6442c19d9693f80b9 Mon Sep 17 00:00:00 2001 From: matttheficus <57759731+matttheficus@users.noreply.github.com> Date: Sun, 1 Oct 2023 12:41:09 -0400 Subject: [PATCH] Removes Bluespace Tile Speed, Replaces It With Anti-Slowdown (#22271) * the start * gear slowdown time * nicer check * trait time! * dimach + henri review * contra review * sean review --- code/__HELPERS/trait_helpers.dm | 8 +++++ code/_globalvars/traits.dm | 3 ++ .../living/carbon/human/species/_species.dm | 30 ++++++++++--------- .../research/xenobiology/xenobiology.dm | 9 ++++-- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index 38964b80859a..6170e1aee69e 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -286,6 +286,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define GLADIATOR "gladiator" #define PULSEDEMON_TRAIT "pulse_demon" + //quirk traits #define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance" #define TRAIT_TABLE_LEAP "table_leap" @@ -308,3 +309,10 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_CANNOT_PULL "pullblocked" /// Abstract condition that prevents movement if being pulled and might be resisted against. Handcuffs and straight jackets, basically. #define TRAIT_RESTRAINED "restrained" + +//***** TURF TRAITS *****// +/// Removes slowdown while walking on these tiles. +#define TRAIT_BLUESPACE_SPEED "bluespace_speed_trait" + +// turf trait sources +#define FLOOR_EFFECT_TRAIT "floor_effect_trait" diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index f8a374e8abd2..d2a6ed085c80 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -93,6 +93,9 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_FORCES_OPEN_DOORS" = TRAIT_FORCES_OPEN_DOORS_ITEM, "TRAIT_OBSCURED_WIRES" = TRAIT_OBSCURED_WIRES, "TRAIT_XENO_INTERACTABLE" = TRAIT_XENO_INTERACTABLE + ), + /turf = list( + "bluespace_speed_trait" = TRAIT_BLUESPACE_SPEED ) )) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 3a3ae6c59565..697f437cc06b 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -290,20 +290,22 @@ ADD_SLOWDOWN(speed_mod) - if(H.wear_suit) - ADD_SLOWDOWN(H.wear_suit.slowdown) - if(H.head) - ADD_SLOWDOWN(H.head.slowdown) - if(H.gloves) - ADD_SLOWDOWN(H.gloves.slowdown) - if(!H.buckled && H.shoes) - ADD_SLOWDOWN(H.shoes.slowdown) - if(H.back) - ADD_SLOWDOWN(H.back.slowdown) - if(H.l_hand && (H.l_hand.flags & HANDSLOW)) - ADD_SLOWDOWN(H.l_hand.slowdown) - if(H.r_hand && (H.r_hand.flags & HANDSLOW)) - ADD_SLOWDOWN(H.r_hand.slowdown) + var/turf/simulated/floor/T = get_turf(H) + if(istype(T) && !HAS_TRAIT(T, TRAIT_BLUESPACE_SPEED)) + if(H.wear_suit) + ADD_SLOWDOWN(H.wear_suit.slowdown) + if(H.head) + ADD_SLOWDOWN(H.head.slowdown) + if(H.gloves) + ADD_SLOWDOWN(H.gloves.slowdown) + if(!H.buckled && H.shoes) + ADD_SLOWDOWN(H.shoes.slowdown) + if(H.back) + ADD_SLOWDOWN(H.back.slowdown) + if(H.l_hand && (H.l_hand.flags & HANDSLOW)) + ADD_SLOWDOWN(H.l_hand.slowdown) + if(H.r_hand && (H.r_hand.flags & HANDSLOW)) + ADD_SLOWDOWN(H.r_hand.slowdown) if(ignoreslow) return . // Only malusses after here diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index e439addf30a7..30a1513f3fed 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -574,7 +574,7 @@ /obj/item/stack/tile/bluespace name = "bluespace floor tile" singular_name = "floor tile" - desc = "Through a series of micro-teleports, these tiles let people move at incredible speeds." + desc = "Through a series of micro-teleports, these tiles allow you to move things that would otherwise slow you down." icon_state = "tile-bluespace" w_class = WEIGHT_CLASS_NORMAL force = 6 @@ -588,11 +588,14 @@ /turf/simulated/floor/bluespace - slowdown = -1 icon_state = "bluespace" - desc = "Through a series of micro-teleports, these tiles let people move at incredible speeds." + desc = "Through a series of micro-teleports, these tiles allow you to move things that would otherwise slow you down." floor_tile = /obj/item/stack/tile/bluespace +/turf/simulated/floor/bluespace/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_BLUESPACE_SPEED, FLOOR_EFFECT_TRAIT) + /obj/item/stack/tile/sepia name = "sepia floor tile"