mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
[MIRROR] separates malf ai from traitor dynamic ruleset (#2723)
* separates malf ai from traitor dynamic ruleset (#56090) Separates malf ai from traitor so admins can treat it separately * separates malf ai from traitor dynamic ruleset Co-authored-by: Fikou <piotrbryla@onet.pl>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
var/list/protected_roles = list()
|
||||
/// If set, rule will deny candidates from those roles always.
|
||||
var/list/restricted_roles = list()
|
||||
/// If set, rule will only accept candidates from those roles, IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
|
||||
/// If set, rule will only accept candidates from those roles.
|
||||
var/list/exclusive_roles = list()
|
||||
/// If set, there needs to be a certain amount of players doing those roles (among the players who won't be drafted) for the rule to be drafted IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
|
||||
var/list/enemy_roles = list()
|
||||
@@ -138,6 +138,8 @@
|
||||
/// Do everything you need to do before job is assigned here.
|
||||
/// IMPORTANT: ASSIGN special_role HERE
|
||||
/datum/dynamic_ruleset/proc/pre_execute()
|
||||
if(exclusive_roles.len)
|
||||
restricted_roles |= get_all_jobs() - exclusive_roles
|
||||
return TRUE
|
||||
|
||||
/// Called on post_setup on roundstart and when the rule executes on midround and latejoin.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
antag_datum = /datum/antagonist/traitor/
|
||||
minimum_required_age = 0
|
||||
protected_roles = list("Prisoner","Security Officer", "Warden", "Detective", "Head of Security", "Captain")
|
||||
restricted_roles = list("Cyborg")
|
||||
restricted_roles = list("Cyborg", "AI")
|
||||
required_candidates = 1
|
||||
weight = 5
|
||||
cost = 10 // Avoid raising traitor threat above 10, as it is the default low cost ruleset.
|
||||
@@ -484,6 +484,32 @@
|
||||
/datum/dynamic_ruleset/roundstart/families/round_result()
|
||||
return handler.set_round_result_analogue()
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// Malfunctioning AI //
|
||||
// //
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/malf
|
||||
name = "Malfunctioning AI"
|
||||
antag_datum = /datum/antagonist/traitor
|
||||
antag_flag = ROLE_MALF
|
||||
exclusive_roles = list("AI")
|
||||
minimum_required_age = 0
|
||||
required_candidates = 1
|
||||
weight = 5
|
||||
cost = 10
|
||||
requirements = list(10,10,10,10,10,10,10,10,10,10)
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/malf/pre_execute()
|
||||
. = ..()
|
||||
var/mob/living/silicon/ai/picked = pick_n_take(candidates)
|
||||
assigned += picked.mind
|
||||
picked.mind.restricted_roles = restricted_roles
|
||||
picked.mind.special_role = ROLE_MALF
|
||||
return TRUE
|
||||
|
||||
// Admin only rulesets. The threat requirement is 101 so it is not possible to roll them.
|
||||
|
||||
//////////////////////////////////////////////
|
||||
|
||||
@@ -376,10 +376,10 @@
|
||||
return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Cook", "Botanist", "Quartermaster", "Cargo Technician",
|
||||
"Shaft Miner", "Clown", "Mime", "Janitor", "Curator", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer",
|
||||
"Atmospheric Technician", "Chief Medical Officer", "Medical Doctor", "Paramedic", "Chemist", "Geneticist", "Virologist", "Psychologist",
|
||||
"Research Director", "Scientist", "Roboticist", "Head of Security", "Warden", "Detective", "Security Officer", "Prisoner")
|
||||
"Research Director", "Scientist", "Roboticist", "Head of Security", "Warden", "Detective", "Security Officer", "Prisoner", "Cyborg", "AI")
|
||||
|
||||
/proc/get_all_job_icons() //For all existing HUD icons
|
||||
return get_all_jobs() + list("Emergency Response Team Commander", "Security Response Officer", "Engineering Response Officer", "Medical Response Officer", "Entertainment Response Officer", "Religious Response Officer", "Janitorial Response Officer", "Death Commando")
|
||||
return get_all_jobs() + list("Emergency Response Team Commander", "Security Response Officer", "Engineering Response Officer", "Medical Response Officer", "Entertainment Response Officer", "Religious Response Officer", "Janitorial Response Officer", "Death Commando") - list("Cyborg", "AI")
|
||||
|
||||
/proc/get_all_centcom_jobs()
|
||||
return list("Central Command","VIP Guest","Custodian","Thunderdome Overseer","CentCom Official","Medical Officer","Research Officer","Special Ops Officer","Admiral","CentCom Commander","CentCom Bartender","Private Security Force")
|
||||
|
||||
Reference in New Issue
Block a user