mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 22:12:58 +01:00
Materials And Medical Stacks (#15586)
This commit is contained in:
@@ -248,14 +248,14 @@ BREATH ANALYZER
|
||||
var/is_bandaged = org.is_bandaged()
|
||||
var/is_salved = org.is_salved()
|
||||
if(is_bandaged && is_salved)
|
||||
var/icon/B = icon('icons/obj/stacks/medical.dmi', "bandaged")
|
||||
var/icon/S = icon('icons/obj/stacks/medical.dmi', "salved")
|
||||
var/icon/B = icon('icons/obj/item/stacks/medical.dmi', "bandaged")
|
||||
var/icon/S = icon('icons/obj/item/stacks/medical.dmi', "salved")
|
||||
limb_result = "[limb_result] \[[icon2html(B, user)] | [icon2html(S, user)]\]"
|
||||
else if(is_bandaged)
|
||||
var/icon/B = icon('icons/obj/stacks/medical.dmi', "bandaged")
|
||||
var/icon/B = icon('icons/obj/item/stacks/medical.dmi', "bandaged")
|
||||
limb_result = "[limb_result] \[[icon2html(B, user)]\]"
|
||||
else if(is_salved)
|
||||
var/icon/S = icon('icons/obj/stacks/medical.dmi', "salved")
|
||||
var/icon/S = icon('icons/obj/item/stacks/medical.dmi', "salved")
|
||||
limb_result = "[limb_result] \[[icon2html(S, user)]\]"
|
||||
dat += limb_result
|
||||
else
|
||||
|
||||
@@ -4,13 +4,11 @@ Contains:
|
||||
- Ointment
|
||||
- Advanced Trauma Kit
|
||||
- Advanced Burn Kit
|
||||
- Space Klot
|
||||
|
||||
*/
|
||||
/obj/item/stack/medical
|
||||
name = "medical pack"
|
||||
singular_name = "medical pack"
|
||||
icon = 'icons/obj/stacks/medical.dmi'
|
||||
icon = 'icons/obj/item/stacks/medical.dmi'
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/stacks/lefthand_medical.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/stacks/righthand_medical.dmi',
|
||||
@@ -24,16 +22,20 @@ Contains:
|
||||
throw_range = 20
|
||||
var/heal_brute = 0
|
||||
var/heal_burn = 0
|
||||
var/automatic_charge_overlays = FALSE //Do we handle overlays with base update_icon()? | Stolen from TG egun code
|
||||
var/charge_sections = 5 // How many indicator blips are there?
|
||||
var/charge_x_offset = 2 //The spacing between each charge indicator. Should be 2 to leave a 1px gap between each blip.
|
||||
var/apply_sounds
|
||||
var/applied_sounds
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/M as mob, mob/user as mob)
|
||||
if (!istype(M) || istype(M, /mob/living/silicon) || istype(M, /mob/living/simple_animal/spiderbot))
|
||||
to_chat(user, "<span class='warning'>\The [src] cannot be applied to [M]!</span>")
|
||||
to_chat(user, SPAN_WARNING("\The [src] cannot be applied to [M]!"))
|
||||
return 1
|
||||
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
istype(user, /mob/living/silicon)) )
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
to_chat(user, SPAN_WARNING("You don't have the dexterity to do this!"))
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
@@ -42,55 +44,77 @@ Contains:
|
||||
|
||||
if(affecting.name == BP_HEAD)
|
||||
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
|
||||
to_chat(user, "<span class='warning'>You can't apply [src] through [H.head]!</span>")
|
||||
to_chat(user, SPAN_WARNING("You can't apply [src] through [H.head]!"))
|
||||
return 1
|
||||
else
|
||||
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
|
||||
to_chat(user, "<span class='warning'>You can't apply [src] through [H.wear_suit]!</span>")
|
||||
to_chat(user, SPAN_WARNING("You can't apply [src] through [H.wear_suit]!"))
|
||||
return 1
|
||||
|
||||
if(affecting.status & ORGAN_LIFELIKE)
|
||||
if(!(affecting.brute_dam || affecting.burn_dam))
|
||||
to_chat(user, "<span class='notice'> [M] seems healthy, there are no wounds to treat! </span>")
|
||||
to_chat(user, SPAN_NOTICE("[M] seems healthy, there are no wounds to treat! "))
|
||||
return 1
|
||||
|
||||
user.visible_message( \
|
||||
"<span class = 'notice'> [user] starts applying \the [src] to [M].</span>", \
|
||||
"<span class = 'notice'> You start applying \the [src] to [M].</span>" \
|
||||
SPAN_NOTICE("[user] starts applying \the [src] to [M]."), \
|
||||
SPAN_NOTICE("You start applying \the [src] to [M].")\
|
||||
)
|
||||
if (do_mob(user, M, 30))
|
||||
user.visible_message( \
|
||||
"<span class = 'notice'> [M] has been applied with [src] by [user].</span>", \
|
||||
"<span class = 'notice'> You apply \the [src] to [M].</span>" \
|
||||
SPAN_NOTICE("[M] has been applied with [src] by [user]."), \
|
||||
SPAN_NOTICE("You apply \the [src] to [M].")\
|
||||
)
|
||||
use(1)
|
||||
return 1
|
||||
|
||||
if(affecting.status & ORGAN_ASSISTED)
|
||||
to_chat(user, "<span class='warning'>This isn't useful at all on a robotic limb.</span>")
|
||||
to_chat(user, SPAN_WARNING("This isn't useful at all on a robotic limb."))
|
||||
return 1
|
||||
|
||||
H.UpdateDamageIcon()
|
||||
|
||||
else
|
||||
if (!M.getBruteLoss() && !M.getFireLoss())
|
||||
to_chat(user, "<span class='notice'> [M] seems healthy, there are no wounds to treat! </span>")
|
||||
to_chat(user, SPAN_NOTICE("[M] seems healthy, there are no wounds to treat! "))
|
||||
return 1
|
||||
|
||||
user.visible_message( \
|
||||
"<span class = 'notice'> [user] starts applying \the [src] to [M].</span>", \
|
||||
"<span class = 'notice'> You start applying \the [src] to [M].</span>" \
|
||||
SPAN_NOTICE("[user] starts applying \the [src] to [M]."), \
|
||||
SPAN_NOTICE("You start applying \the [src] to [M].")\
|
||||
)
|
||||
if (do_mob(user, M, 30))
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
user.visible_message( \
|
||||
"<span class = 'notice'> [M] has been applied with [src] by [user].</span>", \
|
||||
"<span class = 'notice'> You apply \the [src] to [M].</span>" \
|
||||
SPAN_NOTICE("[M] has been applied with [src] by [user]."), \
|
||||
SPAN_NOTICE("You apply \the [src] to [M].")\
|
||||
)
|
||||
use(1)
|
||||
|
||||
M.updatehealth()
|
||||
|
||||
/obj/item/stack/medical/use()
|
||||
. = ..()
|
||||
if(applied_sounds)
|
||||
playsound(src, applied_sounds, 25)
|
||||
|
||||
/obj/item/stack/medical/update_icon()
|
||||
if(QDELETED(src)) //Checks if the item has been deleted
|
||||
return //If it has, do nothing
|
||||
..()
|
||||
if(!automatic_charge_overlays) //Checks if the item has this feature enabled
|
||||
return //If it does not, do nothing
|
||||
var/ratio = CEILING(clamp(amount / max_amount, 0, 1) * charge_sections, 1)
|
||||
cut_overlays()
|
||||
var/iconState = "[icon_state]_charge"
|
||||
if(!amount) //Checks if there are still charges left in the item
|
||||
return //If it does not, do nothing, as the overlays have been cut before this already.
|
||||
else
|
||||
var/mutable_appearance/charge_overlay = mutable_appearance(icon, iconState)
|
||||
for(var/i = ratio, i >= 1, i--)
|
||||
charge_overlay.pixel_x = charge_x_offset * (i - 1)
|
||||
add_overlay(charge_overlay)
|
||||
|
||||
// Bruise Pack.
|
||||
/obj/item/stack/medical/bruise_pack
|
||||
name = "roll of gauze"
|
||||
@@ -100,7 +124,7 @@ Contains:
|
||||
origin_tech = list(TECH_BIO = 1)
|
||||
heal_brute = 4
|
||||
icon_has_variants = TRUE
|
||||
apply_sounds = list('sound/items/rip1.ogg','sound/items/rip2.ogg')
|
||||
apply_sounds = /singleton/sound_category/rip_sound
|
||||
drop_sound = 'sound/items/drop/gloves.ogg'
|
||||
pickup_sound = 'sound/items/pickup/gloves.ogg'
|
||||
|
||||
@@ -122,12 +146,12 @@ Contains:
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.is_bandaged())
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>")
|
||||
to_chat(user, SPAN_WARNING("The wounds on [M]'s [affecting.name] have already been bandaged."))
|
||||
return 1
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message("<span class='notice'>\The [user] starts treating [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You start treating [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts treating [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start treating [M]'s [affecting.name]."))
|
||||
var/used = 0
|
||||
for (var/datum/wound/W in affecting.wounds)
|
||||
if(W.bandaged)
|
||||
@@ -135,27 +159,27 @@ Contains:
|
||||
if(used == amount)
|
||||
break
|
||||
if(!do_mob(user, M, W.damage/5))
|
||||
to_chat(user, "<span class='notice'>You must stand still to bandage wounds.</span>")
|
||||
to_chat(user, SPAN_NOTICE("You must stand still to bandage wounds."))
|
||||
break
|
||||
if (W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message("<span class='notice'>\The [user] bandages \a [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You bandage \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] bandages \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You bandage \a [W.desc] on [M]'s [affecting.name]."))
|
||||
//H.add_side_effect("Itch")
|
||||
else if (W.damage_type == BRUISE)
|
||||
user.visible_message("<span class='notice'>\The [user] places a bruise patch over \a [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You place a bruise patch over \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] places a bruise patch over \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You place a bruise patch over \a [W.desc] on [M]'s [affecting.name]."))
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] places a bandaid over \a [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You place a bandaid over \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] places a bandaid over \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You place a bandaid over \a [W.desc] on [M]'s [affecting.name]."))
|
||||
W.bandage()
|
||||
playsound(src, pick(apply_sounds), 25)
|
||||
playsound(src, apply_sounds, 25)
|
||||
used++
|
||||
affecting.update_damages()
|
||||
if(used == amount)
|
||||
if(affecting.is_bandaged())
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up.</span>")
|
||||
to_chat(user, SPAN_WARNING("\The [src] is used up."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>")
|
||||
to_chat(user, SPAN_WARNING("\The [src] is used up, but there are more wounds to treat on \the [affecting.name]."))
|
||||
use(used)
|
||||
H.update_bandages(TRUE)
|
||||
else
|
||||
@@ -163,7 +187,7 @@ Contains:
|
||||
if (do_surgery(H,user,src))
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
to_chat(user, SPAN_NOTICE("The [affecting.name] is cut open, you'll need more than a bandage!"))
|
||||
|
||||
// Ointment.
|
||||
/obj/item/stack/medical/ointment
|
||||
@@ -175,7 +199,7 @@ Contains:
|
||||
heal_burn = 4
|
||||
origin_tech = list(TECH_BIO = 1)
|
||||
icon_has_variants = TRUE
|
||||
apply_sounds = list('sound/items/ointment.ogg')
|
||||
apply_sounds = /singleton/sound_category/ointment_sound
|
||||
drop_sound = 'sound/items/drop/herb.ogg'
|
||||
pickup_sound = 'sound/items/pickup/herb.ogg'
|
||||
|
||||
@@ -197,18 +221,18 @@ Contains:
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.is_salved())
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
to_chat(user, SPAN_WARNING("The wounds on [M]'s [affecting.name] have already been salved."))
|
||||
return 1
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message("<span class='notice'>\The [user] starts salving wounds on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You start salving the wounds on [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts salving wounds on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start salving the wounds on [M]'s [affecting.name]."))
|
||||
playsound(src, pick(apply_sounds), 25)
|
||||
if(!do_mob(user, M, 10))
|
||||
to_chat(user, "<span class='notice'>You must stand still to salve wounds.</span>")
|
||||
to_chat(user, SPAN_NOTICE("You must stand still to salve wounds."))
|
||||
return 1
|
||||
user.visible_message("<span class='notice'>[user] salved wounds on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You salved wounds on [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("[user] salved wounds on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You salved wounds on [M]'s [affecting.name]."))
|
||||
use(1)
|
||||
affecting.salve()
|
||||
else
|
||||
@@ -216,7 +240,7 @@ Contains:
|
||||
if (do_surgery(H,user,src))
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
to_chat(user, SPAN_NOTICE("The [affecting.name] is cut open, you'll need more than a bandage!"))
|
||||
|
||||
// Advanced Trauma Kit.
|
||||
/obj/item/stack/medical/advanced/bruise_pack
|
||||
@@ -226,7 +250,9 @@ Contains:
|
||||
icon_state = "traumakit"
|
||||
heal_brute = 8
|
||||
origin_tech = list(TECH_BIO = 1)
|
||||
apply_sounds = list('sound/items/rip1.ogg','sound/items/rip2.ogg','sound/items/tape.ogg')
|
||||
apply_sounds = /singleton/sound_category/rip_sound
|
||||
applied_sounds = 'sound/items/advkit.ogg'
|
||||
automatic_charge_overlays = TRUE
|
||||
|
||||
/obj/item/stack/medical/advanced/bruise_pack/full/Initialize()
|
||||
. = ..()
|
||||
@@ -246,12 +272,12 @@ Contains:
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.is_bandaged() && affecting.is_disinfected())
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been treated.</span>")
|
||||
to_chat(user, SPAN_WARNING("The wounds on [M]'s [affecting.name] have already been treated."))
|
||||
return 1
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message("<span class='notice'>\The [user] starts treating [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You start treating [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts treating [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start treating [M]'s [affecting.name]."))
|
||||
var/used = 0
|
||||
for (var/datum/wound/W in affecting.wounds)
|
||||
if (W.bandaged && W.disinfected)
|
||||
@@ -259,18 +285,18 @@ Contains:
|
||||
if(used == amount)
|
||||
break
|
||||
if(!do_mob(user, M, W.damage/5))
|
||||
to_chat(user, "<span class='notice'>You must stand still to bandage wounds.</span>")
|
||||
to_chat(user, SPAN_NOTICE("You must stand still to bandage wounds."))
|
||||
break
|
||||
if (W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message("<span class='notice'>\The [user] cleans \a [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.</span>", \
|
||||
"<span class='notice'>You clean and seal \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] cleans \a [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue."), \
|
||||
SPAN_NOTICE("You clean and seal \a [W.desc] on [M]'s [affecting.name]."))
|
||||
//H.add_side_effect("Itch")
|
||||
else if (W.damage_type == BRUISE)
|
||||
user.visible_message("<span class='notice'>\The [user] places a medical patch over \a [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You place a medical patch over \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] places a medical patch over \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You place a medical patch over \a [W.desc] on [M]'s [affecting.name]."))
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] smears some bioglue over \a [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You smear some bioglue over \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] smears some bioglue over \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You smear some bioglue over \a [W.desc] on [M]'s [affecting.name]."))
|
||||
playsound(src, pick(apply_sounds), 25)
|
||||
W.bandage()
|
||||
W.disinfect()
|
||||
@@ -279,9 +305,9 @@ Contains:
|
||||
affecting.update_damages()
|
||||
if(used == amount)
|
||||
if(affecting.is_bandaged())
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up.</span>")
|
||||
to_chat(user, SPAN_WARNING("\The [src] is used up."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>")
|
||||
to_chat(user, SPAN_WARNING("\The [src] is used up, but there are more wounds to treat on \the [affecting.name]."))
|
||||
use(used)
|
||||
H.update_bandages(TRUE)
|
||||
else
|
||||
@@ -289,7 +315,7 @@ Contains:
|
||||
if (do_surgery(H,user,src))
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
to_chat(user, SPAN_NOTICE("The [affecting.name] is cut open, you'll need more than a bandage!"))
|
||||
|
||||
// Advanced Burn Kit.
|
||||
/obj/item/stack/medical/advanced/ointment
|
||||
@@ -299,7 +325,9 @@ Contains:
|
||||
icon_state = "burnkit"
|
||||
heal_burn = 8
|
||||
origin_tech = list(TECH_BIO = 1)
|
||||
apply_sounds = list('sound/items/ointment.ogg')
|
||||
apply_sounds = /singleton/sound_category/ointment_sound
|
||||
applied_sounds = 'sound/items/advkit.ogg'
|
||||
automatic_charge_overlays = TRUE
|
||||
|
||||
/obj/item/stack/medical/advanced/ointment/full/Initialize()
|
||||
. = ..()
|
||||
@@ -316,18 +344,18 @@ Contains:
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.is_salved())
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
to_chat(user, SPAN_WARNING("The wounds on [M]'s [affecting.name] have already been salved."))
|
||||
return 1
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message("<span class='notice'>\The [user] starts salving wounds on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You start salving the wounds on [M]'s [affecting.name].</span>" )
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts salving wounds on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You start salving the wounds on [M]'s [affecting.name]."))
|
||||
playsound(src, pick(apply_sounds), 25)
|
||||
if(!do_mob(user, M, 10))
|
||||
to_chat(user, "<span class='notice'>You must stand still to salve wounds.</span>")
|
||||
to_chat(user, SPAN_NOTICE("You must stand still to salve wounds."))
|
||||
return 1
|
||||
user.visible_message( "<span class='notice'>[user] covers wounds on [M]'s [affecting.name] with regenerative membrane.</span>", \
|
||||
"<span class='notice'>You cover wounds on [M]'s [affecting.name] with regenerative membrane.</span>" )
|
||||
user.visible_message(SPAN_NOTICE("[user] covers wounds on [M]'s [affecting.name] with regenerative membrane."), \
|
||||
SPAN_NOTICE("You cover wounds on [M]'s [affecting.name] with regenerative membrane."))
|
||||
affecting.heal_damage(0,heal_burn)
|
||||
use(1)
|
||||
affecting.salve()
|
||||
@@ -336,60 +364,7 @@ Contains:
|
||||
if (do_surgery(H,user,src))
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
|
||||
// Space Klot. This stops bleeding and has a small chance to stop some internal bleeding, but it will be locked behind a tech tree + does not disinfect like a normal bruise pack.
|
||||
/obj/item/stack/medical/advanced/bruise_pack/spaceklot
|
||||
name = "space klot"
|
||||
singular_name = "space klot"
|
||||
desc = "A powder that, when poured on an open wound, quickly stops the bleeding. Combine with bandages for the best effect."
|
||||
icon_state = "powderbag"
|
||||
heal_brute = 15
|
||||
origin_tech = list(TECH_BIO = 4)
|
||||
var/open = 0
|
||||
var/used = 0
|
||||
|
||||
/obj/item/stack/medical/advanced/bruise_pack/spaceklot/full/Initialize()
|
||||
. = ..()
|
||||
amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/medical/advanced/bruise_pack/spaceklot/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if(..())
|
||||
return 1
|
||||
if(used)
|
||||
return
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.is_bandaged())
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been treated.</span>")
|
||||
return 1
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message("<span class='notice'>\The [user] starts treating [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You start treating [M]'s [affecting.name].</span>" )
|
||||
if(!do_after(user, 100, act_target = M))
|
||||
return
|
||||
for (var/datum/wound/W in affecting.wounds)
|
||||
if (W.bandaged)
|
||||
continue
|
||||
if(used == amount)
|
||||
break
|
||||
if(!do_mob(user, M, W.damage/5))
|
||||
to_chat(user, "<span class='notice'>You must stand still to bandage wounds.</span>")
|
||||
break
|
||||
if (W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message("<span class='notice'>\The [user] pours the powder \a [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You pour the powder \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
|
||||
W.bandage()
|
||||
W.heal_damage(heal_brute, 0)
|
||||
used = 1
|
||||
affecting.update_damages()
|
||||
|
||||
to_chat(user, SPAN_NOTICE("The [affecting.name] is cut open, you'll need more than a bandage!"))
|
||||
|
||||
/obj/item/stack/medical/splint
|
||||
name = "medical splints"
|
||||
@@ -419,32 +394,31 @@ Contains:
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
var/limb = affecting.name
|
||||
if(!(affecting.limb_name in splintable_organs))
|
||||
to_chat(user, "<span class='danger'>You can't apply a splint there!</span>")
|
||||
to_chat(user, SPAN_DANGER("You can't apply a splint there!"))
|
||||
return
|
||||
if(affecting.status & ORGAN_SPLINTED)
|
||||
to_chat(user, "<span class='danger'>[M]'s [limb] is already splinted!</span>")
|
||||
to_chat(user, SPAN_DANGER("[M]'s [limb] is already splinted!"))
|
||||
return
|
||||
if (M != user)
|
||||
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You start to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
user.visible_message(SPAN_DANGER("[user] starts to apply \the [src] to [M]'s [limb]."), SPAN_DANGER("You start to apply \the [src] to [M]'s [limb]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
else
|
||||
if((!user.hand && affecting.limb_name == BP_R_ARM) || (user.hand && affecting.limb_name == BP_L_ARM))
|
||||
to_chat(user, "<span class='danger'>You can't apply a splint to the arm you're using!</span>")
|
||||
to_chat(user, SPAN_DANGER("You can't apply a splint to the arm you're using!"))
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to their [limb].</span>", "<span class='danger'>You start to apply \the [src] to your [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
user.visible_message(SPAN_DANGER("[user] starts to apply \the [src] to their [limb]."), SPAN_DANGER("You start to apply \the [src] to your [limb]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
if(do_after(user, 50))
|
||||
if (M != user)
|
||||
user.visible_message("<span class='danger'>[user] finishes applying \the [src] to [M]'s [limb].</span>", "<span class='danger'>You finish applying \the [src] to [M]'s [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
user.visible_message(SPAN_DANGER("[user] finishes applying \the [src] to [M]'s [limb]."), SPAN_DANGER("You finish applying \the [src] to [M]'s [limb]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
else
|
||||
if(prob(25))
|
||||
user.visible_message("<span class='danger'>[user] successfully applies \the [src] to their [limb].</span>", "<span class='danger'>You successfully apply \the [src] to your [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
user.visible_message(SPAN_DANGER("[user] successfully applies \the [src] to their [limb]."), SPAN_DANGER("You successfully apply \the [src] to your [limb]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] fumbles \the [src].</span>", "<span class='danger'>You fumble \the [src].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
user.visible_message(SPAN_DANGER("[user] fumbles \the [src]."), SPAN_DANGER("You fumble \the [src]."), SPAN_DANGER("You hear something being wrapped."))
|
||||
return
|
||||
affecting.status |= ORGAN_SPLINTED
|
||||
use(1)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/stack/medical/splint/makeshift
|
||||
name = "makeshift splints"
|
||||
singular_name = "makeshift splint"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "nanopaste"
|
||||
singular_name = "nanite swarm"
|
||||
desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery."
|
||||
icon = 'icons/obj/stacks/nanopaste.dmi'
|
||||
icon = 'icons/obj/item/stacks/nanopaste.dmi'
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/stacks/lefthand_nanopaste.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/stacks/righthand_nanopaste.dmi',
|
||||
@@ -38,10 +38,10 @@
|
||||
R.adjustFireLoss(-15)
|
||||
R.updatehealth()
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applied some [src] at [R]'s damaged areas.</span>",\
|
||||
"<span class='notice'>You apply some [src] at [R]'s damaged areas.</span>")
|
||||
user.visible_message(SPAN_NOTICE("\The [user] applied some [src] at [R]'s damaged areas."),\
|
||||
SPAN_NOTICE("You apply some [src] at [R]'s damaged areas."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>All [R]'s systems are nominal.</span>")
|
||||
to_chat(user, SPAN_NOTICE("All [R]'s systems are nominal."))
|
||||
|
||||
else if(ishuman(M)) //Repairing robolimbs
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -53,27 +53,27 @@
|
||||
|
||||
if(S.limb_name == BP_HEAD)
|
||||
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
|
||||
to_chat(user, "<span class='warning'>You can't apply [src] through [H.head]!</span>")
|
||||
to_chat(user, SPAN_WARNING("You can't apply [src] through [H.head]!"))
|
||||
return
|
||||
else
|
||||
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
|
||||
to_chat(user, "<span class='warning'>You can't apply [src] through [H.wear_suit]!</span>")
|
||||
to_chat(user, SPAN_WARNING("You can't apply [src] through [H.wear_suit]!"))
|
||||
return
|
||||
|
||||
if(do_mob(user, M, 7))
|
||||
S.heal_damage(15, 15, robo_repair = 1)
|
||||
H.updatehealth()
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the [user]"] [S.name] with \the [src].</span>",\
|
||||
"<span class='notice'>You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.name].</span>")
|
||||
user.visible_message(SPAN_NOTICE("\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the [user]"] [S.name] with \the [src]."),\
|
||||
SPAN_NOTICE("You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.name]."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Nothing to fix here.</span>")
|
||||
to_chat(user, SPAN_NOTICE("Nothing to fix here."))
|
||||
else
|
||||
if (can_operate(H))
|
||||
if (do_surgery(H,user,src))
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Nothing to fix in here.</span>")
|
||||
to_chat(user, SPAN_NOTICE("Nothing to fix in here."))
|
||||
|
||||
|
||||
/obj/item/stack/nanopaste/surge
|
||||
@@ -91,15 +91,15 @@
|
||||
return 0
|
||||
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>[src] has depleted it's nanites.</span>")
|
||||
to_chat(user, SPAN_WARNING("[src] has depleted it's nanites."))
|
||||
return 0
|
||||
|
||||
if (isipc(M))
|
||||
var/obj/item/organ/internal/surge/s = M.internal_organs_by_name["surge"]
|
||||
if(isnull(s))
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] is trying to apply [src] to [(M == user) ? ("itself") : (M)]!</span>",
|
||||
"<span class='notice'>You start applying [src] to [(M == user) ? ("yourself") : (M)]!</span>"
|
||||
SPAN_NOTICE("[user] is trying to apply [src] to [(M == user) ? ("itself") : (M)]!"),
|
||||
SPAN_NOTICE("You start applying [src] to [(M == user) ? ("yourself") : (M)]!")
|
||||
)
|
||||
|
||||
if (!do_mob(user, M, 2))
|
||||
@@ -109,18 +109,18 @@
|
||||
M.internal_organs += s
|
||||
M.internal_organs_by_name["surge"] = s
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] applies some nanite paste to [(M == user) ? ("itself") : (M)]!</span>",
|
||||
"<span class='notice'>You apply [src] to [(M == user) ? ("youself") : (M)].</span>"
|
||||
SPAN_NOTICE("[user] applies some nanite paste to [(M == user) ? ("itself") : (M)]!"),
|
||||
SPAN_NOTICE("You apply [src] to [(M == user) ? ("youself") : (M)].")
|
||||
)
|
||||
to_chat(M, "<span class='notice'>You can feel nanites inside you creating something new. An internal OS voice states \"Warning: surge prevention module has been installed, it has [s.surge_left] preventions left!\"</span>")
|
||||
to_chat(M, SPAN_NOTICE("You can feel nanites inside you creating something new. An internal OS voice states \"Warning: surge prevention module has been installed, it has [s.surge_left] preventions left!\""))
|
||||
amount = 0
|
||||
used = TRUE
|
||||
return 1
|
||||
else
|
||||
if(!s.surge_left)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] is trying to apply [src] to [(M == user) ? ("itself") : (M)]!</span>",
|
||||
"<span class='notice'>You start applying [src] to [(M == user) ? ("yourself") : (M)]!</span>"
|
||||
SPAN_NOTICE("[user] is trying to apply [src] to [(M == user) ? ("itself") : (M)]!"),
|
||||
SPAN_NOTICE("You start applying [src] to [(M == user) ? ("yourself") : (M)]!")
|
||||
)
|
||||
|
||||
if (!do_mob(user, M, 2))
|
||||
@@ -131,16 +131,16 @@
|
||||
s.icon_state = "surge_ipc"
|
||||
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] applies some nanite paste to [(M == user) ? ("itself") : (M)]!</span>",
|
||||
"<span class='notice'>You apply [src] to [(M == user) ? ("yourself") : (M)].</span>"
|
||||
SPAN_NOTICE("[user] applies some nanite paste to [(M == user) ? ("itself") : (M)]!"),
|
||||
SPAN_NOTICE("You apply [src] to [(M == user) ? ("yourself") : (M)].")
|
||||
)
|
||||
to_chat(M, "<span class='notice'>You can feel nanites inside you regenerating your surge prevention module. An internal OS voice states \"Warning: surge prevention module repaired, it has [s.surge_left] preventions left!\"</span>")
|
||||
to_chat(M, SPAN_NOTICE("You can feel nanites inside you regenerating your surge prevention module. An internal OS voice states \"Warning: surge prevention module repaired, it has [s.surge_left] preventions left!\""))
|
||||
amount = 0
|
||||
used = TRUE
|
||||
return 1
|
||||
|
||||
to_chat(user, "<span class='warning'>[(M == user) ? ("You already have") : ("[M] already has")] fully functional surge prevention module installed.</span>")
|
||||
to_chat(user, SPAN_WARNING("[(M == user) ? ("You already have") : ("[M] already has")] fully functional surge prevention module installed."))
|
||||
return 0
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src]'s nanites refuse to work on [(M == user) ? ("you") : (M)].</span>")
|
||||
return 0
|
||||
to_chat(user, SPAN_WARNING("[src]'s nanites refuse to work on [(M == user) ? ("you") : (M)]."))
|
||||
return 0
|
||||
|
||||
@@ -35,6 +35,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list(
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
lock_picking_level = 3
|
||||
stacktype = /obj/item/stack/rods
|
||||
icon_has_variants = TRUE
|
||||
|
||||
/obj/item/stack/rods/full/Initialize()
|
||||
. = ..()
|
||||
@@ -52,17 +53,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list(
|
||||
|
||||
/obj/item/stack/rods/New(var/loc, var/amount=null)
|
||||
..()
|
||||
|
||||
recipes = rod_recipes
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/rods/update_icon()
|
||||
var/amount = get_amount()
|
||||
if((amount <= 5) && (amount > 0))
|
||||
icon_state = "rods-[amount]"
|
||||
else
|
||||
icon_state = "rods"
|
||||
check_maptext(SMALL_FONTS(7, amount))
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
@@ -161,4 +152,4 @@ var/global/list/datum/stack_recipe/rod_recipes = list(
|
||||
SPAN_NOTICE("You assemble a liquidbag barricade."))
|
||||
SB.set_dir(user.dir)
|
||||
SB.add_fingerprint(user)
|
||||
use(build_stack)
|
||||
use(build_stack)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
name = "wired glass tile"
|
||||
singular_name = "wired glass floor tile"
|
||||
desc = "A glass tile, which is wired, somehow."
|
||||
icon = 'icons/obj/stacks/tiles.dmi'
|
||||
icon = 'icons/obj/item/stacks/tiles.dmi'
|
||||
icon_state = "glass_wire"
|
||||
created_window = null
|
||||
default_type = "wired glass"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
var/list/charge_costs = null
|
||||
var/list/datum/matter_synth/synths = null
|
||||
var/icon_has_variants = FALSE
|
||||
icon = 'icons/obj/stacks/materials.dmi'
|
||||
icon = 'icons/obj/item/stacks/materials.dmi'
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/stacks/lefthand_materials.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/stacks/righthand_materials.dmi',
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
max_amount = 60
|
||||
recyclable = TRUE
|
||||
icon = 'icons/obj/stacks/tiles.dmi'
|
||||
icon = 'icons/obj/item/stacks/tiles.dmi'
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/stacks/lefthand_tiles.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/stacks/righthand_tiles.dmi',
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
/obj/item/stack/tile/wood/coloured/birch
|
||||
name = "birch wood floor tile"
|
||||
color = WOOD_COLOR_BIRCH
|
||||
color = WOOD_COLOR_BIRCH
|
||||
build_type = /obj/item/stack/tile/wood/coloured/birch
|
||||
|
||||
/obj/item/stack/tile/wood/coloured/mahogany
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "wrapping paper"
|
||||
desc = "You can use this to wrap items in."
|
||||
desc_info = "To wrap something into a gift, click on the wrapping paper that's not in your hands with the object you wish to wrap."
|
||||
icon = 'icons/obj/stacks/wrap.dmi'
|
||||
icon = 'icons/obj/item/stacks/wrap.dmi'
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/stacks/lefthand_wrap.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/stacks/righthand_wrap.dmi',
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
/obj/item/stack/packageWrap
|
||||
name = "package wrapper"
|
||||
icon = 'icons/obj/stacks/wrap.dmi'
|
||||
icon = 'icons/obj/item/stacks/wrap.dmi'
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/stacks/lefthand_wrap.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/stacks/righthand_wrap.dmi',
|
||||
@@ -206,7 +206,7 @@
|
||||
/obj/item/c_tube
|
||||
name = "cardboard tube"
|
||||
desc = "A tube of cardboard."
|
||||
icon = 'icons/obj/stacks/wrap.dmi'
|
||||
icon = 'icons/obj/item/stacks/wrap.dmi'
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/stacks/lefthand_wrap.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/stacks/righthand_wrap.dmi',
|
||||
|
||||
@@ -14,7 +14,7 @@ MRE Stuff
|
||||
drop_sound = 'sound/items/drop/gloves.ogg'
|
||||
pickup_sound = 'sound/items/pickup/gloves.ogg'
|
||||
use_sound = 'sound/items/storage/wrapper.ogg'
|
||||
open_sound = 'sound/items/rip1.ogg'
|
||||
open_sound = /singleton/sound_category/rip_sound
|
||||
open_message = "You tear open the bag, breaking the vacuum seal."
|
||||
var/main_meal = /obj/item/storage/box/fancy/mrebag
|
||||
var/meal_desc = "This one is menu 1, meat pizza."
|
||||
@@ -223,7 +223,7 @@ MRE Stuff
|
||||
name = "dessert"
|
||||
desc = "A vacuum-sealed bag containing a MRE's dessert."
|
||||
icon_state = "pouch_small"
|
||||
open_sound = 'sound/items/rip1.ogg'
|
||||
open_sound = /singleton/sound_category/rip_sound
|
||||
open_message = "You tear open the bag, breaking the vacuum seal."
|
||||
starts_with = list(/obj/random/mre/dessert = 1)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(!H || !src || !H.organs_by_name[BP_HEAD] || !H.has_eyes() || H.glasses || (H.head && (H.head.body_parts_covered & FACE)))
|
||||
return
|
||||
|
||||
playsound(src, 'sound/items/tape.ogg',25)
|
||||
playsound(src, /singleton/sound_category/rip_sound, 25)
|
||||
user.visible_message("<span class='danger'>\The [user] has taped up \the [H]'s eyes!</span>")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/blindfold/tape(H), slot_glasses)
|
||||
H.update_inv_glasses()
|
||||
@@ -51,7 +51,7 @@
|
||||
to_chat(user, "<span class='warning'>Remove their [H.head] first.</span>")
|
||||
return
|
||||
|
||||
playsound(src, 'sound/items/tape.ogg',25)
|
||||
playsound(src, /singleton/sound_category/rip_sound, 25)
|
||||
user.visible_message("<span class='danger'>\The [user] begins taping up \the [H]'s mouth!</span>")
|
||||
|
||||
if(!do_after(user, 30))
|
||||
@@ -61,13 +61,13 @@
|
||||
if(!H || !src || !H.organs_by_name[BP_HEAD] || !H.check_has_mouth() || H.wear_mask || (H.head && (H.head.body_parts_covered & FACE)))
|
||||
return
|
||||
|
||||
playsound(src, 'sound/items/tape.ogg',25)
|
||||
playsound(src, /singleton/sound_category/rip_sound,25)
|
||||
user.visible_message("<span class='danger'>\The [user] has taped up \the [H]'s mouth!</span>")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/muzzle/tape(H), slot_wear_mask)
|
||||
H.update_inv_wear_mask()
|
||||
|
||||
else if(target_zone == BP_R_HAND || target_zone == BP_L_HAND)
|
||||
playsound(src, 'sound/items/tape.ogg',25)
|
||||
playsound(src, /singleton/sound_category/rip_sound,25)
|
||||
var/obj/item/handcuffs/cable/tape/T = new(user)
|
||||
if(!T.place_handcuffs(H, user))
|
||||
user.unEquip(T)
|
||||
@@ -140,7 +140,7 @@
|
||||
return // reduce papers around corners issue.
|
||||
|
||||
user.drop_from_inventory(src,source_turf)
|
||||
playsound(src, 'sound/items/tape.ogg',25)
|
||||
playsound(src, /singleton/sound_category/rip_sound,25)
|
||||
|
||||
if(params)
|
||||
var/list/mouse_control = mouse_safe_xy(params)
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
/obj/random/medical
|
||||
name = "Random Medicine"
|
||||
desc = "This is a random medical item."
|
||||
icon = 'icons/obj/stacks/medical.dmi'
|
||||
icon = 'icons/obj/item/stacks/medical.dmi'
|
||||
icon_state = "brutepack"
|
||||
spawn_nothing_percentage = 25
|
||||
problist = list(
|
||||
|
||||
Reference in New Issue
Block a user