multitool found apc qol (#90896)

## About The Pull Request

Replaces the text description for the APC multitool search function with
directional arrows similar to Heretic.
(If someone has better ideas for a sprite, I'm ready to listen.)


https://github.com/user-attachments/assets/833b4f10-eab2-4833-bdf6-d02bd5820f48


## Why It's Good For The Game

The old search function was inconvenient for players, it looks much
better.
## Changelog
🆑
qol: Replaces the text description for the APC multitool search function
with directional arrows similar to Heretic.
image: Sprite for multitool arrow

/🆑
This commit is contained in:
Maximal08
2025-05-05 14:28:29 +05:00
committed by GitHub
parent 4586c2cfdd
commit 4de5bcbf9c
4 changed files with 44 additions and 5 deletions
+38 -5
View File
@@ -65,14 +65,47 @@
if(!COOLDOWN_FINISHED(src, next_apc_scan))
return
COOLDOWN_START(src, next_apc_scan, 1 SECONDS)
COOLDOWN_START(src, next_apc_scan, 2 SECONDS)
var/area/local_area = get_area(src)
var/power_controller = local_area.apc
if(power_controller)
user.balloon_alert(user, "[get_dist(src, power_controller)]m [dir2text(get_dir(src, power_controller))]")
else
var/obj/machinery/power/apc/power_controller = local_area.apc
if(!power_controller)
user.balloon_alert(user, "couldn't find apc!")
return
var/dist = get_dist(src, power_controller)
var/dir = get_dir(user, power_controller)
var/balloon_message
var/arrow_color
switch(dist)
if (0)
user.balloon_alert(user, "found apc!")
return
if(1 to 5)
arrow_color = COLOR_GREEN
if(6 to 10)
arrow_color = COLOR_YELLOW
if(11 to 15)
arrow_color = COLOR_ORANGE
else
arrow_color = COLOR_RED
user.balloon_alert(user, balloon_message)
var/datum/hud/user_hud = user.hud_used
if(!user_hud)
return
var/atom/movable/screen/multitool_arrow/arrow = new(null, user_hud)
arrow.color = arrow_color
arrow.screen_loc = around_player
arrow.transform = matrix(dir2angle(dir), MATRIX_ROTATE)
user_hud.infodisplay += arrow
user_hud.show_hud(user_hud.hud_version)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), arrow), 1.5 SECONDS)
/obj/item/multitool/suicide_act(mob/living/carbon/user)
user.visible_message(span_suicide("[user] puts the [src] to [user.p_their()] chest. It looks like [user.p_theyre()] trying to pulse [user.p_their()] heart off!"))
@@ -0,0 +1,5 @@
/atom/movable/screen/multitool_arrow
icon = 'icons/effects/96x96.dmi'
icon_state = "multitool_arrow"
pixel_x = -32
pixel_y = -32
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

+1
View File
@@ -4133,6 +4133,7 @@
#include "code\modules\economy\holopay.dm"
#include "code\modules\emoji\emoji_parse.dm"
#include "code\modules\emote_panel\emote_panel.dm"
#include "code\modules\engineering\tools\multitool.dm"
#include "code\modules\error_handler\error_handler.dm"
#include "code\modules\error_handler\error_viewer.dm"
#include "code\modules\escape_menu\details.dm"