Merge branch 'master' into familyport

This commit is contained in:
keronshb
2022-02-11 14:04:57 -05:00
1209 changed files with 276175 additions and 55667 deletions
+1 -7
View File
@@ -151,14 +151,8 @@ Credit where due:
var/datum/team/clockcult/main_clockcult
/datum/game_mode/clockwork_cult/pre_setup() //Gamemode and job code is pain. Have fun codediving all of that stuff, whoever works on this next - Delta
var/list/errorList = list()
var/list/reebes = SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "City_of_Cogs.dmm", default_traits = ZTRAITS_REEBE, silent = TRUE)
if(errorList.len) // reebe failed to load
message_admins("Reebe failed to load!")
log_game("Reebe failed to load!")
if(!load_reebe())
return FALSE
for(var/datum/parsed_map/PM in reebes) //Temporarily commented because of z-level loading reliably segfaulting the server.
PM.initTemplateBounds()
if(CONFIG_GET(flag/protect_roles_from_antagonist))
restricted_jobs += protected_jobs
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
+1
View File
@@ -653,6 +653,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
if (drafted_rules.len > 0)
pick_midround_rule(drafted_rules)
else if (random_event_hijacked == HIJACKED_TOO_SOON)
message_admins("DYNAMIC: Midround injection failed when random event was hijacked. Spawning another random event in its place.")
log_game("DYNAMIC: Midround injection failed when random event was hijacked. Spawning another random event in its place.")
// A random event antag would have rolled had this injection check passed.
@@ -445,6 +445,70 @@
else
return ..()
//////////////////////////////////////////////
// //
// Clock Cult (MID) //
// //
//////////////////////////////////////////////
//changes two people midround into clockwork cultists
/datum/dynamic_ruleset/midround/ratvar_awakening
name = "Ratvar Awakening"
antag_datum = /datum/antagonist/clockcult
antag_flag = "clock mid"
antag_flag_override = ROLE_SERVANT_OF_RATVAR
protected_roles = list("AI", "Cyborg", "Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Chief Medical Officer", "Research Director")
restricted_roles = list("AI", "Cyborg", "Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Chief Medical Officer", "Research Director")
enemy_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Chief Medical Officer", "Research Director")
required_enemies = list(1,1,1,1,1,1,0,0,0,0)
required_candidates = 2
weight = 3
cost = 20
requirements = list(101,101,101,101,50,40,30,20,10,10)
var/list/clock_cap = list(1,1,1,1,2,3,4,5,5,5)
flags = HIGH_IMPACT_RULESET
/datum/dynamic_ruleset/midround/ratvar_awakening/acceptable(population=0, threat=0)
if (locate(/datum/dynamic_ruleset/roundstart/clockcult) in mode.executed_rules)
return FALSE // Unavailable if clockies exist at round start
indice_pop = min(clock_cap.len, round(living_players.len/5)+1)
required_candidates = clock_cap[indice_pop]
return ..()
/datum/dynamic_ruleset/midround/ratvar_awakening/trim_candidates()
..()
candidates = living_players
for(var/mob/living/player as anything in candidates)
var/turf/player_turf = get_turf(player)
if(!player_turf || !is_station_level(player_turf.z))
candidates -= player //no ghost roles
continue
if(!is_eligible_servant(player))
candidates -= player
continue
if(player.mind && (player.mind.special_role || length(player.mind.antag_datums) > 0))
candidates -= player //no double dipping
/datum/dynamic_ruleset/midround/ratvar_awakening/execute()
if(!candidates || !candidates.len)
return FALSE
for(var/i = 0; i < required_candidates; i++)
if(!candidates.len)
break
var/mob/living/clock_antag = pick_n_take(candidates)
assigned += clock_antag.mind
for(var/datum/mind/M in assigned) //add them to the clockwork team
add_servant_of_ratvar(M.current)
SSticker.mode.equip_servant(M.current)
SSticker.mode.greet_servant(M.current)
message_admins("[ADMIN_LOOKUPFLW(M.current)] was selected by the [name] ruleset and has been made into a midround clock cultist.")
log_game("DYNAMIC: [key_name(M.current)] was selected by the [name] ruleset and has been made into a midround clock cultist.")
load_reebe()
return ..()
//////////////////////////////////////////////
// //
// BLOB (GHOST) //
+18
View File
@@ -779,6 +779,24 @@ GLOBAL_LIST_EMPTY(possible_items_special)
target_amount = count
update_explanation_text()
*/
/datum/objective/protect_object
name = "protect object"
var/obj/protect_target
/datum/objective/protect_object/proc/set_target(obj/O)
protect_target = O
update_explanation_text()
/datum/objective/protect_object/update_explanation_text()
. = ..()
if(protect_target)
explanation_text = "Protect \the [protect_target] at all costs."
else
explanation_text = "Free objective."
/datum/objective/protect_object/check_completion()
return !QDELETED(protect_target)
//Changeling Objectives
/datum/objective/absorb