Another stack of runtime errors dealt with.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@260 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2010-10-10 05:36:31 +00:00
parent 5b6d51966f
commit 7391fac4e9
28 changed files with 234 additions and 424 deletions

View File

@@ -685,12 +685,13 @@ var/showadminmessages = 1
if(M.mind in current_mode.traitors)
var/datum/mind/antagonist = M.mind
var/t = ""
for(var/datum/objective/OB in antagonist.objectives)
t += "[OB.explanation_text]\n"
if(antagonist.objectives.len == 0)
t = "None defined."
alert("Is a Traitor. Objective(s):\n[t]", "[M.key]")
return
if(antagonist)
for(var/datum/objective/OB in antagonist.objectives)
t += "[OB.explanation_text]\n"
if(antagonist.objectives.len == 0)
t = "None defined."
alert("Is a Traitor. Objective(s):\n[t]", "[M.key]")
return
//they're nothing so turn them into a traitor!
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
@@ -1888,31 +1889,35 @@ var/showadminmessages = 1
if(!objective)
return
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/N = M
ticker.mode.equip_traitor(N)
if(M.mind)
var/mob/living/carbon/human/N = M
ticker.mode.equip_traitor(N)
ticker.mode.traitors += M.mind
M.mind.special_role = "traitor"
ticker.mode.traitors += M.mind
var/datum/objective/custom_objective = new(objective)
custom_objective.owner = M.mind
M.mind.objectives += custom_objective
M.mind.special_role = "traitor"
var/datum/objective/escape/escape_objective = new
escape_objective.owner = M.mind
M.mind.objectives += escape_objective
var/datum/objective/custom_objective = new(objective)
custom_objective.owner = M.mind
M.mind.objectives += custom_objective
M << "<B>You are the traitor.</B>"
var/datum/objective/escape/escape_objective = new
escape_objective.owner = M.mind
M.mind.objectives += escape_objective
var/obj_count = 1
for(var/datum/objective/OBJ in M.mind.objectives)
M << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
M << "<B>You are the traitor.</B>"
var/obj_count = 1
for(var/datum/objective/OBJ in M.mind.objectives)
M << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
//to stop spamming during traitor all secret
if(mode)
log_admin("[key_name(usr)] has made [key_name(M)] a traitor.")
message_admins("\blue [key_name_admin(usr)] has made [key_name_admin(M)] a traitor. Objective is: [objective]", 1)
if(mode)
log_admin("[key_name(usr)] has made [key_name(M)] a traitor.")
message_admins("\blue [key_name_admin(usr)] has made [key_name_admin(M)] a traitor. Objective is: [objective]", 1)
else
usr << "This guy doesn't have a mind datum, traitoring him doesn't work right."
else if (istype(M, /mob/living/silicon/ai))
ticker.mode.traitors += M.mind
M.mind.special_role = "traitor"

View File

@@ -8,10 +8,11 @@ var
jobban_savebanfile()
/proc/jobban_isbanned(mob/M, rank)
if (jobban_keylist.Find(text("[M.ckey] - [rank]")))
return 1
else
return 0
if(M)
if (jobban_keylist.Find(text("[M.ckey] - [rank]")))
return 1
else
return 0
/proc/jobban_loadbanfile()
var/savefile/S=new("data/job_full.ban")

View File

@@ -77,7 +77,7 @@
usr.verbs -= /mob/dead/observer/proc/dead_tele
spawn(50)
usr.verbs += /mob/dead/observer/proc/dead_tele
A = input("Area to jump to", "BOOYEA", A) in list("Engine","Hallways","Toxins","Storage","Maintenance","Crew Quarters","Medical","Security","Chapel","Bridge","Prison","AI Satellite","Thunderdome")
A = input("Area to jump to", "BOOYEA", A) in list("Engine","Hallways","Toxins","Storage","Maintenance","Crew Quarters","Medical","Security","Chapel","Bridge","AI Satellite","Thunderdome")
switch (A)
if ("Engine")
@@ -146,12 +146,6 @@
if(istype(B, /area/turret_protected/aisat))
L += B
A = pick(L)
if ("Prison")
var/list/L = list()
for(var/area/B in world)
if(istype(B, /area/prison/control))
L += B
A = pick(L)
if ("Thunderdome")
var/list/L = list()
for(var/area/B in world)

View File

@@ -2078,10 +2078,11 @@
if (istype(src.item, /obj/item))
src.source.drop_item()
src.loc = src.target
src.item.layer = 20
src.target.r_hand = src.item
src.item.loc = src.target
src.item.add_fingerprint(src.target)
if (src.item)
src.item.layer = 20
src.target.r_hand = src.item
src.item.loc = src.target
src.item.add_fingerprint(src.target)
if("uniform")
if (src.target.w_uniform)
var/obj/item/W = src.target.w_uniform
@@ -2232,19 +2233,20 @@
S.injest(src.target)
if("dnainjector")
var/obj/item/weapon/dnainjector/S = src.item
src.item.add_fingerprint(src.source)
src.item:inject(src.target, null)
if (!( istype(S, /obj/item/weapon/dnainjector) ))
//SN src = null
del(src)
return
if (S.s_time >= world.time + 30)
//SN src = null
del(src)
return
S.s_time = world.time
for(var/mob/O in viewers(src.source, null))
O.show_message(text("\red [] injects [] with the DNA Injector!", src.source, src.target), 1)
if(src.item)
src.item.add_fingerprint(src.source)
src.item:inject(src.target, null)
if (!( istype(S, /obj/item/weapon/dnainjector) ))
//SN src = null
del(src)
return
if (S.s_time >= world.time + 30)
//SN src = null
del(src)
return
S.s_time = world.time
for(var/mob/O in viewers(src.source, null))
O.show_message(text("\red [] injects [] with the DNA Injector!", src.source, src.target), 1)
if("pockets")
if (src.target.l_store)
var/obj/item/W = src.target.l_store

View File

@@ -164,8 +164,9 @@
breathe()
if(src.reagents)
if(src.reagents.has_reagent("lexorin")) return
if(src.reagents.has_reagent("lexorin")) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath

View File

@@ -1091,7 +1091,8 @@
if (W)
W.layer = initial(W.layer)
var/turf/T = get_turf(src.loc)
T.Entered(W)
if (T)
T.Entered(W)
return
/mob/proc/reset_view(atom/A)
@@ -1438,7 +1439,7 @@
//we don't use message_admins here because the sender/receiver might get it too
for (var/mob/K in world)
if(K)
if(K && usr)
if(K.client && K.client.holder && K.key != usr.key && K.key != M.key)
K << "<b><font color='blue'>PM: [key_name(usr, K)]->[key_name(M, K)]:</b> \blue [t]</font>"
..()

View File

@@ -0,0 +1,8 @@
/obj/hud/proc/unplayer_hud()
src.station_explosion = new src.h_type( src )
src.station_explosion.icon = 'station_explosion.dmi'
src.station_explosion.icon_state = "start"
src.station_explosion.layer = 20
src.station_explosion.mouse_opacity = 0
src.station_explosion.screen_loc = "1,3"
return