diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
index 3ac7e6364e1..15426fda49c 100644
--- a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
@@ -329,8 +329,10 @@
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
head.screen_loc = ui_head
else
+ var/datum/organ/external/head = organs["head"]
+ if(!head.destroyed)
//if not wearing anything on the head, show the ears
- overlays += image("icon" = icon('tajaran.dmi', "ears_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER)
+ overlays += image("icon" = icon('tajaran.dmi', "ears_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER)
// Belt
if (belt)
@@ -474,8 +476,8 @@
else if (gender == FEMALE)
g = "f"
- stand_icon = new /icon('tajaran.dmi', "torso_s")
- lying_icon = new /icon('tajaran.dmi', "torso_l")
+ stand_icon = new /icon('tajaran.dmi', "torso_[g]_s")
+ lying_icon = new /icon('tajaran.dmi', "torso_[g]_l")
var/husk = (mutations & HUSK)
//var/obese = (mutations & FAT)
diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi
index 79333e346bb..05b198970dc 100644
Binary files a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi and b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi differ
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index 591efbc60d7..e0058ee9d49 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -349,15 +349,20 @@ client
if (L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500))
// not sure if this is completely right...
- if (0) // (L.vars.len > 0)
+ if(0) //(L.vars.len > 0)
html += "
"
- for (var/entry in L)
- html += debug_variable(entry, L[entry], level + 1)
+
html += "
"
else
html += ""
- for (var/index = 1, index <= L.len, index++)
- html += debug_variable("[index]", L[index], level + 1)
+ var/index = 1
+ for (var/entry in L)
+ if(istext(entry))
+ html += debug_variable(entry, L[entry], level + 1)
+ //html += debug_variable("[index]", L[index], level + 1)
+ else
+ html += debug_variable(index, L[index], level + 1)
+ index++
html += "
"
else
html += "[name] = [value]"
diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm
index ae795db135e..a429fd6082a 100644
--- a/code/defines/procs/helpers.dm
+++ b/code/defines/procs/helpers.dm
@@ -643,7 +643,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
total = rand(1, total)
for (item in L)
- total -=L [item]
+ total -= L[item]
if (total <= 0)
return item
diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm
index 244ff000d6f..4d554d339b7 100644
--- a/code/game/atom_procs.dm
+++ b/code/game/atom_procs.dm
@@ -81,16 +81,16 @@
/atom/proc/add_fingerprint(mob/living/M as mob)
if(isnull(M)) return
if(isnull(M.key)) return
- if (!( src.flags ) & 256)
+ if (!( flags ) & 256)
return
if (ishuman(M))
if(!fingerprintshidden)
fingerprintshidden = list()
add_fibers(M)
if (M.mutations2 & mFingerprints)
- if(src.fingerprintslast != M.key)
- src.fingerprintshidden += "(Has no fingerprints) Real name: [M.real_name], Key: [M.key]"
- src.fingerprintslast = M.key
+ if(fingerprintslast != M.key)
+ fingerprintshidden += "(Has no fingerprints) Real name: [M.real_name], Key: [M.key]"
+ fingerprintslast = M.key
return 0
var/mob/living/carbon/human/H = M
if (!istype(H.dna, /datum/dna) || !H.dna.uni_identity || (length(H.dna.uni_identity) != 32))
@@ -98,24 +98,24 @@
H.dna = new /datum/dna(null)
H.check_dna()
if (H.gloves && H.gloves != src)
- if(src.fingerprintslast != H.key)
- src.fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
- src.fingerprintslast = H.key
+ if(fingerprintslast != H.key)
+ fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
+ fingerprintslast = H.key
H.gloves.add_fingerprint(M)
if(H.gloves != src)
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
- if(src.fingerprintslast != H.key)
- src.fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key)
- src.fingerprintslast = H.key
+ if(fingerprintslast != H.key)
+ fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key)
+ fingerprintslast = H.key
if(!fingerprints)
fingerprints = list()
var/new_prints = 0
var/prints
- for(var/i = 1, i <= src.fingerprints.len, i++)
- var/list/L = params2list(src.fingerprints[i])
+ for(var/i = 1, i <= fingerprints.len, i++)
+ var/list/L = params2list(fingerprints[i])
if(L[num2text(1)] == md5(H.dna.uni_identity))
new_prints = i
prints = L[num2text(2)]
@@ -123,30 +123,28 @@
else
var/test_print = stars(L[num2text(2)], rand(80,90))
if(stringpercent(test_print) == 32)
- if(src.fingerprints.len == 1)
- src.fingerprints = list()
+ if(fingerprints.len == 1)
+ fingerprints = list()
else
- for(var/j = i, j < (src.fingerprints.len), j++)
- src.fingerprints[j] = src.fingerprints[j+1]
- src.fingerprints.len--
+ fingerprints.Cut(i,i+1)
else
- src.fingerprints[i] = "1=[L[num2text(1)]]&2=[test_print]"
+ fingerprints[i] = "1=[L[num2text(1)]]&2=[test_print]"
if(new_prints)
- src.fingerprints[new_prints] = text("1=[]&2=[]", md5(H.dna.uni_identity), stringmerge(prints,stars(md5(H.dna.uni_identity), (H.gloves ? rand(10,20) : rand(25,40)))))
- else if(new_prints == 0)
- if(!src.fingerprints || !src.fingerprints.len)
- src.fingerprints = list(text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40))))
+ fingerprints[new_prints] = text("1=[]&2=[]", md5(H.dna.uni_identity), stringmerge(prints,stars(md5(H.dna.uni_identity), (H.gloves ? rand(10,20) : rand(25,40)))))
+ else
+ if(!fingerprints || !fingerprints.len)
+ fingerprints = list(text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40))))
else
- src.fingerprints += text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40)))
- for(var/i = 1, i <= src.fingerprints.len, i++)
- if(length(src.fingerprints[i]) != 69)
- src.fingerprints.Remove(src.fingerprints[i])
+ fingerprints += text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40)))
+ for(var/i = 1, i <= fingerprints.len, i++)
+ if(length(fingerprints[i]) != 69)
+ fingerprints.Remove(fingerprints[i])
if(fingerprints && !fingerprints.len) del(fingerprints)
return 1
else
- if(src.fingerprintslast != M.key)
- src.fingerprintshidden += text("Real name: [], Key: []",M.real_name, M.key)
- src.fingerprintslast = M.key
+ if(fingerprintslast != M.key)
+ fingerprintshidden += text("Real name: [], Key: []",M.real_name, M.key)
+ fingerprintslast = M.key
return
//returns 1 if made bloody, returns 0 otherwise
diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm
index 0aee8f7006a..653bf079f8d 100644
--- a/code/game/gamemodes/newobjective.dm
+++ b/code/game/gamemodes/newobjective.dm
@@ -1,48 +1,81 @@
/proc/GenerateTheft(var/job,var/datum/mind/traitor)
var/list/datum/objective/objectives = list()
+ var/list/weight = list()
+ var/index = 1
for(var/o in typesof(/datum/objective/steal))
if(o != /datum/objective/steal) //Make sure not to get a blank steal objective.
- objectives += new o(null,job)
-
- //objectives += GenerateAssassinate(job,traitor)
- return objectives
+ var/datum/objective/target = new o(null,job)
+ weight += list("[index]" = target.weight)
+ objectives += target
+ index++
+ return list(objectives, weight)
/proc/GenerateAssassinate(var/job,var/datum/mind/traitor)
var/list/datum/objective/assassinate/missions = list()
+ var/list/weight = list()
+ var/index = 1
for(var/datum/mind/target in ticker.minds)
if((target != traitor) && istype(target.current, /mob/living/carbon/human))
if(target && target.current)
- missions += new /datum/objective/assassinate(null,job,target)
- return missions
+ var/datum/objective/target_obj = new /datum/objective/assassinate(null,job,target)
+ weight += list("[index]" = target_obj.weight)
+ missions += target_obj
+ index++
+ return list(missions, weight)
/proc/GenerateFrame(var/job,var/datum/mind/traitor)
var/list/datum/objective/frame/missions = list()
+ var/list/weight = list()
+ var/index = 1
for(var/datum/mind/target in ticker.minds)
if((target != traitor) && istype(target.current, /mob/living/carbon/human))
if(target && target.current)
- missions += new /datum/objective/frame(null,job,target)
- return missions
+ var/datum/objective/target_obj = new /datum/objective/frame(null,job,target)
+ weight += list("[index]" = target_obj.weight)
+ missions += target_obj
+ index++
+ return list(missions, weight)
/proc/GenerateProtection(var/job,var/datum/mind/traitor)
var/list/datum/objective/frame/missions = list()
+ var/list/weight = list()
+ var/index = 1
for(var/datum/mind/target in ticker.minds)
if((target != traitor) && istype(target.current, /mob/living/carbon/human))
if(target && target.current)
- missions += new /datum/objective/protection(null,job,target)
- return missions
+ var/datum/objective/target_obj = new /datum/objective/protection(null,job,target)
+ weight += list("[index]" = target_obj.weight)
+ missions += target_obj
+ index++
+ return list(missions, weight)
+/proc/PickObjectiveFromList(var/list/objectivesArray)
+ var/list/datum/objectives = objectivesArray[1]
+ var/pick_index = text2num(pickweight(objectivesArray[2]))
+ return objectives[pick_index]
+/proc/RemoveObjectiveFromList(var/list/objectiveArray, var/datum/objective/objective)
+ var/list/datum/objective/temp = objectiveArray[1]
+ var/list/weight = objectiveArray[2]
+ var/index = temp.Find(objective)
+ if(index == temp.len)
+ temp.Cut(index)
+ weight.Cut(index)
+ else
+ temp.Cut(index, index+1)
+ weight.Cut(index, index+1)
+ return list(temp,weight)
/proc/SelectObjectives(var/job,var/datum/mind/traitor,var/hijack = 0)
- var/list/datum/objective/chosenobjectives = list()
- var/list/datum/objective/theftobjectives = GenerateTheft(job,traitor) //Separated all the objective types so they can be picked independantly of each other.
- var/list/datum/objective/killobjectives = GenerateAssassinate(job,traitor)
- var/list/datum/objective/frameobjectives = GenerateFrame(job,traitor)
- var/list/datum/objective/protectobjectives = GenerateProtection(job,traitor)
+ var/list/chosenobjectives = list()
+ var/list/theftobjectives = GenerateTheft(job,traitor) //Separated all the objective types so they can be picked independantly of each other.
+ var/list/killobjectives = GenerateAssassinate(job,traitor)
+ var/list/frameobjectives = GenerateFrame(job,traitor)
+ var/list/protectobjectives = GenerateProtection(job,traitor)
//var/points
var/totalweight
var/selectobj
@@ -50,27 +83,30 @@
while(totalweight < 100)
selectobj = rand(1,100) //Randomly determine the type of objective to be given.
- if(!length(killobjectives) || !length(protectobjectives)) //If any of these lists are empty, just give them theft objectives.
- var/datum/objective/objective = pick(theftobjectives)
+ if(!length(killobjectives[1]) || !length(protectobjectives[1])|| !length(frameobjectives[1])) //If any of these lists are empty, just give them theft objectives.
+ var/datum/objective/objective = PickObjectiveFromList(theftobjectives)
chosenobjectives += objective
- totalweight += objective.weight
- theftobjectives -= objective
+ totalweight += objective.points
+ theftobjectives = RemoveObjectiveFromList(theftobjectives, objective)
else switch(selectobj)
if(1 to 55) //Theft Objectives (55% chance)
- var/datum/objective/objective = pick(theftobjectives)
+ var/datum/objective/objective = PickObjectiveFromList(theftobjectives)
for(1 to 10)
- if(objective.weight + totalweight <= 110)
+ if(objective.points + totalweight <= 110)
break
- objective = pick(theftobjectives)
+ objective = PickObjectiveFromList(theftobjectives)
chosenobjectives += objective
- totalweight += objective.weight
- theftobjectives -= objective
+ totalweight += objective.points
+ theftobjectives = RemoveObjectiveFromList(theftobjectives, objective)
if(56 to 92) //Assassination Objectives (37% chance)
- var/datum/objective/assassinate/objective = pick(killobjectives)
+ var/datum/objective/assassinate/objective = PickObjectiveFromList(killobjectives)
+ world << objective
for(1 to 10)
- if(objective.weight + totalweight <= 110)
+ if(objective.points + totalweight <= 110)
break
- objective = pick(killobjectives)
+ objective = PickObjectiveFromList(killobjectives)
+ if(!objective)
+ continue
for(var/datum/objective/protection/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Assassinate somebody they need to Protect.
if(conflicttest.target == objective.target)
conflict = 1
@@ -81,24 +117,38 @@
break
if(!conflict)
chosenobjectives += objective
- totalweight += objective.weight
- killobjectives -= objective
+ totalweight += objective.points
+ killobjectives = RemoveObjectiveFromList(killobjectives, objective)
conflict = 0
if(93 to 95) //Framing Objectives (3% chance)
- var/datum/objective/objective = pick(frameobjectives)
+ var/datum/objective/objective = PickObjectiveFromList(frameobjectives)
for(1 to 10)
- if(objective.weight + totalweight <= 110)
+ if(objective.points + totalweight <= 110)
break
- objective = pick(frameobjectives)
- chosenobjectives += objective
- totalweight += objective.weight
- frameobjectives -= objective
+ objective = PickObjectiveFromList(frameobjectives)
+ if(!objective)
+ continue
+ for(var/datum/objective/protection/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Assassinate somebody they need to Protect.
+ if(conflicttest.target == objective.target)
+ conflict = 1
+ break
+ for(var/datum/objective/assassinate/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate.
+ if(conflicttest.target == objective.target)
+ conflict = 1
+ break
+ if(!conflict)
+ chosenobjectives += objective
+ totalweight += objective.points
+ frameobjectives = RemoveObjectiveFromList(frameobjectives, objective)
+ conflict = 0
if(96 to 100) //Protection Objectives (5% chance)
- var/datum/objective/protection/objective = pick(protectobjectives)
+ var/datum/objective/protection/objective = PickObjectiveFromList(protectobjectives)
for(1 to 10)
- if(objective.weight + totalweight <= 110)
+ if(objective.points + totalweight <= 110)
break
- objective = pick(protectobjectives)
+ objective = PickObjectiveFromList(protectobjectives)
+ if(!objective)
+ continue
for(var/datum/objective/assassinate/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate.
if(conflicttest.target == objective.target)
conflict = 1
@@ -109,8 +159,8 @@
break
if(!conflict)
chosenobjectives += objective
- totalweight += objective.weight
- protectobjectives -= objective
+ totalweight += objective.points
+ protectobjectives = RemoveObjectiveFromList(protectobjectives, objective)
conflict = 0
var/hasendgame = 0
@@ -134,19 +184,22 @@ datum
var/datum/mind/target
var/explanation_text = "text not set"
var/job
-// var/points = INFINITY //If this isn't set to something else, the objective is bugged and should be ignored
+ var/points = INFINITY //If this isn't set to something else, the objective is bugged and should be ignored
var/weight = INFINITY
New(var/text,var/joba)
if(text)
src.explanation_text = text
job=joba
- weight = get_points(job)
+ weight = get_weight(job)
+ points = get_points(job)
proc/check_completion()
return 1
proc/get_points(var/job)
return INFINITY
+ proc/get_weight(var/job)
+ return INFINITY
proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned.
for(var/datum/mind/possible_target in ticker.minds)
if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) )
@@ -179,20 +232,26 @@ datum
get_points()
if(target)
+ var/difficulty = GetRank(target.assigned_role) + 1
switch(GetRank(job))
if(4)
- return 30
+ return 20*difficulty
if(3)
- return 40
+ return 30*difficulty
if(2)
- return 50
+ return 40*difficulty
if(1)
- return 55
+ return 55*difficulty
if(0)
- return 60
+ return 60*difficulty
else
return INFINITY
+ get_weight()
+ if(target)
+ return 1
+ return 0
+
protection
New(var/text,var/joba,var/datum/mind/targeta)
@@ -218,7 +277,15 @@ datum
return 0
get_points()
- return 30
+ if(target)
+ return 30
+ else
+ return INFINITY
+
+ get_weight()
+ if(target)
+ return 1
+ return 0
find_target_by_role(role, role_type=0)
..(role, role_type)
@@ -247,20 +314,26 @@ datum
return 1
get_points()
if(target)
+ var/difficulty = GetRank(target.assigned_role) + 1
switch(GetRank(job))
if(4)
- return 30
+ return 20*difficulty
if(3)
- return 40
+ return 30*difficulty
if(2)
- return 50
+ return 40*difficulty
if(1)
- return 55
+ return 55*difficulty
if(0)
- return 60
+ return 60*difficulty
else
return 0
+ get_weight()
+ if(target)
+ return 1
+ return 0
+
find_target_by_role(var/role)
for(var/datum/mind/possible_target in ticker.minds)
if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human) && (possible_target.assigned_role == role))
@@ -327,19 +400,25 @@ datum
get_points()
if(target)
- switch(GetRank(owner.assigned_role))
+ var/difficulty = GetRank(target.assigned_role) + 1
+ switch(GetRank(job))
if(4)
- return 30
+ return 20*difficulty
if(3)
- return 40
+ return 30*difficulty
if(2)
- return 50
+ return 40*difficulty
if(1)
- return 55
+ return 55*difficulty
if(0)
- return 60
+ return 60*difficulty
else
- return 0
+ return INFINITY
+
+ get_weight()
+ if(target)
+ return 1
+ return 0
hijack
@@ -374,6 +453,8 @@ datum
if(4)
return 35
+ get_weight(var/job)
+ return 1
escape
explanation_text = "Escape on the shuttle alive, without being arrested."
@@ -399,6 +480,9 @@ datum
get_points()
return INFINITY
+ get_weight(var/job)
+ return 1
+
survive
explanation_text = "Stay alive."
@@ -411,6 +495,9 @@ datum
get_points()
return INFINITY
+ get_weight(var/job)
+ return 1
+
steal
var/obj/item/steal_target
@@ -441,6 +528,12 @@ datum
if(4)
return 20
+ get_weight(var/job)
+ if(GetRank(job) == 4)
+ return 10
+ else
+ return 20
+
plasmatank
steal_target = /obj/item/weapon/tank/plasma
@@ -452,6 +545,16 @@ datum
return 20
return 40
+ get_weight(var/job)
+ return 20
+
+ check_completion()
+ var/list/all_items = owner.current.get_contents()
+ for(var/obj/item/I in all_items)
+ if(!istype(I, steal_target)) continue//If it's not actually that item.
+ if(I:air_contents:toxins) return 1 //If they got one with plasma
+ return 0
+
/*Removing this as an objective. Not necessary to have two theft objectives in the same room.
steal/captainssuit
@@ -492,6 +595,12 @@ datum
if(4)
return 20
+ get_weight(var/job)
+ if(GetRank(job) == 4)
+ return 10
+ else
+ return 20
+
RCD
steal_target = /obj/item/weapon/rcd
@@ -511,6 +620,12 @@ datum
if(4)
return 20
+ get_weight(var/job)
+ if(GetRank(job) == 4)
+ return 10
+ else
+ return 20
+
/*burger
steal_target = /obj/item/weapon/reagent_containers/food/snacks/human/burger
@@ -549,6 +664,12 @@ datum
if(4)
return 20
+ get_weight(var/job)
+ if(GetRank(job) == 4)
+ return 10
+ else
+ return 20
+
magboots
steal_target = /obj/item/clothing/shoes/magboots
@@ -568,6 +689,12 @@ datum
if(4)
return 20
+ get_weight(var/job)
+ if(GetRank(job) == 4)
+ return 10
+ else
+ return 20
+
blueprints
steal_target = /obj/item/blueprints
@@ -587,6 +714,12 @@ datum
if(4)
return 20
+ get_weight(var/job)
+ if(GetRank(job) == 4)
+ return 10
+ else
+ return 20
+
voidsuit
steal_target = /obj/item/clothing/suit/space/nasavoid
@@ -606,6 +739,9 @@ datum
if(4)
return 20
+ get_weight(var/job)
+ return 20
+
nuke_disk
steal_target = /obj/item/weapon/disk/nuclear
@@ -625,6 +761,12 @@ datum
if(4)
return 25
+ get_weight(var/job)
+ if(GetRank(job) == 4)
+ return 10
+ else
+ return 20
+
nuke_gun
steal_target = /obj/item/weapon/gun/energy/gun/nuclear
explanation_text = "Steal a nuclear powered gun."
@@ -643,6 +785,9 @@ datum
if(4)
return 75
+ get_weight(var/job)
+ return 2
+
diamond_drill
steal_target = /obj/item/weapon/pickaxe/diamonddrill
explanation_text = "Steal a diamond drill."
@@ -661,6 +806,9 @@ datum
if(4)
return 75
+ get_weight(var/job)
+ return 2
+
boh
steal_target = /obj/item/weapon/storage/backpack/holding
explanation_text = "Steal a \"bag of holding.\""
@@ -679,6 +827,9 @@ datum
if(4)
return 75
+ get_weight(var/job)
+ return 2
+
hyper_cell
steal_target = /obj/item/weapon/cell/hyper
explanation_text = "Steal a hyper capacity power cell."
@@ -697,6 +848,9 @@ datum
if(4)
return 75
+ get_weight(var/job)
+ return 2
+
lucy
steal_target = /obj/item/stack/sheet/diamond
explanation_text = "Steal 10 diamonds."
@@ -715,6 +869,9 @@ datum
if(4)
return 75
+ get_weight(var/job)
+ return 2
+
check_completion()
var/target_amount = 10
var/found_amount = 0.0//Always starts as zero.
@@ -741,6 +898,9 @@ datum
if(4)
return 70
+ get_weight(var/job)
+ return 2
+
check_completion()
var/target_amount = 50
var/found_amount = 0.0//Always starts as zero.
@@ -767,6 +927,9 @@ datum
if(4)
return 70
+ get_weight(var/job)
+ return 2
+
check_completion()
var/target_amount = 25
var/found_amount = 0.0//Always starts as zero.
@@ -819,6 +982,9 @@ datum
if(istype(objective,/obj/item/robot_parts/robot_suit) && objective.check_completion())
return 1
return 0
+
+ get_weight(var/job)
+ return 20
AI
steal_target = /obj/structure/AIcore
explanation_text = "Steal a finished AI, either by intellicard or stealing the whole construct."
@@ -837,6 +1003,9 @@ datum
if(4)
return 20
+ get_weight(var/job)
+ return 15
+
check_completion()
if(steal_target)
for(var/obj/item/device/aicard/C in owner.current.get_contents())
@@ -878,6 +1047,9 @@ datum
else
return 0
+ get_weight(var/job)
+ return 20
+
pacid
steal_target = /datum/reagent/pacid
@@ -904,6 +1076,9 @@ datum
else
return 0
+ get_weight(var/job)
+ return 20
+
reagent
var/target_name
@@ -957,6 +1132,9 @@ datum
else
return 0
+ get_weight(var/job)
+ return 20
+
nuclear
explanation_text = "Destroy the station with a nuclear device."
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 128b01d9eef..a1d6311b34d 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -185,7 +185,11 @@
if (src.density)
open()
else
+ var/holdopen_old = holdopen
+ holdopen = 0
close()
+ spawn(1)
+ holdopen = holdopen_old
else if (src.density)
flick("door_deny", src)
return
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index e190fbd2c6a..e2dd58be852 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -195,26 +195,26 @@ FINGERPRINT CARD
return "There are no fingerprints on this card."
return
-/obj/item/weapon/f_card/attack_hand(mob/user as mob)
+///obj/item/weapon/f_card/attack_hand(mob/user as mob)
- if ((user.r_hand == src || user.l_hand == src))
- src.add_fingerprint(user)
- var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user )
- F.amount = 1
- src.amount--
- if (user.hand)
- user.l_hand = F
- else
- user.r_hand = F
- F.layer = 20
- F.add_fingerprint(user)
- if (src.amount < 1)
- //SN src = null
- del(src)
- return
- else
- ..()
- return
+// if ((user.r_hand == src || user.l_hand == src))
+// add_fingerprint(user)
+// var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user )
+// F.amount = 1
+// src.amount--
+// if (user.hand)
+// user.l_hand = F
+// else
+// user.r_hand = F
+// F.layer = 20
+// F.add_fingerprint(user)
+// if (src.amount < 1)
+// //SN src = null
+// del(src)
+// return
+// else
+// ..()
+// return
/obj/item/weapon/f_card/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
@@ -253,10 +253,10 @@ FINGERPRINT CARD
..()
if (!istype(usr, /mob/living/silicon))
- if (src.fingerprints)
+ if (fingerprints)
if (src.amount > 1)
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card(get_turf(src))
F.amount = --src.amount
- src.amount = 1
- src.icon_state = "fingerprint1"
+ amount = 1
+ icon_state = "fingerprint1"
return
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/medical.dm b/code/game/objects/items/weapons/medical.dm
index 07c90d3bdb3..544cefea359 100644
--- a/code/game/objects/items/weapons/medical.dm
+++ b/code/game/objects/items/weapons/medical.dm
@@ -38,31 +38,36 @@ MEDICAL
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
affecting = H.get_organ("head")
if(affecting.destroyed && !affecting.gauzed)
- H.visible_message("\red You do your best to stop the bleeding from [H]'s stump.", "\red [user] does their best to stem [H]'s bleeding from [H.gender == MALE? "his" : "her"] stump.", "\red You hear something like gauze being ripped.")
+ user.visible_message("\red You do your best to stop the bleeding from [H]'s stump.", "\red [user] does [user.gender == MALE? "his" : "her"] best to stem [H]'s bleeding from [H.gender == MALE? "his" : "her"] stump.", "\red You hear something like gauze being ripped.")
affecting.gauzed = 1
use(1)
return
for(var/datum/organ/wound/W in affecting.wounds)
- if(W.bleeding || !W.healing_state)
+ if(W.bleeding || !W.is_healing)
if(heal_brute && W.wound_type == 2)
continue
if(heal_burn && W.wound_type < 2)
continue
- if(stoppedblood)
- stoppedblood++
- break
- if(W.wound_size > 3)
+ if(W.wound_size > 3 && (W.bleeding || !W.is_healing))
+ if(stoppedblood)
+ stoppedblood += 1
+ break
W.bleeding = 0
- else
+ W.is_healing = 1
+ stoppedblood = 1
+ else if(W.wound_size <= 3)
+ if(stoppedblood)
+ stoppedblood += 1
+ break
W.stopbleeding()
- stoppedblood = 1
+ stoppedblood = 1
if (user && stoppedblood)
if (M != user)
- H.visible_message("\red You bandage up [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts", "\red [user] bandages [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts with [src]", "\red You hear something like gauze being ripped.")
+ user.visible_message("\red [user] bandages [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts with [src]", "\red You bandage up [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts", "\red You hear something like gauze being ripped.")
else
- H.visible_message("\red You bandage up [stoppedblood - 1 ? "some of" : "the last of"] your cuts", "\red [user] bandages [stoppedblood - 1 ? "some of" : "the last of"] their own cuts with [src]", "\red You hear something like gauze being ripped.")
+ user.visible_message("\red [user] bandages [stoppedblood - 1 ? "some of" : "the last of"] [user.gender == MALE? "his" : "her"] own cuts with [src]", "\red You bandage up [stoppedblood - 1 ? "some of" : "the last of"] your cuts", "\red You hear something like gauze being ripped.")
else if(user)
user << "\red Nothing to patch up!"
return
diff --git a/code/modules/DetectiveWork/detective_work.dm b/code/modules/DetectiveWork/detective_work.dm
index 6878b2dd5a1..7e5b2bcdfb7 100644
--- a/code/modules/DetectiveWork/detective_work.dm
+++ b/code/modules/DetectiveWork/detective_work.dm
@@ -199,7 +199,6 @@ obj/machinery/computer/forensic_scanning
M.drop_item()
I.loc = src
process_card()
- usr << "You insert the card, and it is destroyed by the machinery in the process of comparing prints."
else
usr << "\red Invalid Object Rejected."
if("database")
@@ -646,7 +645,9 @@ obj/machinery/computer/forensic_scanning
return
proc/process_card() //Same as above, but for fingerprint cards
- if(card.fingerprints && !(card.amount > 1))
+ if(card.fingerprints && !(card.amount > 1) && islist(card.fingerprints) && files && files.len)
+ usr << "You insert the card, and it is destroyed by the machinery in the process of comparing prints."
+ var/found = 0
for(var/k = 1, k <= card.fingerprints.len, k++)
var/list/test_prints = params2list(card.fingerprints[k])
var/print = test_prints[num2text(1)]
@@ -657,7 +658,12 @@ obj/machinery/computer/forensic_scanning
if(perp == print)
test_list[1] = "1=" + print + "&2=" + print
files[i] = test_list
+ found = 1
break
+ if(found)
+ usr << "The machinery finds can completes a match."
+ else
+ usr << "No match found."
del(card)
else
usr << "\red ERROR: No prints/too many cards."
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 363d95d88f2..d9b99a5ee7c 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -511,8 +511,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
e.perma_injury = 0
e.update_icon()
for(var/datum/organ/wound/W in e.wounds)
- if(W.bleeding)
+ if(W.bleeding || !W.is_healing)
W.stopbleeding()
+ del(H.vessel)
H.vessel = new/datum/reagents(560)
H.vessel.my_atom = H
H.vessel.add_reagent("blood",560)
diff --git a/code/modules/chemical/Chemistry-Holder.dm b/code/modules/chemical/Chemistry-Holder.dm
index da6e433f02a..d429802cb57 100644
--- a/code/modules/chemical/Chemistry-Holder.dm
+++ b/code/modules/chemical/Chemistry-Holder.dm
@@ -317,6 +317,10 @@ datum
for(var/A in reagent_list)
var/datum/reagent/R = A
+ if(R.id == "blood" && reagent == R.id)
+ if(R.data && data)
+ if(R.data["donor"] != data["donor"])
+ continue
if (R.id == reagent)
R.volume += amount
update_total()
diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm
index b9b360eeb87..d54eafc97ca 100644
--- a/code/modules/chemical/Chemistry-Reagents.dm
+++ b/code/modules/chemical/Chemistry-Reagents.dm
@@ -103,8 +103,8 @@ datum
color = "#C80000" // rgb: 200, 0, 0
on_mob_life(var/mob/living/M)
if(istype(M, /mob/living/carbon/human) && blood_incompatible(data["blood_type"],M.dna.b_type))
- M.adjustToxLoss(rand(1.5,3))
- M.adjustOxyLoss(rand(1.5,3))
+ M.adjustToxLoss(rand(0.5,1.5))
+ M.adjustOxyLoss(rand(1,1.5))
..()
return
diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm
index d8414436ff4..0d60cbb0899 100644
--- a/code/modules/chemical/Chemistry-Tools.dm
+++ b/code/modules/chemical/Chemistry-Tools.dm
@@ -972,6 +972,7 @@
if(T:vessel.get_reagent_amount("blood") < amount)
return
T:vessel.trans_to(src, amount)
+ on_reagent_change()
else
var/datum/reagent/B = new /datum/reagent/blood
B.holder = src
@@ -1077,8 +1078,8 @@
var/trans
if(B && ishuman(target))
var/mob/living/carbon/human/H = target
- H.vessel.add_reagent("blood",5,B)
- src.reagents.remove_reagent("blood",5)
+ H.vessel.add_reagent("blood",(B.volume > 5? 5 : B.volume),B.data)
+ src.reagents.remove_reagent("blood",(B.volume > 5? 5 : B.volume))
else
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
user << "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units."
diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm
index 3a4f2367a7f..167ad789fda 100644
--- a/code/modules/mob/living/carbon/give.dm
+++ b/code/modules/mob/living/carbon/give.dm
@@ -21,7 +21,7 @@ mob/living/carbon/verb/give()
if(!I)
return
if(src.r_hand == null)
- switch(alert(src,"[usr.name] wants to give you \a [I.name]?",,"Yes","No"))
+ switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
if("Yes")
if(!check_can_reach(usr,src))
usr << "You need to keep in reaching distance."
@@ -50,7 +50,7 @@ mob/living/carbon/verb/give()
if("No")
src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
else if(src.l_hand == null)
- switch(alert(src,"[src.name] wants to give you \a [I.name]?",,"Yes","No"))
+ switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
if("Yes")
if(!check_can_reach(usr,src))
usr << "You need to keep in reaching distance."
@@ -79,4 +79,4 @@ mob/living/carbon/verb/give()
if("No")
src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
else
- usr << "[src.name]\s hands are full."
\ No newline at end of file
+ usr << "[src.name]'s hands are full."
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index cc75597ada4..8a038c84163 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -349,11 +349,11 @@
"severe burn" = "severe burn", "deep burn" = "deep burn", "carbonised area" = "carbonised area")
switch(i)
if(2) //Healing wounds.
- if(tallied in list("cut","tiny bruise","small burn"))
+ if(tallied in list("cut","small burn"))
continue
tallied_rename = list("deep cut" = "clotted cut", "flesh wound" = "small bandaged wound",\
"gaping wound" = "bandaged wound", "big gaping wound" = "gauze wrapped wound",\
- "massive wound" = "massive blood soaked bandage", "small bruise" = "small bruise",\
+ "massive wound" = "massive blood soaked bandage", "tiny bruise" = "tiny bruise", "small bruise" = "small bruise",\
"moderate bruise" = "moderate bruise", "large bruise" = "large bruise",\
"huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\
"moderate burn" = "moderate salved burn", "large burn" = "large salved burn",\
@@ -380,7 +380,7 @@
"large burn" = "large burn scar", "severe burn" = "severe burn scar",\
"deep burn" = "deep burn scar", "carbonised area" = "healing carbonised area")
if(5)
- if(tallied in list("cut","deep cut","tiny bruise", "small bruise", "moderate bruise","small burn", "moderate burn"))
+ if(tallied in list("cut","deep cut","tiny bruise", "moderate bruise", "small bruise","small burn", "moderate burn"))
continue
tallied_rename = list("flesh wound" = "small scar", "gaping wound" = "straight scar",\
"big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\
@@ -429,6 +429,7 @@
flavor_text_string += flavor_text[text]
flavor_text_string += " on [t_his] [named].
"
wound_flavor_text["[named]"] = flavor_text_string
+ world << "[named] + [flavor_text_string]"
if(wound_flavor_text["head"] && !skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))
msg += wound_flavor_text["head"]
else if(is_bleeding["head"])
@@ -436,29 +437,39 @@
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["chest"]
else if(is_bleeding["chest"])
- msg += "[src] has blood from under [t_his] clothing!\n"
+ msg += "[src] has blood soaking through from under [t_his] clothing!\n"
if(wound_flavor_text["left arm"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["left arm"]
+ else if(is_bleeding["left arm"])
+ msg += "[src] has blood soaking through from under [t_his] clothing!\n"
if(wound_flavor_text["left hand"] && !gloves && !skipgloves)
msg += wound_flavor_text["left hand"]
else if(is_bleeding["left hand"])
msg += "[src] has blood running from under [t_his] gloves!\n"
if(wound_flavor_text["right arm"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["right arm"]
+ else if(is_bleeding["right arm"])
+ msg += "[src] has blood soaking through from under [t_his] clothing!\n"
if(wound_flavor_text["right hand"] && !gloves && !skipgloves)
msg += wound_flavor_text["right hand"]
else if(is_bleeding["right hand"])
msg += "[src] has blood running from under [t_his] gloves!\n"
if(wound_flavor_text["groin"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["groin"]
+ else if(is_bleeding["groin"])
+ msg += "[src] has blood soaking through from under [t_his] clothing!\n"
if(wound_flavor_text["left leg"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["left leg"]
+ else if(is_bleeding["left leg"])
+ msg += "[src] has blood soaking through from under [t_his] clothing!\n"
if(wound_flavor_text["left foot"]&& !shoes && !skipshoes)
msg += wound_flavor_text["left foot"]
else if(is_bleeding["left foot"])
msg += "[src] has blood running from [t_his] shoes!\n"
if(wound_flavor_text["right leg"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["right leg"]
+ else if(is_bleeding["right leg"])
+ msg += "[src] has blood soaking through from under [t_his] clothing!\n"
if(wound_flavor_text["right foot"]&& !shoes && !skipshoes)
msg += wound_flavor_text["right foot"]
else if(is_bleeding["right foot"])
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index b1116d78ff6..b9935eb3bda 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -54,7 +54,6 @@
var/list/body_standing = list()
var/list/body_lying = list()
- var/organs2 = list()
var/mutantrace = null
@@ -115,7 +114,7 @@
update_clothing()
src << "\blue Your icons have been generated!"
- vessel = new/datum/reagents(560)
+ vessel = new/datum/reagents(600)
vessel.my_atom = src
vessel.add_reagent("blood",560)
spawn(1) fixblood()
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index c9b2b87aa2b..d06b3a1e344 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -447,7 +447,7 @@
return null
update_canmove()
- if(paralysis || stunned || weakened || buckled || (changeling && changeling.changeling_fakedeath)) canmove = 0
+ if(paralysis || resting || stunned || weakened || buckled || (changeling && changeling.changeling_fakedeath)) canmove = 0
else canmove = 1
handle_breath(datum/gas_mixture/breath)
@@ -857,7 +857,7 @@
leg_tally-- // let it fail even if just foot&leg
// can't stand
- if(leg_tally == 0)
+ if(leg_tally == 0 && !paralysis && !(lying || resting))
emote("scream")
emote("collapse")
paralysis = 10
@@ -1470,4 +1470,4 @@ snippets
plcheck = t_plasma
oxcheck = t_oxygen
G.turf_add(T, G.total_moles())
-*/
+*/
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index 6480701a8d0..715eaeeb6c2 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -24,26 +24,37 @@
real_name = name
var/datum/organ/external/chest/chest = new /datum/organ/external/chest( src )
chest.owner = src
+ organs2 += chest
var/datum/organ/external/groin/groin = new /datum/organ/external/groin( src )
groin.owner = src
+ organs2 += groin
var/datum/organ/external/head/head = new /datum/organ/external/head( src )
head.owner = src
+ organs2 += head
var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm( src )
l_arm.owner = src
+ organs2 += l_arm
var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm( src )
r_arm.owner = src
+ organs2 += r_arm
var/datum/organ/external/l_hand/l_hand = new /datum/organ/external/l_hand( src )
l_hand.owner = src
+ organs2 += l_hand
var/datum/organ/external/r_hand/r_hand = new /datum/organ/external/r_hand( src )
r_hand.owner = src
+ organs2 += r_hand
var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg( src )
l_leg.owner = src
+ organs2 += l_leg
var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg( src )
r_leg.owner = src
+ organs2 += r_leg
var/datum/organ/external/l_foot/l_foot = new /datum/organ/external/l_foot( src )
l_foot.owner = src
+ organs2 += l_foot
var/datum/organ/external/r_foot/r_foot = new /datum/organ/external/r_foot( src )
r_foot.owner = src
+ organs2 += r_foot
organs["chest"] = chest
organs["groin"] = groin
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 8abee2c7478..aa2017253d6 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -280,6 +280,7 @@ the mob is also allowed to move without any sort of restriction. For instance, i
// var/obj/effect/organstructure/organStructure = null //for dem organs
var/list/organs = list( ) //List of organs.
+ var/list/organs2 = list()
//Singularity wants you!
var/grav_delay = 0
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index d30fc1ab884..bb80c607407 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -156,7 +156,7 @@
if(Process_Grab()) return
//Making mob movememnt changes instant.
- if(mob.paralysis || mob.stunned || mob.weakened || mob.buckled || (mob.changeling && mob.changeling.changeling_fakedeath))
+ if(mob.paralysis || mob.stunned || mob.resting || mob.weakened || mob.buckled || (mob.changeling && mob.changeling.changeling_fakedeath))
mob.canmove = 0
return
else
diff --git a/code/modules/mob/organ/organ.dm b/code/modules/mob/organ/organ.dm
index 5e4977c652f..4e3acabe4f4 100644
--- a/code/modules/mob/organ/organ.dm
+++ b/code/modules/mob/organ/organ.dm
@@ -73,6 +73,11 @@
owner = H
H.organs[name] = src
+ Del()
+ for(var/datum/organ/wound/W in wounds)
+ del(W)
+ ..()
+
proc/take_damage(brute, burn, sharp, used_weapon = null)
if((brute <= 0) && (burn <= 0))
return 0
@@ -99,7 +104,7 @@
if(prob(brute) && brute > 20 && !sharp)
createwound(rand(4,6),0,brute)
else if(!sharp)
- createwound(max(1,min(6,round(brute/10) + rand(-1,1))),1,brute)
+ createwound(max(1,min(6,round(brute/10) + rand(0,2))),1,brute)
if(burn)
burn_dam += burn
createwound(max(1,min(6,round(burn/10) + rand(-1,1))),2,burn)
@@ -152,15 +157,16 @@
brute -= W.damage
W.damage = 0
W.initial_dmg = 0
- W.stopbleeding()
+ W.stopbleeding(1)
else
W.damage -= brute
W.initial_dmg -= brute
+ W.stopbleeding()
else if(brute)
for(var/datum/organ/wound/W in brute_wounds)
W.damage = 0
W.initial_dmg = 0
- W.stopbleeding()
+ W.stopbleeding(1)
brute_dam = 0
if(burn && burn >= burn_to_heal)
for(var/datum/organ/wound/W in burn_wounds)
@@ -173,6 +179,7 @@
else
W.damage -= burn
W.initial_dmg -= burn
+ W.stopbleeding()
else if(burn)
for(var/datum/organ/wound/W in burn_wounds)
W.damage = 0
@@ -226,8 +233,6 @@
return
if(brute_dam > min_broken_damage)
if(broken == 0)
- var/dmgmsg = "[damage_msg] in your [display_name]"
- owner << dmgmsg
//owner.unlock_medal("Broke Yarrr Bones!", 0, "Break a bone.", "easy")
owner.visible_message("\red You hear a loud cracking sound coming from [owner.name].","\red Something feels like it shattered in your [display_name]!","You hear a sickening crack.")
owner.emote("scream")
@@ -275,6 +280,8 @@
proc/droplimb()
if(destroyed)
//owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy")
+
+ owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.","\red Your [display_name] goes flying off!","You hear a terrible sound of ripping tendons and flesh.")
switch(body_part)
if(UPPER_TORSO)
owner.gib()
@@ -288,6 +295,7 @@
H.transfer_identity(owner)
H.pixel_x = -10
H.pixel_y = 6
+ H.name = "[owner.name]'s head"
var/lol = pick(cardinal)
step(H,lol)
@@ -332,29 +340,21 @@
destroyed = 1
if(HAND_RIGHT)
var/obj/item/weapon/organ/r_hand/X = new(owner.loc, owner)
- for(var/mob/M in viewers(owner))
- M.show_message("\red [owner.name]'s [X.name] flies off in an arc.")
var/lol2 = pick(cardinal)
step(X,lol2)
destroyed = 1
if(HAND_LEFT)
var/obj/item/weapon/organ/l_hand/X = new(owner.loc, owner)
- for(var/mob/M in viewers(owner))
- M.show_message("\red [owner.name]'s [X.name] flies off in an arc.")
var/lol2 = pick(cardinal)
step(X,lol2)
destroyed = 1
if(FOOT_RIGHT)
var/obj/item/weapon/organ/r_foot/X = new(owner.loc, owner)
- for(var/mob/M in viewers(owner))
- M.show_message("\red [owner.name]'s [X.name] flies off in an arc.")
var/lol2 = pick(cardinal)
step(X,lol2)
destroyed = 1
if(FOOT_LEFT)
var/obj/item/weapon/organ/l_foot/X = new(owner.loc, owner)
- for(var/mob/M in viewers(owner))
- M.show_message("\red [owner.name]'s [X.name] flies off in an arc.")
var/lol2 = pick(cardinal)
step(X,lol2)
destroyed = 1
@@ -377,7 +377,10 @@
W.wound_size = size
W.owner = owner
W.parent = src
- spawn W.start_close() //Let small cuts close themselves.
+ if(type == 1)
+ spawn W.become_scar()
+ else
+ spawn W.start_close() //Let small cuts close themselves.
wounds += W
/datum/organ/wound
@@ -389,6 +392,8 @@
var/datum/organ/external/parent
var/bleeding = 0 //You got wounded, of course it's bleeding. -- Scratch that. Rewrote it.
var/healing_state = 0
+ var/is_healing = 0
+ var/slowheal = 3
proc/start_close()
sleep(rand(1800,3000)) //3-5 minutes
@@ -400,7 +405,7 @@
stopbleeding()
return
sleep(rand(1800,3000))
- if(wound_size == 1) //Small cuts heal in 3-10 minutes.
+ if(wound_size == 1) //Small cuts heal in 6-10 minutes.
parent.wounds.Remove(src)
update_health(1)
del(src)
@@ -408,30 +413,34 @@
stopbleeding()
return
if(wound_size < 5 && bleeding) //Give it a chance to stop bleeding on it's own.
- spawn(1)
+ spawn while(1)
sleep(1200)
if(prob(50))
stopbleeding()
return
return
- proc/stopbleeding()
- if(healing_state)
+ proc/stopbleeding(var/bleed = 0)
+ if(is_healing)
return 0
// owner:bloodloss -= 10 * src.wound_size
- parent.bleeding = 0
+ parent.bleeding = min(bleed,bleeding)
for(var/datum/organ/wound/W in parent)
if(W.bleeding && W != src)
parent.bleeding = 1
- bleeding = 0
+ break
+ bleeding = min(bleed,bleeding)
+ is_healing = 1
+ slowheal = 1
spawn become_scar() //spawn off the process of becoming a scar.
return 1
proc/become_scar()
healing_state = 1 //Patched
- update_health(0.5) //Heals some.
+ spawn(200*slowheal) //20 seconds
+ update_health(5) //Heals some.
- sleep(rand(1800,3000)) //3-5 minutes
+ sleep(rand(1800,3000)*slowheal) //3-5 minutes
if(parent.owner.stat == 2)
return
@@ -441,23 +450,26 @@
del(src)
healing_state = 2 //Noticibly healing.
- update_health(1) //Heals the rest of the way.
+ update_health(2) //Heals more.
- sleep(rand(1800,3000)) //3-5 minutes
+ sleep(rand(1800,3000)*slowheal) //3-5 minutes
if(parent.owner.stat == 2)
return
if(prob(60) && wound_size < 3) //Cuts heal up
parent.wounds.Remove(src)
del(src)
healing_state = 3 //Angry red scar
- sleep(rand(6000,9000)) //10-15 minutes
+ update_health(1) //Heals the rest of the way.
+
+
+ sleep(rand(6000,9000)*slowheal) //10-15 minutes
if(parent.owner.stat == 2)
return
if(prob(80) && wound_size < 4) //Minor wounds heal up fully.
parent.wounds.Remove(src)
del(src)
healing_state = 4 //Scar
- sleep(rand(6000,9000)) //10-15 minutes
+ sleep(rand(6000,9000)*slowheal) //10-15 minutes
if(parent.owner.stat == 2)
return
if(prob(30) || wound_size < 4 || wound_type == 1) //Small chance for the scar to disappear, any small remaining wounds deleted.
@@ -467,11 +479,11 @@
return
proc/update_health(var/percent = 1)
- damage -= damage/percent //Remove that amount of the damage
+ damage = max(damage - damage/percent,0) //Remove that amount of the damage
if(wound_type > 1)
- parent.burn_dam -= initial_dmg - damage
+ parent.burn_dam = max(parent.burn_dam - (initial_dmg - damage),0)
else
- parent.brute_dam -= initial_dmg - damage
+ parent.brute_dam = max(parent.brute_dam - (initial_dmg - damage),0)
initial_dmg = damage //reset it for further updates.
parent.owner.updatehealth()
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index c388bba9795..b11348dd6b1 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -98,7 +98,7 @@
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
- M.apply_damage(30+in_chamber.damage, BRUTE, used_weapon = "Point Blank Shot") //So we'll put him an inch from death.
+ M.apply_damage(30+in_chamber.damage, BRUTE, user.zone_sel.selecting, used_weapon = "Point Blank Shot") //So we'll put him an inch from death.
M.attack_log += text("\[[]\] []/[] shot []/[] point blank with a []", time_stamp(), user, user.ckey, M, M.ckey, src)
user.attack_log += text("\[[]\] []/[] shot []/[] point blank with a []", time_stamp(), user, user.ckey, M, M.ckey, src)
log_admin("ATTACK: [user] ([user.ckey]) shot [M] ([M.ckey]) point blank with [src].")