From c4744f419b92468aede7d0b7cf681ff92834e6fc Mon Sep 17 00:00:00 2001 From: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Date: Mon, 6 Feb 2023 00:56:43 +0530 Subject: [PATCH] Adds examine, balloon alert & screen tips for Meat Spike Frame (#73126) ## About The Pull Request - Examining a meat spike frame will tell how you can either deconstruct it with an welding tool or add spikes to it with iron rods - Examining a meat spike will tell you how to remove its spikes and how to basically use it - A balloon alert will pop up if you don't have enough iron rods to add spikes to a meat spike frame - Screen tips when holding the correct tool are displayed ## Why It's Good For The Game New players don't have to wiki this and honestly i got confused the first time i used it so there is that. More information basically ## Changelog :cl: qol: examining a meat spike frame & meat spike will tell you about itself /:cl: --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: san7890 --- code/game/objects/structures/kitchen_spike.dm | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 90b98578525..ab2ffafe421 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -9,6 +9,27 @@ anchored = FALSE max_integrity = 200 +/obj/structure/kitchenspike_frame/Initialize(mapload) + . = ..() + register_context() + +/obj/structure/kitchenspike_frame/examine(mob/user) + . = ..() + . += "It can be welded apart." + . += "You could attach [MEATSPIKE_IRONROD_REQUIREMENT] iron rods to it to create a Meat Spike." + +/obj/structure/kitchenspike_frame/add_context(atom/source, list/context, obj/item/held_item, mob/living/user) + var/message = "" + if(held_item.tool_behaviour == TOOL_WELDER) + message = "Deconstruct" + else if(held_item.tool_behaviour == TOOL_WRENCH) + message = "Bolt Down Frame" + + if(!message) + return NONE + context[SCREENTIP_CONTEXT_LMB] = message + return CONTEXTUAL_SCREENTIP_SET + /obj/structure/kitchenspike_frame/welder_act(mob/living/user, obj/item/tool) if(!tool.tool_start_check(user, amount = 0)) return FALSE @@ -33,10 +54,12 @@ var/obj/item/stack/rods/used_rods = attacking_item if(used_rods.get_amount() >= MEATSPIKE_IRONROD_REQUIREMENT) used_rods.use(MEATSPIKE_IRONROD_REQUIREMENT) - to_chat(user, span_notice("You add spikes to the frame.")) + balloon_alert(user, "meatspike built") var/obj/structure/new_meatspike = new /obj/structure/kitchenspike(loc) transfer_fingerprints_to(new_meatspike) qdel(src) + return + balloon_alert(user, "[MEATSPIKE_IRONROD_REQUIREMENT] rods needed!") /obj/structure/kitchenspike name = "meat spike" @@ -49,6 +72,22 @@ can_buckle = TRUE max_integrity = 250 +/obj/structure/kitchenspike/Initialize(mapload) + . = ..() + register_context() + +/obj/structure/kitchenspike/examine(mob/user) + . = ..() + . += "Drag a mob onto it to hook it in place." + . += "A crowbar could remove those spikes." + +/obj/structure/kitchenspike/add_context(atom/source, list/context, obj/item/held_item, mob/living/user) + if(held_item.tool_behaviour == TOOL_CROWBAR) + context[SCREENTIP_CONTEXT_LMB] = "Remove Spikes" + return CONTEXTUAL_SCREENTIP_SET + + return NONE + /obj/structure/kitchenspike/attack_paw(mob/user, list/modifiers) return attack_hand(user, modifiers)