mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
On primary antagonist rounds (wizard/blob/malfunction) if the config is set for continous rounds the round will convert on the fly to a new mode choosen from these mode if the primary antagonist dies:
EXTENDED TRAITOR CHANGELING DOUBLE AGENTS TRAITORLING based on the game probabilities set through the config. The round will not convert if more than 30% of the players are dead (round immediatly ends) or if the shuttle is beyond the point of no return (the round ends normally). Adds the CONTINIOUS_ROUND_BLOB config
This commit is contained in:
@@ -90,6 +90,7 @@
|
||||
var/continuous_round_rev = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
|
||||
var/continuous_round_wiz = 0
|
||||
var/continuous_round_malf = 0
|
||||
var/continuous_round_blob = 0
|
||||
var/shuttle_refuel_delay = 12000
|
||||
var/show_game_type_odds = 0 //if set this allows players to see the odds of each roundtype on the get revision screen
|
||||
var/mutant_races = 0 //players can choose their mutant race before joining the game
|
||||
@@ -361,6 +362,8 @@
|
||||
config.continuous_round_wiz = 1
|
||||
if("continuous_round_malf")
|
||||
config.continuous_round_malf = 1
|
||||
if("continuous_round_blob")
|
||||
config.continuous_round_blob = 1
|
||||
if("shuttle_refuel_delay")
|
||||
config.shuttle_refuel_delay = text2num(value)
|
||||
if("show_game_type_odds")
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
/datum/game_mode/blob/check_finished()
|
||||
if(round_converted)
|
||||
return 0
|
||||
if(infected_crew.len > burst)//Some blobs have yet to burst
|
||||
return 0
|
||||
if(blobwincount <= blobs.len)//Blob took over
|
||||
return 1
|
||||
if(!blob_cores.len) // blob is dead
|
||||
if(config.continuous_round_blob)
|
||||
if(!convert_roundtype())
|
||||
return ..()
|
||||
else
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
|
||||
SSshuttle.emergency.mode = SHUTTLE_DOCKED
|
||||
SSshuttle.emergency.timer = world.time
|
||||
priority_announce("Hostile enviroment resolved. You have 3 minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
|
||||
round_converted = 1
|
||||
return 0
|
||||
return 1
|
||||
if(station_was_nuked)//Nuke went off
|
||||
return 1
|
||||
|
||||
@@ -13,6 +13,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
required_players = 15
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
reroll_friendly = 1
|
||||
|
||||
|
||||
var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "extended"
|
||||
config_tag = "extended"
|
||||
required_players = 0
|
||||
reroll_friendly = 1
|
||||
|
||||
/datum/game_mode/announce()
|
||||
world << "<B>The current game mode is - Extended Role-Playing!</B>"
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
var/pre_setup_before_jobs = 0
|
||||
var/antag_flag = null //preferences flag such as BE_WIZARD that need to be turned on for players to be antag
|
||||
var/datum/mind/sacrifice_target = null
|
||||
var/round_converted = 0
|
||||
var/reroll_friendly //During mode conversion only these are in the running
|
||||
|
||||
var/const/waittime_l = 600
|
||||
var/const/waittime_h = 1800 // started at 1800
|
||||
@@ -88,6 +90,50 @@
|
||||
/datum/game_mode/proc/make_antag_chance(var/mob/living/carbon/human/character)
|
||||
return
|
||||
|
||||
///convert_roundtype()
|
||||
///Allows rounds to basically be "rerolled" should the initial premise fall through
|
||||
/datum/game_mode/proc/convert_roundtype()
|
||||
var/list/datum/game_mode/runnable_modes = config.get_runnable_modes()
|
||||
for(var/datum/game_mode/G in runnable_modes)
|
||||
if(!G.reroll_friendly) del(G)
|
||||
|
||||
if(!runnable_modes) return 0
|
||||
|
||||
var/list/datum/game_mode/replacementmode = pickweight(runnable_modes)
|
||||
|
||||
switch(SSshuttle.emergency.mode) //Rounds on the verge of ending don't get new antags, they just run out
|
||||
if(SHUTTLE_STRANDED, SHUTTLE_ESCAPE)
|
||||
return 1
|
||||
if(SHUTTLE_CALL)
|
||||
if(SSshuttle.emergency.timeLeft(1) < initial(SSshuttle.emergencyCallTime)*0.5)
|
||||
return 1
|
||||
|
||||
var/list/living_crew = list()
|
||||
|
||||
for(var/mob in player_list)
|
||||
if(mob in living_mob_list)
|
||||
living_crew += mob
|
||||
if(living_crew.len / player_list.len <= 0.7) //If a lot of the player base died, we start fresh
|
||||
return 0
|
||||
|
||||
var/list/antag_canadates = list()
|
||||
|
||||
for(var/mob/living/carbon/human/H in living_crew)
|
||||
antag_canadates += H
|
||||
|
||||
if(!antag_canadates) return 1
|
||||
|
||||
antag_canadates = shuffle(antag_canadates)
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
replacementmode.restricted_jobs += replacementmode.protected_jobs
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
replacementmode.restricted_jobs += "Assistant"
|
||||
for(var/mob/living/carbon/human/H in antag_canadates)
|
||||
replacementmode.make_antag_chance(H)
|
||||
|
||||
return 1
|
||||
|
||||
///process()
|
||||
///Called by the gameticker
|
||||
/datum/game_mode/proc/process()
|
||||
|
||||
@@ -153,6 +153,8 @@
|
||||
priority_announce("Hostile enviroment resolved. You have 3 minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
|
||||
SSshuttle.emergencyNoEscape = 0
|
||||
malf_mode_declared = 0
|
||||
convert_roundtype()
|
||||
round_converted = 1
|
||||
else
|
||||
return 1
|
||||
return ..() //check for shuttle and nuke
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
required_players = 0
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
reroll_friendly = 1
|
||||
|
||||
var/traitors_possible = 4 //hard limit on traitors if scaling is turned off
|
||||
var/num_modifier = 0 // Used for gamemodes, that are a child of traitor, that need more than the usual.
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
/datum/game_mode/wizard/check_finished()
|
||||
|
||||
if(config.continuous_round_wiz)
|
||||
if(round_converted)
|
||||
return ..()
|
||||
|
||||
var/wizards_alive = 0
|
||||
@@ -192,11 +192,17 @@
|
||||
|
||||
if (wizards_alive || traitors_alive)
|
||||
return ..()
|
||||
else
|
||||
finished = 1
|
||||
return 1
|
||||
|
||||
if(config.continuous_round_wiz)
|
||||
if(!convert_roundtype())
|
||||
finished = 1
|
||||
return 1
|
||||
else
|
||||
round_converted = 1
|
||||
return ..()
|
||||
|
||||
finished = 1
|
||||
return 1
|
||||
|
||||
/datum/game_mode/wizard/declare_completion()
|
||||
if(finished)
|
||||
|
||||
@@ -102,6 +102,7 @@ PROBABILITY SANDBOX 0
|
||||
#CONTINUOUS_ROUND_REV
|
||||
#CONTINUOUS_ROUND_WIZ
|
||||
#CONTINUOUS_ROUND_MALF
|
||||
#CONTINUOUS_ROUND_BLOB
|
||||
|
||||
## The amount of time it takes for the emergency shuttle to be called, from round start.
|
||||
SHUTTLE_REFUEL_DELAY 12000
|
||||
|
||||
Reference in New Issue
Block a user