mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-15 11:21:14 +01:00
47564346fb
* Begin * Begin 2 * move to tsx * fix that UI * fix gib * bunch of fixes * fix this one * Nicer ahelp bot text formatting * clean up all inputs * . * fix MC tab * fix ore spawn * with rare * More filter stuff * Cleaned up world * Fix * ummm * . * fix that * . * Begin * Begin 2 * move to tsx * fix that UI * fix gib * bunch of fixes * fix this one * clean up all inputs * Nicer ahelp bot text formatting * . * fix MC tab * fix ore spawn * with rare * More filter stuff * Cleaned up world * Fix * Added missing props * useContext fix * . --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
21 lines
1.2 KiB
Plaintext
21 lines
1.2 KiB
Plaintext
ADMIN_VERB_VISIBILITY(set_server_fps, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
|
|
ADMIN_VERB(set_server_fps, R_DEBUG, "Set Server FPS", "Sets game speed in frames-per-second. Can potentially break the game", ADMIN_CATEGORY_DEBUG)
|
|
var/cfg_fps = CONFIG_GET(number/fps)
|
|
var/new_fps = round(tgui_input_number(user, "Sets game frames-per-second. Can potentially break the game (default: [cfg_fps])","FPS", world.fps))
|
|
|
|
if(new_fps <= 0)
|
|
to_chat(user, span_danger("Error: set_server_fps(): Invalid world.fps value. No changes made."), confidential = TRUE)
|
|
return
|
|
if(new_fps > cfg_fps * 1.5)
|
|
if(tgui_alert(user, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!",list("Confirm","ABORT-ABORT-ABORT")) != "Confirm")
|
|
return
|
|
|
|
var/msg = "[key_name(user)] has modified world.fps to [new_fps]"
|
|
log_admin(msg, 0)
|
|
message_admins(msg, 0)
|
|
//SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Set Server FPS", "[new_fps]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
|
|
feedback_add_details("admin_verb", "SETFPS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
CONFIG_SET(number/fps, new_fps)
|
|
world.change_fps(new_fps)
|