Part one of bugfixes for the new damage system.

This commit is contained in:
SkyMarshal
2012-03-30 20:31:26 -07:00
parent cae82368d1
commit a90173c628
13 changed files with 260 additions and 92 deletions

View File

@@ -329,8 +329,10 @@
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
head.screen_loc = ui_head head.screen_loc = ui_head
else else
var/datum/organ/external/head = organs["head"]
if(!head.destroyed)
//if not wearing anything on the head, show the ears //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 // Belt
if (belt) if (belt)
@@ -474,8 +476,8 @@
else if (gender == FEMALE) else if (gender == FEMALE)
g = "f" g = "f"
stand_icon = new /icon('tajaran.dmi', "torso_s") stand_icon = new /icon('tajaran.dmi', "torso_[g]_s")
lying_icon = new /icon('tajaran.dmi', "torso_l") lying_icon = new /icon('tajaran.dmi', "torso_[g]_l")
var/husk = (mutations & HUSK) var/husk = (mutations & HUSK)
//var/obese = (mutations & FAT) //var/obese = (mutations & FAT)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -643,7 +643,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
total = rand(1, total) total = rand(1, total)
for (item in L) for (item in L)
total -=L [item] total -= L[item]
if (total <= 0) if (total <= 0)
return item return item

View File

@@ -3,7 +3,8 @@
for(var/o in typesof(/datum/objective/steal)) for(var/o in typesof(/datum/objective/steal))
if(o != /datum/objective/steal) //Make sure not to get a blank steal objective. if(o != /datum/objective/steal) //Make sure not to get a blank steal objective.
objectives += new o(null,job) var/datum/objective/target = new o(null,job)
objectives += list(target = target.weight)
//objectives += GenerateAssassinate(job,traitor) //objectives += GenerateAssassinate(job,traitor)
return objectives return objectives
@@ -14,7 +15,8 @@
for(var/datum/mind/target in ticker.minds) for(var/datum/mind/target in ticker.minds)
if((target != traitor) && istype(target.current, /mob/living/carbon/human)) if((target != traitor) && istype(target.current, /mob/living/carbon/human))
if(target && target.current) if(target && target.current)
missions += new /datum/objective/assassinate(null,job,target) var/datum/objective/target_obj = new /datum/objective/assassinate(null,job,target)
missions += list(target_obj = target_obj.weight)
return missions return missions
/proc/GenerateFrame(var/job,var/datum/mind/traitor) /proc/GenerateFrame(var/job,var/datum/mind/traitor)
@@ -23,7 +25,8 @@
for(var/datum/mind/target in ticker.minds) for(var/datum/mind/target in ticker.minds)
if((target != traitor) && istype(target.current, /mob/living/carbon/human)) if((target != traitor) && istype(target.current, /mob/living/carbon/human))
if(target && target.current) if(target && target.current)
missions += new /datum/objective/frame(null,job,target) var/datum/objective/target_obj = new /datum/objective/frame(null,job,target)
missions += list(target_obj = target_obj.weight)
return missions return missions
/proc/GenerateProtection(var/job,var/datum/mind/traitor) /proc/GenerateProtection(var/job,var/datum/mind/traitor)
@@ -32,7 +35,8 @@
for(var/datum/mind/target in ticker.minds) for(var/datum/mind/target in ticker.minds)
if((target != traitor) && istype(target.current, /mob/living/carbon/human)) if((target != traitor) && istype(target.current, /mob/living/carbon/human))
if(target && target.current) if(target && target.current)
missions += new /datum/objective/protection(null,job,target) var/datum/objective/target_obj = new /datum/objective/protection(null,job,target)
missions += list(target_obj = target_obj.weight)
return missions return missions
@@ -51,26 +55,26 @@
while(totalweight < 100) while(totalweight < 100)
selectobj = rand(1,100) //Randomly determine the type of objective to be given. 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. if(!length(killobjectives) || !length(protectobjectives)) //If any of these lists are empty, just give them theft objectives.
var/datum/objective/objective = pick(theftobjectives) var/datum/objective/objective = pickweight(theftobjectives)
chosenobjectives += objective chosenobjectives += objective
totalweight += objective.weight totalweight += objective.points
theftobjectives -= objective theftobjectives -= objective
else switch(selectobj) else switch(selectobj)
if(1 to 55) //Theft Objectives (55% chance) if(1 to 55) //Theft Objectives (55% chance)
var/datum/objective/objective = pick(theftobjectives) var/datum/objective/objective = pickweight(theftobjectives)
for(1 to 10) for(1 to 10)
if(objective.weight + totalweight <= 110) if(objective.points + totalweight <= 110)
break break
objective = pick(theftobjectives) objective = pickweight(theftobjectives)
chosenobjectives += objective chosenobjectives += objective
totalweight += objective.weight totalweight += objective.points
theftobjectives -= objective theftobjectives -= objective
if(56 to 92) //Assassination Objectives (37% chance) if(56 to 92) //Assassination Objectives (37% chance)
var/datum/objective/assassinate/objective = pick(killobjectives) var/datum/objective/assassinate/objective = pickweight(killobjectives)
for(1 to 10) for(1 to 10)
if(objective.weight + totalweight <= 110) if(objective.points + totalweight <= 110)
break break
objective = pick(killobjectives) objective = pickweight(killobjectives)
for(var/datum/objective/protection/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Assassinate somebody they need to Protect. 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) if(conflicttest.target == objective.target)
conflict = 1 conflict = 1
@@ -81,24 +85,24 @@
break break
if(!conflict) if(!conflict)
chosenobjectives += objective chosenobjectives += objective
totalweight += objective.weight totalweight += objective.points
killobjectives -= objective killobjectives -= objective
conflict = 0 conflict = 0
if(93 to 95) //Framing Objectives (3% chance) if(93 to 95) //Framing Objectives (3% chance)
var/datum/objective/objective = pick(frameobjectives) var/datum/objective/objective = pickweight(frameobjectives)
for(1 to 10) for(1 to 10)
if(objective.weight + totalweight <= 110) if(objective.points + totalweight <= 110)
break break
objective = pick(frameobjectives) objective = pickweight(frameobjectives)
chosenobjectives += objective chosenobjectives += objective
totalweight += objective.weight totalweight += objective.points
frameobjectives -= objective frameobjectives -= objective
if(96 to 100) //Protection Objectives (5% chance) if(96 to 100) //Protection Objectives (5% chance)
var/datum/objective/protection/objective = pick(protectobjectives) var/datum/objective/protection/objective = pickweight(protectobjectives)
for(1 to 10) for(1 to 10)
if(objective.weight + totalweight <= 110) if(objective.points + totalweight <= 110)
break break
objective = pick(protectobjectives) objective = pickweight(protectobjectives)
for(var/datum/objective/assassinate/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate. 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) if(conflicttest.target == objective.target)
conflict = 1 conflict = 1
@@ -109,7 +113,7 @@
break break
if(!conflict) if(!conflict)
chosenobjectives += objective chosenobjectives += objective
totalweight += objective.weight totalweight += objective.points
protectobjectives -= objective protectobjectives -= objective
conflict = 0 conflict = 0
@@ -134,19 +138,22 @@ datum
var/datum/mind/target var/datum/mind/target
var/explanation_text = "text not set" var/explanation_text = "text not set"
var/job 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 var/weight = INFINITY
New(var/text,var/joba) New(var/text,var/joba)
if(text) if(text)
src.explanation_text = text src.explanation_text = text
job=joba job=joba
weight = get_points(job) weight = get_weight(job)
points = get_points(job)
proc/check_completion() proc/check_completion()
return 1 return 1
proc/get_points(var/job) proc/get_points(var/job)
return INFINITY 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. 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) 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) ) if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) )
@@ -179,20 +186,26 @@ datum
get_points() get_points()
if(target) if(target)
var/difficulty = GetRank(target.assigned_role) + 1
switch(GetRank(job)) switch(GetRank(job))
if(4) if(4)
return 30 return 20*difficulty
if(3) if(3)
return 40 return 30*difficulty
if(2) if(2)
return 50 return 40*difficulty
if(1) if(1)
return 55 return 55*difficulty
if(0) if(0)
return 60 return 60*difficulty
else else
return INFINITY return INFINITY
get_weight()
if(target)
return 1
return 0
protection protection
New(var/text,var/joba,var/datum/mind/targeta) New(var/text,var/joba,var/datum/mind/targeta)
@@ -218,7 +231,15 @@ datum
return 0 return 0
get_points() 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) find_target_by_role(role, role_type=0)
..(role, role_type) ..(role, role_type)
@@ -247,20 +268,26 @@ datum
return 1 return 1
get_points() get_points()
if(target) if(target)
var/difficulty = GetRank(target.assigned_role) + 1
switch(GetRank(job)) switch(GetRank(job))
if(4) if(4)
return 30 return 20*difficulty
if(3) if(3)
return 40 return 30*difficulty
if(2) if(2)
return 50 return 40*difficulty
if(1) if(1)
return 55 return 55*difficulty
if(0) if(0)
return 60 return 60*difficulty
else else
return 0 return 0
get_weight()
if(target)
return 1
return 0
find_target_by_role(var/role) find_target_by_role(var/role)
for(var/datum/mind/possible_target in ticker.minds) 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)) if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human) && (possible_target.assigned_role == role))
@@ -327,19 +354,25 @@ datum
get_points() get_points()
if(target) if(target)
switch(GetRank(owner.assigned_role)) var/difficulty = GetRank(target.assigned_role) + 1
switch(GetRank(job))
if(4) if(4)
return 30 return 20*difficulty
if(3) if(3)
return 40 return 30*difficulty
if(2) if(2)
return 50 return 40*difficulty
if(1) if(1)
return 55 return 55*difficulty
if(0) if(0)
return 60 return 60*difficulty
else else
return 0 return INFINITY
get_weight()
if(target)
return 1
return 0
hijack hijack
@@ -374,6 +407,8 @@ datum
if(4) if(4)
return 35 return 35
get_weight(var/job)
return 1
escape escape
explanation_text = "Escape on the shuttle alive, without being arrested." explanation_text = "Escape on the shuttle alive, without being arrested."
@@ -399,6 +434,9 @@ datum
get_points() get_points()
return INFINITY return INFINITY
get_weight(var/job)
return 1
survive survive
explanation_text = "Stay alive." explanation_text = "Stay alive."
@@ -411,6 +449,9 @@ datum
get_points() get_points()
return INFINITY return INFINITY
get_weight(var/job)
return 1
steal steal
var/obj/item/steal_target var/obj/item/steal_target
@@ -441,6 +482,12 @@ datum
if(4) if(4)
return 20 return 20
get_weight(var/job)
if(GetRank(job) == 4)
return 10
else
return 20
plasmatank plasmatank
steal_target = /obj/item/weapon/tank/plasma steal_target = /obj/item/weapon/tank/plasma
@@ -452,6 +499,16 @@ datum
return 20 return 20
return 40 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. /*Removing this as an objective. Not necessary to have two theft objectives in the same room.
steal/captainssuit steal/captainssuit
@@ -492,6 +549,12 @@ datum
if(4) if(4)
return 20 return 20
get_weight(var/job)
if(GetRank(job) == 4)
return 10
else
return 20
RCD RCD
steal_target = /obj/item/weapon/rcd steal_target = /obj/item/weapon/rcd
@@ -511,6 +574,12 @@ datum
if(4) if(4)
return 20 return 20
get_weight(var/job)
if(GetRank(job) == 4)
return 10
else
return 20
/*burger /*burger
steal_target = /obj/item/weapon/reagent_containers/food/snacks/human/burger steal_target = /obj/item/weapon/reagent_containers/food/snacks/human/burger
@@ -549,6 +618,12 @@ datum
if(4) if(4)
return 20 return 20
get_weight(var/job)
if(GetRank(job) == 4)
return 10
else
return 20
magboots magboots
steal_target = /obj/item/clothing/shoes/magboots steal_target = /obj/item/clothing/shoes/magboots
@@ -568,6 +643,12 @@ datum
if(4) if(4)
return 20 return 20
get_weight(var/job)
if(GetRank(job) == 4)
return 10
else
return 20
blueprints blueprints
steal_target = /obj/item/blueprints steal_target = /obj/item/blueprints
@@ -587,6 +668,12 @@ datum
if(4) if(4)
return 20 return 20
get_weight(var/job)
if(GetRank(job) == 4)
return 10
else
return 20
voidsuit voidsuit
steal_target = /obj/item/clothing/suit/space/nasavoid steal_target = /obj/item/clothing/suit/space/nasavoid
@@ -606,6 +693,9 @@ datum
if(4) if(4)
return 20 return 20
get_weight(var/job)
return 20
nuke_disk nuke_disk
steal_target = /obj/item/weapon/disk/nuclear steal_target = /obj/item/weapon/disk/nuclear
@@ -625,6 +715,12 @@ datum
if(4) if(4)
return 25 return 25
get_weight(var/job)
if(GetRank(job) == 4)
return 10
else
return 20
nuke_gun nuke_gun
steal_target = /obj/item/weapon/gun/energy/gun/nuclear steal_target = /obj/item/weapon/gun/energy/gun/nuclear
explanation_text = "Steal a nuclear powered gun." explanation_text = "Steal a nuclear powered gun."
@@ -643,6 +739,9 @@ datum
if(4) if(4)
return 75 return 75
get_weight(var/job)
return 2
diamond_drill diamond_drill
steal_target = /obj/item/weapon/pickaxe/diamonddrill steal_target = /obj/item/weapon/pickaxe/diamonddrill
explanation_text = "Steal a diamond drill." explanation_text = "Steal a diamond drill."
@@ -661,6 +760,9 @@ datum
if(4) if(4)
return 75 return 75
get_weight(var/job)
return 2
boh boh
steal_target = /obj/item/weapon/storage/backpack/holding steal_target = /obj/item/weapon/storage/backpack/holding
explanation_text = "Steal a \"bag of holding.\"" explanation_text = "Steal a \"bag of holding.\""
@@ -679,6 +781,9 @@ datum
if(4) if(4)
return 75 return 75
get_weight(var/job)
return 2
hyper_cell hyper_cell
steal_target = /obj/item/weapon/cell/hyper steal_target = /obj/item/weapon/cell/hyper
explanation_text = "Steal a hyper capacity power cell." explanation_text = "Steal a hyper capacity power cell."
@@ -697,6 +802,9 @@ datum
if(4) if(4)
return 75 return 75
get_weight(var/job)
return 2
lucy lucy
steal_target = /obj/item/stack/sheet/diamond steal_target = /obj/item/stack/sheet/diamond
explanation_text = "Steal 10 diamonds." explanation_text = "Steal 10 diamonds."
@@ -715,6 +823,9 @@ datum
if(4) if(4)
return 75 return 75
get_weight(var/job)
return 2
check_completion() check_completion()
var/target_amount = 10 var/target_amount = 10
var/found_amount = 0.0//Always starts as zero. var/found_amount = 0.0//Always starts as zero.
@@ -741,6 +852,9 @@ datum
if(4) if(4)
return 70 return 70
get_weight(var/job)
return 2
check_completion() check_completion()
var/target_amount = 50 var/target_amount = 50
var/found_amount = 0.0//Always starts as zero. var/found_amount = 0.0//Always starts as zero.
@@ -767,6 +881,9 @@ datum
if(4) if(4)
return 70 return 70
get_weight(var/job)
return 2
check_completion() check_completion()
var/target_amount = 25 var/target_amount = 25
var/found_amount = 0.0//Always starts as zero. var/found_amount = 0.0//Always starts as zero.
@@ -819,6 +936,9 @@ datum
if(istype(objective,/obj/item/robot_parts/robot_suit) && objective.check_completion()) if(istype(objective,/obj/item/robot_parts/robot_suit) && objective.check_completion())
return 1 return 1
return 0 return 0
get_weight(var/job)
return 20
AI AI
steal_target = /obj/structure/AIcore steal_target = /obj/structure/AIcore
explanation_text = "Steal a finished AI, either by intellicard or stealing the whole construct." explanation_text = "Steal a finished AI, either by intellicard or stealing the whole construct."
@@ -837,6 +957,9 @@ datum
if(4) if(4)
return 20 return 20
get_weight(var/job)
return 15
check_completion() check_completion()
if(steal_target) if(steal_target)
for(var/obj/item/device/aicard/C in owner.current.get_contents()) for(var/obj/item/device/aicard/C in owner.current.get_contents())
@@ -878,6 +1001,9 @@ datum
else else
return 0 return 0
get_weight(var/job)
return 20
pacid pacid
steal_target = /datum/reagent/pacid steal_target = /datum/reagent/pacid
@@ -904,6 +1030,9 @@ datum
else else
return 0 return 0
get_weight(var/job)
return 20
reagent reagent
var/target_name var/target_name
@@ -957,6 +1086,9 @@ datum
else else
return 0 return 0
get_weight(var/job)
return 20
nuclear nuclear
explanation_text = "Destroy the station with a nuclear device." explanation_text = "Destroy the station with a nuclear device."

View File

@@ -38,31 +38,36 @@ MEDICAL
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0) if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
affecting = H.get_organ("head") affecting = H.get_organ("head")
if(affecting.destroyed && !affecting.gauzed) 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 affecting.gauzed = 1
use(1) use(1)
return return
for(var/datum/organ/wound/W in affecting.wounds) 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) if(heal_brute && W.wound_type == 2)
continue continue
if(heal_burn && W.wound_type < 2) if(heal_burn && W.wound_type < 2)
continue continue
if(stoppedblood) if(W.wound_size > 3 && (W.bleeding || !W.is_healing))
stoppedblood++ if(stoppedblood)
break stoppedblood += 1
if(W.wound_size > 3) break
W.bleeding = 0 W.bleeding = 0
else W.is_healing = 1
stoppedblood = 1
else if(W.wound_size <= 3)
if(stoppedblood)
stoppedblood += 1
break
W.stopbleeding() W.stopbleeding()
stoppedblood = 1 stoppedblood = 1
if (user && stoppedblood) if (user && stoppedblood)
if (M != user) 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 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) else if(user)
user << "\red Nothing to patch up!" user << "\red Nothing to patch up!"
return return

View File

@@ -972,6 +972,7 @@
if(T:vessel.get_reagent_amount("blood") < amount) if(T:vessel.get_reagent_amount("blood") < amount)
return return
T:vessel.trans_to(src, amount) T:vessel.trans_to(src, amount)
on_reagent_change()
else else
var/datum/reagent/B = new /datum/reagent/blood var/datum/reagent/B = new /datum/reagent/blood
B.holder = src B.holder = src

View File

@@ -21,7 +21,7 @@ mob/living/carbon/verb/give()
if(!I) if(!I)
return return
if(src.r_hand == null) 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("Yes")
if(!check_can_reach(usr,src)) if(!check_can_reach(usr,src))
usr << "You need to keep in reaching distance." usr << "You need to keep in reaching distance."
@@ -50,7 +50,7 @@ mob/living/carbon/verb/give()
if("No") if("No")
src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.") 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) 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("Yes")
if(!check_can_reach(usr,src)) if(!check_can_reach(usr,src))
usr << "You need to keep in reaching distance." usr << "You need to keep in reaching distance."
@@ -79,4 +79,4 @@ mob/living/carbon/verb/give()
if("No") if("No")
src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.") src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
else else
usr << "[src.name]\s hands are full." usr << "[src.name]'s hands are full."

View File

@@ -436,29 +436,39 @@
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["chest"] msg += wound_flavor_text["chest"]
else if(is_bleeding["chest"]) else if(is_bleeding["chest"])
msg += "<span class='warning'>[src] has blood from under [t_his] clothing!</span>\n" msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
if(wound_flavor_text["left arm"] && !w_uniform && !skipjumpsuit) if(wound_flavor_text["left arm"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["left arm"] msg += wound_flavor_text["left arm"]
else if(is_bleeding["left arm"])
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
if(wound_flavor_text["left hand"] && !gloves && !skipgloves) if(wound_flavor_text["left hand"] && !gloves && !skipgloves)
msg += wound_flavor_text["left hand"] msg += wound_flavor_text["left hand"]
else if(is_bleeding["left hand"]) else if(is_bleeding["left hand"])
msg += "<span class='warning'>[src] has blood running from under [t_his] gloves!</span>\n" msg += "<span class='warning'>[src] has blood running from under [t_his] gloves!</span>\n"
if(wound_flavor_text["right arm"] && !w_uniform && !skipjumpsuit) if(wound_flavor_text["right arm"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["right arm"] msg += wound_flavor_text["right arm"]
else if(is_bleeding["right arm"])
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
if(wound_flavor_text["right hand"] && !gloves && !skipgloves) if(wound_flavor_text["right hand"] && !gloves && !skipgloves)
msg += wound_flavor_text["right hand"] msg += wound_flavor_text["right hand"]
else if(is_bleeding["right hand"]) else if(is_bleeding["right hand"])
msg += "<span class='warning'>[src] has blood running from under [t_his] gloves!</span>\n" msg += "<span class='warning'>[src] has blood running from under [t_his] gloves!</span>\n"
if(wound_flavor_text["groin"] && !w_uniform && !skipjumpsuit) if(wound_flavor_text["groin"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["groin"] msg += wound_flavor_text["groin"]
else if(is_bleeding["groin"])
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
if(wound_flavor_text["left leg"] && !w_uniform && !skipjumpsuit) if(wound_flavor_text["left leg"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["left leg"] msg += wound_flavor_text["left leg"]
else if(is_bleeding["left leg"])
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
if(wound_flavor_text["left foot"]&& !shoes && !skipshoes) if(wound_flavor_text["left foot"]&& !shoes && !skipshoes)
msg += wound_flavor_text["left foot"] msg += wound_flavor_text["left foot"]
else if(is_bleeding["left foot"]) else if(is_bleeding["left foot"])
msg += "<span class='warning'>[src] has blood running from [t_his] shoes!</span>\n" msg += "<span class='warning'>[src] has blood running from [t_his] shoes!</span>\n"
if(wound_flavor_text["right leg"] && !w_uniform && !skipjumpsuit) if(wound_flavor_text["right leg"] && !w_uniform && !skipjumpsuit)
msg += wound_flavor_text["right leg"] msg += wound_flavor_text["right leg"]
else if(is_bleeding["right leg"])
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
if(wound_flavor_text["right foot"]&& !shoes && !skipshoes) if(wound_flavor_text["right foot"]&& !shoes && !skipshoes)
msg += wound_flavor_text["right foot"] msg += wound_flavor_text["right foot"]
else if(is_bleeding["right foot"]) else if(is_bleeding["right foot"])

View File

@@ -54,7 +54,6 @@
var/list/body_standing = list() var/list/body_standing = list()
var/list/body_lying = list() var/list/body_lying = list()
var/organs2 = list()
var/mutantrace = null var/mutantrace = null

View File

@@ -857,7 +857,7 @@
leg_tally-- // let it fail even if just foot&leg leg_tally-- // let it fail even if just foot&leg
// can't stand // can't stand
if(leg_tally == 0) if(leg_tally == 0 && !paralysis)
emote("scream") emote("scream")
emote("collapse") emote("collapse")
paralysis = 10 paralysis = 10
@@ -1470,4 +1470,4 @@ snippets
plcheck = t_plasma plcheck = t_plasma
oxcheck = t_oxygen oxcheck = t_oxygen
G.turf_add(T, G.total_moles()) G.turf_add(T, G.total_moles())
*/ */

View File

@@ -24,26 +24,37 @@
real_name = name real_name = name
var/datum/organ/external/chest/chest = new /datum/organ/external/chest( src ) var/datum/organ/external/chest/chest = new /datum/organ/external/chest( src )
chest.owner = src chest.owner = src
organs2 += chest
var/datum/organ/external/groin/groin = new /datum/organ/external/groin( src ) var/datum/organ/external/groin/groin = new /datum/organ/external/groin( src )
groin.owner = src groin.owner = src
organs2 += groin
var/datum/organ/external/head/head = new /datum/organ/external/head( src ) var/datum/organ/external/head/head = new /datum/organ/external/head( src )
head.owner = src head.owner = src
organs2 += head
var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm( src ) var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm( src )
l_arm.owner = src l_arm.owner = src
organs2 += l_arm
var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm( src ) var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm( src )
r_arm.owner = src r_arm.owner = src
organs2 += r_arm
var/datum/organ/external/l_hand/l_hand = new /datum/organ/external/l_hand( src ) var/datum/organ/external/l_hand/l_hand = new /datum/organ/external/l_hand( src )
l_hand.owner = src l_hand.owner = src
organs2 += l_hand
var/datum/organ/external/r_hand/r_hand = new /datum/organ/external/r_hand( src ) var/datum/organ/external/r_hand/r_hand = new /datum/organ/external/r_hand( src )
r_hand.owner = src r_hand.owner = src
organs2 += r_hand
var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg( src ) var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg( src )
l_leg.owner = src l_leg.owner = src
organs2 += l_leg
var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg( src ) var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg( src )
r_leg.owner = src r_leg.owner = src
organs2 += r_leg
var/datum/organ/external/l_foot/l_foot = new /datum/organ/external/l_foot( src ) var/datum/organ/external/l_foot/l_foot = new /datum/organ/external/l_foot( src )
l_foot.owner = src l_foot.owner = src
organs2 += l_foot
var/datum/organ/external/r_foot/r_foot = new /datum/organ/external/r_foot( src ) var/datum/organ/external/r_foot/r_foot = new /datum/organ/external/r_foot( src )
r_foot.owner = src r_foot.owner = src
organs2 += r_foot
organs["chest"] = chest organs["chest"] = chest
organs["groin"] = groin organs["groin"] = groin

View File

@@ -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/obj/effect/organstructure/organStructure = null //for dem organs
var/list/organs = list( ) //List of organs. var/list/organs = list( ) //List of organs.
var/list/organs2 = list()
//Singularity wants you! //Singularity wants you!
var/grav_delay = 0 var/grav_delay = 0

View File

@@ -99,7 +99,7 @@
if(prob(brute) && brute > 20 && !sharp) if(prob(brute) && brute > 20 && !sharp)
createwound(rand(4,6),0,brute) createwound(rand(4,6),0,brute)
else if(!sharp) 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) if(burn)
burn_dam += burn burn_dam += burn
createwound(max(1,min(6,round(burn/10) + rand(-1,1))),2,burn) createwound(max(1,min(6,round(burn/10) + rand(-1,1))),2,burn)
@@ -152,15 +152,16 @@
brute -= W.damage brute -= W.damage
W.damage = 0 W.damage = 0
W.initial_dmg = 0 W.initial_dmg = 0
W.stopbleeding() W.stopbleeding(1)
else else
W.damage -= brute W.damage -= brute
W.initial_dmg -= brute W.initial_dmg -= brute
W.stopbleeding()
else if(brute) else if(brute)
for(var/datum/organ/wound/W in brute_wounds) for(var/datum/organ/wound/W in brute_wounds)
W.damage = 0 W.damage = 0
W.initial_dmg = 0 W.initial_dmg = 0
W.stopbleeding() W.stopbleeding(1)
brute_dam = 0 brute_dam = 0
if(burn && burn >= burn_to_heal) if(burn && burn >= burn_to_heal)
for(var/datum/organ/wound/W in burn_wounds) for(var/datum/organ/wound/W in burn_wounds)
@@ -173,6 +174,7 @@
else else
W.damage -= burn W.damage -= burn
W.initial_dmg -= burn W.initial_dmg -= burn
W.stopbleeding()
else if(burn) else if(burn)
for(var/datum/organ/wound/W in burn_wounds) for(var/datum/organ/wound/W in burn_wounds)
W.damage = 0 W.damage = 0
@@ -226,8 +228,6 @@
return return
if(brute_dam > min_broken_damage) if(brute_dam > min_broken_damage)
if(broken == 0) 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.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 <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.") owner.visible_message("\red You hear a loud cracking sound coming from [owner.name].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
owner.emote("scream") owner.emote("scream")
@@ -275,6 +275,8 @@
proc/droplimb() proc/droplimb()
if(destroyed) if(destroyed)
//owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy") //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 <b>Your [display_name] goes flying off!</b>","You hear a terrible sound of ripping tendons and flesh.")
switch(body_part) switch(body_part)
if(UPPER_TORSO) if(UPPER_TORSO)
owner.gib() owner.gib()
@@ -288,6 +290,7 @@
H.transfer_identity(owner) H.transfer_identity(owner)
H.pixel_x = -10 H.pixel_x = -10
H.pixel_y = 6 H.pixel_y = 6
H.name = "[owner.name]'s head"
var/lol = pick(cardinal) var/lol = pick(cardinal)
step(H,lol) step(H,lol)
@@ -332,29 +335,21 @@
destroyed = 1 destroyed = 1
if(HAND_RIGHT) if(HAND_RIGHT)
var/obj/item/weapon/organ/r_hand/X = new(owner.loc, owner) 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) var/lol2 = pick(cardinal)
step(X,lol2) step(X,lol2)
destroyed = 1 destroyed = 1
if(HAND_LEFT) if(HAND_LEFT)
var/obj/item/weapon/organ/l_hand/X = new(owner.loc, owner) 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) var/lol2 = pick(cardinal)
step(X,lol2) step(X,lol2)
destroyed = 1 destroyed = 1
if(FOOT_RIGHT) if(FOOT_RIGHT)
var/obj/item/weapon/organ/r_foot/X = new(owner.loc, owner) 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) var/lol2 = pick(cardinal)
step(X,lol2) step(X,lol2)
destroyed = 1 destroyed = 1
if(FOOT_LEFT) if(FOOT_LEFT)
var/obj/item/weapon/organ/l_foot/X = new(owner.loc, owner) 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) var/lol2 = pick(cardinal)
step(X,lol2) step(X,lol2)
destroyed = 1 destroyed = 1
@@ -377,7 +372,10 @@
W.wound_size = size W.wound_size = size
W.owner = owner W.owner = owner
W.parent = src 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 wounds += W
/datum/organ/wound /datum/organ/wound
@@ -389,6 +387,8 @@
var/datum/organ/external/parent var/datum/organ/external/parent
var/bleeding = 0 //You got wounded, of course it's bleeding. -- Scratch that. Rewrote it. var/bleeding = 0 //You got wounded, of course it's bleeding. -- Scratch that. Rewrote it.
var/healing_state = 0 var/healing_state = 0
var/is_healing = 0
var/slowheal = 3
proc/start_close() proc/start_close()
sleep(rand(1800,3000)) //3-5 minutes sleep(rand(1800,3000)) //3-5 minutes
@@ -400,7 +400,7 @@
stopbleeding() stopbleeding()
return return
sleep(rand(1800,3000)) 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) parent.wounds.Remove(src)
update_health(1) update_health(1)
del(src) del(src)
@@ -408,30 +408,34 @@
stopbleeding() stopbleeding()
return return
if(wound_size < 5 && bleeding) //Give it a chance to stop bleeding on it's own. if(wound_size < 5 && bleeding) //Give it a chance to stop bleeding on it's own.
spawn(1) spawn while(1)
sleep(1200) sleep(1200)
if(prob(50)) if(prob(50))
stopbleeding() stopbleeding()
return return
return return
proc/stopbleeding() proc/stopbleeding(var/bleed = 0)
if(healing_state) if(is_healing)
return 0 return 0
// owner:bloodloss -= 10 * src.wound_size // owner:bloodloss -= 10 * src.wound_size
parent.bleeding = 0 parent.bleeding = min(bleed,bleeding)
for(var/datum/organ/wound/W in parent) for(var/datum/organ/wound/W in parent)
if(W.bleeding && W != src) if(W.bleeding && W != src)
parent.bleeding = 1 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. spawn become_scar() //spawn off the process of becoming a scar.
return 1 return 1
proc/become_scar() proc/become_scar()
healing_state = 1 //Patched healing_state = 1 //Patched
update_health(0.5) //Heals some. spawn(200) //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) if(parent.owner.stat == 2)
return return
@@ -441,23 +445,26 @@
del(src) del(src)
healing_state = 2 //Noticibly healing. 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) if(parent.owner.stat == 2)
return return
if(prob(60) && wound_size < 3) //Cuts heal up if(prob(60) && wound_size < 3) //Cuts heal up
parent.wounds.Remove(src) parent.wounds.Remove(src)
del(src) del(src)
healing_state = 3 //Angry red scar 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) if(parent.owner.stat == 2)
return return
if(prob(80) && wound_size < 4) //Minor wounds heal up fully. if(prob(80) && wound_size < 4) //Minor wounds heal up fully.
parent.wounds.Remove(src) parent.wounds.Remove(src)
del(src) del(src)
healing_state = 4 //Scar healing_state = 4 //Scar
sleep(rand(6000,9000)) //10-15 minutes sleep(rand(6000,9000)*slowheal) //10-15 minutes
if(parent.owner.stat == 2) if(parent.owner.stat == 2)
return return
if(prob(30) || wound_size < 4 || wound_type == 1) //Small chance for the scar to disappear, any small remaining wounds deleted. if(prob(30) || wound_size < 4 || wound_type == 1) //Small chance for the scar to disappear, any small remaining wounds deleted.
@@ -467,11 +474,11 @@
return return
proc/update_health(var/percent = 1) 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) if(wound_type > 1)
parent.burn_dam -= initial_dmg - damage parent.burn_dam = max(parent.burn_dam - (initial_dmg - damage),0)
else 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. initial_dmg = damage //reset it for further updates.
parent.owner.updatehealth() parent.owner.updatehealth()