Files
GS13NG/code/game/gamemodes/dynamic
Detective-Google bd37d45334 Ports TG Icemoon framework and map (#49680) (#12002)
* ports all the tg junk for icemoon, not yet changed to make it all compile

* fixes

* fixes

* fixes

* fixes

* fixes

* new stuff

* whew

* fixes

* it compiles, now to fix the maps

* fixes the maps

* fixes solars + removes the space tiles in the toxins burn chamber

* nukes the SpawnTerrain proc used for tg geysers

* linter fix

* fix

* fixes the non matching turf atmos (hopefully)

* more mapping fixes

* dmm2tgm

* unfucks changeturf for the more_caves

* fixes the volanic subtypes of the other thing

* fixes the stupid fucking tile placing list

* some map fixes, fixes the station_ruin loader shitting out errors this commit took 2 hours of my fucking life

* fixes a bunch of mismatch atmos in ruins

* fixes wendigo cave having no air

* backwards couch backwards couch

* fixes the SM up

* wendigos can't runtime when butchering if you can't butcher them 😎

* makes the wendigo fight have the same atmos as the surrounding icemoon

* Tweaks atmos mixture from o2=22;n2=82;TEMP=180 to o2=18;n2=63;TEMP=180, making lavaland weapons actually work

* makes the wendigo screech shake not completely aids

* fixes snowlegion portals dropping proper legions instead of skeles

* brings the engioutpost ruin over as well

* whoopps

* empty commit to reroll bots

* Fixes pirates, ops, the mining base, and gives pirates and ops drills

* fixes lone ops and ninjas

* fixes the snowed plating getting fucked when tiles are placed on it

* removes some OP junk from the wabbajack pool (aka removes non-antag headslugs again)

* more bug fixes

* empty commit to reroll bots

* hopefully finally kills the active turfs on the library ruin

Co-authored-by: kevinz000 <2003111+kevinz000@users.noreply.github.com>
2020-05-07 14:46:16 +02:00
..
2020-04-24 16:18:34 -07:00
2020-05-01 18:02:00 +02:00

DYNAMIC

ROUNDSTART

Dynamic rolls threat based on a special sauce formula: "dynamic_curve_width * tan((3.1416 * (rand() - 0.5) * 57.2957795)) + dynamic_curve_centre"

Latejoin and midround injection cooldowns are set using exponential distribution between 5 minutes and 25 for latejoin 15 minutes and 35 for midround this value is then added to world.time and assigned to the injection cooldown variables.

rigged_roundstart() is called instead if there are forced rules (an admin set the mode)

can_start() -> pre_setup() -> roundstart() OR rigged_roundstart() -> picking_roundstart_rule(drafted_rules) -> post_setup()

PROCESS

Calls rule_process on every rule which is in the current_rules list. Every sixty seconds, update_playercounts() Midround injection time is checked against world.time to see if an injection should happen. If midround injection time is lower than world.time, it updates playercounts again, then tries to inject and generates a new cooldown regardless of whether a rule is picked.

LATEJOIN

make_antag_chance(newPlayer) -> [For each latespawn rule...] -> acceptable(living players, threat_level) -> trim_candidates() -> ready(forced=FALSE) **If true, add to drafted rules **NOTE that acceptable uses threat_level not threat! **NOTE Latejoin timer is ONLY reset if at least one rule was drafted. **NOTE the new_player.dm AttemptLateSpawn() calls OnPostSetup for all roles (unless assigned role is MODE) [After collecting all draftble rules...] -> picking_latejoin_ruleset(drafted_rules) -> spend threat -> ruleset.execute()

MIDROUND

process() -> [For each midround rule...] -> acceptable(living players, threat_level) -> trim_candidates() -> ready(forced=FALSE) [After collecting all draftble rules...] -> picking_midround_ruleset(drafted_rules) -> spend threat -> ruleset.execute()

FORCED

For latejoin, it simply sets forced_latejoin_rule make_antag_chance(newPlayer) -> trim_candidates() -> ready(forced=TRUE) **NOTE no acceptable() call For midround, calls the below proc with forced = TRUE picking_specific_rule(ruletype,forced) -> forced OR acceptable(living_players, threat_level) -> trim_candidates() -> ready(forced) -> spend threat -> execute() **NOTE specific rule can be called by RS traitor->MR autotraitor w/ forced=FALSE **NOTE that due to short circuiting acceptable() need not be called if forced.

RULESET

acceptable(population,threat) just checks if enough threat_level for population indice. **NOTE that we currently only send threat_level as the second arg, not threat. ready(forced) checks if enough candidates and calls the map's map_ruleset(dynamic_ruleset) at the parent level trim_candidates() varies significantly according to the ruleset type Roundstart: All candidates are new_player mobs. Check them for standard stuff: connected, desire role, not banned, etc. **NOTE Roundstart deals with both candidates (trimmed list of valid players) and mode.candidates (everyone readied up). Don't confuse them! Latejoin: Only one candidate, the latejoiner. Standard checks. Midround: Instead of building a single list candidates, candidates contains four lists: living, dead, observing, and living antags. Standard checks in trim_list(list). Midround - Rulesets have additional types /from_ghosts: execute() -> send_applications() -> review_applications() -> finish_setup(mob/newcharacter, index) -> setup_role(role) **NOTE: execute() here adds dead players and observers to candidates list