Stack of runtime error fixes.

Didn't feel like digging into the DNA code to find the cause of one of the errors I got sent, if anyone feels like taking a crack at it:

runtime error: list index out of bounds
proc name: updateappearance (/proc/updateappearance)
  source file: dna.dm,257
  usr: Walter Bishop (/mob/living/carbon/human)
  src: null
  call stack:
updateappearance(Walter Bishop (/mob/living/carbon/human), "0FF0000660FF000066DC0000000000...")
Walter Bishop (/mob/living/carbon/human): Transform()

What I know: He was a changeling transforming between DNAs, apparently he somehow got a set of hair DNA that was literally off the charts for determining what hairstyle it was

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@781 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2011-01-05 02:12:37 +00:00
parent 2e1948eb1c
commit cc51d5eeb1
9 changed files with 39 additions and 33 deletions

View File

@@ -138,9 +138,10 @@ obj
sd_SetLuminosity(3) sd_SetLuminosity(3)
Del() Del()
loc:active_hotspot = null if (!istype(loc, /turf/space))
src.sd_SetLuminosity(0) loc:active_hotspot = null
loc = null src.sd_SetLuminosity(0)
loc = null
..() ..()

View File

@@ -145,7 +145,7 @@ datum
active_singletons += T active_singletons += T
setup() setup()
set background = 1
world << "\red \b Processing Geometry..." world << "\red \b Processing Geometry..."
sleep(1) sleep(1)

View File

@@ -181,9 +181,9 @@ datum
if(isobj(A)) spawn(0) R.reaction_obj(A, R.volume+volume_modifier) if(isobj(A)) spawn(0) R.reaction_obj(A, R.volume+volume_modifier)
if(INGEST) if(INGEST)
for(var/datum/reagent/R in reagent_list) for(var/datum/reagent/R in reagent_list)
if(ismob(A)) spawn(0) R.reaction_mob(A, INGEST, R.volume+volume_modifier) if(ismob(A) && R) spawn(0) R.reaction_mob(A, INGEST, R.volume+volume_modifier)
if(isturf(A)) spawn(0) R.reaction_turf(A, R.volume+volume_modifier) if(isturf(A) && R) spawn(0) R.reaction_turf(A, R.volume+volume_modifier)
if(isobj(A)) spawn(0) R.reaction_obj(A, R.volume+volume_modifier) if(isobj(A) && R) spawn(0) R.reaction_obj(A, R.volume+volume_modifier)
return return
add_reagent(var/reagent, var/amount, var/data=null) add_reagent(var/reagent, var/amount, var/data=null)

View File

@@ -105,9 +105,9 @@ datum
if(D) if(D)
blood_prop.virus = new D.type blood_prop.virus = new D.type
blood_prop.virus.holder = blood_prop blood_prop.virus.holder = blood_prop
if(istype(T, /turf/simulated/floor)) if(istype(T, /turf/simulated/floor) && D)
blood_prop.virus.spread_type = CONTACT_FEET blood_prop.virus.spread_type = CONTACT_FEET
else else if (D)
blood_prop.virus.spread_type = CONTACT_HANDS blood_prop.virus.spread_type = CONTACT_HANDS
else if(istype(self.data["donor"], /mob/living/carbon/monkey)) else if(istype(self.data["donor"], /mob/living/carbon/monkey))
@@ -184,7 +184,7 @@ datum
T:wet_overlay = null T:wet_overlay = null
var/hotspot = (locate(/obj/hotspot) in T) var/hotspot = (locate(/obj/hotspot) in T)
if(hotspot) if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() ) var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0) lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react() lowertemp.react()
@@ -195,7 +195,7 @@ datum
src = null src = null
var/turf/T = get_turf(O) var/turf/T = get_turf(O)
var/hotspot = (locate(/obj/hotspot) in T) var/hotspot = (locate(/obj/hotspot) in T)
if(hotspot) if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() ) var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0) lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react() lowertemp.react()

View File

@@ -162,23 +162,24 @@ obj/item/toy/blink
playsound(user.loc, 'syringeproj.ogg', 50, 1) playsound(user.loc, 'syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++) for(var/i=0, i<6, i++)
if(D.loc == trg) break if (D)
step_towards(D,trg) if(D.loc == trg) break
step_towards(D,trg)
for(var/mob/living/M in D.loc) for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue if(!istype(M,/mob/living)) continue
if(M == user) continue if(M == user) continue
for(var/mob/O in viewers(world.view, D)) for(var/mob/O in viewers(world.view, D))
O.show_message(text("\red [] was hit by the foam dart!", M), 1) O.show_message(text("\red [] was hit by the foam dart!", M), 1)
new /obj/item/toy/ammo/crossbow(M.loc) new /obj/item/toy/ammo/crossbow(M.loc)
del(D)
return
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
del(D) del(D)
return
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
del(D)
sleep(1) sleep(1)

View File

@@ -179,7 +179,9 @@
return 0 return 0
var/turf/T = src.loc var/turf/T = src.loc
var/obj/cable/C = T.get_cable_node() var/obj/cable/C = T.get_cable_node()
var/net = C.netnum // find the powernet of the connected cable var/net
if (C)
net = C.netnum // find the powernet of the connected cable
if(!net) if(!net)
power = 0 power = 0
@@ -212,11 +214,11 @@
if(power != 1) if(power != 1)
user << "\red The shield generator needs to be powered by wire underneath." user << "\red The shield generator needs to be powered by wire underneath."
return 1 return 1
if(src.active >= 1) if(src.active >= 1)
src.active = 0 src.active = 0
icon_state = "Shield_Gen" icon_state = "Shield_Gen"
user.visible_message("[user] turned the shield generator off.", \ user.visible_message("[user] turned the shield generator off.", \
"You turn off the shield generator.", \ "You turn off the shield generator.", \
"You hear heavy droning fade out.") "You hear heavy droning fade out.")

View File

@@ -14,7 +14,8 @@
V.show_message("\red [M] writhes in pain as the markings below him glow a bloody red.", 3, "\red You hear an anguished scream.", 2) V.show_message("\red [M] writhes in pain as the markings below him glow a bloody red.", 3, "\red You hear an anguished scream.", 2)
M << "<font color=\"purple\"><b><i>Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.</b></i></font>" M << "<font color=\"purple\"><b><i>Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.</b></i></font>"
M << "<font color=\"purple\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>" M << "<font color=\"purple\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>"
ticker.mode:grant_runeword(M) if (ticker.mode.name == "cult")
ticker.mode:grant_runeword(M)
cultists.Add(M) cultists.Add(M)
return return
return fizzle() return fizzle()

View File

@@ -662,8 +662,9 @@ steam.start() -- spawns the effect
F.amount = amount F.amount = amount
if(!metal) if(!metal)
F.create_reagents(10) F.create_reagents(10)
for(var/datum/reagent/R in reagents.reagent_list) if (reagents)
F.reagents.add_reagent(R.id,1) for(var/datum/reagent/R in reagents.reagent_list)
F.reagents.add_reagent(R.id,1)
sleep(15) sleep(15)
// foam disolves when heated // foam disolves when heated

View File

@@ -44,7 +44,7 @@
..() ..()
statpanel("Status") statpanel("Status")
if (src.client.statpanel == "Status") if (src.client.statpanel == "Status")
if(ticker.mode != null) if(ticker.mode)
//world << "DEBUG: ticker not null" //world << "DEBUG: ticker not null"
if(ticker.mode.name == "AI malfunction") if(ticker.mode.name == "AI malfunction")
//world << "DEBUG: malf mode ticker test" //world << "DEBUG: malf mode ticker test"