- Fixed one of the ways the Core R&D Computer can lock up and become completely unusable. If it gets stuck from using this method, just close the window and click on the computer again. Fixes issue 316.

- Vaccine bottles from the panD.E.M.I.C. now auto-name. There was a bug where you could very quickly create a ton of bottles which could cause clients to crash. Fixes issue 326.

- Changed various ASSERT()'s to sanity ifs. ASSERT should really only be used during debugging, not in release. Runtime prevention.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3368 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-03-28 16:51:55 +00:00
parent 99d894c168
commit 0f456531b9
9 changed files with 25 additions and 25 deletions
+1 -1
View File
@@ -58,7 +58,7 @@
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40))
ASSERT(gibbed == 0)
if(gibbed != 0) return 0
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE
for(var/mob/dead/observer/G in world)
if(G.client)
@@ -52,7 +52,7 @@
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40)) //So everyone can feel like robot Seth Brundle
ASSERT(src.gibbed == 0)
if(src.gibbed != 0) return 0
var/turf/T = find_loc(affected_mob)
gibs(T)
src.cure(0)
+1 -1
View File
@@ -52,7 +52,7 @@
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40))
ASSERT(gibbed == 0)
if(gibbed != 0) return 0
var/turf/T = find_loc(affected_mob)
gibs(T)
src.cure(0)
+2 -2
View File
@@ -57,12 +57,12 @@ PriorityQueue
j >>= 1
Dequeue()
ASSERT(L.len)
if(!L.len) return 0
. = L[1]
Remove(1)
Remove(i)
ASSERT(i <= L.len)
if(i > L.len) return 0
L.Swap(i,L.len)
L.Cut(L.len)
if(i < L.len)
+1 -1
View File
@@ -448,7 +448,7 @@ proc
currentLayer = current:layer
if(currentLayer<0) // Special case for FLY_LAYER
ASSERT(currentLayer > -1000)
if(currentLayer <= -1000) return 0
if(pSet == 0) // Underlay
currentLayer = A.layer+currentLayer/1000
else // Overlay
+1 -1
View File
@@ -78,7 +78,7 @@ obj/hud/New(var/type = 0)
/obj/hud/proc/instantiate(var/type = 0)
mymob = loc
ASSERT(istype(mymob, /mob))
if(!istype(mymob, /mob)) return 0
if(ishuman(mymob))
human_hud(mymob.UI) // Pass the player the UI style chosen in preferences
+1 -1
View File
@@ -194,7 +194,7 @@
if(part)
parts[i] = part
//debug below
ASSERT(istype(parts[i],/obj/item))
if(!istype(parts[i],/obj/item)) return 0
return
+16 -17
View File
@@ -388,24 +388,23 @@
if (href_list["create_vaccine"])
if(!src.wait)
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
var/vaccine_type = text2path(href_list["create_vaccine"])//the path is received as string - converting
var/datum/disease/D = new vaccine_type
var/name = input(usr,"Name:","Name the vaccine",D.name)
if(!name || name == " ") name = D.name
if(B)
B.name = "[name] vaccine bottle"
B.reagents.add_reagent("vaccine",15,vaccine_type)
del(D)
wait = 1
var/datum/reagents/R = beaker.reagents
var/datum/reagent/blood/Blood = null
for(var/datum/reagent/blood/L in R.reagent_list)
if(L)
Blood = L
break
var/list/res = Blood.data["resistances"]
spawn(res.len*500)
src.wait = null
var/vaccine_type = text2path(href_list["create_vaccine"])//the path is received as string - converting
var/datum/disease/D = new vaccine_type
if(D)
B.name = "[D.name] vaccine bottle"
B.reagents.add_reagent("vaccine",15,vaccine_type)
del(D)
wait = 1
var/datum/reagents/R = beaker.reagents
var/datum/reagent/blood/Blood = null
for(var/datum/reagent/blood/L in R.reagent_list)
if(L)
Blood = L
break
var/list/res = Blood.data["resistances"]
spawn(res.len*500)
src.wait = null
else
src.temphtml = "The replicator is not ready yet."
src.updateUsrDialog()
+1
View File
@@ -268,6 +268,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(!linked_destroy.hacked)
if(!linked_destroy.loaded_item)
usr <<"\red The destructive analyzer appears to be empty."
screen = 1.0
return
if(linked_destroy.loaded_item.reliability >= 90)
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)