mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-18 11:30:35 +01:00
Headtail Storage (#10640)
This commit is contained in:
@@ -405,6 +405,7 @@
|
||||
dat += "<BR><A href='?src=\ref[src];item=tie'>Remove accessory</A>"
|
||||
dat += "<BR><A href='?src=\ref[src];item=splints'>Remove splints</A>"
|
||||
dat += "<BR><A href='?src=\ref[src];item=pockets'>Empty pockets</A>"
|
||||
dat += species.get_strip_info("\ref[src]")
|
||||
dat += "<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>"
|
||||
|
||||
@@ -591,6 +592,9 @@
|
||||
if(href_list["item"])
|
||||
handle_strip(href_list["item"],usr)
|
||||
|
||||
if(href_list["species"])
|
||||
species.handle_strip(usr, src, href_list["species"])
|
||||
|
||||
if(href_list["criminal"])
|
||||
if(hasHUD(usr,"security"))
|
||||
|
||||
|
||||
@@ -633,6 +633,12 @@
|
||||
/datum/species/proc/handle_despawn()
|
||||
return
|
||||
|
||||
/datum/species/proc/handle_strip(var/mob/user, var/mob/living/carbon/human/H, var/action)
|
||||
return
|
||||
|
||||
/datum/species/proc/get_strip_info(var/reference)
|
||||
return ""
|
||||
|
||||
/datum/species/proc/get_pain_emote(var/mob/living/carbon/human/H, var/pain_power)
|
||||
if(flags & NO_PAIN)
|
||||
return
|
||||
|
||||
@@ -34,6 +34,20 @@
|
||||
appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_SOCKS
|
||||
flags = NO_SLIP
|
||||
|
||||
has_limbs = list(
|
||||
BP_CHEST = list("path" = /obj/item/organ/external/chest),
|
||||
BP_GROIN = list("path" = /obj/item/organ/external/groin),
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/skrell),
|
||||
BP_L_ARM = list("path" = /obj/item/organ/external/arm),
|
||||
BP_R_ARM = list("path" = /obj/item/organ/external/arm/right),
|
||||
BP_L_LEG = list("path" = /obj/item/organ/external/leg),
|
||||
BP_R_LEG = list("path" = /obj/item/organ/external/leg/right),
|
||||
BP_L_HAND = list("path" = /obj/item/organ/external/hand),
|
||||
BP_R_HAND = list("path" = /obj/item/organ/external/hand/right),
|
||||
BP_L_FOOT = list("path" = /obj/item/organ/external/foot),
|
||||
BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right)
|
||||
)
|
||||
|
||||
has_organ = list(
|
||||
BP_HEART = /obj/item/organ/internal/heart/skrell,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs/skrell,
|
||||
@@ -71,6 +85,25 @@
|
||||
/datum/species/skrell/handle_post_spawn(mob/living/carbon/human/H)
|
||||
H.set_psi_rank(PSI_COERCION, PSI_RANK_OPERANT)
|
||||
|
||||
/datum/species/skrell/handle_strip(var/mob/user, var/mob/living/carbon/human/H, var/action)
|
||||
switch(action)
|
||||
if("headtail")
|
||||
if(!H.head)
|
||||
to_chat(user, SPAN_WARNING("\The [H] doesn't have a head!"))
|
||||
return
|
||||
user.visible_message(SPAN_WARNING("\The [user] is trying to remove something from \the [H]'s headtails!"))
|
||||
if(do_after(usr, HUMAN_STRIP_DELAY, act_target = H))
|
||||
var/obj/item/storage/internal/skrell/S = locate() in H.head
|
||||
var/obj/item/I = locate() in S
|
||||
if(!I)
|
||||
to_chat(usr, SPAN_WARNING("\The [H] had nothing in their headtail storage."))
|
||||
return
|
||||
S.remove_from_storage(I, get_turf(H))
|
||||
return
|
||||
|
||||
/datum/species/skrell/get_strip_info(var/reference)
|
||||
return "<BR><A href='?src=[reference];species=headtail'>Empty Headtail Storage</A>"
|
||||
|
||||
/datum/species/skrell/can_breathe_water()
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -16,3 +16,33 @@
|
||||
|
||||
/obj/item/organ/internal/brain/skrell
|
||||
icon_state = "brain_skrell"
|
||||
|
||||
/obj/item/organ/external/head/skrell
|
||||
var/obj/item/storage/internal/skrell/storage
|
||||
action_button_name = "Headtail Pocket"
|
||||
|
||||
/obj/item/organ/external/head/skrell/Initialize(mapload)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/setup_storage), 3 SECONDS)
|
||||
|
||||
/obj/item/organ/external/head/skrell/proc/setup_storage()
|
||||
storage = new /obj/item/storage/internal/skrell(src)
|
||||
if(owner)
|
||||
storage.color = rgb(owner.r_hair, owner.g_hair, owner.b_hair)
|
||||
refresh_action_button()
|
||||
|
||||
/obj/item/organ/external/head/skrell/refresh_action_button()
|
||||
. = ..()
|
||||
if(. && storage)
|
||||
action.button_icon_state = storage.icon_state
|
||||
action.button_icon_color = storage.color
|
||||
if(action.button)
|
||||
action.button.update_icon()
|
||||
|
||||
/obj/item/organ/external/head/skrell/removed()
|
||||
. = ..()
|
||||
for(var/thing in storage)
|
||||
storage.remove_from_storage(thing, get_turf(src))
|
||||
|
||||
/obj/item/organ/external/head/skrell/attack_self(mob/user)
|
||||
storage.open(user)
|
||||
Reference in New Issue
Block a user