diff --git a/code/WorkInProgress/SkyMarshal/wardrobes.dm b/code/WorkInProgress/SkyMarshal/wardrobes.dm index f8fa93cef3..ba10065340 100755 --- a/code/WorkInProgress/SkyMarshal/wardrobes.dm +++ b/code/WorkInProgress/SkyMarshal/wardrobes.dm @@ -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) diff --git a/code/defines/obj/storage.dm b/code/defines/obj/storage.dm index 78fab7ed58..f9a6e70930 100644 --- a/code/defines/obj/storage.dm +++ b/code/defines/obj/storage.dm @@ -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 diff --git a/code/defines/obj/supplypacks.dm b/code/defines/obj/supplypacks.dm index 845ebf4e8c..4dfb5c86d9 100755 --- a/code/defines/obj/supplypacks.dm +++ b/code/defines/obj/supplypacks.dm @@ -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", diff --git a/code/defines/obj/vending.dm b/code/defines/obj/vending.dm index 1da471db46..a46fe70716 100755 --- a/code/defines/obj/vending.dm +++ b/code/defines/obj/vending.dm @@ -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" diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index a13ae184f4..99ae7b485a 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -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." diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index a12c54feec..79275c114f 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -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 diff --git a/code/game/objects/closets/secure/medical.dm b/code/game/objects/closets/secure/medical.dm index 7b3cac9e7d..7abfd70df6 100644 --- a/code/game/objects/closets/secure/medical.dm +++ b/code/game/objects/closets/secure/medical.dm @@ -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) diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index a7566c5e44..cc1425d064 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -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) diff --git a/code/game/objects/items/weapons/medical.dm b/code/game/objects/items/weapons/medical.dm index 1abb9f9bb8..145d8220b2 100644 --- a/code/game/objects/items/weapons/medical.dm +++ b/code/game/objects/items/weapons/medical.dm @@ -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) \ No newline at end of file diff --git a/code/game/objects/items/weapons/surgery_limbattachment.dm b/code/game/objects/items/weapons/surgery_limbattachment.dm index 6d7ea982ee..94496eb49d 100644 --- a/code/game/objects/items/weapons/surgery_limbattachment.dm +++ b/code/game/objects/items/weapons/surgery_limbattachment.dm @@ -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() diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index a9a6e66f15..5daad7eb76 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -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() diff --git a/code/game/objects/storage/firstaid.dm b/code/game/objects/storage/firstaid.dm index e8cd1eb9a2..2f2691ebb5 100644 --- a/code/game/objects/storage/firstaid.dm +++ b/code/game/objects/storage/firstaid.dm @@ -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 diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 46612817ea..fb413c8557 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -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)" diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 47d8ef6880..e1f7fecf23 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -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) diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 6247785597..ea31ecfffb 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -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) diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm index e923720413..62f9d1e6e4 100644 --- a/code/modules/chemical/Chemistry-Tools.dm +++ b/code/modules/chemical/Chemistry-Tools.dm @@ -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()]\] Has been injected with [src.name] by [user.name] ([user.ckey])") @@ -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 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 26e3ab1263..20d851d2ca 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 96978f233d..eae2847cc9 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -36,22 +36,22 @@ var/msg = "*---------*\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 += "[t_He] [t_is] \icon[src.handcuffed] handcuffed!\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 += "[t_He] [t_has] a splint on his [o.getDisplayName()]!\n" + //belt if (src.belt) if (src.belt.blood_DNA) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ec02dc0bde..c60d670e45 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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 [] is trying to take off \a [] from []'s back!", source, target.back, target) if("handcuff") message = text("\red [] is trying to unhandcuff []!", source, target) + if("splints") + message = text("\red [] is trying to remove []'s splints!", source, target) if("uniform") target.attack_log += text("\[[time_stamp()]\] Has had their uniform removed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) uniform") @@ -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.
Suit Storage: [(s_store ? s_store : "Nothing")] [(istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : ""]
[(handcuffed ? text("Handcuffed") : text("Not Handcuffed"))]
[(internal ? text("Remove Internal") : "")] +
Remove Splints
Empty Pockets
Refresh
Close diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 3a72f0647d..bf857af074 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -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 Remove your mask!" return 0 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 97b80f7ced..3dd1228447 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -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") diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 855ad0d3a7..b04101a9d4 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -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)) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index a697c53120..e598b0be3f 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -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 [] is trying to take off a [] from []'s back!", source, target.back, target) if("handcuff") message = text("\red [] is trying to unhandcuff []!", source, target) + if("splints") + message = text("\red [] is trying to remove []'s splints!", source, target) if("internal") if (target.internal) message = text("\red [] is trying to remove []'s internals", 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) diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index be199abfb1..fea6ef34ab 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -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 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index c4028a43fb..5f0ad20254 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -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() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index cd0902eaad..57a886a0d9 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -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 Pulling \the [M] in their current condition would probably be a bad idea." if(istype(src, /obj/machinery/artifact)) var/obj/machinery/artifact/A = src A.attack_hand(usr) diff --git a/code/modules/mob/organ/organ.dm b/code/modules/mob/organ/organ.dm index 6ffc7c576b..655a828750 100644 --- a/code/modules/mob/organ/organ.dm +++ b/code/modules/mob/organ/organ.dm @@ -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" \ No newline at end of file diff --git a/code/setup.dm b/code/setup.dm index 8ed5104a71..843bfbbbc2 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -470,4 +470,5 @@ var/list/liftable_structures = list(\ #define BANDAGED 16 #define BROKEN 32 #define DESTROYED 64 -#define ROBOT 128 \ No newline at end of file +#define ROBOT 128 +#define SPLINTED 256 \ No newline at end of file diff --git a/config/alienwhitelist.txt b/config/alienwhitelist.txt index c8d17badd1..7b9e72d3b6 100644 --- a/config/alienwhitelist.txt +++ b/config/alienwhitelist.txt @@ -1,6 +1,7 @@ botanistpower - Tajaran bluefishie - Skrell densane - Skrell +dopeghoti - Tajaran duntadaman - Skrell fenrisian - Tajaran forsamori - Tajaran diff --git a/html/changelog.html b/html/changelog.html index 18faae2f9d..e57f388534 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -57,6 +57,21 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit though. Thanks. --> +
+

25 June 2012

+

Erthilo updated:

+ +
+

23 June 2012

SkyMarshal updated:

@@ -67,10 +82,6 @@ should be listed in the changelog upon commit though. Thanks. -->
  • The auto-targeting-mode for guns will now provide a different type of flavor text when it makes you fire, to make the situations that it occurs in to be less ambiguous.
  • UltraLight is in, but has some lighting bugs still remaining. This is the next thing I intend to tackle, bare with it please.
  • -
    - -
    -

    23 June 2012

    TG updated: