mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 23:48:28 +01:00
Implement head pocket
This commit is contained in:
@@ -348,7 +348,8 @@ This function completely restores a damaged organ to perfect condition.
|
||||
burn_dam = 0
|
||||
open = 0 //Closing all wounds.
|
||||
wounds.Cut() //Clears all wounds! Good as new.
|
||||
if(istype(src, /obj/item/organ/external/head) && disfigured) //If their head's disfigured, refigure it.
|
||||
if(istype(src, /obj/item/organ/external/
|
||||
) && disfigured) //If their head's disfigured, refigure it.
|
||||
disfigured = 0
|
||||
|
||||
// handle internal organs
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
/obj/item/organ/internal/liver/skrell
|
||||
alcohol_intensity = 4
|
||||
species = "Skrell"
|
||||
|
||||
/obj/item/organ/internal/headpocket
|
||||
name = "headpocket"
|
||||
desc = "Allows Skrell to hide tiny objects within their head tentacles."
|
||||
icon_state = "kid_lantern"
|
||||
origin_tech = "biotech=2"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
parent_organ = "head"
|
||||
slot = "headpocket"
|
||||
species = "Skrell"
|
||||
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
||||
var/obj/item/weapon/storage/internal/pocket
|
||||
|
||||
/obj/item/organ/internal/headpocket/New()
|
||||
pocket = new /obj/item/weapon/storage/internal(src)
|
||||
pocket.storage_slots = 1
|
||||
//fit only pocket sized items
|
||||
pocket.max_w_class = 2
|
||||
pocket.max_combined_w_class = 2
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/headpocket/ui_action_click()
|
||||
var/obj/item/hand_item = owner.get_active_hand()
|
||||
if(hand_item)
|
||||
// Store item
|
||||
if(pocket.can_be_inserted(hand_item))
|
||||
pocket.handle_item_insertion(hand_item)
|
||||
return
|
||||
// Try to remove item
|
||||
if(pocket.contents.len)
|
||||
pocket.remove_from_storage(pocket.contents.len, get_turf(owner))
|
||||
|
||||
Reference in New Issue
Block a user