Implement head pocket

This commit is contained in:
Tayyyyyyy
2017-05-22 02:01:05 -07:00
parent 0de4b320fa
commit a005a3e553
3 changed files with 35 additions and 2 deletions
@@ -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))