This commit is contained in:
caelaislinn
2012-06-27 00:02:01 +10:00
36 changed files with 313 additions and 138 deletions

View File

@@ -246,7 +246,7 @@
new /obj/item/weapon/storage/box(BPK)
new /obj/item/weapon/pen(src)
new /obj/item/device/pda/heads/cmo(src)
new /obj/item/weapon/storage/firstaid/regular(src)
new /obj/item/weapon/storage/firstaid/adv(src)
new /obj/item/device/flashlight/pen(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/suit/bio_suit/cmo(src)
@@ -268,7 +268,7 @@
new /obj/item/weapon/storage/box(BPK)
new /obj/item/weapon/pen(src)
new /obj/item/device/pda/medical(src)
new /obj/item/weapon/storage/firstaid/regular(src)
new /obj/item/weapon/storage/firstaid/adv(src)
new /obj/item/device/flashlight/pen(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/head/nursehat (src)

View File

@@ -380,7 +380,7 @@
/obj/item/weapon/storage/firstaid/adv
name = "advanced first-aid kit"
desc = "Contains advanced medical treatments."
icon_state = "o2"
icon_state = "advfirstaid"
item_state = "firstaid-advanced"
/obj/item/weapon/storage/flashbang_kit

View File

@@ -428,6 +428,7 @@
"/obj/item/weapon/storage/firstaid/fire",
"/obj/item/weapon/storage/firstaid/toxin",
"/obj/item/weapon/storage/firstaid/o2",
"/obj/item/weapon/storage/firstaid/adv",
"/obj/item/weapon/reagent_containers/glass/bottle/antitoxin",
"/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline",
"/obj/item/weapon/reagent_containers/glass/bottle/stoxin",

View File

@@ -173,9 +173,9 @@
icon_state = "med"
icon_deny = "med-deny"
req_access_txt = "5"
product_paths = "/obj/item/clothing/under/rank/medical;/obj/item/clothing/under/rank/chemist;/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/shoes/white;/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/syringe;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/beaker;/obj/item/weapon/reagent_containers/dropper"
product_paths = "/obj/item/clothing/under/rank/medical;/obj/item/clothing/under/rank/chemist;/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/shoes/white;/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/syringe;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/beaker;/obj/item/weapon/reagent_containers/dropper;/obj/item/stack/medical/bruise_pack;/obj/item/stack/medical/ointment;/obj/item/stack/medical/splint;/obj/item/stack/medical/advanced/bruise_pack;/obj/item/stack/medical/advanced/ointment"
// product_amounts = "4;4;4;4;4;12;5;4;2"
product_prices = "1;1;1;1;2;2;2;2;2;1;2;2;5"
product_prices = "1;1;1;1;2;2;2;2;2;1;2;2;5;1;1;2;3;3"
product_hidden = "/obj/item/weapon/reagent_containers/pill/tox;/obj/item/weapon/reagent_containers/pill/stox;/obj/item/weapon/reagent_containers/pill/antitox"
// product_hideamt = "3;4;6"
hidden_prices = "3;3;2"

View File

@@ -619,6 +619,16 @@
amount = 10
max_amount = 10
/obj/item/stack/medical/splint
name = "medical splint"
singular_name = "medical splint"
icon_state = "splint"
amount = 5
max_amount = 5
/obj/item/stack/medical/splint/single
amount = 1
/obj/item/weapon/c_tube
name = "cardboard tube"
desc = "A tube made of cardboard."

View File

@@ -20,7 +20,7 @@
H.equip_if_possible(new /obj/item/clothing/shoes/brown(H), H.slot_shoes)
H.equip_if_possible(new /obj/item/device/pda/heads/cmo(H), H.slot_belt)
H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat/cmo(H), H.slot_wear_suit)
H.equip_if_possible(new /obj/item/weapon/storage/firstaid/regular(H), H.slot_l_hand)
H.equip_if_possible(new /obj/item/weapon/storage/firstaid/adv(H), H.slot_l_hand)
H.equip_if_possible(new /obj/item/device/flashlight/pen(H), H.slot_s_store)
H.equip_if_possible(new /obj/item/device/healthanalyzer(H), H.slot_r_store)
return 1
@@ -63,7 +63,7 @@
H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat(H), H.slot_wear_suit)
H.equip_if_possible(new /obj/item/clothing/shoes/white(H), H.slot_shoes)
H.equip_if_possible(new /obj/item/device/pda/medical(H), H.slot_belt)
H.equip_if_possible(new /obj/item/weapon/storage/firstaid/regular(H), H.slot_l_hand)
H.equip_if_possible(new /obj/item/weapon/storage/firstaid/adv(H), H.slot_l_hand)
H.equip_if_possible(new /obj/item/device/flashlight/pen(H), H.slot_s_store)
H.equip_if_possible(new /obj/item/device/healthanalyzer(H), H.slot_r_store)
return 1

View File

@@ -70,7 +70,7 @@
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/pda/medical(src)
new /obj/item/weapon/storage/firstaid/regular(src)
new /obj/item/weapon/storage/firstaid/adv(src)
new /obj/item/device/flashlight/pen(src)
switch(pick("blue", "green", "purple"))
if ("blue")
@@ -158,7 +158,7 @@
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/pda/heads/cmo(src)
new /obj/item/weapon/storage/firstaid/regular(src)
new /obj/item/weapon/storage/firstaid/adv(src)
new /obj/item/device/flashlight/pen(src)
new /obj/item/weapon/cartridge/cmo(src)
new /obj/item/device/radio/headset/heads/cmo(src)

View File

@@ -119,8 +119,14 @@ MASS SPECTROMETER
var/mob/living/carbon/human/H = M
for(var/name in H.organs)
var/datum/organ/external/e = H.organs[name]
var/limb = e.getDisplayName()
if(e.status & BROKEN)
user.show_message("\red Bone fractures detected. Advanced scanner required for location.", 1)
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!e.status & SPLINTED))
user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport."
for(var/name in H.organs)
var/datum/organ/external/e = H.organs[name]
if(e.status & BROKEN)
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
break
if(ishuman(M))
if(M:vessel)

View File

@@ -7,6 +7,11 @@ MEDICAL
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
var/heal_cap = 0
if(istype(src, /obj/item/stack/medical/advanced))
heal_cap = -50
if (M.stat == 2)
var/t_him = "it"
if (M.gender == MALE)
@@ -15,15 +20,6 @@ MEDICAL
t_him = "her"
user << "\red \The [M] is dead, you cannot help [t_him]!"
return
if (M.health < 50)
var/t_him = "it"
if (M.gender == MALE)
t_him = "him"
else if (M.gender == FEMALE)
t_him = "her"
user << "\red \The [M] is wounded badly, this item cannot help [t_him]!"
return
if (!istype(M))
user << "\red \The [src] cannot be applied to \the [M]!"
@@ -46,6 +42,51 @@ MEDICAL
if(!istype(affecting, /datum/organ/external))
affecting = H.get_organ("head")
if(affecting.status & ROBOT)
user << "Medical equipment for a robot arm? Better get a welder..."
return
if(istype(src, /obj/item/stack/medical/splint))
var/limb = affecting.getDisplayName()
if(!((affecting.name == "l_arm") || (affecting.name == "r_arm") || (affecting.name == "l_leg") || (affecting.name == "r_leg")))
user << "\red You can't apply a splint there!"
return
if(!affecting.status & BROKEN)
user << "\red [M]'s [limb] isn't broken!"
return
if(affecting.status & SPLINTED)
user << "\red [M]'s [limb] is already splinted!"
return
if (M != user)
user.visible_message("\red [user] starts to apply \the [src] to [M]'s [limb].", "\red You start to apply \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
else
if((!user.hand && affecting.name == "r_arm") || (user.hand && affecting.name == "l_arm"))
user << "\red You can't apply a splint to the arm you're using!"
return
user.visible_message("\red [user] starts to apply \the [src] to their [limb].", "\red You start to apply \the [src] to your [limb].", "\red You hear something being wrapped.")
if(do_after(user, 50))
if (M != user)
user.visible_message("\red [user] finishes applying \the [src] to [M]'s [limb].", "\red You finish applying \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
else
if(prob(25))
user.visible_message("\red [user] successfully applies \the [src] to their [limb].", "\red You successfully apply \the [src] to your [limb].", "\red You hear something being wrapped.")
else
user.visible_message("\red [user] fumbles \the [src].", "\red You fumble \the [src].", "\red You hear something being wrapped.")
return
affecting.status |= SPLINTED
use(1)
M.update_clothing()
return
if (M.health < heal_cap)
var/t_him = "it"
if (M.gender == MALE)
t_him = "him"
else if (M.gender == FEMALE)
t_him = "her"
user << "\red \The [M] is wounded badly, this item cannot help [t_him]!"
return
if (affecting.heal_damage(src.heal_brute, src.heal_burn))
H.UpdateDamageIcon()
if (user)
@@ -68,70 +109,15 @@ MEDICAL
M.updatehealth()
else
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
if (M.health < heal_cap)
var/t_him = "it"
if (M.gender == MALE)
t_him = "him"
else if (M.gender == FEMALE)
t_him = "her"
user << "\red \The [M] is wounded badly, this item cannot help [t_him]!"
return
use(1)
/obj/item/stack/medical/advanced/attack(mob/living/carbon/M as mob, mob/user as mob)
if (M.stat == 2)
var/t_him = "it"
if (M.gender == MALE)
t_him = "him"
else if (M.gender == FEMALE)
t_him = "her"
user << "\red \The [M] is dead, you cannot help [t_him]!"
return
if (M.health < 0)
var/t_him = "it"
if (M.gender == MALE)
t_him = "him"
else if (M.gender == FEMALE)
t_him = "her"
user << "\red \The [M] is wounded badly, this item cannot help [t_him]!"
return
if (!istype(M))
user << "\red \The [src] cannot be applied to [M]!"
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
user << "\red You don't have the dexterity to do this!"
return 1
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affecting = H.get_organ("chest")
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/user2 = user
affecting = H.get_organ(check_zone(user2.zone_sel.selecting))
else
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
affecting = H.get_organ("head")
if (affecting.heal_damage(src.heal_brute, src.heal_burn))
H.UpdateDamageIcon()
if (user)
if (M != user)
user.visible_message("\red \The [H]'s [affecting.display_name] has been bandaged with \a [src] by \the [user].",\
"\red You bandage \the [H]'s [affecting.display_name] with \the [src].",\
"You hear gauze being ripped.")
else
var/t_his = "its"
if (user.gender == MALE)
t_his = "his"
else if (user.gender == FEMALE)
t_his = "her"
user.visible_message("\red \The [user] bandages [t_his] [affecting.display_name] with \a [src].",\
"\red You bandage your [affecting.display_name] with \the [src].",\
"You hear gauze being ripped.")
use(1)
M.updatehealth()
else
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
use(1)

View File

@@ -23,7 +23,7 @@
return ..()
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[limbloc]
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.status & DESTROYED)
if(!(S.status & ATTACHABLE))
user << "\red The wound is not ready for a replacement!"
@@ -52,9 +52,16 @@
S.take_damage(15)
S.status &= ~BROKEN
S.status &= ~SPLINTED
S.status &= ~ATTACHABLE
S.status &= ~DESTROYED
S.status |= ROBOT
var/datum/organ/external/T = H.organs["[limbloc]"]
T.status &= ~BROKEN
T.status &= ~SPLINTED
T.status &= ~ATTACHABLE
T.status &= ~DESTROYED
T.status |= ROBOT
M.update_body()
M.updatehealth()
M.UpdateDamageIcon()

View File

@@ -1712,6 +1712,7 @@ CIRCULAR SAW
if(IsFinalStage(temp.stage))
temp.status &= ~BROKEN
temp.status &= ~SPLINTED
temp.stage = 0
temp.perma_injury = 0
temp.brute_dam = temp.min_broken_damage -1
@@ -1819,6 +1820,7 @@ CIRCULAR SAW
e.open = 0
e.status &= ~BROKEN
e.status &= ~DESTROYED
e.status &= ~SPLINTED
e.perma_injury = 0
e.update_icon()
H.update_body()

View File

@@ -28,7 +28,7 @@
/obj/item/weapon/storage/firstaid/regular/New()
..()
if (empty) return
new /obj/item/weapon/reagent_containers/syringe/inaprovaline( src )
new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src )
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/bruise_pack(src)
@@ -67,13 +67,13 @@
/obj/item/weapon/storage/firstaid/adv/New()
..()
if (empty) return
new /obj/item/weapon/reagent_containers/syringe/inaprovaline( src )
new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src )
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/splint(src)
return
/obj/item/weapon/storage/pill_bottle/kelotane

View File

@@ -223,7 +223,7 @@ proc/trigger_armed_response_team(var/force = 0)
//Backpack
equip_if_possible(new /obj/item/weapon/storage/backpack/security(src), slot_back)
equip_if_possible(new /obj/item/weapon/storage/box/engineer(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)
var/obj/item/weapon/card/id/W = new(src)
W.name = "[real_name]'s ID Card (Emergency Response Team)"

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)

View File

@@ -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)

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

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)

View File

@@ -36,22 +36,22 @@
var/msg = "<span class='info'>*---------*\nThis is "
if(src.icon)
msg += "\icon[src.icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
else
switch(get_visible_gender())
if(MALE)
t_He = "He"
t_his = "his"
t_him = "him"
if(FEMALE)
t_He = "She"
t_his = "her"
t_him = "her"
if(NEUTER)
t_He = "They"
t_his = "their"
t_him = "them"
t_has = "have"
t_is = "are"
switch(get_visible_gender())
if(MALE)
t_He = "He"
t_his = "his"
t_him = "him"
if(FEMALE)
t_He = "She"
t_his = "her"
t_him = "her"
if(NEUTER)
t_He = "They"
t_his = "their"
t_him = "them"
t_has = "have"
t_is = "are"
if(mutantrace == "lizard")
examine_text = "one of those lizard-like Soghuns"
@@ -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)

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>

View File

@@ -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

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")

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))

View File

@@ -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)

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

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()

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)

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"

View File

@@ -470,4 +470,5 @@ var/list/liftable_structures = list(\
#define BANDAGED 16
#define BROKEN 32
#define DESTROYED 64
#define ROBOT 128
#define ROBOT 128
#define SPLINTED 256