Files
0bd4b0820f Adds TGMC Tactical maps to the game and to Nuclear Operatives! (#96068)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Brought to you by Team Powercrèpe.(same group of people that delivered
the Heretic Overhaul)

This PR ports the TGMC Tacmaps and grants em to our NukeOps.

Code by Me, @Xander3359, @Arturlang, @Absolucy.

Mapping by @RipGrayson 

Sprites by @KillerOrcaCora

Writing bits by @necromanceranne

Tacmaps are essentially dynamically generated minimaps,

<img width="1711" height="1335" alt="Tac map examples"
src="https://github.com/user-attachments/assets/f936fac0-fb7c-4b84-970d-7195b4995ca7"
/>



<img width="1274" height="714" alt="Tac-Maps Icons"
src="https://github.com/user-attachments/assets/0f04e388-af4b-4955-be7a-04650cfd746b"
/>






As you can see from the screenshots above, departments are classified by
color, hovering your cursor over an area or a team mate, will display
their name, the system does allow the user to switch between Multi-Z,
and lastly you can draw and add labels to the map, although the last
option is only available to the NukeOps Leader and OW agents.


The functionality is tied to the Syndicate implants nukies start with,
Cayenne, Syndie borgs and Mechs also have the ability to toggle the map.

Likewise, the tacmaps will display the positioning of the following in
real time!

- Nuke ops agents

- Syndie borgs and Mechs

- Cayenne

- Location of the nuclear fission device (and beer nuke)

- Location of the Nuclear Authentication Disk.

<img width="1274" height="714" alt="SkyBridge OFF"
src="https://github.com/user-attachments/assets/3915e7d7-644a-4e9a-b213-997834dde2ea"
/>

<img width="1274" height="714" alt="SkyBridge ON"
src="https://github.com/user-attachments/assets/13748290-fd16-42ba-a9c4-a6b4f7e69c79"
/>

<img width="566" height="459" alt="Holo table done"
src="https://github.com/user-attachments/assets/1a43c5b7-ee51-4794-9c09-16b4fb50e2ad"
/>






https://github.com/user-attachments/assets/caf38538-ef04-4330-992c-3137a67ea0d0






Lastly The tactiical map implant cannot be be used on the nuke ops
base,If the team wishes to interact with the map they'll have to
Interact with the "Reconnaisance Platform" (Sprite by Orcacora) in the
briefing room, which has seen some mapping changes (Brought to you by
TheLastGrayson).



<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

Originally this feature was planned for the Upcoming Contractor Rework
our team is currently working on, but given the massive size of it all,
we decided to atomize it.

But without that consideration in mind, I think it makes sense for
Nuclear operatives of all antagonists to have the means to Recon and
plot an assault plan onto the station and actually be able to know the
whereabouts of their teammates.

Obviously this feature has a lot of other potential applications, we
have wanted to have functional Maps for a very long time, if someone
wants to give it a go once the feature is merged, by all means.

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and its effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
add: Tactical Maps have been added to the game!
add: Nuclear Operatives implants now grant the ability to open a
Minimap, this map will display and show the names of various areas of
the station, and the positioning of the Nukeops team,borgs,mechs,Cayenne
and the nuke disk in real time!
add: Nukie leaders and OW agents can also draw and apply labels to the
map.
add: the "Recoinassance Platform" has been added to the Nukie Base, it
allows displaying of the Tactical maps while on the Syndicate Base Z
level.
map: The briefing room in the NukeOps base has been remapped to better
accomodate the new Holographic table.
map: Changed the front shutters on the Syndicate Infiltrator to the more
fitting Syndicate Shutters.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: Xander3359 <66163761+Xander3359@users.noreply.github.com>
Co-authored-by: Artur Lang <24881678+Arturlang@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: RipGrayson <49290523+RipGrayson@users.noreply.github.com>
Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
2026-06-09 16:38:00 +02:00

199 lines
7.1 KiB
Plaintext

#define MINIMAP_TOOLBAR_ERASE_RANGE 5
/atom/movable/screen/minimap_toolbar_button
icon = 'icons/ui_icons/minimap/minimap_buttons.dmi'
icon_state = "draw"
mouse_over_pointer = MOUSE_HAND_POINTER
/// The minimap display this button controls.
var/atom/movable/screen/minimap_display/display
/// Vertical slot index (0 = topmost). Used by reposition_toolbar_buttons to calculate screen_loc.
var/button_slot = 0
/// Mouse cursor icon set when this button's tool is active. null = default cursor.
var/icon/mouse_icon = null
/// Draw color this button represents. null = erase mode.
var/draw_color = null
/// HUD key for this tool button. Used to track selection state.
var/tool_key = null
/// Coordinates of the last drag position during drawing.
var/last_drag_x
var/last_drag_y
/atom/movable/screen/minimap_toolbar_button/Initialize(mapload, datum/hud/hud_owner, atom/movable/screen/minimap_display/minimap_display)
. = ..()
display = minimap_display
/atom/movable/screen/minimap_toolbar_button/Destroy()
display = null
return ..()
/atom/movable/screen/minimap_toolbar_button/MouseEntered(location, control, params)
add_filter("mouseover", 1, outline_filter(1, COLOR_LIME))
if(desc)
openToolTip(usr, tip_src = display || src, params = params, title = name, content = desc)
/atom/movable/screen/minimap_toolbar_button/MouseExited(location, control, params)
remove_filter("mouseover")
if(desc)
closeToolTip(usr)
/// Returns TRUE if this button should be shown as active.
/atom/movable/screen/minimap_toolbar_button/proc/is_active()
return display && display.active_button == src
/// Updates the button's visual state to show if it's active.
/atom/movable/screen/minimap_toolbar_button/proc/update_active_state()
if(is_active())
add_filter("active", 1, outline_filter(2, COLOR_YELLOW))
else
remove_filter("active")
/// Called when this button is activated as the active tool.
/atom/movable/screen/minimap_toolbar_button/proc/on_activate()
display?.set_cursor_icon(mouse_icon)
/// Called when this button is deactivated.
/atom/movable/screen/minimap_toolbar_button/proc/on_deactivate()
display?.set_cursor_icon(null)
last_drag_x = null
last_drag_y = null
/// Called during mouse drag on the map. Override to implement tool behavior.
/atom/movable/screen/minimap_toolbar_button/proc/on_mouse_drag(x, y)
return FALSE
/// Called on mouse up. Override to clean up tool state.
/atom/movable/screen/minimap_toolbar_button/proc/on_mouse_up()
last_drag_x = null
last_drag_y = null
/// Called on click. Override to implement click behavior like label placement.
/atom/movable/screen/minimap_toolbar_button/proc/on_click(icon_x, icon_y, right_click)
return FALSE
/atom/movable/screen/minimap_toolbar_button/draw
desc = "Left-drag on the map to draw."
/atom/movable/screen/minimap_toolbar_button/draw/on_mouse_drag(x, y)
if(isnull(display) || isnull(display.drawing))
return FALSE
var/icon_width = display.minimap?.base_map?.Width()
var/icon_height = display.minimap?.base_map?.Height()
if(isnull(icon_width) || isnull(icon_height))
return FALSE
if(!ISINRANGE(x, 1, icon_width) || !ISINRANGE(y, 1, icon_height))
last_drag_x = null
last_drag_y = null
return FALSE
if(last_drag_x && last_drag_y)
display.drawing.draw_line(draw_color, last_drag_x, last_drag_y + display.draw_offset_y, x, y + display.draw_offset_y, 0, 1)
last_drag_x = x
last_drag_y = y
else
display.drawing.draw_box(draw_color, x, y + display.draw_offset_y, x + 1, y + 1 + display.draw_offset_y, 0, 1)
last_drag_x = x
last_drag_y = y
return TRUE
/atom/movable/screen/minimap_toolbar_button/draw/Click(location, control, params)
if(usr == get_mob())
display?.activate_button(src)
/atom/movable/screen/minimap_toolbar_button/draw/red
button_slot = 0
color = TACMAP_DRAWING_RED
draw_color = TACMAP_DRAWING_RED
mouse_icon = 'icons/ui_icons/minimap/minimap_mouse/draw_red.dmi'
/atom/movable/screen/minimap_toolbar_button/draw/yellow
button_slot = 1
color = TACMAP_DRAWING_YELLOW
draw_color = TACMAP_DRAWING_YELLOW
mouse_icon = 'icons/ui_icons/minimap/minimap_mouse/draw_yellow.dmi'
/atom/movable/screen/minimap_toolbar_button/draw/purple
button_slot = 2
color = TACMAP_DRAWING_PURPLE
draw_color = TACMAP_DRAWING_PURPLE
mouse_icon = 'icons/ui_icons/minimap/minimap_mouse/draw_purple.dmi'
/atom/movable/screen/minimap_toolbar_button/draw/blue
button_slot = 3
color = TACMAP_DRAWING_BLUE
draw_color = TACMAP_DRAWING_BLUE
mouse_icon = 'icons/ui_icons/minimap/minimap_mouse/draw_blue.dmi'
/// Erase tool — left-drag on the map to erase a line.
/atom/movable/screen/minimap_toolbar_button/erase
icon_state = "erase"
button_slot = 4
desc = "Left-drag on the map to erase."
mouse_icon = 'icons/ui_icons/minimap/minimap_mouse/draw_erase.dmi'
/atom/movable/screen/minimap_toolbar_button/erase/on_mouse_drag(x, y)
if(isnull(display) || isnull(display.drawing))
return FALSE
var/icon_width = display.minimap?.base_map?.Width()
var/icon_height = display.minimap?.base_map?.Height()
if(isnull(icon_width) || isnull(icon_height))
return FALSE
if(!ISINRANGE(x, 1, icon_width) || !ISINRANGE(y, 1, icon_height))
last_drag_x = null
last_drag_y = null
return FALSE
if(last_drag_x && last_drag_y)
display.drawing.draw_line(null, last_drag_x, last_drag_y + display.draw_offset_y, x, y + display.draw_offset_y, MINIMAP_TOOLBAR_ERASE_RANGE, 1)
last_drag_x = x
last_drag_y = y
else
display.drawing.draw_box(null, x, y + display.draw_offset_y, x + 1, y + 1 + display.draw_offset_y, MINIMAP_TOOLBAR_ERASE_RANGE, 1)
last_drag_x = x
last_drag_y = y
return TRUE
/atom/movable/screen/minimap_toolbar_button/erase/Click(location, control, params)
if(usr == get_mob())
display?.activate_button(src)
/// Clear tool — removes all drawings and labels.
/atom/movable/screen/minimap_toolbar_button/clear
icon_state = "clear"
button_slot = 5
desc = "Clear all drawings."
/atom/movable/screen/minimap_toolbar_button/clear/is_active()
return FALSE
/atom/movable/screen/minimap_toolbar_button/clear/Click(location, control, params)
if(usr == get_mob())
display?.clear_canvas(usr)
/// Label tool — click the map to place labels, right-click a label to remove it, right-click this button to clear all labels.
/atom/movable/screen/minimap_toolbar_button/label
icon_state = "label"
button_slot = 6
desc = "Toggle label mode. Click the map to place a label. Right-click a nearby label on the map to remove it. Right-click this button to clear all labels."
mouse_icon = 'icons/ui_icons/minimap/minimap_mouse/label.dmi'
/atom/movable/screen/minimap_toolbar_button/label/on_click(icon_x, icon_y, right_click)
if(isnull(display))
return FALSE
if(right_click)
display.remove_nearest_label(icon_x, icon_y, usr)
return TRUE
// Place label asynchronously
INVOKE_ASYNC(display, /atom/movable/screen/minimap_display/proc/async_place_label, usr, icon_x, icon_y)
return TRUE
/atom/movable/screen/minimap_toolbar_button/label/Click(location, control, params)
if(usr != get_mob())
return
var/list/modifiers = params2list(params)
if(LAZYACCESS(modifiers, RIGHT_CLICK))
display.clear_all_annotations(usr, /atom/movable/screen/minimap_element/label)
else
display?.activate_button(src)
#undef MINIMAP_TOOLBAR_ERASE_RANGE