diff --git a/code/modules/mob/living/carbon/alien/humanoid/death.dm b/code/modules/mob/living/carbon/alien/humanoid/death.dm index de242f455e2..01eb6e2f257 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/death.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/death.dm @@ -31,30 +31,4 @@ if (mind) mind.store_memory("Time of death: [tod]", 0) else src << "We seem to have misplaced your mind datum, so we can't add this to your memory, but you died at [tod]" - var/cancel - for (var/mob/M in world) - if (M.client && !M.stat) - cancel = 1 - break - - if (!cancel && !abandon_allowed) - spawn (50) - cancel = 0 - for (var/mob/M in world) - if (M.client && !M.stat) - cancel = 1 - break - - if (!cancel && !abandon_allowed) - world << "Everyone is dead! Resetting in 30 seconds!" - - feedback_set_details("end_error","no live players") - feedback_set_details("round_end","[time2text(world.realtime)]") - if(blackbox) - blackbox.save_all_data_to_sql() - - spawn (300) - log_game("Rebooting because of no live players") - world.Reboot() - return ..(gibbed) diff --git a/code/modules/mob/living/carbon/alien/larva/death.dm b/code/modules/mob/living/carbon/alien/larva/death.dm index 48b6e13c7a5..0242119ef56 100644 --- a/code/modules/mob/living/carbon/alien/larva/death.dm +++ b/code/modules/mob/living/carbon/alien/larva/death.dm @@ -34,30 +34,4 @@ var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch mind.store_memory("Time of death: [tod]", 0) - var/cancel - for (var/mob/M in world) - if (M.client && !M.stat) - cancel = 1 - break - - if (!cancel && !abandon_allowed) - spawn (50) - cancel = 0 - for (var/mob/M in world) - if (M.client && !M.stat) - cancel = 1 - break - - if (!cancel && !abandon_allowed) - world << "Everyone is dead! Resetting in 30 seconds!" - - feedback_set_details("end_error","no live players") - feedback_set_details("round_end","[time2text(world.realtime)]") - if(blackbox) - blackbox.save_all_data_to_sql() - - spawn (300) - log_game("Rebooting because of no live players") - world.Reboot() - return ..(gibbed) diff --git a/code/modules/mob/living/carbon/brain/death.dm b/code/modules/mob/living/carbon/brain/death.dm index 6f34b926c6f..71581811e88 100644 --- a/code/modules/mob/living/carbon/brain/death.dm +++ b/code/modules/mob/living/carbon/brain/death.dm @@ -15,25 +15,8 @@ see_invisible = 2 var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - var/cancel store_memory("Time of death: [tod]", 0) - for(var/mob/M in world) - if ((M.client && !( M.stat ))) - cancel = 1 - break - if (!( cancel )) - world << "Everyone is dead! Resetting in 30 seconds!" - - feedback_set_details("end_error","no live players") - feedback_set_details("round_end","[time2text(world.realtime)]") - if(blackbox) - blackbox.save_all_data_to_sql() - - spawn( 300 ) - log_game("Rebooting because of no live players") - world.Reboot() - return if (key) spawn(50) if(key && stat == 2) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index b74b9fea7b1..6a9662adf24 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -56,32 +56,6 @@ message_admins("\red Traitor [key_name_admin(src)] has died.") log_game("Traitor [key_name(src)] has died.") - var/cancel - for (var/mob/M in world) - if (M.client && !M.stat) - cancel = 1 - break - - if (!cancel && !abandon_allowed) - spawn (50) - cancel = 0 - for (var/mob/M in world) - if (M.client && !M.stat) - cancel = 1 - break - - if (!cancel && !abandon_allowed) - world << "Everyone is dead! Resetting in 30 seconds!" - - feedback_set_details("end_error","no live players") - feedback_set_details("round_end","[time2text(world.realtime)]") - if(blackbox) - blackbox.save_all_data_to_sql() - - spawn (300) - log_game("Rebooting because of no live players") - world.Reboot() - return ..(gibbed) /mob/living/carbon/human/proc/ChangeToHusk() diff --git a/code/modules/mob/living/carbon/metroid/death.dm b/code/modules/mob/living/carbon/metroid/death.dm index 813929cb0d1..2356f425505 100644 --- a/code/modules/mob/living/carbon/metroid/death.dm +++ b/code/modules/mob/living/carbon/metroid/death.dm @@ -1,7 +1,7 @@ /mob/living/carbon/metroid/death(gibbed) if(src.stat == 2) return - var/cancel + if(!gibbed) if(istype(src, /mob/living/carbon/metroid/adult)) @@ -32,27 +32,8 @@ drop_item() src.hand = h - //var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - //mind.store_memory("Time of death: [tod]", 0) - ticker.mode.check_win() - //src.icon_state = "dead" - for(var/mob/M in world) - if ((M.client && !( M.stat ))) - cancel = 1 - break - if (!( cancel )) - world << "Everyone is dead! Resetting in 30 seconds!" - feedback_set_details("end_error","no live players") - feedback_set_details("round_end","[time2text(world.realtime)]") - if(blackbox) - blackbox.save_all_data_to_sql() - - spawn( 300 ) - log_game("Rebooting because of no live players") - world.Reboot() - return if (src.key) spawn(50) if(src.key && src.stat == 2) diff --git a/code/modules/mob/living/carbon/monkey/death.dm b/code/modules/mob/living/carbon/monkey/death.dm index 0f984a3b4bd..a20b53d203c 100644 --- a/code/modules/mob/living/carbon/monkey/death.dm +++ b/code/modules/mob/living/carbon/monkey/death.dm @@ -1,7 +1,7 @@ /mob/living/carbon/monkey/death(gibbed) if(src.stat == 2) return - var/cancel + if (src.healths) src.healths.icon_state = "health5" if(!gibbed) @@ -21,27 +21,8 @@ drop_item() src.hand = h - //var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - //mind.store_memory("Time of death: [tod]", 0) - ticker.mode.check_win() - //src.icon_state = "dead" - for(var/mob/M in world) - if ((M.client && !( M.stat ))) - cancel = 1 - break - if (!( cancel )) - world << "Everyone is dead! Resetting in 30 seconds!" - feedback_set_details("end_error","no live players") - feedback_set_details("round_end","[time2text(world.realtime)]") - if(blackbox) - blackbox.save_all_data_to_sql() - - spawn( 300 ) - log_game("Rebooting because of no live players") - world.Reboot() - return if (src.key) spawn(50) if(src.key && src.stat == 2) diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 430bd76ef7a..ce640fc219f 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -1,5 +1,4 @@ /mob/living/silicon/ai/death(gibbed) - var/cancel stat = 2 canmove = 0 if(blind) @@ -49,24 +48,8 @@ loc.icon_state = "aicard-404" var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - mind.store_memory("Time of death: [tod]", 0) + if(mind) mind.store_memory("Time of death: [tod]", 0) - for(var/mob/M in world) - if ((M.client && !( M.stat ))) - cancel = 1 - break - if (!( cancel )) - world << "Everyone is dead! Resetting in 30 seconds!" - - feedback_set_details("end_error","no live players") - feedback_set_details("round_end","[time2text(world.realtime)]") - if(blackbox) - blackbox.save_all_data_to_sql() - - spawn( 300 ) - log_game("Rebooting because of no live players") - world.Reboot() - return if (key) spawn(50) if(key && stat == 2) diff --git a/code/modules/mob/living/silicon/pai/death.dm b/code/modules/mob/living/silicon/pai/death.dm index 33da7afd092..bbbe20ad14d 100644 --- a/code/modules/mob/living/silicon/pai/death.dm +++ b/code/modules/mob/living/silicon/pai/death.dm @@ -1,5 +1,4 @@ /mob/living/silicon/pai/death(gibbed) - var/cancel src.stat = 2 src.canmove = 0 if(src.blind) @@ -13,22 +12,6 @@ //var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch //mind.store_memory("Time of death: [tod]", 0) - for(var/mob/M in world) - if ((M.client && !( M.stat ))) - cancel = 1 - break - if (!( cancel )) - world << "Everyone is dead! Resetting in 30 seconds!" - - feedback_set_details("end_error","no live players") - feedback_set_details("round_end","[time2text(world.realtime)]") - if(blackbox) - blackbox.save_all_data_to_sql() - - spawn( 300 ) - log_game("Rebooting because of no live players") - world.Reboot() - return if(key) spawn(50) src.ghostize(1) diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index dec51853808..9a677ac60ab 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -1,5 +1,4 @@ /mob/living/silicon/robot/death(gibbed) - var/cancel if (!gibbed) src.emote("deathgasp") src.stat = 2 @@ -28,22 +27,6 @@ sql_report_cyborg_death(src) - for(var/mob/M in world) - if ((M.client && !( M.stat ))) - cancel = 1 - break - if (!( cancel )) - world << "Everyone is dead! Resetting in 30 seconds!" - - feedback_set_details("end_error","no live players") - feedback_set_details("round_end","[time2text(world.realtime)]") - if(blackbox) - blackbox.save_all_data_to_sql() - - spawn( 300 ) - log_game("Rebooting because of no live players") - world.Reboot() - return if (src.key) spawn(50) if(src.key && src.stat == 2) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index af12643d530..58b66560cc9 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -105,6 +105,34 @@ /mob/proc/death(gibbed) timeofdeath = world.time + + var/cancel = 0 + for(var/mob/M in world) + if(M.client && (M.stat != DEAD)) + cancel = 1 + break + if(!cancel) + world << "Everyone is dead! Resetting in 30 seconds!" + + + + spawn(300) + for(var/mob/M in world) + if(M.client && (M.stat != DEAD)) + world << "Aborting world restart!" + return + + feedback_set_details("end_error","no live players") + + if(blackbox) + blackbox.save_all_data_to_sql() + + sleep(50) + + log_game("Rebooting because of no live players") + world.Reboot() + return + return ..(gibbed) /mob/proc/restrained() diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index e0f5acf4710..e5365fe3408 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -505,16 +505,14 @@ PN.merge_powernets(TPN) for(var/obj/machinery/power/apc/N in loc) - - if(!N) - continue + if(!N) continue var/obj/machinery/power/M M = N.terminal + if(!M) continue - if(M.netnum == 0) - if(netnum == 0) - continue + if(!M.netnum) + if(!netnum)continue var/datum/powernet/PN = powernets[netnum] PN.nodes += M M.netnum = netnum