Skip to content

Commit

Permalink
Movespeed modifier changes (#660)
Browse files Browse the repository at this point in the history
## About The Pull Request
Что замедляло замедляет сильнее; что ускоряло, ускоряет быстрее. Простое
умножение модификатора на `(RP_SPEED / TG_SPEED)`.

Пример с ножками генокрада.
ТГ скорость - 1.5
Ножки генокрада - -0.55
Итоговая скорость - 0.95, или же ~36% быстрее

РП скорость - 2.2
Ножки генокрада - -0.81
Итоговая скорость - 1.39, или же ~36% быстрее
  • Loading branch information
larentoun authored Nov 8, 2024
1 parent db3ce12 commit 788876f
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 64 deletions.
2 changes: 1 addition & 1 deletion code/modules/movespeed/_movespeed_modifier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ GLOBAL_LIST_EMPTY(movespeed_modification_cache)
if(M.blacklisted_movetypes & movement_type) // There's a movetype here that disables this modifier, skip
continue
var/conflict = M.conflicts_with
var/amt = M.multiplicative_slowdown
var/amt = M.get_rp_speed() // BANDASTATION EDIT - Speed
if(conflict)
// Conflicting modifiers prioritize the larger slowdown or the larger speedup
// We purposefuly don't handle mixing speedups and slowdowns on the same id
Expand Down
6 changes: 5 additions & 1 deletion modular_bandastation/balance/_balance.dme
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#include "_balance.dm"

#include "code/balance_riding.dm"
#include "code/~defines.dm"

#include "code/speed/movespeed_modifier.dm"
#include "code/dynamic.dm"
#include "code/events.dm"
#include "code/station_traits.dm"
#include "code/supply_packs.dm"
#include "code/crew_manifest.dm"

#include "code/~undefs.dm"
10 changes: 0 additions & 10 deletions modular_bandastation/balance/code/balance_riding.dm

This file was deleted.

10 changes: 10 additions & 0 deletions modular_bandastation/balance/code/speed/movespeed_modifier.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/proc/modified_move_delay(move_delay, ignore_zero = FALSE)
if(move_delay == 0 && !ignore_zero)
return round(max(RP_SPEED - TG_SPEED, 0) * TG_SPEED, 0.01)
return round(RP_SPEED / TG_SPEED * move_delay, 0.01)

/datum/movespeed_modifier/proc/get_rp_speed()
return modified_move_delay(multiplicative_slowdown, ignore_zero = TRUE)

/datum/movespeed_modifier/config_walk_run/get_rp_speed()
return multiplicative_slowdown
2 changes: 2 additions & 0 deletions modular_bandastation/balance/code/~defines.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define TG_SPEED 1.5
#define RP_SPEED CONFIG_GET(number/movedelay/run_delay)
2 changes: 2 additions & 0 deletions modular_bandastation/balance/code/~undefs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#undef TG_SPEED
#undef RP_SPEED
4 changes: 0 additions & 4 deletions modular_bandastation/crawl_speed/_crawl_speed.dm

This file was deleted.

6 changes: 0 additions & 6 deletions modular_bandastation/crawl_speed/_crawl_speed.dme

This file was deleted.

2 changes: 0 additions & 2 deletions modular_bandastation/crawl_speed/code/_crawl_speed_defines.dm

This file was deleted.

24 changes: 0 additions & 24 deletions modular_bandastation/crawl_speed/code/crawl_speed_component.dm

This file was deleted.

12 changes: 0 additions & 12 deletions modular_bandastation/crawl_speed/code/crawl_speed_mob.dm

This file was deleted.

2 changes: 0 additions & 2 deletions modular_bandastation/crawl_speed/code/~crawl_speed_defines.dm

This file was deleted.

3 changes: 1 addition & 2 deletions modular_bandastation/modular_bandastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
#include "balance/_balance.dme"
#include "barsigns/_barsigns.dme"
#include "communication/_communication.dme"
//#include "crawl_speed/_crawl_speed.dme" // Fixing floored melee brawl, or first steps to remove RP speed
#include "cyrillic_fixes/_cyrillic_fixes.dme"
#include "database220/_database220.dme"
#include "discord/_discord.dme"
#include "emote_panel/_emote_panel.dme" // Waiting for upstream merge
#include "emote_panel/_emote_panel.dme"
#include "examine_panel/_examine_panel.dme"
#include "gunhud/_gunhud.dme"
#include "hair/_hair.dme"
Expand Down

0 comments on commit 788876f

Please sign in to comment.