[READY] A victory for revolutionaries will no longer end the round on dynamic, instead no new security and command will be allowed to join (#55956)

Currently, a victory for revoutionaries leads to the round abruptly ending on dynamic. This has been replaced by all revolutionaries being deconverted, and no new security or command positions being available.

Also attempts to unionize (pun intended) copy and paste code in the round start and late join revolutionary rulesets into being handled under the revolutionary team instead.
This commit is contained in:
Mothblocks
2021-01-11 17:52:40 -08:00
committed by GitHub
parent fa3cda7a4b
commit a4c61a37ad
13 changed files with 186 additions and 128 deletions

View File

@@ -14,6 +14,7 @@
#define ROLE_MALF "Malf AI" #define ROLE_MALF "Malf AI"
#define ROLE_REV "Revolutionary" #define ROLE_REV "Revolutionary"
#define ROLE_REV_HEAD "Head Revolutionary" #define ROLE_REV_HEAD "Head Revolutionary"
#define ROLE_REV_SUCCESSFUL "Victorious Revolutionary"
#define ROLE_ALIEN "Xenomorph" #define ROLE_ALIEN "Xenomorph"
#define ROLE_PAI "pAI" #define ROLE_PAI "pAI"
#define ROLE_CULTIST "Cultist" #define ROLE_CULTIST "Cultist"

View File

@@ -30,11 +30,13 @@ SUBSYSTEM_DEF(job)
var/datum/job/new_overflow = GetJob(new_overflow_role) var/datum/job/new_overflow = GetJob(new_overflow_role)
var/cap = CONFIG_GET(number/overflow_cap) var/cap = CONFIG_GET(number/overflow_cap)
new_overflow.allow_bureaucratic_error = FALSE
new_overflow.spawn_positions = cap new_overflow.spawn_positions = cap
new_overflow.total_positions = cap new_overflow.total_positions = cap
if(new_overflow_role != overflow_role) if(new_overflow_role != overflow_role)
var/datum/job/old_overflow = GetJob(overflow_role) var/datum/job/old_overflow = GetJob(overflow_role)
old_overflow.allow_bureaucratic_error = initial(old_overflow.allow_bureaucratic_error)
old_overflow.spawn_positions = initial(old_overflow.spawn_positions) old_overflow.spawn_positions = initial(old_overflow.spawn_positions)
old_overflow.total_positions = initial(old_overflow.total_positions) old_overflow.total_positions = initial(old_overflow.total_positions)
overflow_role = new_overflow_role overflow_role = new_overflow_role

View File

@@ -80,6 +80,9 @@
///Skill multiplier list, just slap your multiplier change onto this with the type it is coming from as key. ///Skill multiplier list, just slap your multiplier change onto this with the type it is coming from as key.
var/list/experience_multiplier_reasons = list() var/list/experience_multiplier_reasons = list()
/// A lazy list of statuses to add next to this mind in the traitor panel
var/list/special_statuses
/datum/mind/New(_key) /datum/mind/New(_key)
key = _key key = _key
martial_art = default_martial_art martial_art = default_martial_art

View File

@@ -190,10 +190,6 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
// Checks if there are HIGHLANDER_RULESETs and calls the rule's round_result() proc // Checks if there are HIGHLANDER_RULESETs and calls the rule's round_result() proc
/datum/game_mode/dynamic/set_round_result() /datum/game_mode/dynamic/set_round_result()
for(var/datum/dynamic_ruleset/rule in executed_rules)
if(rule.flags & HIGHLANDER_RULESET)
if(rule.check_finished()) // Only the rule that actually finished the round sets round result.
return rule.round_result()
// If it got to this part, just pick one highlander if it exists // If it got to this part, just pick one highlander if it exists
for(var/datum/dynamic_ruleset/rule in executed_rules) for(var/datum/dynamic_ruleset/rule in executed_rules)
if(rule.flags & HIGHLANDER_RULESET) if(rule.flags & HIGHLANDER_RULESET)
@@ -250,9 +246,6 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
return TRUE return TRUE
if(force_ending) if(force_ending)
return TRUE return TRUE
for(var/datum/dynamic_ruleset/rule in executed_rules)
if(rule.flags & HIGHLANDER_RULESET)
return rule.check_finished()
/datum/game_mode/dynamic/proc/show_threatlog(mob/admin) /datum/game_mode/dynamic/proc/show_threatlog(mob/admin)
if(!SSticker.HasRoundStarted()) if(!SSticker.HasRoundStarted())

View File

@@ -182,11 +182,6 @@
/// Only called if ruleset is flagged as HIGHLANDER_RULESET /// Only called if ruleset is flagged as HIGHLANDER_RULESET
/datum/dynamic_ruleset/proc/round_result() /datum/dynamic_ruleset/proc/round_result()
/// Checks if round is finished, return true to end the round.
/// Only called if ruleset is flagged as HIGHLANDER_RULESET
/datum/dynamic_ruleset/proc/check_finished()
return FALSE
////////////////////////////////////////////// //////////////////////////////////////////////
// // // //
// ROUNDSTART RULESETS // // ROUNDSTART RULESETS //

View File

@@ -86,6 +86,8 @@
blocking_rules = list(/datum/dynamic_ruleset/roundstart/revs) blocking_rules = list(/datum/dynamic_ruleset/roundstart/revs)
var/required_heads_of_staff = 3 var/required_heads_of_staff = 3
var/finished = FALSE var/finished = FALSE
/// How much threat should be injected when the revolution wins?
var/revs_win_threat_injection = 20
var/datum/team/revolution/revolution var/datum/team/revolution/revolution
/datum/dynamic_ruleset/latejoin/provocateur/ready(forced=FALSE) /datum/dynamic_ruleset/latejoin/provocateur/ready(forced=FALSE)
@@ -112,7 +114,7 @@
new_head = M.mind.add_antag_datum(new_head, revolution) new_head = M.mind.add_antag_datum(new_head, revolution)
revolution.update_objectives() revolution.update_objectives()
revolution.update_heads() revolution.update_heads()
SSshuttle.registerHostileEnvironment(src) SSshuttle.registerHostileEnvironment(revolution)
return TRUE return TRUE
else else
log_game("DYNAMIC: [ruletype] [name] discarded [M.name] from head revolutionary due to ineligibility.") log_game("DYNAMIC: [ruletype] [name] discarded [M.name] from head revolutionary due to ineligibility.")
@@ -120,29 +122,12 @@
return FALSE return FALSE
/datum/dynamic_ruleset/latejoin/provocateur/rule_process() /datum/dynamic_ruleset/latejoin/provocateur/rule_process()
if(check_rev_victory()) var/winner = revolution.process_victory(revs_win_threat_injection)
finished = REVOLUTION_VICTORY if (isnull(winner))
return RULESET_STOP_PROCESSING return
else if (check_heads_victory())
finished = STATION_VICTORY
SSshuttle.clearHostileEnvironment(src)
revolution.save_members()
for(var/datum/mind/M in revolution.members) // Remove antag datums and prevents podcloned or exiled headrevs restarting rebellions.
if(M.has_antag_datum(/datum/antagonist/rev/head))
var/datum/antagonist/rev/head/R = M.has_antag_datum(/datum/antagonist/rev/head)
R.remove_revolutionary(FALSE, "gamemode")
if(M.current)
var/mob/living/carbon/C = M.current
if(istype(C) && C.stat == DEAD)
C.makeUncloneable()
if(M.has_antag_datum(/datum/antagonist/rev))
var/datum/antagonist/rev/R = M.has_antag_datum(/datum/antagonist/rev)
R.remove_revolutionary(FALSE, "gamemode")
priority_announce("It appears the mutiny has been quelled. Please return yourself and your incapacitated colleagues to work. \
We have remotely blacklisted the head revolutionaries in your medical records to prevent accidental revival.", null, 'sound/ai/attention.ogg', null, "Central Command Loyalty Monitoring Division")
return RULESET_STOP_PROCESSING
finished = winner
return RULESET_STOP_PROCESSING
/// Checks for revhead loss conditions and other antag datums. /// Checks for revhead loss conditions and other antag datums.
/datum/dynamic_ruleset/latejoin/provocateur/proc/check_eligible(datum/mind/M) /datum/dynamic_ruleset/latejoin/provocateur/proc/check_eligible(datum/mind/M)
@@ -151,33 +136,8 @@
return TRUE return TRUE
return FALSE return FALSE
/datum/dynamic_ruleset/latejoin/provocateur/check_finished()
if(finished == REVOLUTION_VICTORY)
return TRUE
else
return ..()
/datum/dynamic_ruleset/latejoin/provocateur/proc/check_rev_victory()
for(var/datum/objective/mutiny/objective in revolution.objectives)
if(!(objective.check_completion()))
return FALSE
return TRUE
/datum/dynamic_ruleset/latejoin/provocateur/proc/check_heads_victory()
for(var/datum/mind/rev_mind in revolution.head_revolutionaries())
var/turf/T = get_turf(rev_mind.current)
if(!considered_afk(rev_mind) && considered_alive(rev_mind) && is_station_level(T.z))
if(ishuman(rev_mind.current))
return FALSE
return TRUE
/datum/dynamic_ruleset/latejoin/provocateur/round_result() /datum/dynamic_ruleset/latejoin/provocateur/round_result()
if(finished == REVOLUTION_VICTORY) revolution.round_result(finished)
SSticker.mode_result = "win - heads killed"
SSticker.news_report = REVS_WIN
else if(finished == STATION_VICTORY)
SSticker.mode_result = "loss - rev heads killed"
SSticker.news_report = REVS_LOSE
////////////////////////////////////////////// //////////////////////////////////////////////
// // // //

View File

@@ -380,6 +380,8 @@
blocking_rules = list(/datum/dynamic_ruleset/latejoin/provocateur) blocking_rules = list(/datum/dynamic_ruleset/latejoin/provocateur)
// I give up, just there should be enough heads with 35 players... // I give up, just there should be enough heads with 35 players...
minimum_players = 35 minimum_players = 35
/// How much threat should be injected when the revolution wins?
var/revs_win_threat_injection = 20
var/datum/team/revolution/revolution var/datum/team/revolution/revolution
var/finished = FALSE var/finished = FALSE
@@ -412,7 +414,7 @@
if(revolution.members.len) if(revolution.members.len)
revolution.update_objectives() revolution.update_objectives()
revolution.update_heads() revolution.update_heads()
SSshuttle.registerHostileEnvironment(src) SSshuttle.registerHostileEnvironment(revolution)
return TRUE return TRUE
log_game("DYNAMIC: [ruletype] [name] failed to get any eligible headrevs. Refunding [cost] threat.") log_game("DYNAMIC: [ruletype] [name] failed to get any eligible headrevs. Refunding [cost] threat.")
return FALSE return FALSE
@@ -422,26 +424,11 @@
..() ..()
/datum/dynamic_ruleset/roundstart/revs/rule_process() /datum/dynamic_ruleset/roundstart/revs/rule_process()
if(check_rev_victory()) var/winner = revolution.process_victory(revs_win_threat_injection)
finished = REVOLUTION_VICTORY if (isnull(winner))
return RULESET_STOP_PROCESSING return
else if (check_heads_victory())
finished = STATION_VICTORY finished = winner
SSshuttle.clearHostileEnvironment(src)
revolution.save_members()
for(var/datum/mind/M in revolution.members) // Remove antag datums and prevents podcloned or exiled headrevs restarting rebellions.
if(M.has_antag_datum(/datum/antagonist/rev/head))
var/datum/antagonist/rev/head/R = M.has_antag_datum(/datum/antagonist/rev/head)
R.remove_revolutionary(FALSE, "gamemode")
if(M.current)
var/mob/living/carbon/C = M.current
if(istype(C) && C.stat == DEAD)
C.makeUncloneable()
if(M.has_antag_datum(/datum/antagonist/rev))
var/datum/antagonist/rev/R = M.has_antag_datum(/datum/antagonist/rev)
R.remove_revolutionary(FALSE, "gamemode")
priority_announce("It appears the mutiny has been quelled. Please return yourself and your incapacitated colleagues to work. \
We have remotely blacklisted the head revolutionaries in your medical records to prevent accidental revival.", null, 'sound/ai/attention.ogg', null, "Central Command Loyalty Monitoring Division")
return RULESET_STOP_PROCESSING return RULESET_STOP_PROCESSING
/// Checks for revhead loss conditions and other antag datums. /// Checks for revhead loss conditions and other antag datums.
@@ -451,33 +438,8 @@
return TRUE return TRUE
return FALSE return FALSE
/datum/dynamic_ruleset/roundstart/revs/check_finished()
if(finished == REVOLUTION_VICTORY)
return TRUE
else
return ..()
/datum/dynamic_ruleset/roundstart/revs/proc/check_rev_victory()
for(var/datum/objective/mutiny/objective in revolution.objectives)
if(!(objective.check_completion()))
return FALSE
return TRUE
/datum/dynamic_ruleset/roundstart/revs/proc/check_heads_victory()
for(var/datum/mind/rev_mind in revolution.head_revolutionaries())
var/turf/T = get_turf(rev_mind.current)
if(!considered_afk(rev_mind) && considered_alive(rev_mind) && is_station_level(T.z))
if(ishuman(rev_mind.current))
return FALSE
return TRUE
/datum/dynamic_ruleset/roundstart/revs/round_result() /datum/dynamic_ruleset/roundstart/revs/round_result()
if(finished == REVOLUTION_VICTORY) revolution.round_result(finished)
SSticker.mode_result = "win - heads killed"
SSticker.news_report = REVS_WIN
else if(finished == STATION_VICTORY)
SSticker.mode_result = "loss - rev heads killed"
SSticker.news_report = REVS_LOSE
////////////////////////////////////////////// //////////////////////////////////////////////
// // // //

View File

@@ -77,7 +77,7 @@ GLOBAL_VAR(antag_prototypes)
return common_commands return common_commands
/datum/mind/proc/get_special_statuses() /datum/mind/proc/get_special_statuses()
var/list/result = list() var/list/result = LAZYCOPY(special_statuses)
if(!current) if(!current)
result += "<span class='bad'>No body!</span>" result += "<span class='bad'>No body!</span>"
if(current && HAS_TRAIT(current, TRAIT_MINDSHIELD)) if(current && HAS_TRAIT(current, TRAIT_MINDSHIELD))

View File

@@ -1,3 +1,5 @@
#define DECONVERTER_STATION_WIN "gamemode_station_win"
#define DECONVERTER_REVS_WIN "gamemode_revs_win"
//How often to check for promotion possibility //How often to check for promotion possibility
#define HEAD_UPDATE_PERIOD 300 #define HEAD_UPDATE_PERIOD 300
@@ -11,6 +13,9 @@
antag_hud_name = "rev" antag_hud_name = "rev"
var/datum/team/revolution/rev_team var/datum/team/revolution/rev_team
/// What message should the player receive when they are being demoted, and the revolution has won?
var/victory_message = "The revolution has overpowered the command staff! Viva la revolution! Execute any head of staff and security should you find them alive."
/datum/antagonist/rev/can_be_owned(datum/mind/new_owner) /datum/antagonist/rev/can_be_owned(datum/mind/new_owner)
. = ..() . = ..()
if(.) if(.)
@@ -200,7 +205,22 @@
new_rev.silent = FALSE new_rev.silent = FALSE
to_chat(old_owner, "<span class='userdanger'>Revolution has been disappointed of your leader traits! You are a regular revolutionary now!</span>") to_chat(old_owner, "<span class='userdanger'>Revolution has been disappointed of your leader traits! You are a regular revolutionary now!</span>")
/// Checks if the revolution succeeded, and lets them know.
/datum/antagonist/rev/proc/announce_victorious()
. = rev_team.check_rev_victory()
if (!.)
return
to_chat(owner, "<span class='deconversion_message bold'>[victory_message]</span>")
var/policy = get_policy(ROLE_REV_SUCCESSFUL)
if (policy)
to_chat(owner, policy)
/datum/antagonist/rev/farewell() /datum/antagonist/rev/farewell()
if (announce_victorious())
return
if(ishuman(owner.current)) if(ishuman(owner.current))
owner.current.visible_message("<span class='deconversion_message'>[owner.current] looks like [owner.current.p_theyve()] just remembered [owner.current.p_their()] real allegiance!</span>", null, null, null, owner.current) owner.current.visible_message("<span class='deconversion_message'>[owner.current] looks like [owner.current.p_theyve()] just remembered [owner.current.p_their()] real allegiance!</span>", null, null, null, owner.current)
to_chat(owner, "<span class ='deconversion_message bold'>You are no longer a brainwashed revolutionary! Your memory is hazy from the time you were a rebel...the only thing you remember is the name of the one who brainwashed you....</span>") to_chat(owner, "<span class ='deconversion_message bold'>You are no longer a brainwashed revolutionary! Your memory is hazy from the time you were a rebel...the only thing you remember is the name of the one who brainwashed you....</span>")
@@ -209,6 +229,9 @@
to_chat(owner, "<span class='userdanger'>The frame's firmware detects and deletes your neural reprogramming! You remember nothing but the name of the one who flashed you.</span>") to_chat(owner, "<span class='userdanger'>The frame's firmware detects and deletes your neural reprogramming! You remember nothing but the name of the one who flashed you.</span>")
/datum/antagonist/rev/head/farewell() /datum/antagonist/rev/head/farewell()
if (announce_victorious())
return
if((ishuman(owner.current))) if((ishuman(owner.current)))
if(owner.current.stat != DEAD) if(owner.current.stat != DEAD)
owner.current.visible_message("<span class='deconversion_message'>[owner.current] looks like [owner.current.p_theyve()] just remembered [owner.current.p_their()] real allegiance!</span>", null, null, null, owner.current) owner.current.visible_message("<span class='deconversion_message'>[owner.current] looks like [owner.current.p_theyve()] just remembered [owner.current.p_their()] real allegiance!</span>", null, null, null, owner.current)
@@ -225,13 +248,13 @@
if(borged) if(borged)
message_admins("[ADMIN_LOOKUPFLW(owner.current)] has been borged while being a [name]") message_admins("[ADMIN_LOOKUPFLW(owner.current)] has been borged while being a [name]")
owner.special_role = null owner.special_role = null
if(iscarbon(owner.current)) if(iscarbon(owner.current) && deconverter != DECONVERTER_REVS_WIN)
var/mob/living/carbon/C = owner.current var/mob/living/carbon/C = owner.current
C.Unconscious(100) C.Unconscious(100)
owner.remove_antag_datum(type) owner.remove_antag_datum(type)
/datum/antagonist/rev/head/remove_revolutionary(borged,deconverter) /datum/antagonist/rev/head/remove_revolutionary(borged,deconverter)
if(borged || deconverter == "gamemode") if(borged || deconverter == DECONVERTER_STATION_WIN || deconverter == DECONVERTER_REVS_WIN)
. = ..() . = ..()
/datum/antagonist/rev/head/equip_rev() /datum/antagonist/rev/head/equip_rev()
@@ -257,6 +280,21 @@
S.Insert(C) S.Insert(C)
to_chat(C, "Your eyes have been implanted with a cybernetic security HUD which will help you keep track of who is mindshield-implanted, and therefore unable to be recruited.") to_chat(C, "Your eyes have been implanted with a cybernetic security HUD which will help you keep track of who is mindshield-implanted, and therefore unable to be recruited.")
/// "Enemy of the Revolutionary", given to heads and security when the revolution wins
/datum/antagonist/revolution_enemy
name = "Enemy of the Revolution"
show_in_antagpanel = FALSE
/datum/antagonist/revolution_enemy/on_gain()
owner.special_role = "revolution enemy"
var/datum/objective/survive/survive = new /datum/objective/survive
survive.owner = owner
survive.explanation_text = "The station has been overrun by revolutionaries, stay alive until the end."
objectives += survive
return ..()
/datum/team/revolution /datum/team/revolution
name = "Revolution" name = "Revolution"
var/max_headrevs = 3 var/max_headrevs = 3
@@ -315,6 +353,100 @@
ex_headrevs = get_antag_minds(/datum/antagonist/rev/head, TRUE) ex_headrevs = get_antag_minds(/datum/antagonist/rev/head, TRUE)
ex_revs = get_antag_minds(/datum/antagonist/rev, TRUE) ex_revs = get_antag_minds(/datum/antagonist/rev, TRUE)
/// Checks if revs have won
/datum/team/revolution/proc/check_rev_victory()
for(var/datum/objective/mutiny/objective in objectives)
if(!(objective.check_completion()))
return FALSE
return TRUE
/// Checks if heads have won
/datum/team/revolution/proc/check_heads_victory()
for(var/datum/mind/rev_mind in head_revolutionaries())
var/turf/rev_turf = get_turf(rev_mind.current)
if(!considered_afk(rev_mind) && considered_alive(rev_mind) && is_station_level(rev_turf.z))
if(ishuman(rev_mind.current))
return FALSE
return TRUE
/// Updates the state of the world depending on if revs won or loss.
/// Returns who won, at which case this method should no longer be called.
/// If revs_win_injection_amount is passed, then that amount of threat will be added if the revs win.
/datum/team/revolution/proc/process_victory(revs_win_injection_amount)
if (check_rev_victory())
. = REVOLUTION_VICTORY
else if (check_heads_victory())
. = STATION_VICTORY
else
return
SSshuttle.clearHostileEnvironment(src)
save_members()
// Remove everyone as a revolutionary
for (var/_rev_mind in members)
var/datum/mind/rev_mind = _rev_mind
if (rev_mind.has_antag_datum(/datum/antagonist/rev))
var/datum/antagonist/rev/rev_antag = rev_mind.has_antag_datum(/datum/antagonist/rev)
rev_antag.remove_revolutionary(FALSE, . == STATION_VICTORY ? DECONVERTER_STATION_WIN : DECONVERTER_REVS_WIN)
LAZYADD(rev_mind.special_statuses, "<span class='bad'>Former [(rev_mind in ex_headrevs) ? "head revolutionary" : "revolutionary"]</span>")
if (. == STATION_VICTORY)
// If the revolution was quelled, make rev heads unable to be revived through pods
for (var/_rev_head_mind in ex_revs)
var/datum/mind/rev_head_mind = _rev_head_mind
var/mob/living/carbon/rev_head_body = rev_head_mind.current
if(istype(rev_head_body) && rev_head_body.stat == DEAD)
rev_head_body.makeUncloneable()
priority_announce("It appears the mutiny has been quelled. Please return yourself and your incapacitated colleagues to work. \
We have remotely blacklisted the head revolutionaries in your medical records to prevent accidental revival.", null, 'sound/ai/attention.ogg', null, "Central Command Loyalty Monitoring Division")
else
for (var/_player in GLOB.player_list)
var/mob/player = _player
var/datum/mind/mind = player.mind
if (isnull(mind))
continue
if (!(mind.assigned_role in GLOB.command_positions + GLOB.security_positions))
continue
var/mob/living/carbon/target_body = mind.current
mind.add_antag_datum(/datum/antagonist/revolution_enemy)
if (!istype(target_body))
continue
if (target_body.stat == DEAD)
target_body.makeUncloneable()
else
mind.announce_objectives()
for (var/job_name in GLOB.command_positions + GLOB.security_positions)
var/datum/job/job = SSjob.GetJob(job_name)
job.allow_bureaucratic_error = FALSE
job.total_positions = 0
if (revs_win_injection_amount)
var/datum/game_mode/dynamic/dynamic = SSticker.mode
dynamic.create_threat(revs_win_injection_amount)
dynamic.threat_log += "[worldtime2text()]: Revolution victory. Added [revs_win_injection_amount] threat."
priority_announce("A recent assessment of your station has marked your station as a severe risk area for high ranking Nanotrasen officials. \
For the safety of our staff, we have blacklisted your station for new employment of security and command. \
[pick(world.file2list("strings/anti_union_propaganda.txt"))]", null, 'sound/ai/attention.ogg', null, "Central Command Loyalty Monitoring Division")
/// Mutates the ticker to report that the revs have won
/datum/team/revolution/proc/round_result(finished)
if (finished == REVOLUTION_VICTORY)
SSticker.mode_result = "win - heads killed"
SSticker.news_report = REVS_WIN
else if (finished == STATION_VICTORY)
SSticker.mode_result = "loss - rev heads killed"
SSticker.news_report = REVS_LOSE
/datum/team/revolution/roundend_report() /datum/team/revolution/roundend_report()
if(!members.len && !ex_headrevs.len) if(!members.len && !ex_headrevs.len)
return return
@@ -323,18 +455,6 @@
result += "<div class='panel redborder'>" result += "<div class='panel redborder'>"
var/num_revs = 0
var/num_survivors = 0
for(var/mob/living/carbon/survivor in GLOB.alive_mob_list)
if(survivor.ckey)
num_survivors++
if(survivor.mind)
if(is_revolutionary(survivor))
num_revs++
if(num_survivors)
result += "Command's Approval Rating: <B>[100 - round((num_revs/num_survivors)*100, 0.1)]%</B><br>"
var/list/targets = list() var/list/targets = list()
var/list/datum/mind/headrevs var/list/datum/mind/headrevs
var/list/datum/mind/revs var/list/datum/mind/revs
@@ -348,16 +468,27 @@
else else
revs = get_antag_minds(/datum/antagonist/rev, TRUE) revs = get_antag_minds(/datum/antagonist/rev, TRUE)
var/num_revs = 0
var/num_survivors = 0
for(var/mob/living/carbon/survivor in GLOB.alive_mob_list)
if(survivor.ckey)
num_survivors += 1
if ((survivor.mind in revs) || (survivor.mind in headrevs))
num_revs += 1
if(num_survivors)
result += "Command's Approval Rating: <B>[100 - round((num_revs/num_survivors)*100, 0.1)]%</B><br>"
if(headrevs.len) if(headrevs.len)
var/list/headrev_part = list() var/list/headrev_part = list()
headrev_part += "<span class='header'>The head revolutionaries were:</span>" headrev_part += "<span class='header'>The head revolutionaries were:</span>"
headrev_part += printplayerlist(headrevs,TRUE) headrev_part += printplayerlist(headrevs, !check_rev_victory())
result += headrev_part.Join("<br>") result += headrev_part.Join("<br>")
if(revs.len) if(revs.len)
var/list/rev_part = list() var/list/rev_part = list()
rev_part += "<span class='header'>The revolutionaries were:</span>" rev_part += "<span class='header'>The revolutionaries were:</span>"
rev_part += printplayerlist(revs,TRUE) rev_part += printplayerlist(revs, !check_rev_victory())
result += rev_part.Join("<br>") result += rev_part.Join("<br>")
var/list/heads = SSjob.get_all_heads() var/list/heads = SSjob.get_all_heads()
@@ -410,3 +541,6 @@
/datum/team/revolution/is_gamemode_hero() /datum/team/revolution/is_gamemode_hero()
return SSticker.mode.name == "revolution" return SSticker.mode.name == "revolution"
#undef DECONVERTER_STATION_WIN
#undef DECONVERTER_REVS_WIN

View File

@@ -18,13 +18,13 @@
overflow.total_positions = -1 // Ensures infinite slots as this role. Assistant will still be open for those that cant play it. overflow.total_positions = -1 // Ensures infinite slots as this role. Assistant will still be open for those that cant play it.
for(var/job in jobs) for(var/job in jobs)
var/datum/job/current = job var/datum/job/current = job
if(current.title == "AI" || current.title == SSjob.overflow_role) // AI currently doesnt support latejoining past one total. if(!current.allow_bureaucratic_error)
continue continue
current.total_positions = 0 current.total_positions = 0
else // Adds/removes a random amount of job slots from all jobs. else // Adds/removes a random amount of job slots from all jobs.
for(var/job in jobs) for(var/job in jobs)
var/datum/job/current = job var/datum/job/current = job
if(current.title == "AI" || current.title == SSjob.overflow_role) // AI currently doesnt support latejoining past one total. if(!current.allow_bureaucratic_error)
continue continue
var/ran = rand(-2,4) var/ran = rand(-2,4)
current.total_positions = max(current.total_positions + ran, 0) current.total_positions = max(current.total_positions + ran, 0)

View File

@@ -68,6 +68,9 @@
var/bounty_types = CIV_JOB_BASIC var/bounty_types = CIV_JOB_BASIC
/// Should this job be allowed to be picked for the bureaucratic error event?
var/allow_bureaucratic_error = TRUE
/datum/job/New() /datum/job/New()
. = ..() . = ..()
var/list/jobs_changes = GetMapChanges() var/list/jobs_changes = GetMapChanges()

View File

@@ -12,6 +12,7 @@
exp_type = EXP_TYPE_CREW exp_type = EXP_TYPE_CREW
exp_type_department = EXP_TYPE_SILICON exp_type_department = EXP_TYPE_SILICON
display_order = JOB_DISPLAY_ORDER_AI display_order = JOB_DISPLAY_ORDER_AI
allow_bureaucratic_error = FALSE
var/do_special_check = TRUE var/do_special_check = TRUE
/datum/job/ai/equip(mob/living/carbon/human/H, visualsOnly, announce, latejoin, datum/outfit/outfit_override, client/preference_source = null) /datum/job/ai/equip(mob/living/carbon/human/H, visualsOnly, announce, latejoin, datum/outfit/outfit_override, client/preference_source = null)

View File

@@ -0,0 +1,4 @@
Remember, union dues cost around 70,000 credits a year. A new video game system with the latest hits sounds like fun. Put your money towards that instead of paying dues to the union.
Remember, tickets & food to the Toolbox Tournament aren't cheap. That money in union dues you'd be paying every year could sure go a long way.
Remember, nothing's more enjoyable than a night out watching a thunderdome match with your buddies. All those union dues you pay every year could buy a few rounds.
Nanotrasen's open door policy is designed to help you feel comfortable taking up issues to your assigned head of staff. It's hard for us to maintain this when they're dead.