Merge pull request #3456 from Tastyfish/continuous-rounds

Fixed continuous rounds
This commit is contained in:
Fox McCloud
2016-01-30 21:20:41 -05:00
7 changed files with 14 additions and 46 deletions
+2 -2
View File
@@ -36,7 +36,7 @@
var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
var/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/continuous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/allow_Metadata = 0 // Metadata is supported.
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
var/Ticklag = 0.9
@@ -449,7 +449,7 @@
config.gateway_delay = text2num(value)
if("continuous_rounds")
config.continous_rounds = 1
config.continuous_rounds = 1
if("ghost_interaction")
config.ghost_interaction = 1
+3 -3
View File
@@ -20,9 +20,9 @@
action_icon_state = "skeleton"
/obj/effect/proc_holder/spell/targeted/lichdom/New()
if(!config.continous_rounds)
if(!config.continuous_rounds)
existence_stops_round_end = 1
config.continous_rounds = 1
config.continuous_rounds = 1
..()
/obj/effect/proc_holder/spell/targeted/lichdom/Destroy()
@@ -31,7 +31,7 @@
if(istype(S,/obj/effect/proc_holder/spell/targeted/lichdom) && S != src)
return ..()
if(existence_stops_round_end)
config.continous_rounds = 0
config.continuous_rounds = 0
return ..()
/obj/effect/proc_holder/spell/targeted/lichdom/cast(list/targets,mob/user = usr)
+5 -21
View File
@@ -7,7 +7,6 @@ var/round_start_time = 0
var/hide_mode = 0 // leave here at 0 ! setup() will take care of it when needed for Secret mode -walter0o
var/datum/game_mode/mode = null
var/post_game = 0
var/event_time = null
var/event = 0
@@ -386,16 +385,13 @@ var/round_start_time = 0
//emergency_shuttle.process() DONE THROUGH PROCESS SCHEDULER
var/game_finished = 0
var/mode_finished = 0
if (config.continous_rounds)
game_finished = (mode.station_was_nuked)
mode_finished = (!post_game && mode.check_finished())
var/game_finished = shuttle_master.emergency.mode >= SHUTTLE_ENDGAME || mode.station_was_nuked
if (config.continuous_rounds)
mode.check_finished() // some modes contain var-changing code in here, so call even if we don't uses result
else
game_finished = (mode.check_finished())
mode_finished = game_finished
game_finished |= mode.check_finished()
if(!mode.explosion_in_progress && game_finished && (mode_finished || post_game))
if(!mode.explosion_in_progress && game_finished)
current_state = GAME_STATE_FINISHED
auto_toggle_ooc(1) // Turn it on
spawn
@@ -409,18 +405,6 @@ var/round_start_time = 0
else
world.Reboot("Round ended.", "end_proper", "proper completion")
else if (mode_finished)
post_game = 1
mode.cleanup()
//call a transfer shuttle vote
spawn(50)
if(!round_end_announced) // Spam Prevention. Now it should announce only once.
world << "\red The round has ended!"
round_end_announced = 1
vote.autotransfer()
return 1
proc/getfactionbyname(var/name)
@@ -148,7 +148,7 @@
if (station_captured && !to_nuke_or_not_to_nuke)
return 1
if (is_malf_ai_dead())
if(config.continous_rounds)
if(config.continuous_rounds)
if(shuttle_master && shuttle_master.emergencyNoEscape)
shuttle_master.emergencyNoEscape = 0
malf_mode_declared = 0
+2 -6
View File
@@ -203,15 +203,11 @@
//Checks if the round is over//
///////////////////////////////
/datum/game_mode/revolution/check_finished()
if(config.continous_rounds)
if(config.continuous_rounds)
if(finished != 0)
if(shuttle_master && shuttle_master.emergencyNoEscape)
shuttle_master.emergencyNoEscape = 0
return ..()
if(finished != 0)
return 1
else
return 0
return finished != 0
///////////////////////////////////////////////////
//Deals with converting players to the revolution//
-4
View File
@@ -203,10 +203,6 @@
/datum/game_mode/wizard/check_finished()
if(config.continous_rounds)
return ..()
var/wizards_alive = 0
var/traitors_alive = 0
for(var/datum/mind/wizard in wizards)
+1 -9
View File
@@ -135,15 +135,7 @@
return ..()
/datum/game_mode/xenos/check_finished()
if(config.continous_rounds)
if(result)
return ..()
if(shuttle_master && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return ..()
if(result || station_was_nuked)
return 1
else
return 0
return result != 0
/datum/game_mode/xenos/proc/xenos_alive()
var/list/livingxenos = list()