mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-17 02:47:58 +01:00
Ports makeshift splints (#6603)
This pr ports makeshift splints from polaris. You can make them with rods and duct tape, they can only splint arms and legs.
This commit is contained in:
@@ -340,11 +340,13 @@ Contains:
|
||||
|
||||
/obj/item/stack/medical/splint
|
||||
name = "medical splints"
|
||||
desc = "Modular splints capable of supporting and immobilizing bones in both limbs and appendages."
|
||||
singular_name = "medical splint"
|
||||
icon_state = "splint"
|
||||
amount = 5
|
||||
max_amount = 5
|
||||
drop_sound = 'sound/items/drop/hat.ogg'
|
||||
var/list/splintable_organs = list("l_arm","r_arm","l_leg","r_leg", "l_hand", "r_hand", "r_foot", "l_foot")
|
||||
|
||||
/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if(..())
|
||||
@@ -354,7 +356,7 @@ Contains:
|
||||
var/mob/living/carbon/human/H = M
|
||||
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_leg","r_leg", "l_hand", "r_hand", "r_foot", "l_foot")))
|
||||
if(!(affecting.limb_name in splintable_organs))
|
||||
to_chat(user, "<span class='danger'>You can't apply a splint there!</span>")
|
||||
return
|
||||
if(affecting.status & ORGAN_SPLINTED)
|
||||
@@ -381,3 +383,10 @@ Contains:
|
||||
return
|
||||
|
||||
|
||||
/obj/item/stack/medical/splint/makeshift
|
||||
name = "makeshift splints"
|
||||
singular_name = "makeshift splint"
|
||||
desc = "For holding your limbs in place with duct tape and scrap metal."
|
||||
icon_state = "tape-splint"
|
||||
amount = 1
|
||||
splintable_organs = list("l_arm","r_arm","l_leg","r_leg")
|
||||
@@ -71,4 +71,14 @@ var/global/list/datum/stack_recipe/rod_recipes = list(
|
||||
if (!R && replace)
|
||||
user.put_in_hands(new_item)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/tape_roll))
|
||||
var/obj/item/stack/medical/splint/makeshift/new_splint = new(user.loc)
|
||||
new_splint.add_fingerprint(user)
|
||||
|
||||
user.visible_message("<span class='notice'>\The [user] constructs \a [new_splint] out of a [singular_name].</span>", \
|
||||
"<span class='notice'>You use make \a [new_splint] out of a [singular_name].</span>")
|
||||
use(1)
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user