Skip to content

Commit

Permalink
Removes Bluespace Tile Speed, Replaces It With Anti-Slowdown (Paradis…
Browse files Browse the repository at this point in the history
…eSS13#22271)

* the start

* gear slowdown time

* nicer check

* trait time!

* dimach + henri review

* contra review

* sean review
  • Loading branch information
matttheficus authored Oct 1, 2023
1 parent 53c3e89 commit 9d0c74b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 17 deletions.
8 changes: 8 additions & 0 deletions code/__HELPERS/trait_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
3 changes: 3 additions & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
))

Expand Down
30 changes: 16 additions & 14 deletions code/modules/mob/living/carbon/human/species/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions code/modules/research/xenobiology/xenobiology.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 9d0c74b

Please sign in to comment.