between() -> clamp() & swaps args 1 and 2 in uses

This commit is contained in:
Spookerton
2024-02-05 15:47:07 +00:00
parent dfac4a77fe
commit ebbf0e33fb
68 changed files with 137 additions and 146 deletions
+3 -3
View File
@@ -85,12 +85,12 @@ SUBSYSTEM_DEF(game_master)
// Tell the game master that something dangerous happened, e.g. someone dying, station explosions.
/datum/controller/subsystem/game_master/proc/adjust_danger(amount)
amount *= GM.danger_modifier
danger = round(between(0, danger + amount, 1000), 0.1)
danger = round(clamp(danger + amount, 0, 1000), 0.1)
// Tell the game master that things are getting boring if positive, or something interesting if negative..
/datum/controller/subsystem/game_master/proc/adjust_staleness(amount)
amount *= GM.staleness_modifier
staleness = round( between(-20, staleness + amount, 100), 0.1)
staleness = round( clamp(staleness + amount, -20, 100), 0.1)
// These are ran before committing to an event.
// Returns TRUE if the system is allowed to proceed, otherwise returns FALSE.
@@ -364,4 +364,4 @@ SUBSYSTEM_DEF(game_master)
danger = amount
message_admins("GM danger was set to [amount] by [usr.key].")
interact(usr) // To refresh the UI.
interact(usr) // To refresh the UI.