mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
world.fps
This commit is contained in:
@@ -202,7 +202,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
// Sort subsystems by display setting for easy access.
|
||||
sortTim(subsystems, /proc/cmp_subsystem_display)
|
||||
// Set world options.
|
||||
world.fps = CONFIG_GET(number/fps)
|
||||
world.change_fps(CONFIG_GET(number/fps))
|
||||
var/initialized_tod = REALTIMEOFDAY
|
||||
|
||||
if(sleep_offline_after_initializations)
|
||||
|
||||
@@ -306,3 +306,14 @@ GLOBAL_VAR(restart_counter)
|
||||
maxz++
|
||||
SSmobs.MaxZChanged()
|
||||
SSidlenpcpool.MaxZChanged()
|
||||
|
||||
|
||||
/world/proc/change_fps(new_value = 20)
|
||||
if(new_value <= 0)
|
||||
CRASH("change_fps() called with [new_value] new_value.")
|
||||
if(fps == new_value)
|
||||
return //No change required.
|
||||
|
||||
fps = new_value
|
||||
|
||||
SStimer?.reset_buckets()
|
||||
@@ -23,4 +23,4 @@
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Set Server FPS", "[new_fps]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
CONFIG_SET(number/fps, new_fps)
|
||||
world.fps = new_fps
|
||||
world.change_fps(new_fps)
|
||||
|
||||
Reference in New Issue
Block a user