mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-17 13:12:37 +00:00
* 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>
21 lines
499 B
Plaintext
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
|