* [READY] Space Ninja Rework (#53492) * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Revert "Automatic changelog compile [ci skip]" This reverts commit 48a63defa644ec9826ee5eb1736e5158d2a636d4. * Revert "Automatic changelog compile [ci skip]" This reverts commit cb68f4988edd9d841c4203eecee2067a49ce75c5. * Revert "Revert "Automatic changelog compile [ci skip]"" This reverts commit e6e1f1ef53ee6611c334efcae6ca7c102edaf351. * Revert "Revert "Automatic changelog compile [ci skip]"" This reverts commit 1782210527b9819772c0781122bec35b7979bf7d. * Update changelog.html * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Move suit_initialization into better location * Clean up cost check * Clean up net using * Clean up Ninja Star * Clean Up Ninja Stealth * Clean Up Sword Recall * Move the event file * Re-Merge the Changes * Get your ninja code out of my human.dm * Move the event into events folder and clean it up * Can the old space ninja antagonist file * Roll in the shiny new bad boy * Get rid of actions/ninja.dm and move its info into respective ability files * Update one_click_antag with new ninja * Move proc out of ninja code into proper location * Update the dme properly this time * Update code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm Co-authored-by: Fikou <piotrbryla@ onet.pl> * Update code/modules/ninja/suit/gloves.dm Co-authored-by: Fikou <piotrbryla@ onet.pl> * Update the antagonist file * Update ninjaDrainAct * Re-Add MGS Voice Lines * Up the Katana Damage Back Up to 30 * Attempting a Risky Manuever * Adjusting some numbers to fit the delta time PR * Fix Var Names and do a return ..() * Remove Unused Defines, Update qdels to QDEL_NULLs * Update code/modules/antagonists/space_ninja/space_ninja.dm Co-authored-by: Rohesie <rohesie@ gmail.com> * Update code/modules/antagonists/space_ninja/space_ninja.dm Co-authored-by: Rohesie <rohesie@ gmail.com> * Update code/modules/events/space_ninja.dm Co-authored-by: Rohesie <rohesie@ gmail.com> * Update code/modules/ninja/energy_katana.dm Co-authored-by: Rohesie <rohesie@ gmail.com> * Update code/modules/ninja/ninja_explosive.dm Co-authored-by: Rohesie <rohesie@ gmail.com> * Update code/modules/ninja/suit/ninja_equipment_actions/energy_net_nets.dm Co-authored-by: Rohesie <rohesie@ gmail.com> * Remove Unnecessary Condition Checks * I'll show you what A stands for! * Turn some things into defines * Remove is_ninja() * Gives the SN roles on Antag Gain, not on event spawn * Clean up mind/key code to be efficient and modern * Have Deactivated Suit Gloves use default black sprite * Add the new clothing sprites * Add new inventory sprites for alternate sprites * Get Rid of These Again * Re-add suit changes * Implement all the suggestions for the antag file * And then everything else * Updating the Weight for purpose of testmerge * Balance Updates * Update the Objective Definitions * Remove Now Unreachable Cyborg Interaction Code * Get That Shit Out of My Forest * Re-Add Cowl Wearing Sprite * Re-Add Cowl Inventory Sprite * Adapt to the new thing?.thing changes * Re-add New Katana Inhand Sprites * Re-Add glove's shock but have it do knockdown instead * Get rid of the these stupid changelog changes * Update sounds * Re-add New Mask Sprite * Re-update katana inventory sprite * Revert Event Weight * Update code/modules/ninja/suit/ninja_equipment_actions/energy_net_nets.dm Co-authored-by: girl <11748095+ExcessiveUseOfCobblestone@ users.noreply.github.com> * Re-Add Dynamic Ninja * Revert Changelog thing * Update Mob Sprites * Add files via upload Co-authored-by: Changelogs <action@ github.com> Co-authored-by: Fikou <piotrbryla@ onet.pl> Co-authored-by: Rohesie <rohesie@ gmail.com> Co-authored-by: girl <11748095+ExcessiveUseOfCobblestone@ users.noreply.github.com> * [READY] Space Ninja Rework Co-authored-by: IndieanaJones <47086570+IndieanaJones@users.noreply.github.com> Co-authored-by: Changelogs <action@ github.com> Co-authored-by: Fikou <piotrbryla@ onet.pl> Co-authored-by: Rohesie <rohesie@ gmail.com> Co-authored-by: girl <11748095+ExcessiveUseOfCobblestone@ users.noreply.github.com>
Dynamic Mode
Roundstart
Dynamic rolls threat based on a special sauce formula:
[dynamic_curve_width][/datum/controller/global_vars/var/dynamic_curve_width] * tan((3.1416 * (rand() - 0.5) * 57.2957795)) + [dynamic_curve_centre][/datum/controller/global_vars/var/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][/datum/game_mode/dynamic/proc/rigged_roundstart] is called instead if there are forced rules (an admin set the mode)
- [can_start][/datum/game_mode/proc/can_start]()
- [pre_setup][/datum/game_mode/proc/pre_setup]()
- [roundstart][/datum/game_mode/dynamic/proc/roundstart]() OR [rigged_roundstart][/datum/game_mode/dynamic/proc/rigged_roundstart]()
- [picking_roundstart_rule][/datum/game_mode/dynamic/proc/picking_roundstart_rule](drafted_rules)
- [post_setup][/datum/game_mode/proc/post_setup]()
Process
Calls [rule_process][/datum/dynamic_ruleset/proc/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