Files
Bubberstation/code/__DEFINES/dynamic.dm
Jacquerel 9efe108090 Admin dynamic rule management (#78720)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/7483112/a538643e-8d84-48b1-9dc0-c29a90d3a46c)
This PR adds a very ugly menu which allows admins to force dynamic
rulesets to be enabled or disabled.
Some admins asked if someone could add this and it seems reasonably
useful.


![image](https://github.com/tgstation/tgstation/assets/7483112/2a88cceb-0cdc-4d92-b688-19cd7daf31ae)

The information you have available becomes slightly more detailed once
the game is actually running, because then we know how many players and
how much threat there is.


![image](https://github.com/tgstation/tgstation/assets/7483112/91fdc7e7-dc3e-4b56-a2db-a33cb241e39b)

I don't know why the weight of every midround is 0 when I run locally.
It's fine.
Unfortunately, the interface I have crafted is hideous. This is because
it's not part of tgui and I am not very good at working with byond UIs
without my beautiful typescript. It functions though.
If anyone has any pointers I'll take 'em.

"Force disabling" a ruleset simply ensures it will never run.
"Force enabling" a ruleset disregards minimum population and minimum
threat rules, but doesn't ensure that the ruleset will run. It might
still be skipped due to low weight, insufficient threat to _buy_ it, or
other disqualifying factors.

## Why It's Good For The Game

It was an admin request so presumably they have some plans for it.
It's a less-intrusive way of theming a round than disabling dynamic and
running all the midround rules yourself.
If they want to temporarily set the game to traitorling I guess they can
do that. Or only heretic/cult.

## Changelog

🆑
admin: Admins can turn off dynamic rulesets (or force them on despite
not meeting the qualification criteria) on a per-round basis.
/🆑
2023-10-03 14:34:19 -06:00

41 lines
1.6 KiB
Plaintext

/// This is the only ruleset that should be picked this round, used by admins and should not be on rulesets in code.
#define ONLY_RULESET (1 << 0)
/// Only one ruleset with this flag will be picked.
#define HIGH_IMPACT_RULESET (1 << 1)
/// This ruleset can only be picked once. Anything that does not have a scaling_cost MUST have this.
#define LONE_RULESET (1 << 2)
/// This is a "heavy" midround ruleset, and should be run later into the round
#define MIDROUND_RULESET_STYLE_HEAVY "Heavy"
/// This is a "light" midround ruleset, and should be run early into the round
#define MIDROUND_RULESET_STYLE_LIGHT "Light"
/// No round event was hijacked this cycle
#define HIJACKED_NOTHING "HIJACKED_NOTHING"
/// This cycle, a round event was hijacked when the last midround event was too recent.
#define HIJACKED_TOO_RECENT "HIJACKED_TOO_RECENT"
/// Kill this ruleset from continuing to process
#define RULESET_STOP_PROCESSING 1
/// Requirements when something needs a lot of threat to run, but still possible at low-pop
#define REQUIREMENTS_VERY_HIGH_THREAT_NEEDED list(90,90,90,80,60,50,40,40,40,40)
/// Max number of teams we can have for the abductor ruleset
#define ABDUCTOR_MAX_TEAMS 4
// Ruletype defines
#define ROUNDSTART_RULESET "Roundstart"
#define LATEJOIN_RULESET "Latejoin"
#define MIDROUND_RULESET "Midround"
#define RULESET_NOT_FORCED "not forced"
/// Ruleset should run regardless of population and threat available
#define RULESET_FORCE_ENABLED "force enabled"
/// Ruleset should not run regardless of population and threat available
#define RULESET_FORCE_DISABLED "force disabled"