Files
Bubberstation/code/modules/client/preferences/fps.dm
SkyratBot c10be1344d [MIRROR] Fixes default FPS and makes it apply to new players [MDB IGNORE] (#8687)
* Fixes default FPS and makes it apply to new players (#61957)

Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Fixes default FPS and makes it apply to new players

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2021-10-08 08:22:12 -04:00

21 lines
499 B
Plaintext

/datum/preference/numeric/fps
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "clientfps"
savefile_identifier = PREFERENCE_PLAYER
minimum = -1
maximum = 240
/datum/preference/numeric/fps/create_default_value()
return -1
/datum/preference/numeric/fps/apply_to_client(client/client, value)
client.fps = (value < 0) ? RECOMMENDED_FPS : value
/datum/preference/numeric/fps/compile_constant_data()
var/list/data = ..()
data["recommended_fps"] = RECOMMENDED_FPS
return data