Merge pull request #1119 from SkyMarshal/BugFixes

Bug fixes
This commit is contained in:
Erthilo
2012-05-20 14:42:30 -07:00
20 changed files with 89 additions and 49 deletions

View File

@@ -238,9 +238,8 @@ obj/machinery/computer/forensic_scanning
var/list/blood = outputs[3]
if(blood && blood.len)
temp += "&nbsp<b>Blood:</b><br>"
for(var/j = 1, j <= blood.len, j++)
var/list/templist2 = blood[j]
temp += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [templist2[2]], DNA: [templist2[1]]<br>"
for(var/named in blood)
temp += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: [blood[named]], DNA: [named]<br>"
temp += "<br><a href='?src=\ref[src];operation=database;delete_record=[href_list["identifier"]]'>{Delete this Dossier}</a>"
temp += "<br><a href='?src=\ref[src];operation=databaseprint;identifier=[href_list["identifier"]]'>{Print}</a>"
else

View File

@@ -104,7 +104,7 @@ datum
on_mob_life(var/mob/living/M)
if(!data || !data["blood_type"])
..()
else if(istype(M, /mob/living/carbon/human) && blood_incompatible(data["blood_type"],M.dna.b_type))
else if(istype(M, /mob/living/carbon/human) && blood_incompatible(data["blood_type"],M.dna.b_type) && !M.changeling)
M.adjustToxLoss(rand(0.5,1.5))
M.adjustOxyLoss(rand(1,1.5))
..()

View File

@@ -185,9 +185,10 @@
if(W:amount >= 1)
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
W:use(1)
user << "\blue You put in the glass lens."
src.state = 5
if(W)
W:use(1)
user << "\blue You put in the glass lens."
src.state = 5
if(5)
if(istype(W, /obj/item/weapon/crowbar))
playsound(src.loc, 'Crowbar.ogg', 50, 1)

View File

@@ -872,7 +872,7 @@
if(E.name == "l_hand" || E.name == "l_arm")
if(hand && equipped())
drop_item()
emote("custom v drops what they were holding, their limb malfunctioning!")
emote("custom v drops what they were holding, their [E] malfunctioning!")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -882,7 +882,7 @@
else if(E.name == "r_hand" || E.name == "r_arm")
if(!hand && equipped())
drop_item()
emote("custom v drops what they were holding, their limb malfunctioning!")
emote("custom v drops what they were holding, their [E] malfunctioning!")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -915,6 +915,15 @@
var/blood_volume = round(vessel.get_reagent_amount("blood"))
if(bloodloss)
drip(bloodloss)
else if(blood_volume < 560 && blood_volume)
var/datum/reagent/blood/B = locate() in vessel //Grab some blood
if(!B.data["donor"] == src) //If it's not theirs, then we look for theirs
for(var/datum/reagent/blood/D in vessel)
if(D.data["donor"] == src)
B = D
break
//At this point, we dun care which blood we are adding to, as long as they get more blood.
B.volume = max(min(B.volume + 560/blood_volume,560), 0) //Less blood = More blood generated per tick
if(!blood_volume)
bloodloss = 0
else if(blood_volume > 448)

View File

@@ -23,7 +23,7 @@
del(O.organs)
O.organs = organs
for(var/name in O.organs)
var/datum/organ/external/organ = O[name]
var/datum/organ/external/organ = O.organs[name]
organ.owner = O
for(var/obj/item/weapon/implant/implant in organ.implant)
implant.imp_in = O

View File

@@ -30,7 +30,9 @@
overlays += image('power.dmi', "cell-o1")
/obj/item/weapon/cell/proc/percent() // return % charge of cell
return 100.0*charge/maxcharge
if(maxcharge)
return 100.0*charge/maxcharge
return 0
// use power from a cell
/obj/item/weapon/cell/proc/use(var/amount)