mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Remove reagent ids and use typepaths where applicable * Remove reagent ids and use typepaths where applicable * Resolves some easier conflicts * Resolves medical_tools.dm * Resolves robots.dm * Handles cinnamon Wow, I cannot do this manually. Fuckin' regex time. * Removes 27 merge conflicts (!!!!!) * Makes it actually half-attempt to compile * I just -- I give up, it's over * mk * mk * mk * hm * ok * what a bloody chain reaction jesus * ok * and done * went threw and changed the ones I missed * ok * dangit altoids hurry the fek up * Fixes whatever I found find thru this regex: reagents[\s\w]*=[\s\w]*list\([^\/]+\)
174 lines
6.3 KiB
Plaintext
174 lines
6.3 KiB
Plaintext
/obj/item/stack/medical
|
|
name = "medical pack"
|
|
singular_name = "medical pack"
|
|
icon = 'icons/obj/stack_objects.dmi'
|
|
amount = 6
|
|
max_amount = 6
|
|
w_class = WEIGHT_CLASS_TINY
|
|
full_w_class = WEIGHT_CLASS_TINY
|
|
throw_speed = 3
|
|
throw_range = 7
|
|
resistance_flags = FLAMMABLE
|
|
max_integrity = 40
|
|
novariants = FALSE
|
|
var/heal_brute = 0
|
|
var/heal_burn = 0
|
|
var/stop_bleeding = 0
|
|
var/self_delay = 50
|
|
|
|
/obj/item/stack/medical/attack(mob/living/M, mob/user)
|
|
|
|
if(M.stat == DEAD && !stop_bleeding)
|
|
var/t_him = "it"
|
|
if(M.gender == MALE)
|
|
t_him = "him"
|
|
else if(M.gender == FEMALE)
|
|
t_him = "her"
|
|
to_chat(user, "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>")
|
|
return
|
|
|
|
if(!iscarbon(M) && !isanimal(M))
|
|
to_chat(user, "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>")
|
|
return 1
|
|
|
|
var/obj/item/bodypart/affecting
|
|
if(iscarbon(M))
|
|
var/mob/living/carbon/C = M
|
|
affecting = C.get_bodypart(check_zone(user.zone_selected))
|
|
if(!affecting) //Missing limb?
|
|
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
|
return
|
|
if(ishuman(C))
|
|
var/mob/living/carbon/human/H = C
|
|
if(stop_bleeding)
|
|
if(H.bleedsuppress)
|
|
to_chat(user, "<span class='warning'>[H]'s bleeding is already bandaged!</span>")
|
|
return
|
|
else if(!H.bleed_rate)
|
|
to_chat(user, "<span class='warning'>[H] isn't bleeding!</span>")
|
|
return
|
|
|
|
|
|
if(isliving(M))
|
|
if(!M.can_inject(user, 1))
|
|
return
|
|
|
|
if(user)
|
|
if (M != user)
|
|
if (isanimal(M))
|
|
var/mob/living/simple_animal/critter = M
|
|
if (!(critter.healable))
|
|
to_chat(user, "<span class='notice'> You cannot use [src] on [M]!</span>")
|
|
return
|
|
else if (critter.health == critter.maxHealth)
|
|
to_chat(user, "<span class='notice'> [M] is at full health.</span>")
|
|
return
|
|
else if(src.heal_brute < 1)
|
|
to_chat(user, "<span class='notice'> [src] won't help [M] at all.</span>")
|
|
return
|
|
user.visible_message("<span class='green'>[user] applies [src] on [M].</span>", "<span class='green'>You apply [src] on [M].</span>")
|
|
else
|
|
var/t_himself = "itself"
|
|
if(user.gender == MALE)
|
|
t_himself = "himself"
|
|
else if(user.gender == FEMALE)
|
|
t_himself = "herself"
|
|
user.visible_message("<span class='notice'>[user] starts to apply [src] on [t_himself]...</span>", "<span class='notice'>You begin applying [src] on yourself...</span>")
|
|
if(!do_mob(user, M, self_delay, extra_checks=CALLBACK(M, /mob/living/proc/can_inject, user, TRUE)))
|
|
return
|
|
user.visible_message("<span class='green'>[user] applies [src] on [t_himself].</span>", "<span class='green'>You apply [src] on yourself.</span>")
|
|
|
|
|
|
if(iscarbon(M))
|
|
var/mob/living/carbon/C = M
|
|
affecting = C.get_bodypart(check_zone(user.zone_selected))
|
|
if(!affecting) //Missing limb?
|
|
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
|
return
|
|
if(ishuman(C))
|
|
var/mob/living/carbon/human/H = C
|
|
if(stop_bleeding)
|
|
if(!H.bleedsuppress) //so you can't stack bleed suppression
|
|
H.suppress_bloodloss(stop_bleeding)
|
|
if(affecting.status == BODYPART_ORGANIC) //Limb must be organic to be healed - RR
|
|
if(affecting.heal_damage(heal_brute, heal_burn))
|
|
C.update_damage_overlays()
|
|
else
|
|
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
|
|
else
|
|
M.heal_bodypart_damage((src.heal_brute/2), (src.heal_burn/2))
|
|
|
|
use(1)
|
|
|
|
|
|
|
|
/obj/item/stack/medical/bruise_pack
|
|
name = "bruise pack"
|
|
singular_name = "bruise pack"
|
|
desc = "A therapeutic gel pack and bandages designed to treat blunt-force trauma."
|
|
icon_state = "brutepack"
|
|
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
|
heal_brute = 40
|
|
self_delay = 20
|
|
grind_results = list(/datum/reagent/medicine/styptic_powder = 10)
|
|
|
|
/obj/item/stack/medical/bruise_pack/suicide_act(mob/user)
|
|
user.visible_message("<span class='suicide'>[user] is bludgeoning [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
|
return (BRUTELOSS)
|
|
|
|
/obj/item/stack/medical/gauze
|
|
name = "medical gauze"
|
|
desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, but does not heal wounds."
|
|
gender = PLURAL
|
|
singular_name = "medical gauze"
|
|
icon_state = "gauze"
|
|
stop_bleeding = 1800
|
|
self_delay = 20
|
|
max_amount = 12
|
|
|
|
|
|
/obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params)
|
|
if(I.tool_behaviour == TOOL_WIRECUTTER || I.is_sharp())
|
|
if(get_amount() < 2)
|
|
to_chat(user, "<span class='warning'>You need at least two gauzes to do this!</span>")
|
|
return
|
|
new /obj/item/stack/sheet/cloth(user.drop_location())
|
|
user.visible_message("[user] cuts [src] into pieces of cloth with [I].", \
|
|
"<span class='notice'>You cut [src] into pieces of cloth with [I].</span>", \
|
|
"<span class='italics'>You hear cutting.</span>")
|
|
use(2)
|
|
else
|
|
return ..()
|
|
|
|
/obj/item/stack/medical/gauze/suicide_act(mob/living/user)
|
|
user.visible_message("<span class='suicide'>[user] begins tightening \the [src] around [user.p_their()] neck! It looks like [user.p_they()] forgot how to use medical supplies!</span>")
|
|
return OXYLOSS
|
|
|
|
/obj/item/stack/medical/gauze/improvised
|
|
name = "improvised gauze"
|
|
singular_name = "improvised gauze"
|
|
desc = "A roll of cloth roughly cut from something that can stop bleeding, but does not heal wounds."
|
|
stop_bleeding = 900
|
|
|
|
/obj/item/stack/medical/gauze/cyborg
|
|
materials = list()
|
|
is_cyborg = 1
|
|
cost = 250
|
|
|
|
/obj/item/stack/medical/ointment
|
|
name = "ointment"
|
|
desc = "Used to treat those nasty burn wounds."
|
|
gender = PLURAL
|
|
singular_name = "ointment"
|
|
icon_state = "ointment"
|
|
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
|
heal_burn = 40
|
|
self_delay = 20
|
|
grind_results = list(/datum/reagent/medicine/silver_sulfadiazine = 10)
|
|
|
|
/obj/item/stack/medical/ointment/suicide_act(mob/living/user)
|
|
user.visible_message("<span class='suicide'>[user] is squeezing \the [src] into [user.p_their()] mouth! [user.p_do(TRUE)]n't [user.p_they()] know that stuff is toxic?</span>")
|
|
return TOXLOSS
|