mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-12 16:37:19 +01:00
Map PDA Program - POIs (#19536)
   --------- Co-authored-by: DreamySkrell <>
This commit is contained in:
@@ -2282,6 +2282,7 @@
|
||||
#include "code\modules\holodeck\HolodeckControl.dm"
|
||||
#include "code\modules\holodeck\HolodeckObjects.dm"
|
||||
#include "code\modules\holodeck\HolodeckPrograms.dm"
|
||||
#include "code\modules\holomap\poi.dm"
|
||||
#include "code\modules\http\forum_api.dm"
|
||||
#include "code\modules\http\forumuser_api.dm"
|
||||
#include "code\modules\http\http.dm"
|
||||
|
||||
@@ -21,6 +21,9 @@ SUBSYSTEM_DEF(holomap)
|
||||
/// Same as `minimaps_base64`, but does not discriminate between walls and paths.
|
||||
var/list/minimaps_scan_base64 = list()
|
||||
|
||||
/// List of all `/obj/effect/landmark/minimap_poi`.
|
||||
var/list/obj/effect/landmark/minimap_poi/pois = list()
|
||||
|
||||
/datum/controller/subsystem/holomap/Initialize()
|
||||
generate_all_minimaps()
|
||||
LOG_DEBUG("SSholomap: [minimaps.len] maps.")
|
||||
@@ -96,6 +99,8 @@ SUBSYSTEM_DEF(holomap)
|
||||
for (var/thing in Z_TURFS(zlevel))
|
||||
T = thing
|
||||
A = T.loc
|
||||
if (A.area_flags & AREA_FLAG_HIDE_FROM_HOLOMAP)
|
||||
continue
|
||||
if (A.holomap_color)
|
||||
canvas.DrawBox(A.holomap_color + "99", T.x, T.y)
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
/obj/effect/landmark/minimap_poi
|
||||
name = "minimap poi"
|
||||
desc = null
|
||||
icon = 'icons/effects/map_effects.dmi'
|
||||
icon_state = "minimap_poi"
|
||||
|
||||
/obj/effect/landmark/minimap_poi/Initialize()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/effect/landmark/minimap_poi/LateInitialize()
|
||||
. = ..()
|
||||
SSholomap.pois += src
|
||||
|
||||
/obj/effect/landmark/minimap_poi/Destroy()
|
||||
SSholomap.pois -= src
|
||||
. = ..()
|
||||
@@ -45,6 +45,16 @@
|
||||
list("d"="Hangar", "c"=HOLOMAP_AREACOLOR_HANGAR),
|
||||
)
|
||||
|
||||
data["pois"] = list()
|
||||
for(var/obj/effect/landmark/minimap_poi/poi as anything in SSholomap.pois)
|
||||
data["pois"] += list(list(
|
||||
"name" = poi.name,
|
||||
"desc" = poi.desc,
|
||||
"x" = poi.x,
|
||||
"y" = poi.y,
|
||||
"z" = poi.z,
|
||||
))
|
||||
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/map/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# - (fixes bugs)
|
||||
# wip
|
||||
# - (work in progress)
|
||||
# qol
|
||||
# - (quality of life)
|
||||
# soundadd
|
||||
# - (adds a sound)
|
||||
# sounddel
|
||||
# - (removes a sound)
|
||||
# rscadd
|
||||
# - (adds a feature)
|
||||
# rscdel
|
||||
# - (removes a feature)
|
||||
# imageadd
|
||||
# - (adds an image or sprite)
|
||||
# imagedel
|
||||
# - (removes an image or sprite)
|
||||
# spellcheck
|
||||
# - (fixes spelling or grammar)
|
||||
# experiment
|
||||
# - (experimental change)
|
||||
# balance
|
||||
# - (balance changes)
|
||||
# code_imp
|
||||
# - (misc internal code change)
|
||||
# refactor
|
||||
# - (refactors code)
|
||||
# config
|
||||
# - (makes a change to the config files)
|
||||
# admin
|
||||
# - (makes changes to administrator tools)
|
||||
# server
|
||||
# - (miscellaneous changes to server)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: DreamySkrell
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Adds map PDA program POIs."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
@@ -38,7 +38,7 @@ Generally you don't want to put your areas in here; if the area is only used in
|
||||
no_light_control = 1
|
||||
base_turf = /turf/space
|
||||
is_outside = OUTSIDE_YES
|
||||
area_flags = AREA_FLAG_IS_BACKGROUND
|
||||
area_flags = AREA_FLAG_IS_BACKGROUND | AREA_FLAG_HIDE_FROM_HOLOMAP
|
||||
nevergravity = TRUE //There's no gravity in space
|
||||
|
||||
/area/space/atmosalert()
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
/area/bridge/selfdestruct
|
||||
name = "Command - Station Authentication Terminal Safe"
|
||||
icon_state = "bridge"
|
||||
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
|
||||
|
||||
/area/bridge/controlroom // Horizon.
|
||||
name = "Command - Control Room"
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
|
||||
// Exterior
|
||||
/area/horizon/exterior
|
||||
name = "Horizon - Exterior (DO NOT ENCROACH ON LANDING PLACES)"
|
||||
name = "Horizon - Exterior"
|
||||
icon_state = "exterior"
|
||||
base_turf = /turf/space
|
||||
dynamic_lighting = TRUE
|
||||
@@ -346,6 +346,7 @@
|
||||
no_light_control = TRUE
|
||||
allow_nightmode = FALSE
|
||||
ambience = AMBIENCE_SPACE
|
||||
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
|
||||
|
||||
/********** Maintenance Start **********/
|
||||
// Maintenance
|
||||
|
||||
@@ -7493,6 +7493,15 @@
|
||||
},
|
||||
/turf/simulated/floor/plating,
|
||||
/area/maintenance/engineering)
|
||||
"fes" = (
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 1
|
||||
},
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Canary"
|
||||
},
|
||||
/turf/simulated/floor/plating,
|
||||
/area/hangar/canary)
|
||||
"feD" = (
|
||||
/obj/structure/cable{
|
||||
icon_state = "4-8"
|
||||
@@ -11233,6 +11242,12 @@
|
||||
roof_type = null
|
||||
},
|
||||
/area/horizon/custodial/disposals)
|
||||
"hGb" = (
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Main Lift"
|
||||
},
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/hallway/primary/aft)
|
||||
"hGu" = (
|
||||
/obj/structure/closet/crate,
|
||||
/obj/effect/floor_decal/corner/brown{
|
||||
@@ -13060,6 +13075,15 @@
|
||||
/obj/effect/floor_decal/industrial/outline/emergency_closet,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/engineering/atmos/propulsion/starboard)
|
||||
"jbh" = (
|
||||
/obj/effect/floor_decal/corner/brown{
|
||||
dir = 10
|
||||
},
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Spark"
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/hangar/operations)
|
||||
"jbm" = (
|
||||
/obj/effect/floor_decal/corner/brown{
|
||||
dir = 10
|
||||
@@ -28389,6 +28413,12 @@
|
||||
/obj/random/loot,
|
||||
/turf/simulated/floor/plating,
|
||||
/area/maintenance/operations)
|
||||
"txK" = (
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Intrepid"
|
||||
},
|
||||
/turf/simulated/floor/plating,
|
||||
/area/hangar/intrepid)
|
||||
"txT" = (
|
||||
/obj/structure/table/rack,
|
||||
/obj/item/clothing/suit/hazmat/anomaly,
|
||||
@@ -50818,7 +50848,7 @@ umt
|
||||
wkD
|
||||
cua
|
||||
rcA
|
||||
oXD
|
||||
jbh
|
||||
wSS
|
||||
ixU
|
||||
pgW
|
||||
@@ -55917,7 +55947,7 @@ pTd
|
||||
kyK
|
||||
oSi
|
||||
kaM
|
||||
iRC
|
||||
txK
|
||||
iRC
|
||||
xsx
|
||||
eSV
|
||||
@@ -56882,7 +56912,7 @@ rHK
|
||||
rHK
|
||||
rHK
|
||||
rHK
|
||||
kuh
|
||||
hGb
|
||||
bec
|
||||
wLL
|
||||
ovg
|
||||
@@ -61576,7 +61606,7 @@ vqx
|
||||
hot
|
||||
nNh
|
||||
pPV
|
||||
pEk
|
||||
fes
|
||||
oji
|
||||
hmD
|
||||
kOp
|
||||
|
||||
@@ -6199,6 +6199,9 @@
|
||||
/turf/simulated/floor/tiled/full,
|
||||
/area/hallway/primary/central_two)
|
||||
"cOp" = (
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Research"
|
||||
},
|
||||
/turf/simulated/floor/wood,
|
||||
/area/rnd/hallway/secondary)
|
||||
"cOs" = (
|
||||
@@ -23537,6 +23540,9 @@
|
||||
/obj/effect/floor_decal/corner/brown{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Operations"
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/operations/office)
|
||||
"kOW" = (
|
||||
@@ -27397,6 +27403,12 @@
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/horizon/security/warden)
|
||||
"mGv" = (
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Main Lift"
|
||||
},
|
||||
/turf/simulated/wall/r_wall,
|
||||
/area/hallway/primary/central_one)
|
||||
"mGY" = (
|
||||
/obj/machinery/atmospherics/binary/pump/high_power{
|
||||
dir = 1;
|
||||
@@ -28809,6 +28821,12 @@
|
||||
},
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/horizon/grauwolf)
|
||||
"njk" = (
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Medbay"
|
||||
},
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/gen_treatment)
|
||||
"nju" = (
|
||||
/obj/structure/table/reinforced,
|
||||
/obj/machinery/door/firedoor,
|
||||
@@ -29408,6 +29426,9 @@
|
||||
/obj/effect/floor_decal/spline/fancy/wood{
|
||||
dir = 1
|
||||
},
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Service"
|
||||
},
|
||||
/turf/simulated/floor/wood,
|
||||
/area/horizon/crew_quarters/lounge/bar)
|
||||
"nAz" = (
|
||||
@@ -43609,6 +43630,9 @@
|
||||
/obj/effect/floor_decal/corner_wide/yellow{
|
||||
dir = 6
|
||||
},
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Engineering"
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/hallway/engineering)
|
||||
"uki" = (
|
||||
@@ -48844,6 +48868,9 @@
|
||||
},
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers,
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/supply,
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Security"
|
||||
},
|
||||
/turf/simulated/floor/tiled/full,
|
||||
/area/horizon/security/hallway)
|
||||
"wzN" = (
|
||||
@@ -70641,7 +70668,7 @@ nbd
|
||||
abA
|
||||
weX
|
||||
iyl
|
||||
xqE
|
||||
njk
|
||||
pUI
|
||||
bCl
|
||||
iIf
|
||||
@@ -73861,7 +73888,7 @@ iVp
|
||||
iVp
|
||||
iVp
|
||||
iVp
|
||||
nUN
|
||||
mGv
|
||||
vcv
|
||||
lPO
|
||||
vbk
|
||||
|
||||
@@ -16423,6 +16423,9 @@
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 8
|
||||
},
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Starboard Docks"
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/horizon/hallway/deck_three/primary/starboard/docks)
|
||||
"lkC" = (
|
||||
@@ -20009,6 +20012,9 @@
|
||||
/obj/machinery/light{
|
||||
dir = 1
|
||||
},
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Port Docks"
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/horizon/hallway/deck_three/primary/port/docks)
|
||||
"nCs" = (
|
||||
@@ -24658,6 +24664,9 @@
|
||||
/obj/effect/floor_decal/corner/dark_blue{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Bridge"
|
||||
},
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/bridge/controlroom)
|
||||
"qMd" = (
|
||||
@@ -24852,6 +24861,12 @@
|
||||
},
|
||||
/turf/simulated/floor/plating,
|
||||
/area/maintenance/engineering_ladder)
|
||||
"qTo" = (
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Main Lift"
|
||||
},
|
||||
/turf/simulated/wall/r_wall,
|
||||
/area/horizon/hallway/deck_three/primary/central)
|
||||
"qTN" = (
|
||||
/obj/structure/disposalpipe/segment{
|
||||
dir = 4;
|
||||
@@ -33300,6 +33315,15 @@
|
||||
},
|
||||
/turf/simulated/floor,
|
||||
/area/horizon/maintenance/deck_three/aft/starboard)
|
||||
"wFC" = (
|
||||
/obj/effect/floor_decal/spline/fancy/wood{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/landmark/minimap_poi{
|
||||
name = "Cafeteria"
|
||||
},
|
||||
/turf/simulated/floor/wood,
|
||||
/area/horizon/cafeteria)
|
||||
"wFE" = (
|
||||
/obj/effect/floor_decal/corner/dark_blue{
|
||||
dir = 5
|
||||
@@ -56541,7 +56565,7 @@ ffj
|
||||
ffj
|
||||
ffj
|
||||
ffj
|
||||
wdy
|
||||
qTo
|
||||
nCP
|
||||
dHs
|
||||
dHr
|
||||
@@ -58978,7 +59002,7 @@ lbi
|
||||
tqm
|
||||
mpY
|
||||
dvl
|
||||
dvl
|
||||
wFC
|
||||
dui
|
||||
lbi
|
||||
qzF
|
||||
|
||||
@@ -11,6 +11,7 @@ export type MapData = {
|
||||
station_levels: number[];
|
||||
z_override: number;
|
||||
dept_colors_map: { d: string; c: string }[];
|
||||
pois: { name: string; desc: string; x: number; y: number; z: number }[];
|
||||
};
|
||||
|
||||
export const Map = (props, context) => {
|
||||
@@ -19,7 +20,7 @@ export const Map = (props, context) => {
|
||||
const [minimapZoom, setMinimapZoom] = useLocalState<number>(
|
||||
context,
|
||||
`minimapZoom`,
|
||||
100
|
||||
150
|
||||
);
|
||||
|
||||
const [showLegend, setShowLegend] = useLocalState<boolean>(
|
||||
@@ -28,6 +29,10 @@ export const Map = (props, context) => {
|
||||
false
|
||||
);
|
||||
|
||||
const pois = data.pois?.filter(
|
||||
(poi) => poi.z === (data.z_override ? data.z_override : data.user_z)
|
||||
);
|
||||
|
||||
const map_size = 255;
|
||||
const zoom_mod = minimapZoom / 100.0;
|
||||
|
||||
@@ -109,6 +114,31 @@ export const Map = (props, context) => {
|
||||
height={map_size * zoom_mod}
|
||||
xlinkHref={`data:image/jpeg;base64,${data.map_image}`}
|
||||
/>
|
||||
{pois?.map((poi) => (
|
||||
<g
|
||||
key={poi.name}
|
||||
transform={`translate(
|
||||
${poi.x * zoom_mod}
|
||||
${(map_size - poi.y) * zoom_mod}
|
||||
)`}>
|
||||
<polygon
|
||||
points="3,0 0,3 -3,0 0,-3"
|
||||
fill="#AA0000"
|
||||
stroke="#FFFF00"
|
||||
stroke-width="0.5"
|
||||
/>
|
||||
<text
|
||||
x={poi.x > data.user_x ? 5 : -5}
|
||||
y={poi.y > data.user_y ? -3 : 9}
|
||||
fill="#FF0000"
|
||||
stroke="#FFFF00"
|
||||
stroke-width="0.1"
|
||||
font-size="9"
|
||||
text-anchor={poi.x > data.user_x ? 'start' : 'end'}>
|
||||
{poi.name}
|
||||
</text>
|
||||
</g>
|
||||
))}
|
||||
{!data.z_override || data.user_z === data.z_override ? (
|
||||
<>
|
||||
<polygon
|
||||
|
||||
Reference in New Issue
Block a user