TG: Fixed a few runtimes.

Moved the all player mobs death check into the parent death proc.
Revision: r2940
Author: 	 mport2004
This commit is contained in:
Ren Erthilo
2012-04-15 17:00:51 +01:00
parent 4927203371
commit e2bd08a336
11 changed files with 35 additions and 193 deletions

View File

@@ -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 << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
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)

View File

@@ -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 << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
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)

View File

@@ -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 << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
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)

View File

@@ -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 << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
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()

View File

@@ -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 << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
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)

View File

@@ -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 << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
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)

View File

@@ -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 << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
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)

View File

@@ -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 << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
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)

View File

@@ -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 << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
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)

View File

@@ -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 << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
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()

View File

@@ -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