Medical System Updates...

* Dragging someone while injured (brute) will have a small chance of injuring them further that increases depending on how damaged they are. This coincides with the blood spatters that are already generated.
* Blood is now actually lost from the person being dragged.

* Added splints that can be applied to broken arms and legs, and will reduce effects of broken limbs. These can be removed the same way as handcuffs. They show up on the mob and on examine.
* Added an autoinjector that can only hold five units, but acts like a hypospray.
* Added an advanced medical kit that Medical Doctors spawn with that has Advanced Trauma Kits, Advanced Burn Kits, autoinjectors, and splints.
* Health Scanners now show unsplinted fractures ONLY in arms or legs.

* People in critical (less than -50 health) from external trauma (100+ damage from brute and/or burn) bleeding, and with unsplinted limbs, will send a message to anyone trying to drag them, to warn them it would be a bad idea trying to move them. They will suffer a lot more damage if dragged while lying down.
* The correct procedure is therefore, A) Bring a roller bed, or B) Splint all limbs, stop all bleeding with gauze, and then drag them.

* Fixed CPR being performed at weird health levels.
This commit is contained in:
Erthilo
2012-06-25 01:18:55 +01:00
parent e6aae0103c
commit 67c5e8e3a8
34 changed files with 281 additions and 118 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ var/global/sent_strike_team = 0
equip_if_possible(new /obj/item/weapon/storage/box(src), slot_in_backpack)
equip_if_possible(new /obj/item/ammo_magazine/a357(src), slot_in_backpack)
equip_if_possible(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack)
equip_if_possible(new /obj/item/weapon/storage/firstaid/adv(src), slot_in_backpack)
equip_if_possible(new /obj/item/weapon/storage/flashbang_kit(src), slot_in_backpack)
equip_if_possible(new /obj/item/device/flashlight(src), slot_in_backpack)
if (!leader_selected)
@@ -164,7 +164,7 @@ var/global/sent_syndicate_strike_team = 0
equip_if_possible(new /obj/item/weapon/storage/box(src), slot_in_backpack)
equip_if_possible(new /obj/item/ammo_magazine/c45(src), slot_in_backpack)
equip_if_possible(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack)
equip_if_possible(new /obj/item/weapon/storage/firstaid/adv(src), slot_in_backpack)
equip_if_possible(new /obj/item/weapon/plastique(src), slot_in_backpack)
equip_if_possible(new /obj/item/device/flashlight(src), slot_in_backpack)
if (!syndicate_leader_selected)
+40 -8
View File
@@ -1319,12 +1319,12 @@
/obj/item/weapon/reagent_containers/hypospray/attack(mob/M as mob, mob/user as mob)
if(!reagents.total_volume)
user << "\red The hypospray is empty."
user << "\red \The [src] is empty."
return
if (!( istype(M, /mob) ))
return
if (reagents.total_volume)
user << "\blue You inject [M] with the hypospray."
user << "\blue You inject [M] with \the [src]."
M << "\red You feel a tiny prick!"
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [user.name] ([user.ckey])</font>")
@@ -1337,11 +1337,11 @@
src.reagents.reaction(M, INGEST)
if(M.reagents)
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
user << "\blue [trans] units injected. [reagents.total_volume] units remaining in the hypospray."
user << "\blue [trans] units injected. [reagents.total_volume] units remaining in \the [src]."
return
/obj/item/weapon/reagent_containers/borghypo
name = "Cyborg Hypospray"
name = "cyborg hypospray"
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
icon = 'syringe.dmi'
item_state = "hypo"
@@ -1440,6 +1440,41 @@
amount_per_transfer_from_this = 50
volume = 50
/obj/item/weapon/reagent_containers/hypospray/autoinjector
name = "autoinjector"
desc = "A rapid and safe way to administer small amounts of drugs by untrained or trained personnel."
icon_state = "autoinjector"
item_state = "autoinjector"
amount_per_transfer_from_this = 5
volume = 5
/obj/item/weapon/reagent_containers/hypospray/autoinjector/New()
..()
reagents.remove_reagent("tricordrazine", 30)
reagents.add_reagent("inaprovaline", 5)
update_icon()
return
/obj/item/weapon/reagent_containers/hypospray/autoinjector/attack(mob/M as mob, mob/user as mob)
..()
update_icon()
return
/obj/item/weapon/reagent_containers/hypospray/autoinjector/update_icon()
if(reagents.total_volume > 0)
icon_state = "[initial(icon_state)]1"
else
icon_state = "[initial(icon_state)]0"
/obj/item/weapon/reagent_containers/hypospray/autoinjector/examine()
..()
if(reagents && reagents.reagent_list.len)
for(var/datum/reagent/R in reagents.reagent_list)
usr << "\blue It currently has [R.volume] units of [R.name] stored."
else
usr << "\blue It is currently empty."
////////////////////////////////////////////////////////////////////////////////
/// Food.
////////////////////////////////////////////////////////////////////////////////
@@ -1590,8 +1625,6 @@
if(M == user) user << "\red You finish eating [src]."
else user << "\red [M] finishes eating [src]."
del(src)
spawn(5)
user.update_clothing()
playsound(M.loc, eatsound, rand(10,50), 1)
return 1
@@ -1646,10 +1679,9 @@
bitecount++
On_Consume()
if(!reagents.total_volume)
if(M == user) user << "\red You finish eating [src]."
else user << "\red [M] finishes eating [src]."
spawn(2)
user.update_clothing()
del(src)
playsound(M.loc,'eatfood.ogg', rand(10,50), 1)
return 1
+1 -1
View File
@@ -200,7 +200,7 @@
swap_hand()
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
if (src.health > 0)
if (src.health > config.health_threshold_crit)
if(src == M && istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/list/damaged = H.get_damaged_organs(1,1)
@@ -128,6 +128,12 @@
else
msg += "<span class='warning'>[t_He] [t_is] \icon[src.handcuffed] handcuffed!</span>\n"
//splints
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = organs["[organ]"]
if(o.status & SPLINTED)
msg += "<span class='warning'>[t_He] [t_has] a splint on his [o.getDisplayName()]!</span>\n"
//belt
if (src.belt)
if (src.belt.blood_DNA)
+58 -4
View File
@@ -285,7 +285,10 @@
for(var/organ in list("l_leg","l_foot","r_leg","r_foot"))
var/datum/organ/external/o = organs["[organ]"]
if(o.status & BROKEN)
tally += 6
if(o.status & SPLINTED)
tally += 3
else
tally += 6
if(wear_suit)
tally += wear_suit.slowdown
@@ -848,7 +851,26 @@
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
if(ishuman(M))
var/mob/living/carbon/H = M
var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
if(blood_volume > 0)
H:vessel.remove_reagent("blood",1)
if(prob(5))
M.adjustBruteLoss(1)
visible_message("\red \The [M]'s wounds open more from being dragged!")
if(M.pull_damage())
if(prob(25))
M.adjustBruteLoss(2)
visible_message("\red \The [M]'s wounds worsen terribly from being dragged!")
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
if(ishuman(M))
var/mob/living/carbon/H = M
var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
if(blood_volume > 0)
H:vessel.remove_reagent("blood",1)
step(pulling, get_dir(pulling.loc, T))
M.pulling = t
@@ -1077,6 +1099,15 @@
else
clothing_overlays += image("icon" = 'mob.dmi', "icon_state" = "[h1]2", "layer" = CUFFED_LAYER)
// Splints
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = organs["[organ]"]
if (o.status & SPLINTED)
if (!lying)
clothing_overlays += image("icon" = 'mob.dmi', "icon_state" = "[o]_splint", "layer" = CUFFED_LAYER)
else
clothing_overlays += image("icon" = 'mob.dmi', "icon_state" = "[o]_splint2", "layer" = CUFFED_LAYER)
if (r_hand)
clothing_overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = INHANDS_LAYER)
r_hand.screen_loc = ui_rhand
@@ -1592,6 +1623,16 @@
//SN src = null
del(src)
return
if("splints")
var/count = 0
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = target.organs["[organ]"]
if(o.status & SPLINTED)
count = 1
break
if(count == 0)
del(src)
return
if("id")
if ((!( target.wear_id ) || !( target.w_uniform )))
//SN src = null
@@ -1699,6 +1740,8 @@
message = text("\red <B>[] is trying to take off \a [] from []'s back!</B>", source, target.back, target)
if("handcuff")
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
if("splints")
message = text("\red <B>[] is trying to remove []'s splints!</B>", source, target)
if("uniform")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their uniform removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) uniform</font>")
@@ -2184,14 +2227,24 @@ It can still be worn/put on as normal.
source.drop_item()
target.handcuffed = item
item.loc = target
if("splints")
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = target.organs["[organ]"]
if (o.status & SPLINTED)
var/obj/item/W = new /obj/item/stack/medical/splint/single()
o.status &= ~SPLINTED
if (W)
W.loc = target.loc
W.layer = initial(W.layer)
W.add_fingerprint(source)
if("CPR")
if (target.cpr_time + 30 >= world.time)
//SN src = null
del(src)
return
if ((target.health >= -99.0 && target.stat == 1))
if ((target.health <= config.health_threshold_crit && target.stat == 1))
target.cpr_time = world.time
var/suff = min(target.getOxyLoss(), 7)
var/suff = min(target.getOxyLoss(), 2)
target.adjustOxyLoss(-suff)
target.losebreath = 0
target.updatehealth()
@@ -2314,6 +2367,7 @@ It can still be worn/put on as normal.
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A> [(istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal;loc=store'>Set Internal</A>", src) : ""]
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=splints'>Remove Splints</A>
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
@@ -62,11 +62,10 @@
switch(M.a_intent)
if("help")
if(health > 0)
if(health > config.health_threshold_crit)
help_shake_act(M)
return 1
if(M.health < -75) return 0
// if(M.health < -75) return 0
if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH)))
M << "\blue <B>Remove your mask!</B>"
return 0
+14 -6
View File
@@ -931,16 +931,24 @@
if(E.status & BROKEN || E.status & DESTROYED)
if(E.name == "l_hand" || E.name == "l_arm")
if(hand && equipped())
drop_item()
emote("scream")
if(E.status & SPLINTED && prob(10))
drop_item()
emote("scream")
else
drop_item()
emote("scream")
else if(E.name == "r_hand" || E.name == "r_arm")
if(!hand && equipped())
drop_item()
emote("scream")
if(E.status & SPLINTED && prob(10))
drop_item()
emote("scream")
else
drop_item()
emote("scream")
else if(E.name == "l_leg" || E.name == "l_foot" \
|| E.name == "r_leg" || E.name == "r_foot" && !lying)
leg_tally-- // let it fail even if just foot&leg
if(!E.status & SPLINTED)
leg_tally-- // let it fail even if just foot&leg
// can't stand
if(leg_tally == 0 && !paralysis && !(lying || resting))
emote("scream")
+14 -5
View File
@@ -434,15 +434,24 @@
if(E.status & BROKEN || E.status & DESTROYED)
if(E.name == "l_hand" || E.name == "l_arm")
if(hand && equipped())
drop_item()
emote("scream")
if(E.status & SPLINTED && prob(7))
drop_item()
emote("scream")
else
drop_item()
emote("scream")
else if(E.name == "r_hand" || E.name == "r_arm")
if(!hand && equipped())
drop_item()
emote("scream")
if(E.status & SPLINTED && prob(7))
drop_item()
emote("scream")
else
drop_item()
emote("scream")
else if(E.name == "l_leg" || E.name == "l_foot" \
|| E.name == "r_leg" || E.name == "r_foot" && !lying)
leg_tally-- // let it fail even if just foot&leg
if(!E.status & SPLINTED)
leg_tally-- // let it fail even if just foot&leg
// can't stand
if(leg_tally == 0 && !paralysis && !(lying || resting))
@@ -739,6 +739,16 @@
if (!( target.handcuffed ))
del(src)
return
if("splints")
var/count = 0
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = target.organs["[organ]"]
if(o.status & SPLINTED)
count = 1
break
if(count == 0)
del(src)
return
if("internal")
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal )))
del(src)
@@ -764,6 +774,8 @@
message = text("\red <B>[] is trying to take off a [] from []'s back!</B>", source, target.back, target)
if("handcuff")
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
if("splints")
message = text("\red <B>[] is trying to remove []'s splints!</B>", source, target)
if("internal")
if (target.internal)
message = text("\red <B>[] is trying to remove []'s internals</B>", source, target)
@@ -875,6 +887,16 @@
source.drop_item()
target.handcuffed = item
item.loc = target
if("splints")
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = target.organs["[organ]"]
if (o.status & SPLINTED)
var/obj/item/W = new /obj/item/stack/medical/splint/single()
o.status &= ~SPLINTED
if (W)
W.loc = target.loc
W.layer = initial(W.layer)
W.add_fingerprint(source)
if("internal")
if (target.internal)
target.internal.add_fingerprint(source)
+2
View File
@@ -26,6 +26,8 @@
src.traumatic_shock += 60
else if(organ.status & BROKEN || organ.open)
src.traumatic_shock += 30
if(organ.status & SPLINTED)
src.traumatic_shock -= 20
if(src.traumatic_shock < 0)
src.traumatic_shock = 0
+2
View File
@@ -182,6 +182,7 @@
if(!istype(affecting, /datum/organ/external)) continue
affecting.heal_damage(1000, 1000) //fixes getting hit after ingestion, killing you when game updates organ health
affecting.status &= ~BROKEN
affecting.status &= ~SPLINTED
affecting.status &= ~DESTROYED
del affecting.wound_descs
H.UpdateDamageIcon()
@@ -213,6 +214,7 @@
e.status &= ~BLEEDING
e.open = 0
e.status &= ~BROKEN
e.status &= ~SPLINTED
e.status &= ~DESTROYED
e.perma_injury = 0
e.update_icon()
+14
View File
@@ -681,6 +681,18 @@
ul_SetLuminosity(LuminosityRed, LuminosityGreen, LuminosityBlue)//Current hardcode max at 7, should likely be a const somewhere else
return 1
/mob/proc/pull_damage()
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.health - H.halloss <= config.health_threshold_crit)
for(var/name in H.organs)
var/datum/organ/external/e = H.organs[name]
if((H.lying) && ((e.status & BROKEN && !e.status & SPLINTED) || e.status & BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
return 1
break
return 0
/mob/MouseDrop(mob/M as mob)
..()
if(M != usr) return
@@ -718,6 +730,8 @@
M.LAssailant = null
else
M.LAssailant = usr
if(M.pull_damage())
usr << "\red <B>Pulling \the [M] in their current condition would probably be a bad idea.</B>"
if(istype(src, /obj/machinery/artifact))
var/obj/machinery/artifact/A = src
A.attack_hand(usr)
+3 -1
View File
@@ -315,6 +315,8 @@ var/list/wound_progressions = list(
if(override)
status |= DESTROYED
if(status & DESTROYED)
if(status & SPLINTED)
status &= ~SPLINTED
if(implant)
for(var/implants in implant)
del(implants)
@@ -499,4 +501,4 @@ var/list/wound_progressions = list(
INTERNAL ORGANS
****************************************************/
/datum/organ/internal
name = "internal"
name = "internal"