Skip to content

Commit

Permalink
modify cooldown declares, not base speed
Browse files Browse the repository at this point in the history
  • Loading branch information
larentoun committed Oct 13, 2024
1 parent e5a1290 commit 847b64a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion code/datums/components/riding/riding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
/datum/component/riding/proc/driver_move(atom/movable/movable_parent, mob/living/user, direction)
SIGNAL_HANDLER
SHOULD_CALL_PARENT(TRUE)
movable_parent.set_glide_size(DELAY_TO_GLIDE_SIZE(vehicle_move_delay))
movable_parent.set_glide_size(DELAY_TO_GLIDE_SIZE(modified_move_delay(vehicle_move_delay))) // BANDASTATION EDIT - Vehicle speed

/// So we can check all occupants when we bump a door to see if anyone has access
/datum/component/riding/proc/vehicle_bump(atom/movable/movable_parent, obj/machinery/door/possible_bumped_door)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/riding/riding_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
var/mob/living/living_parent = parent
step(living_parent, direction)
var/modified_move_cooldown = vehicle_move_cooldown
var/modified_move_delay = vehicle_move_delay
var/modified_move_delay = modified_move_delay(vehicle_move_delay)
if(ishuman(user) && HAS_TRAIT(user, TRAIT_ROUGHRIDER)) // YEEHAW!
var/mob/living/carbon/human/rough_rider = user
var/ride_benefit = null
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/riding/riding_vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
return

step(movable_parent, direction)
COOLDOWN_START(src, vehicle_move_cooldown, vehicle_move_delay)
COOLDOWN_START(src, vehicle_move_cooldown, modified_move_delay(vehicle_move_delay)) // BANDASTATION EDIT - Vehicle speed

if(QDELETED(src))
return
Expand Down
2 changes: 1 addition & 1 deletion code/datums/elements/ridable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
return
var/speed_limit = round(CONFIG_GET(number/movedelay/run_delay) * 0.85, 0.01)
var/datum/component/riding/theoretical_riding_component = riding_component_type
var/theoretical_speed = initial(theoretical_riding_component.vehicle_move_delay)
var/theoretical_speed = modified_move_delay(initial(theoretical_riding_component.vehicle_move_delay)) // BANDASTATION EDIT - Vehicle speed
if(theoretical_speed <= speed_limit) // i say speed but this is actually move delay, so you have to be ABOVE the speed limit to pass
to_chat(user, span_warning("[ridable_atom] can't be made any faster!"))
return
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/cars/car.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
/obj/vehicle/sealed/car/vehicle_move(direction)
if(!COOLDOWN_FINISHED(src, cooldown_vehicle_move))
return FALSE
COOLDOWN_START(src, cooldown_vehicle_move, vehicle_move_delay)
COOLDOWN_START(src, cooldown_vehicle_move, modified_move_delay(vehicle_move_delay)) // BANDASTATION EDIT - Vehicle speed

if(COOLDOWN_FINISHED(src, enginesound_cooldown))
COOLDOWN_START(src, enginesound_cooldown, engine_sound_length)
Expand Down
6 changes: 0 additions & 6 deletions modular_bandastation/balance/code/balance_riding.dm
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#define TG_SPEED 1.5
#define RP_SPEED CONFIG_GET(number/movedelay/run_delay)

/datum/component/riding/Initialize(mob/living/riding_mob, force, buckle_mob_flags, potion_boost)
. = ..()
if(. == COMPONENT_INCOMPATIBLE)
return
vehicle_move_delay = modified_move_delay(vehicle_move_delay)

/proc/modified_move_delay(move_delay)
if(move_delay == 0)
return round(max(RP_SPEED - TG_SPEED, 0) * TG_SPEED, 0.01)
Expand Down

0 comments on commit 847b64a

Please sign in to comment.