Skip to content

Commit cf1b6a2

Browse files
authored
Adjusts movement speed values (#1089)
* changes1 * shoes code cleanup * holding someone up now slows you down * fix * drop items when dislocated or broken
1 parent 5e6d602 commit cf1b6a2

File tree

19 files changed

+98
-22
lines changed

19 files changed

+98
-22
lines changed

code/__DEFINES/combat.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
//slowdown when in softcrit. Note that crawling slowdown will also apply at the same time!
9393
#define SOFTCRIT_ADD_SLOWDOWN 3
9494
//slowdown when crawling
95-
#define CRAWLING_ADD_SLOWDOWN 6
95+
#define CRAWLING_ADD_SLOWDOWN 8
9696

9797
//Attack types for checking shields/hit reactions
9898
#define MELEE_ATTACK 1

code/__DEFINES/mobs.dm

-2
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,6 @@
418418
#define AGE_MINOR 20 //legal age of space drinking and smoking
419419
#define WIZARD_AGE_MIN 30 //youngest a wizard can be
420420
#define APPRENTICE_AGE_MIN 29 //youngest an apprentice can be
421-
#define SHOES_SLOWDOWN 0 //How much shoes slow you down by default. Negative values speed you up
422-
#define SHOES_SPEED_SLIGHT SHOES_SLOWDOWN - 1 // slightest speed boost to movement
423421
#define POCKET_STRIP_DELAY (4 SECONDS) //time taken to search somebody's pockets
424422
#define DOOR_CRUSH_DAMAGE 15 //the amount of damage that airlocks deal when they crush you
425423

code/datums/status_effects/neutral.dm

+8
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@
9595
status_type = STATUS_EFFECT_UNIQUE
9696
alert_type = /atom/movable/screen/alert/status_effect/holdup
9797

98+
/datum/status_effect/holdup/on_apply()
99+
. = ..()
100+
owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/holdup)
101+
102+
/datum/status_effect/holdup/on_remove()
103+
. = ..()
104+
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/holdup)
105+
98106
/atom/movable/screen/alert/status_effect/holdup
99107
name = "Holding Up"
100108
desc = "You're currently pointing a gun at someone."

code/game/machinery/washing_machine.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
292292
/obj/item/clothing/shoes/sneakers/machine_wash(obj/machinery/washing_machine/washer)
293293
if(chained)
294294
chained = FALSE
295-
slowdown = SHOES_SLOWDOWN
295+
slowdown = initial(slowdown)
296296
new /obj/item/restraints/handcuffs(loc)
297297
..()
298298

code/modules/antagonists/clown_ops/clown_weapons.dm

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
name = "combat clown shoes"
1717
desc = "advanced clown shoes that protect the wearer and render them nearly immune to slipping on their own peels. They also squeak at 100% capacity."
1818
clothing_traits = list(TRAIT_NO_SLIP_WATER)
19-
slowdown = SHOES_SLOWDOWN
19+
slowdown = /obj/item/clothing/shoes::slowdown
2020
armor = list(BLUNT = 25, PUNCTURE = 25, SLASH = 0, LASER = 25, ENERGY = 25, BOMB = 50, BIO = 10, FIRE = 70, ACID = 50)
2121
strip_delay = 70
2222
resistance_flags = NONE
@@ -34,7 +34,7 @@
3434
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat
3535
name = "mk-honk combat shoes"
3636
desc = "The culmination of years of clown combat research, these shoes leave a trail of chaos in their wake. They will slowly recharge themselves over time, or can be manually charged with bananium."
37-
slowdown = SHOES_SLOWDOWN
37+
slowdown = /obj/item/clothing/shoes::slowdown
3838
armor = list(BLUNT = 25, PUNCTURE = 25, SLASH = 0, LASER = 25, ENERGY = 25, BOMB = 50, BIO = 10, FIRE = 70, ACID = 50)
3939
strip_delay = 70
4040
resistance_flags = NONE

code/modules/clothing/shoes/_shoes.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
supports_variations_flags = CLOTHING_VOX_VARIATION | CLOTHING_DIGITIGRADE_VARIATION
1313

1414
permeability_coefficient = 0.5
15-
slowdown = SHOES_SLOWDOWN
15+
slowdown = 0
1616

1717
equip_delay_self = EQUIP_DELAY_SHOES
1818
equip_delay_other = EQUIP_DELAY_SHOES * 1.5

code/modules/clothing/shoes/clown.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
name = "clown shoes"
44
icon_state = "clown"
55
inhand_icon_state = "clown_shoes"
6-
slowdown = SHOES_SLOWDOWN+1
6+
slowdown = parent_type::slowdown + 1 // Slower than normal
77
var/enabled_waddle = TRUE
88
lace_time = 20 SECONDS // how the hell do these laces even work??
99
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION

code/modules/clothing/shoes/galoshes.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
siemens_coefficient = 0
88

99
clothing_traits = list(TRAIT_NO_SLIP_WATER)
10-
slowdown = SHOES_SLOWDOWN+1
10+
slowdown = parent_type::slowdown + 1 // Slower than normal
1111
strip_delay = 30
1212
equip_delay_other = 50
1313
resistance_flags = NONE

code/modules/clothing/shoes/magboots.dm

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
resistance_flags = FIRE_PROOF
1212
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_TESHARI_VARIATION | CLOTHING_VOX_VARIATION
1313

14-
slowdown = SHOES_SLOWDOWN
1514
/// Whether the magpulse system is active
1615
var/magpulse = FALSE
1716
/// Slowdown applied wwhen magpulse is active. This is added onto existing slowdown
@@ -66,7 +65,7 @@
6665
name = "advanced magboots"
6766
icon_state = "advmag0"
6867
base_icon_state = "advmag"
69-
slowdown_active = SHOES_SLOWDOWN // ZERO active slowdown
68+
slowdown_active = parent_type::slowdown // ZERO active slowdown
7069
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
7170

7271
/obj/item/clothing/shoes/magboots/syndie

code/modules/clothing/shoes/sneakers.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
/obj/item/clothing/shoes/sneakers/orange/attack_self(mob/user)
7373
if (chained)
7474
chained = FALSE
75-
slowdown = SHOES_SLOWDOWN
75+
slowdown = initial(slowdown)
7676
new /obj/item/restraints/handcuffs( user.loc )
7777
icon_state = initial(icon_state)
7878
return

code/modules/clothing/shoes/wheelys.dm

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
greyscale_colors = null
6464
greyscale_config = null
6565
worn_icon_state = "rollerskates"
66-
slowdown = SHOES_SLOWDOWN+1
66+
slowdown = parent_type::slowdown + 1 // Slower than normal
6767
wheels = /obj/vehicle/ridden/scooter/skateboard/wheelys/rollerskates
6868
custom_premium_price = PAYCHECK_EASY * 5
6969
custom_price = PAYCHECK_EASY * 5
@@ -75,7 +75,7 @@
7575
greyscale_colors = null
7676
greyscale_config = null
7777
worn_icon_state = "skishoes"
78-
slowdown = SHOES_SLOWDOWN+1
78+
slowdown = parent_type::slowdown + 1 // Slower than normal
7979
wheels = /obj/vehicle/ridden/scooter/skateboard/wheelys/skishoes
8080
custom_premium_price = PAYCHECK_EASY * 1.6
8181
custom_price = PAYCHECK_EASY * 1.6

code/modules/mob/living/carbon/pain.dm

+3-3
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@
189189

190190
to_chat(src, result.create_tooltip("Pain is temporary, I will not die on this day! (Shock reduced)"))
191191
shock_stage = max(shock_stage - 15, 0)
192-
stats.set_cooldown("shrug_off_pain", 60 SECONDS)
192+
stats.set_cooldown("shrug_off_pain", 180 SECONDS)
193193
return
194194

195195
if(SUCCESS)
196196
shock_stage = max(shock_stage - 5, 0)
197197
to_chat(src, result.create_tooltip("Not here, not now. (Pain shrugged off)"))
198-
stats.set_cooldown("shrug_off_pain", 30 SECONDS)
198+
stats.set_cooldown("shrug_off_pain", 180 SECONDS)
199199
return
200200

201201
if(FAILURE)
@@ -205,7 +205,7 @@
205205
if(CRIT_FAILURE)
206206
shock_stage = min(shock_stage + 1, SHOCK_MAXIMUM)
207207
to_chat(src, result.create_tooltip("I'm going to die here. (Shock increased)"))
208-
stats.set_cooldown("shrug_off_pain", 30 SECONDS)
208+
stats.set_cooldown("shrug_off_pain", 60 SECONDS)
209209
// Do not return
210210

211211
shock_stage = min(shock_stage + 1, SHOCK_MAXIMUM)

code/modules/mob/status_procs.dm

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@
44
* Set drowsyness of a mob to passed value
55
*/
66
/mob/proc/set_drowsyness(amount)
7+
. = drowsyness
78
drowsyness = max(amount, 0)
89

10+
if(!!. != !!drowsyness)
11+
if(drowsyness)
12+
add_movespeed_modifier(/datum/movespeed_modifier/status_effect/drowsy)
13+
else
14+
remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/drowsy)
915
/**
1016
* Adds passed value to the drowsyness of a mob
1117
*/
1218
/mob/proc/adjust_drowsyness(amount, up_to = INFINITY)
1319
if(amount + drowsyness > up_to)
1420
amount = max(up_to - drowsyness, 0)
15-
drowsyness = max(drowsyness + amount, 0)
21+
set_drowsyness(max(drowsyness + amount, 0))
1622

1723
///Blind a mobs eyes by amount
1824
/mob/proc/blind_eyes(amount)

code/modules/movespeed/modifiers/mobs.dm

+3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525

2626
/datum/movespeed_modifier/shock
2727
slowdown = 3
28+
blacklisted_movetypes = FLOATING
2829

2930
/datum/movespeed_modifier/asystole
3031
slowdown = 10
32+
blacklisted_movetypes = FLOATING
3133

3234
/datum/movespeed_modifier/equipment_speedmod
3335
variable = TRUE
@@ -116,6 +118,7 @@
116118
/datum/movespeed_modifier/living_exhaustion
117119
slowdown = STAMINA_EXHAUSTION_MOVESPEED_SLOWDOWN
118120
flags = IGNORE_NOSLOW
121+
119122
/datum/movespeed_modifier/carbon_crawling
120123
slowdown = CRAWLING_ADD_SLOWDOWN
121124
flags = IGNORE_NOSLOW

code/modules/movespeed/modifiers/status_effects.dm

+7
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,10 @@
2424

2525
/datum/movespeed_modifier/status_effect/disorient
2626
slowdown = 1
27+
28+
// technically not a status effect but like, close enough
29+
/datum/movespeed_modifier/status_effect/drowsy
30+
slowdown = 4
31+
32+
/datum/movespeed_modifier/status_effect/holdup
33+
slowdown = 5

code/modules/reagents/chemistry/reagents/medicine_reagents.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
C.silent = FALSE
5757
C.remove_status_effect(/datum/status_effect/dizziness)
5858
C.disgust = 0
59-
C.drowsyness = 0
59+
C.set_drowsyness(0)
60+
6061
// Remove all speech related status effects
6162
for(var/effect in typesof(/datum/status_effect/speech))
6263
C.remove_status_effect(effect)

code/modules/surgery/bodyparts/parts.dm

+42
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,51 @@
8787

8888
minimum_break_damage = 30
8989

90+
/// Used for inventory procs
91+
var/hand_side
9092
var/fingerprints = ""
9193

9294
/obj/item/bodypart/arm/update_limb(dropping_limb, is_creating)
9395
. = ..()
9496
if(is_creating && owner?.has_dna())
9597
fingerprints = md5(owner.dna.unique_identity)
9698

99+
/obj/item/bodypart/arm/on_life(delta_time, times_fired, stam_heal)
100+
. = ..()
101+
// Splinted, exit
102+
if(splint)
103+
return
104+
105+
// Not broken or dislocated, exit
106+
if(!(bodypart_flags & (BP_BROKEN_BONES|BP_DISLOCATED)))
107+
return
108+
109+
var/obj/target_item
110+
if(hand_side == LEFT_HANDS)
111+
target_item = owner.get_item_for_held_index(1)
112+
else
113+
target_item = owner.get_item_for_held_index(2)
114+
115+
if(isnull(target_item) || !owner.canUnequipItem(target_item))
116+
return
117+
118+
var/zone_name = parse_zone(aux_zone)
119+
120+
if(IS_ORGANIC_LIMB(src))
121+
if(bodypart_flags & BP_NO_PAIN)
122+
owner.visible_message(span_alert("<b>[owner]</b> drops what [owner.p_they()] [p_are()] holding in [owner.p_their()] [zone_name]."))
123+
owner.dropItemToGround(target_item)
124+
return
125+
126+
owner.apply_pain(30, src, "A sharp pain in your [plaintext_zone] forces you to drop your [target_item]!", TRUE, FALSE)
127+
owner.dropItemToGround(target_item)
128+
return . | BODYPART_LIFE_UPDATE_HEALTH_HUD
129+
130+
else
131+
owner.visible_message(span_alert("<b>[owner]</b>'s [zone_name] malfunctions, dropping what [owner.p_they()] [p_are()] holding.."))
132+
owner.dropItemToGround(target_item)
133+
return
134+
97135
/obj/item/bodypart/arm/left
98136
name = "left arm"
99137
desc = "Did you know that the word 'sinister' stems originally from the \
@@ -115,6 +153,8 @@
115153
amputation_point = "left shoulder"
116154
joint_name = "left elbow"
117155

156+
hand_side = LEFT_HANDS
157+
118158

119159
/obj/item/bodypart/arm/left/set_owner(new_owner)
120160
. = ..()
@@ -199,6 +239,8 @@
199239
amputation_point = "right shoulder"
200240
joint_name = "right elbow"
201241

242+
hand_side = RIGHT_HANDS
243+
202244
/obj/item/bodypart/arm/right/set_owner(new_owner)
203245
. = ..()
204246
if(. == FALSE)

code/modules/surgery/organs/heart.dm

+12
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
return
4848

4949
owner.med_hud_set_health()
50+
update_movespeed()
5051

5152
/obj/item/organ/heart/Remove(mob/living/carbon/heartless, special = 0)
5253
..()
@@ -59,11 +60,22 @@
5960
pulse = PULSE_NORM
6061
update_appearance(UPDATE_ICON_STATE)
6162
owner?.med_hud_set_health()
63+
update_movespeed()
6264

6365
/obj/item/organ/heart/proc/Stop()
6466
pulse = PULSE_NONE
6567
update_appearance(UPDATE_ICON_STATE)
6668
owner?.med_hud_set_health()
69+
update_movespeed()
70+
71+
/obj/item/organ/heart/proc/update_movespeed()
72+
if(isnull(owner))
73+
return
74+
75+
if(is_working() || !owner.needs_organ(ORGAN_SLOT_HEART))
76+
owner.remove_movespeed_modifier(/datum/movespeed_modifier/asystole)
77+
else
78+
owner.add_movespeed_modifier(/datum/movespeed_modifier/asystole)
6779

6880
/obj/item/organ/heart/proc/stop_if_unowned()
6981
if(!owner)

config/game_options.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ COMMENDATION_PERCENT_POLL 0.05
3030
## To speed things up make the number negative, to slow things down, make the number positive.
3131

3232
## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied.
33-
RUN_DELAY 2.2
34-
WALK_DELAY 4
35-
SPRINT_DELAY 1.4
33+
RUN_DELAY 4
34+
WALK_DELAY 6
35+
SPRINT_DELAY 2
3636

3737
## The variables below affect the movement of specific mob types. THIS AFFECTS ALL SUBTYPES OF THE TYPE YOU CHOOSE!
3838
## Entries completely override all subtypes. Later entries have precedence over earlier entries.

0 commit comments

Comments
 (0)