mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-22 08:11:06 +00:00
This commit ports /tg/'s move refactor. The throwing system has been replaced entirely, removing the necessity of throw_at_fast and resolving multiple outstanding issues, such as crossbows being unusable. Spacedrifting has also been upgraded to function with the new throwing system. It is now it's own process. Tickcomp has been killed, and the config values have been adjusted to more or less match live Paradise. All mobs now share a common Bump() proc. There are only four mobtypes which do not, including humans and simple animals. With the exception of mob types that do not ever want to Bump() or be Bumped(), they should call the parent proc. Human movement slowdown has been moderately tweaked in how it stacks effects; It shouldn't be significantly different from a player perspective. Mobs will now spread fire if they bump into another mob. I don't want to set the world on fiiiire, I just want start a flame in your heart~ For player facing changes: Input delay has been reduced by roughly ~50ms for any direction keys, by advantage of a previously unknown flag on byond verbs which allow them to operate independently from the tick rate of the server. You may need to clear your interface.dmf file if you have a custom skin for this change to function.
53 lines
1.2 KiB
Plaintext
53 lines
1.2 KiB
Plaintext
var/global/datum/controller/process/spacedrift/drift_master
|
|
|
|
/datum/controller/process/spacedrift
|
|
var/list/processing_list = list()
|
|
|
|
/datum/controller/process/spacedrift/setup()
|
|
name = "spacedrift"
|
|
schedule_interval = 5
|
|
start_delay = 20
|
|
log_startup_progress("Spacedrift starting up.")
|
|
|
|
/datum/controller/process/spacedrift/statProcess()
|
|
..()
|
|
stat(null, "P:[processing_list.len]")
|
|
|
|
/datum/controller/process/spacedrift/doWork()
|
|
var/list/currentrun = processing_list.Copy()
|
|
|
|
while(currentrun.len)
|
|
var/atom/movable/AM = currentrun[currentrun.len]
|
|
currentrun.len--
|
|
if(!AM)
|
|
processing_list -= AM
|
|
SCHECK
|
|
continue
|
|
|
|
if(AM.inertia_next_move > world.time)
|
|
SCHECK
|
|
continue
|
|
|
|
if(!AM.loc || AM.loc != AM.inertia_last_loc || AM.Process_Spacemove(0))
|
|
AM.inertia_dir = 0
|
|
|
|
if(!AM.inertia_dir)
|
|
AM.inertia_last_loc = null
|
|
processing_list -= AM
|
|
SCHECK
|
|
continue
|
|
|
|
var/old_dir = AM.dir
|
|
var/old_loc = AM.loc
|
|
AM.inertia_moving = TRUE
|
|
step(AM, AM.inertia_dir)
|
|
AM.inertia_moving = FALSE
|
|
AM.inertia_next_move = world.time + AM.inertia_move_delay
|
|
if(AM.loc == old_loc)
|
|
AM.inertia_dir = 0
|
|
|
|
AM.setDir(old_dir)
|
|
AM.inertia_last_loc = AM.loc
|
|
SCHECK
|
|
|
|
DECLARE_GLOBAL_CONTROLLER(spacedrift, drift_master) |