Merge branch 'master' of git://github.com/Baystation12/Baystation12

This commit is contained in:
Ren Erthilo
2012-04-09 11:24:10 +01:00
5 changed files with 31 additions and 9 deletions

View File

@@ -56,6 +56,11 @@
/proc/PickObjectiveFromList(var/list/objectivesArray)
var/list/datum/objectives = objectivesArray[1]
var/pick_index = text2num(pickweight(objectivesArray[2]))
if (pick_index > objectives.len || pick_index < 1)
log_admin("Objective picking failed. Error logged. One or more traitors will need to be manually-assigned objectives")
CRASH("Objective picking failed. Pick_index was [pick_index].")
return objectives[pick_index]
/proc/RemoveObjectiveFromList(var/list/objectiveArray, var/datum/objective/objective)

View File

@@ -285,7 +285,13 @@ the implant may become unstable and either pre-maturely inject the subject or si
process()
var/mob/M = src.loc
if(M.stat == 2)
if(isnull(M)) // If the mob got gibbed
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
a.autosay("states, \"[mobname] has died-zzzzt in-in-in...\"", "[mobname]'s Death Alarm")
del(a)
processing_objects.Remove(src)
else if(M.stat == 2)
var/turf/t = get_turf(M)
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
a.autosay("states, \"[mobname] has died in [t.loc.name]!\"", "[mobname]'s Death Alarm")

View File

@@ -65,8 +65,11 @@
dat += "<td>[M.mind.assigned_role] (No ID)</td>"
else if(isnull(id.assignment)) // Preventing runtime errors blocking the player panel
usr << "<font color=red>ERROR:</font> Inform the coders that an [id.name] was checked for its assignment variable, and it was null."
dat += "<td><font color=red>ERROR</font></td>"
if(istype(id, /obj/item/weapon/card/id/syndicate))
dat += "<td><font color=purple>Antagonist</font></td>"
else
usr << "<font color=red>ERROR:</font> Inform the coders that an [id.name] was checked for its assignment variable, and it was null."
dat += "<td><font color=red>ERROR</font></td>"
else
if(M.mind.assigned_role == id.assignment) // Polymorph

View File

@@ -130,25 +130,30 @@
/mob/living/carbon/human/proc/drip(var/amt as num)
if(!amt)
return
var/amm = 0.1 * amt
var/turf/T = get_turf(src)
var/list/obj/effect/decal/cleanable/blood/drip/nums = list()
var/amm = 0.1 * amt
var/list/iconL = list("1","2","3","4","5")
vessel.remove_reagent("blood",amm)
var/list/hax = list("1","2","3","4","5")
for(var/obj/effect/decal/cleanable/blood/drip/G in T)
nums += G
hax.Remove(G.icon_state)
iconL.Remove(G.icon_state)
if(nums.len >= 3)
var/obj/effect/decal/cleanable/blood/drip/D = pick(nums)
D.blood_DNA.len++
D.blood_DNA[D.blood_DNA.len] = list(dna.unique_enzymes,dna.b_type)
if(virus2)
D.virus2 += virus2.getcopy()
D.virus2 = virus2.getcopy()
return
var/obj/effect/decal/cleanable/blood/drip/this = new(T)
this.icon_state = pick(hax)
this.icon_state = pick(iconL)
this.blood_DNA = list(list(dna.unique_enzymes,dna.b_type))
this.blood_owner = src
if(virus2)
this.virus2 = virus2.getcopy()

View File

@@ -1322,7 +1322,10 @@
if(M.virus2 && get_infection_chance())
infect_virus2(src,M.virus2)
else
virus2.activate(src)
if(isnull(virus2)) // Trying to figure out a runtime error that keeps repeating
CRASH("virus2 nulled before calling activate()")
else
virus2.activate(src)
// activate may have deleted the virus
if(!virus2) return