mirror of
https://github.com/Skyrat-SS13/Skyrat-tg.git
synced 2026-07-19 20:04:03 +01:00
[MIRROR] Minor cleanup for machine frames & boulder machines (#26810)
* Minor cleanup for machine frames & boulder machines (#81706) ## About The Pull Request - Moves call to `update_appearance(UPDATE_ICON_STATE)` to `/obj/structure/frame/Initialize()` for both computer & machine frames cause both do that anyway - Fixes wrench screentip for machine frames - Screw driving an incomplete machine frame won't display the "you need to unsecure it first" along with "missing components" balloon alerts - Moved boulder refinery code to `item_interaction()` - Autodoc some golem procs for refineries - Gives the secured machine frame an icon state of `box_1` so it looks wired in the rcd menu as well - Fixes screentips(like wrench act) for boulder machines ## Changelog 🆑 fix: fixes toolact screentips & balloon alerts for boulder machines & machine frame /🆑 * Minor cleanup for machine frames & boulder machines --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
This commit is contained in:
@@ -37,26 +37,23 @@
|
||||
register_context()
|
||||
|
||||
/obj/machinery/brm/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
. = CONTEXTUAL_SCREENTIP_SET
|
||||
. = NONE
|
||||
|
||||
if(isnull(held_item))
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Teleport single boulder"
|
||||
context[SCREENTIP_CONTEXT_RMB] = "Toggle [toggled_on ? "Off" : "On"] automatic boulder retrieval"
|
||||
return
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
if(!isnull(held_item))
|
||||
if(held_item.tool_behaviour == TOOL_WRENCH)
|
||||
context[SCREENTIP_CONTEXT_LMB] = "[anchored ? "" : "Un"] Anchor"
|
||||
return
|
||||
if(held_item.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
context[SCREENTIP_CONTEXT_LMB] = "[panel_open ? "Close" : "Open"] Panel"
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(held_item.tool_behaviour == TOOL_CROWBAR)
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Deconstruct"
|
||||
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
context[SCREENTIP_CONTEXT_LMB] = "[anchored ? "Un" : ""]Anchor"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
else if(held_item.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
context[SCREENTIP_CONTEXT_LMB] = "[panel_open ? "Close" : "Open"] panel"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
else if(panel_open && held_item.tool_behaviour == TOOL_CROWBAR)
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Deconstruct"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/machinery/brm/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -131,8 +128,6 @@
|
||||
var/result = pre_collect_boulder()
|
||||
if(result == TURF_BLOCKED_BY_BOULDER)
|
||||
balloon_alert(user, "no space")
|
||||
else if(result)
|
||||
balloon_alert(user, "teleporting")
|
||||
COOLDOWN_START(src, manual_teleport_cooldown, TELEPORTATION_TIME)
|
||||
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user