mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-29 08:09:34 +01:00
between() -> clamp() & swaps args 1 and 2 in uses
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user