Refactors Medical Stacks

This commit is contained in:
Fox-McCloud
2016-07-21 12:26:21 -04:00
parent 212ba735ad
commit a4e7a41426
10 changed files with 133 additions and 163 deletions
+1 -1
View File
@@ -893,7 +893,7 @@
products = list(/obj/item/weapon/reagent_containers/glass/bottle/charcoal = 4,/obj/item/weapon/reagent_containers/glass/bottle/morphine = 4,/obj/item/weapon/reagent_containers/glass/bottle/ether = 4,/obj/item/weapon/reagent_containers/glass/bottle/epinephrine = 4,
/obj/item/weapon/reagent_containers/glass/bottle/toxin = 4,/obj/item/weapon/reagent_containers/syringe/antiviral = 6,/obj/item/weapon/reagent_containers/syringe/insulin = 4,
/obj/item/weapon/reagent_containers/syringe = 12,/obj/item/device/healthanalyzer = 5,/obj/item/device/healthupgrade = 5,/obj/item/weapon/reagent_containers/glass/beaker = 4,
/obj/item/weapon/reagent_containers/dropper = 2,/obj/item/stack/medical/advanced/bruise_pack = 3, /obj/item/stack/medical/advanced/ointment = 3,
/obj/item/weapon/reagent_containers/dropper = 2,/obj/item/stack/medical/bruise_pack/advanced = 3, /obj/item/stack/medical/ointment/advanced = 3,
/obj/item/stack/medical/bruise_pack = 3,/obj/item/stack/medical/splint = 2, /obj/item/device/sensor_device = 2)
contraband = list(/obj/item/weapon/reagent_containers/glass/bottle/pancuronium = 1,/obj/item/weapon/reagent_containers/glass/bottle/sulfonal = 1)
@@ -82,7 +82,7 @@
/obj/item/device/t_scanner = 60,
/obj/item/stack/cable_coil = 40,
/obj/item/stack/cable_coil{amount = 5} = 60,
/obj/item/stack/medical/advanced/bruise_pack = 10,
/obj/item/stack/medical/bruise_pack/advanced = 10,
/obj/item/stack/rods{amount = 10} = 80,
/obj/item/stack/rods{amount = 23} = 20,
/obj/item/stack/rods{amount = 50} = 10,
+100 -131
View File
@@ -5,12 +5,12 @@
amount = 5
max_amount = 5
w_class = 1
throw_speed = 4
throw_range = 20
throw_speed = 3
throw_range = 7
var/heal_brute = 0
var/heal_burn = 0
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
/obj/item/stack/medical/attack(mob/living/carbon/M, mob/user)
if(!istype(M))
to_chat(user, "<span class='danger'>\The [src] cannot be applied to [M]!</span>")
return 1
@@ -40,12 +40,15 @@
H.UpdateDamageIcon()
else
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>")
M.heal_organ_damage(heal_brute/2, 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>")
use(1)
M.updatehealth()
//Bruise Packs//
/obj/item/stack/medical/bruise_pack
name = "roll of gauze"
singular_name = "gauze length"
@@ -53,94 +56,7 @@
icon_state = "gauze"
origin_tech = "biotech=1"
/obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
if(..())
return 1
if(istype(M, /mob/living/carbon/human))
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.bandage())
to_chat(user, "\red The wounds on [M]'s [affecting.name] have already been bandaged.")
return 1
else
for(var/datum/wound/W in affecting.wounds)
if(W.internal)
continue
if(W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] bandages \the [W.desc] on [M]'s [affecting.name].", \
"\blue You bandage \the [W.desc] on [M]'s [affecting.name]." )
else if(istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places a bruise patch over \the [W.desc] on [M]'s [affecting.name].", \
"\blue You place a bruise patch over \the [W.desc] on [M]'s [affecting.name]." )
else
user.visible_message( "\blue [user] places a bandaid over \the [W.desc] on [M]'s [affecting.name].", \
"\blue You place a bandaid over \the [W.desc] on [M]'s [affecting.name]." )
affecting.heal_damage(src.heal_brute, src.heal_burn, 0)
use(1)
else
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
use(1)
/obj/item/stack/medical/ointment
name = "ointment"
desc = "Used to treat those nasty burns."
gender = PLURAL
singular_name = "ointment"
icon_state = "ointment"
heal_burn = 1
origin_tech = "biotech=1"
/obj/item/stack/medical/ointment/attack(mob/living/carbon/M as mob, mob/user as mob)
if(..())
return 1
if(istype(M, /mob/living/carbon/human))
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.salve())
to_chat(user, "\red The wounds on [M]'s [affecting.name] have already been salved.")
return 1
else
user.visible_message( "\blue [user] salves the wounds on [M]'s [affecting.name].", \
"\blue You salve the wounds on [M]'s [affecting.name]." )
affecting.heal_damage(src.heal_brute, src.heal_burn, 0)
use(1)
else
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than some ointment!</span>")
/obj/item/stack/medical/bruise_pack/comfrey
name = "\improper Comfrey leaf"
singular_name = "Comfrey leaf"
desc = "A soft leaf that is rubbed on bruises."
icon = 'icons/obj/hydroponics_products.dmi'
icon_state = "alien3-product"
color = "#378C61"
heal_brute = 7
/obj/item/stack/medical/ointment/aloe
name = "\improper Aloe Vera leaf"
singular_name = "Aloe Vera leaf"
desc = "A cold leaf that is rubbed on burns."
icon = 'icons/obj/hydroponics_products.dmi'
icon_state = "ambrosia-product"
color = "#4CC5C7"
heal_burn = 7
/obj/item/stack/medical/advanced/bruise_pack
name = "advanced trauma kit"
singular_name = "advanced trauma kit"
desc = "An advanced trauma kit for severe injuries."
icon_state = "traumakit"
heal_brute = 12
origin_tech = "biotech=1"
/obj/item/stack/medical/advanced/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
/obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M, mob/user)
if(..())
return 1
@@ -153,38 +69,49 @@
var/disinfected = affecting.disinfect()
if(!(bandaged || disinfected))
to_chat(user, "\red The wounds on [M]'s [affecting.name] have already been treated.")
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>")
return 1
else
for(var/datum/wound/W in affecting.wounds)
if(W.internal)
continue
if(W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] cleans \the [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.", \
"\blue You clean and seal \the [W.desc] on [M]'s [affecting.name]." )
//H.add_side_effect("Itch")
user.visible_message("<span class='notice'>[user] bandages \the [W.desc] on [M]'s [affecting.name].</span>", \
"<span class='notice'>You bandage \the [W.desc] on [M]'s [affecting.name].</span>" )
else if(istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places a medicine patch over \the [W.desc] on [M]'s [affecting.name].", \
"\blue You place a medicine patch over \the [W.desc] on [M]'s [affecting.name]." )
user.visible_message("<span class='notice'>[user] places a bruise patch over \the [W.desc] on [M]'s [affecting.name].</span>", \
"<span class='notice'>You place a bruise patch over \the [W.desc] on [M]'s [affecting.name].</span>" )
else
user.visible_message( "\blue [user] smears some bioglue over [W.desc] on [M]'s [affecting.name].", \
"\blue You smear some bioglue over [W.desc] on [M]'s [affecting.name]." )
user.visible_message("<span class='notice'>[user] places a bandaid over \the [W.desc] on [M]'s [affecting.name].</span>", \
"<span class='notice'>You place a bandaid over \the [W.desc] on [M]'s [affecting.name].</span>" )
if(bandaged)
affecting.heal_damage(heal_brute,0)
affecting.heal_damage(heal_brute, heal_burn)
use(1)
else
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
/obj/item/stack/medical/advanced/ointment
name = "advanced burn kit"
singular_name = "advanced burn kit"
desc = "An advanced treatment kit for severe burns."
icon_state = "burnkit"
heal_burn = 12
/obj/item/stack/medical/bruise_pack/advanced
name = "advanced trauma kit"
singular_name = "advanced trauma kit"
desc = "An advanced trauma kit for severe injuries."
icon_state = "traumakit"
heal_brute = 12
//Ointment//
/obj/item/stack/medical/ointment
name = "ointment"
desc = "Used to treat those nasty burns."
gender = PLURAL
singular_name = "ointment"
icon_state = "ointment"
origin_tech = "biotech=1"
/obj/item/stack/medical/advanced/ointment/attack(mob/living/carbon/M as mob, mob/user as mob)
/obj/item/stack/medical/ointment/attack(mob/living/carbon/M, mob/user)
if(..())
return 1
@@ -194,15 +121,52 @@
if(affecting.open == 0)
if(!affecting.salve())
to_chat(user, "\red The wounds on [M]'s [affecting.name] have already been salved.")
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
return 1
else
user.visible_message( "\blue [user] covers the wounds on [M]'s [affecting.name] with regenerative membrane.", \
"\blue You cover the wounds on [M]'s [affecting.name] with regenerative membrane." )
affecting.heal_damage(0,heal_burn)
user.visible_message("<span class='notice'>[user] salves the wounds on [M]'s [affecting.name].", \
"<span class='notice'>You salve the wounds on [M]'s [affecting.name].</span>" )
affecting.heal_damage(heal_brute, heal_burn)
use(1)
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 class='notice'>The [affecting.name] is cut open, you'll need more than some ointment!</span>")
/obj/item/stack/medical/ointment/advanced
name = "advanced burn kit"
singular_name = "advanced burn kit"
desc = "An advanced treatment kit for severe burns."
icon_state = "burnkit"
heal_burn = 12
//Medical Herbs//
/obj/item/stack/medical/bruise_pack/comfrey
name = "\improper Comfrey leaf"
singular_name = "Comfrey leaf"
desc = "A soft leaf that is rubbed on bruises."
icon = 'icons/obj/hydroponics_products.dmi'
icon_state = "alien3-product"
color = "#378C61"
heal_brute = 7
/obj/item/stack/medical/ointment/aloe
name = "\improper Aloe Vera leaf"
singular_name = "Aloe Vera leaf"
desc = "A cold leaf that is rubbed on burns."
icon = 'icons/obj/hydroponics_products.dmi'
icon_state = "ambrosia-product"
color = "#4CC5C7"
heal_burn = 7
//Splits//
/obj/item/stack/medical/splint
name = "medical splints"
@@ -211,11 +175,7 @@
amount = 5
max_amount = 5
/obj/item/stack/medical/splint/single
amount = 1
/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/user as mob)
/obj/item/stack/medical/splint/attack(mob/living/carbon/M, mob/user)
if(..())
return 1
@@ -224,30 +184,39 @@
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/limb = affecting.name
if(!(affecting.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")))
to_chat(user, "\red You can't apply a splint there!")
to_chat(user, "<span class='danger'>You can't apply a splint there!</span>")
return
if(affecting.status & ORGAN_SPLINTED)
to_chat(user, "\red [M]'s [limb] is already splinted!")
to_chat(user, "<span class='danger'>[M]'s [limb] is already splinted!</span>")
if(alert(user, "Would you like to remove the splint from [M]'s [limb]?", "Removing.", "Yes", "No") == "Yes")
affecting.status &= ~ORGAN_SPLINTED
to_chat(user, "<span class='notice'>You remove the splint from [M]'s [limb].")
to_chat(user, "<span class='notice'>You remove the splint from [M]'s [limb].</span>")
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.")
user.visible_message("<span class='notice'>[user] starts to apply \the [src] to [M]'s [limb].</span>", \
"<span class='notice'>You start to apply \the [src] to [M]'s [limb].</span>", \
"<span class='notice'>You hear something being wrapped.</span>")
else
if((!user.hand && affecting.limb_name in list("r_arm", "r_hand")) || (user.hand && affecting.limb_name in list("l_arm", "l_hand")))
to_chat(user, "\red You can't apply a splint to the arm you're using!")
to_chat(user, "<span class='danger'>You can't apply a splint to the arm you're using!</span>")
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.")
user.visible_message("<span class='notice'>[user] starts to apply \the [src] to their [limb].</span>", \
"<span class='notice'>You start to apply \the [src] to your [limb].</span>", \
"<span class='notice'>You hear something being wrapped.</span>")
if(do_after(user, 50, target = M))
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.")
user.visible_message("<span class='notice'>[user] finishes applying \the [src] to [M]'s [limb].</span>", \
"<span class='notice'>You finish applying \the [src] to [M]'s [limb].</span>", \
"<span class='notice'>You hear something being wrapped.</span>")
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.")
user.visible_message("<span class='notice'>[user] successfully applies \the [src] to their [limb].</span>", \
"<span class='notice'>You successfully apply \the [src] to your [limb].</span>", \
"<span class='notice'>You hear something being wrapped.</span>")
else
user.visible_message("\red [user] fumbles \the [src].", "\red You fumble \the [src].", "\red You hear something being wrapped.")
user.visible_message("<span class='warning'>[user] fumbles \the [src].</span>",
"<span class='warning'>You fumble \the [src].</span>",
"<span class='warning'>You hear something being wrapped.</span>")
return
affecting.status |= ORGAN_SPLINTED
use(1)
return
use(1)
@@ -140,11 +140,11 @@
..()
if(empty) return
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/bruise_pack/advanced(src)
new /obj/item/stack/medical/bruise_pack/advanced(src)
new /obj/item/stack/medical/bruise_pack/advanced(src)
new /obj/item/stack/medical/ointment/advanced(src)
new /obj/item/stack/medical/ointment/advanced(src)
new /obj/item/stack/medical/splint(src)
return
@@ -119,8 +119,8 @@
module_type = "Medical"
subsystems = list(/mob/living/silicon/proc/subsystem_crew_monitor)
stacktypes = list(
/obj/item/stack/medical/advanced/bruise_pack = 5,
/obj/item/stack/medical/advanced/ointment = 5,
/obj/item/stack/medical/bruise_pack/advanced = 5,
/obj/item/stack/medical/ointment/advanced = 5,
/obj/item/stack/medical/splint = 5,
/obj/item/stack/nanopaste = 5
)
@@ -136,8 +136,8 @@
src.modules += new /obj/item/weapon/reagent_containers/dropper(src)
src.modules += new /obj/item/weapon/reagent_containers/syringe(src)
src.modules += new /obj/item/weapon/extinguisher/mini(src)
src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src)
src.modules += new /obj/item/stack/medical/advanced/ointment(src)
src.modules += new /obj/item/stack/medical/bruise_pack/advanced(src)
src.modules += new /obj/item/stack/medical/ointment/advanced(src)
src.modules += new /obj/item/stack/medical/splint(src)
src.modules += new /obj/item/stack/nanopaste(src)
src.modules += new /obj/item/weapon/scalpel(src)
@@ -362,8 +362,8 @@
name = "syndicate medical robot module"
module_type = "Malf"
stacktypes = list(
/obj/item/stack/medical/advanced/bruise_pack = 25,
/obj/item/stack/medical/advanced/ointment = 25,
/obj/item/stack/medical/bruise_pack/advanced = 25,
/obj/item/stack/medical/ointment/advanced = 25,
/obj/item/stack/medical/splint = 25,
/obj/item/stack/nanopaste = 25
)
@@ -376,8 +376,8 @@
src.modules += new /obj/item/roller_holder(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo/syndicate(src)
src.modules += new /obj/item/weapon/extinguisher/mini(src)
src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src)
src.modules += new /obj/item/stack/medical/advanced/ointment(src)
src.modules += new /obj/item/stack/medical/bruise_pack/advanced(src)
src.modules += new /obj/item/stack/medical/ointment/advanced(src)
src.modules += new /obj/item/stack/medical/splint(src)
src.modules += new /obj/item/stack/nanopaste(src)
src.modules += new /obj/item/weapon/scalpel(src)
+8 -7
View File
@@ -72,7 +72,7 @@
name = "manipulate organs"
allowed_tools = list(/obj/item/organ/internal = 100, /obj/item/weapon/reagent_containers/food/snacks/organ = 0)
var/implements_extract = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/kitchen/utensil/fork = 55)
var/implements_mend = list(/obj/item/stack/medical/advanced/bruise_pack = 100,/obj/item/stack/nanopaste = 100,/obj/item/stack/medical/bruise_pack = 20)
var/implements_mend = list(/obj/item/stack/medical/bruise_pack = 20,/obj/item/stack/medical/bruise_pack/advanced = 100,/obj/item/stack/nanopaste = 100)
//Finish is just so you can close up after you do other things.
var/implements_finsh = list(/obj/item/weapon/scalpel/manager = 120,/obj/item/weapon/retractor = 100 ,/obj/item/weapon/crowbar = 75)
var/current_type
@@ -156,10 +156,10 @@
else if(implement_type in implements_mend)
current_type = "mend"
var/tool_name = "\the [tool]"
if(istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
tool_name = "regenerative membrane"
else if(istype(tool, /obj/item/stack/medical/bruise_pack))
if(istype(tool, /obj/item/stack/medical/bruise_pack))
tool_name = "the bandaid"
if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced))
tool_name = "regenerative membrane"
else if(istype(tool, /obj/item/stack/nanopaste))
tool_name = "\the [tool]" //what else do you call nanopaste medically?
@@ -177,7 +177,8 @@
user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \
"You start treating damage to [target]'s [I.name] with [tool_name]." )
to_chat(user, "[I] does not appear to be damaged.")
else
to_chat(user, "[I] does not appear to be damaged.")
H.custom_pain("The pain in your [affected.name] is living hell!",1)
else if(istype(tool, /obj/item/weapon/reagent_containers/food/snacks/organ))
@@ -188,7 +189,7 @@
/datum/surgery_step/internal/manipulate_organs/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
if(current_type == "mend")
var/tool_name = "\the [tool]"
if(istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced))
tool_name = "regenerative membrane"
if(istype(tool, /obj/item/stack/medical/bruise_pack))
tool_name = "the bandaid"
@@ -266,7 +267,7 @@
"<span class='warning'> Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>")
var/dam_amt = 2
if(istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced))
target.adjustToxLoss(5)
else if(istype(tool, /obj/item/stack/medical/bruise_pack) || istype(tool, /obj/item/stack/nanopaste))