Skip to content

Commit 6c7d153

Browse files
authored
Carps now go much faster when ridden without gravity (#4055)
* Carps now go much faster when ridden without gravity * fix comment lol
1 parent fd4918a commit 6c7d153

File tree

8 files changed

+20
-5
lines changed

8 files changed

+20
-5
lines changed

code/datums/components/riding/riding.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
/datum/component/riding/proc/driver_move(atom/movable/movable_parent, mob/living/user, direction)
252252
SIGNAL_HANDLER
253253
SHOULD_CALL_PARENT(TRUE)
254-
movable_parent.set_glide_size(DELAY_TO_GLIDE_SIZE(vehicle_move_delay))
254+
movable_parent.set_glide_size(DELAY_TO_GLIDE_SIZE(move_delay())) // monkestation edit: use move_delay() proc instead of raw vehicle_move_delay var
255255

256256
/// So we can check all occupants when we bump a door to see if anyone has access
257257
/datum/component/riding/proc/vehicle_bump(atom/movable/movable_parent, obj/machinery/door/possible_bumped_door)

code/datums/components/riding/riding_mob.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
var/turf/next = get_step(living_parent, direction)
104104
step(living_parent, direction)
105105
last_move_diagonal = ((direction & (direction - 1)) && (living_parent.loc == next))
106-
COOLDOWN_START(src, vehicle_move_cooldown, (last_move_diagonal? 2 : 1) * vehicle_move_delay)
106+
COOLDOWN_START(src, vehicle_move_cooldown, (last_move_diagonal ? 2 : 1) * move_delay()) // monkestation edit: use move_delay() proc instead of raw vehicle_move_delay var
107107
return ..()
108108

109109
/datum/component/riding/creature/keycheck(mob/user)

code/datums/components/riding/riding_structure.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
step(movable_parent, direction)
3030
last_move_diagonal = ((direction & (direction - 1)) && (movable_parent.loc == next))
31-
COOLDOWN_START(src, vehicle_move_cooldown, (last_move_diagonal? 2 : 1) * vehicle_move_delay)
31+
COOLDOWN_START(src, vehicle_move_cooldown, (last_move_diagonal? 2 : 1) * move_delay()) // monkestation edit: use move_delay() proc instead of raw vehicle_move_delay var
3232

3333
if(QDELETED(src))
3434
return

code/datums/components/riding/riding_vehicle.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898

9999
step(movable_parent, direction)
100100
last_move_diagonal = ((direction & (direction - 1)) && (movable_parent.loc == next))
101-
COOLDOWN_START(src, vehicle_move_cooldown, (last_move_diagonal? 2 : 1) * vehicle_move_delay)
101+
COOLDOWN_START(src, vehicle_move_cooldown, (last_move_diagonal ? 2 : 1) * move_delay()) // monkestation edit: use move_delay() proc instead of raw vehicle_move_delay var
102102

103103
if(QDELETED(src))
104104
return
@@ -214,7 +214,7 @@
214214
COOLDOWN_START(src, message_cooldown, 0.75 SECONDS)
215215
return COMPONENT_DRIVER_BLOCK_MOVE
216216
return ..()
217-
217+
218218
/datum/component/riding/vehicle/speedbike
219219
vehicle_move_delay = 0
220220
override_allow_spacemove = TRUE
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Carps move 4x faster when ridden in space
2+
/datum/component/riding/creature/carp/move_delay()
3+
. = ..()
4+
var/mob/living/living_parent = parent
5+
if(!living_parent.has_gravity())
6+
. *= 0.25
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/// Returns the move delay of this vehicle.
2+
/datum/component/riding/proc/move_delay()
3+
return vehicle_move_delay
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/mob/living/basic/carp/on_tamed(mob/tamer, feedback = TRUE)
2+
. = ..()
3+
ai_controller?.change_ai_movement_type(/datum/ai_movement/jps)

tgstation.dme

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5865,6 +5865,8 @@
58655865
#include "monkestation\code\datums\components\turf_healing.dm"
58665866
#include "monkestation\code\datums\components\uplink.dm"
58675867
#include "monkestation\code\datums\components\wound_converter.dm"
5868+
#include "monkestation\code\datums\components\riding\riding_mob.dm"
5869+
#include "monkestation\code\datums\components\riding\riding_vehicle.dm"
58685870
#include "monkestation\code\datums\diseases\advance\symptoms\clockwork.dm"
58695871
#include "monkestation\code\datums\elements\area_locked.dm"
58705872
#include "monkestation\code\datums\elements\basic_eating.dm"
@@ -7398,6 +7400,7 @@
73987400
#include "monkestation\code\modules\mob\living\basic\pets\snake.dm"
73997401
#include "monkestation\code\modules\mob\living\basic\pets\parrot\_parrot.dm"
74007402
#include "monkestation\code\modules\mob\living\basic\pets\parrot\parrot_ai\parroting_action.dm"
7403+
#include "monkestation\code\modules\mob\living\basic\space_fauna\carp\carp.dm"
74017404
#include "monkestation\code\modules\mob\living\basic\space_fauna\slugcat\slugcat.dm"
74027405
#include "monkestation\code\modules\mob\living\basic\trooper\syndicate.dm"
74037406
#include "monkestation\code\modules\mob\living\basic\vermin\frog.dm"

0 commit comments

Comments
 (0)