From 4934ca596283b0c891d56a3e519072a8c30ea770 Mon Sep 17 00:00:00 2001 From: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Date: Fri, 12 Dec 2025 15:31:53 +0000 Subject: [PATCH] Silicon Hats are now Removed by Action Button (#31145) * Hats * Update silicon_mob.dm --- .../modules/mob/living/silicon/silicon_mob.dm | 49 +++++++++++++++++-- code/modules/mob/mob_emote.dm | 6 --- 2 files changed, 46 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/silicon/silicon_mob.dm b/code/modules/mob/living/silicon/silicon_mob.dm index 6a067da1c52..82cabcd6579 100644 --- a/code/modules/mob/living/silicon/silicon_mob.dm +++ b/code/modules/mob/living/silicon/silicon_mob.dm @@ -569,10 +569,48 @@ "You put [item_to_add] on [real_name]." ) silicon_hat = item_to_add + var/datum/action/A = new /datum/action/innate/drop_silicon_hat(src) + A.Grant(src) update_icons() return TRUE +/datum/action/innate/drop_silicon_hat + name = "Drop hat" + desc = "Discard your hat onto the ground." + +/datum/action/innate/drop_silicon_hat/apply_button_overlay(atom/movable/screen/movable/action_button/current_button) + current_button.cut_overlays() + var/mob/living/silicon/S = owner + button_icon = S.silicon_hat.icon + button_icon_state = S.silicon_hat.icon_state + if(button_icon && button_icon_state) + var/image/img = image(button_icon, current_button, "scan_mode") + img.appearance_flags = RESET_COLOR | RESET_ALPHA + current_button.overlays += img + +/datum/action/innate/drop_silicon_hat/Activate() + var/mob/living/silicon/S = owner + // Sillycones will not escape from the wrath of the shamebrero! + if(S.silicon_hat.flags & NODROP) + to_chat(S, "[S.silicon_hat] is stuck to your head! It is impossible to remove!") + return + + if(is_ai(S)) + S.visible_message( + "[S] ejects [S.silicon_hat] from [S.p_their()] hat storage area.", + "You eject [S.silicon_hat] from your hat storage area.", + "You hear a quiet pneumatic hiss followed by something landing on the floor." + ) + else + S.visible_message( + "[S] shakes [S.silicon_hat] off [S.p_their()] head.", + "You shake [S.silicon_hat] off your head.", + "You hear something land on the floor." + ) + S.drop_hat() + Remove(owner) + /** * Attempts to remove any hats a silicon is wearing. * @@ -585,12 +623,17 @@ to_chat(user, "[src] isn't wearing anything on their head!") return FALSE if(silicon_hat.flags & NODROP) - to_chat(user, "[silicon_hat.name] is stuck on [src]'s head, it is impossible to remove!") + to_chat(user, "[silicon_hat] is stuck on [src]'s head, it is impossible to remove!") return FALSE - to_chat(user, "You remove [silicon_hat.name] from [src]'s head.") + user.visible_message( + "[user] removes [silicon_hat] from [src]'s head!", + "You remove [silicon_hat] from [src]'s head!" + ) user.put_in_hands(silicon_hat) - + for(var/datum/action/A in src.actions) + if(A.name == "Drop hat") + A.Remove(src) null_hat() update_icons() diff --git a/code/modules/mob/mob_emote.dm b/code/modules/mob/mob_emote.dm index 185359d4027..a7bf591a820 100644 --- a/code/modules/mob/mob_emote.dm +++ b/code/modules/mob/mob_emote.dm @@ -161,12 +161,6 @@ user.SpinAnimation(5, 1) - if(isrobot(user)) - var/mob/living/silicon/robot/borg = user - if(borg.drop_hat()) - borg.visible_message("[user] drops their hat!", - "As you flip your hat falls off!") - if(prob(5) && ishuman(user) && !HAS_TRAIT(user, TRAIT_COOL)) var/turf = get_turf(L) message = "attempts a flip and [isspaceturf(turf) ? "loses balance" : "crashes to the floor"]!"