diff --git a/code/_onclick/hud/action.dm b/code/_onclick/hud/action.dm index 712728aa861..4498c7406f1 100644 --- a/code/_onclick/hud/action.dm +++ b/code/_onclick/hud/action.dm @@ -22,6 +22,7 @@ var/obj/screen/movable/action_button/button = null var/button_icon = 'icons/obj/action_buttons/actions.dmi' var/button_icon_state = "default" + var/button_icon_color var/background_icon_state = "bg_default" var/mob/living/owner @@ -146,6 +147,8 @@ img = image(owner.button_icon,src,owner.button_icon_state) img.pixel_x = 0 img.pixel_y = 0 + if(owner.button_icon_color) + img.color = owner.button_icon_color add_overlay(img) if(!owner.IsAvailable()) diff --git a/code/game/objects/items/weapons/storage/internal.dm b/code/game/objects/items/weapons/storage/internal.dm index 6d06d886c09..fd1dd16c733 100644 --- a/code/game/objects/items/weapons/storage/internal.dm +++ b/code/game/objects/items/weapons/storage/internal.dm @@ -84,3 +84,16 @@ /obj/item/storage/internal/Adjacent(var/atom/neighbor) return master_item.Adjacent(neighbor) + +/obj/item/storage/internal/skrell + name = "headtail storage" + icon = 'icons/obj/action_buttons/organs.dmi' + icon_state = "skrell_headpocket" + storage_slots = 1 + max_storage_space = 2 + max_w_class = ITEMSIZE_SMALL + use_sound = null + +/obj/item/storage/internal/skrell/Initialize() + . = ..() + name = initial(name) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 2735ffd527f..faf50d6f395 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -405,6 +405,7 @@ dat += "
Remove accessory" dat += "
Remove splints" dat += "
Empty pockets" + dat += species.get_strip_info("\ref[src]") dat += "
Refresh" dat += "
Close" @@ -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")) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index fee31909504..0ef58d42aee 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm b/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm index 1aea53b69a7..e5ee3267085 100644 --- a/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm +++ b/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm @@ -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 "
Empty Headtail Storage" + /datum/species/skrell/can_breathe_water() return TRUE diff --git a/code/modules/organs/subtypes/skrell.dm b/code/modules/organs/subtypes/skrell.dm index e2edca8c0cb..25260267f43 100644 --- a/code/modules/organs/subtypes/skrell.dm +++ b/code/modules/organs/subtypes/skrell.dm @@ -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) \ No newline at end of file diff --git a/html/changelogs/geeves-headtail_pockets.yml b/html/changelogs/geeves-headtail_pockets.yml new file mode 100644 index 00000000000..46546e4e075 --- /dev/null +++ b/html/changelogs/geeves-headtail_pockets.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Skrell can now store a single small item in their headtails via an ability in the top left corner of their screen. It can be emptied via the strip menu, same as pockets." \ No newline at end of file diff --git a/icons/obj/action_buttons/organs.dmi b/icons/obj/action_buttons/organs.dmi index 8fd0fee2f28..698fa8ea49d 100644 Binary files a/icons/obj/action_buttons/organs.dmi and b/icons/obj/action_buttons/organs.dmi differ