From b52f671be67c794652e6abde9f3f155333058b2f Mon Sep 17 00:00:00 2001
From: Paxilmaniac <82386923+Paxilmaniac@users.noreply.github.com>
Date: Fri, 11 Aug 2023 19:36:19 -0400
Subject: [PATCH] Makes bluespace navigation gigabeacons both significantly
nicer to use, and significantly cooler (#77223)
## About The Pull Request
"Behold, a navigation beacon" Plato says to the crowd of shocked
onlookers.

What are you looking at here? Navigation beacons have been party
reworked for significantly improved ease of use, and for significantly
cooler functionality.
As it stands, in order to explore space with a ship of some sort, you
have to take the following steps:
Fly to target zlevel
Build a floor
Build a machine frame, then make the beacon out of it
Go back and park your ship
Now, while this doesn't eliminate this process, it makes it a step
shorter and a good bit less annoying to do. There are no gigabeacon
boards, instead a compact beacon can be printed. This can be used inhand
and, after a delay of three seconds, will create a brand new gigabeacon
in front of you with no extra hassle.
So, aside from the sprite (the old one is an alien power core, by the
way), what's new? Just a bit of flavor. Examining a gigabeacon will
mention a radio frequency. If you tune into this radio frequency, then
you might be able to catch the automatic messages the beacons put out
every five minutes. They detail a little bit about the beacon, namely
its coordinates, and if its activate or locked. While not critical info
my any means, it can be good information to have pop up every few
minutes, or for discovering that there are gigabeacons you didn't know
were there before.
## Why It's Good For The Game
Gigabeacons had two big problems, one was that they were pointlessly
annoying to set up, and two was that they didn't have their own sprite.
Yup, they just used a random alien tech structure and nobody said
anything about it. Hopefully this pr fixes both of those problems,
alongside adding a little neat bit of flavor to them in the form of the
automatic radio broadcasts they put every few minutes on a non-standard
channel.
## Changelog
:cl:
qol: Gigabeacons no longer need to be constructed like standard
machines, instead being printed as items that can be deployed quickly
inhand without tools.
qol: Gigabeacons are no longer their own research node, instead being a
part of telecomms tech (due to the fact they're RADIO navigation
beacons)
image: Navigation gigabeacons now have their own unique sprites,
inspired by maritime EPIRB devices. If you find a yellow box with an
antenna on it, you probably found a nav beacon!
code: The deployable component now gives you an option to disable the
examine blurb it adds to its parent
/:cl:
---
code/__DEFINES/radio.dm | 1 +
code/datums/components/deployable.dm | 15 ++-
.../research/designs/machine_designs.dm | 11 --
code/modules/research/designs/misc_designs.dm | 12 ++
code/modules/research/techweb/all_nodes.dm | 11 +-
.../shuttle/spaceship_navigation_beacon.dm | 119 ++++++++++++------
icons/obj/machines/navigation_beacon.dmi | Bin 0 -> 1087 bytes
7 files changed, 108 insertions(+), 61 deletions(-)
create mode 100644 icons/obj/machines/navigation_beacon.dmi
diff --git a/code/__DEFINES/radio.dm b/code/__DEFINES/radio.dm
index f4967eb9ce3..686c42e07d0 100644
--- a/code/__DEFINES/radio.dm
+++ b/code/__DEFINES/radio.dm
@@ -86,6 +86,7 @@
#define FREQ_ELECTROPACK 1449
#define FREQ_MAGNETS 1449
#define FREQ_LOCATOR_IMPLANT 1451
+#define FREQ_RADIO_NAV_BEACON 1455
#define FREQ_SIGNALER 1457 // the default for new signalers
#define FREQ_COMMON 1459 // Common comms frequency, dark green
diff --git a/code/datums/components/deployable.dm b/code/datums/components/deployable.dm
index 7a5e798b337..e2c6b84703e 100644
--- a/code/datums/components/deployable.dm
+++ b/code/datums/components/deployable.dm
@@ -10,15 +10,18 @@
/datum/component/deployable
/// The time it takes to deploy the object
- var/deploy_time = 5 SECONDS
+ var/deploy_time
/// The object that gets spawned if deployed successfully
var/obj/thing_to_be_deployed
+ /// If the item used to deploy gets deleted on use or not
+ var/delete_on_use
+ /// If the component adds a little bit into the parent's description
+ var/add_description_hint
+
/// Used in getting the name of the deployed object
var/deployed_name
- /// If the item used to deploy gets deleted on use or not
- var/delete_on_use = TRUE
-/datum/component/deployable/Initialize(deploy_time, thing_to_be_deployed, delete_on_use)
+/datum/component/deployable/Initialize(deploy_time = 5 SECONDS, thing_to_be_deployed, delete_on_use = TRUE, add_description_hint = TRUE)
. = ..()
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
@@ -26,8 +29,10 @@
src.deploy_time = deploy_time
src.thing_to_be_deployed = thing_to_be_deployed
src.delete_on_use = delete_on_use
+ src.add_description_hint = add_description_hint
- RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(examine))
+ if(add_description_hint)
+ RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(examine))
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, PROC_REF(on_attack_hand))
var/obj/item/typecast = thing_to_be_deployed
diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm
index d4e70865982..6597c12fbec 100644
--- a/code/modules/research/designs/machine_designs.dm
+++ b/code/modules/research/designs/machine_designs.dm
@@ -874,17 +874,6 @@
)
departmental_flags = DEPARTMENT_BITFLAG_MEDICAL
-/datum/design/board/spaceship_navigation_beacon
- name = "Bluespace Navigation Gigabeacon Board"
- desc = "The circuit board for a Bluespace Navigation Gigabeacon."
- id = "spaceship_navigation_beacon"
- build_type = IMPRINTER
- build_path = /obj/item/circuitboard/machine/spaceship_navigation_beacon
- category = list(
- RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_TELEPORT
- )
- departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING | DEPARTMENT_BITFLAG_SCIENCE
-
/datum/design/board/medical_kiosk
name = "Medical Kiosk Board"
desc = "The circuit board for a Medical Kiosk."
diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm
index 03f512a3e09..3f4d4b8f8ec 100644
--- a/code/modules/research/designs/misc_designs.dm
+++ b/code/modules/research/designs/misc_designs.dm
@@ -1034,6 +1034,18 @@
)
departmental_flags = DEPARTMENT_BITFLAG_SERVICE
+/datum/design/radio_navigation_beacon
+ name = "Compact Radio Navigation Gigabeacon"
+ id = "gigabeacon"
+ build_type = PROTOLATHE | AWAY_LATHE
+ materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2,
+ /datum/material/glass = HALF_SHEET_MATERIAL_AMOUNT)
+ build_path = /obj/item/folded_navigation_gigabeacon
+ category = list(
+ RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_ENGINEERING
+ )
+ departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING | DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_CARGO
+
// Experimental designs
/datum/design/polymorph_belt
diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm
index ca61b41b946..bb82108d872 100644
--- a/code/modules/research/techweb/all_nodes.dm
+++ b/code/modules/research/techweb/all_nodes.dm
@@ -777,16 +777,6 @@
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 4000)
discount_experiments = list(/datum/experiment/scanning/points/machinery_pinpoint_scan/tier3_cells = 3000)
-/datum/techweb_node/regulated_bluespace
- id = "regulated_bluespace"
- display_name = "Regulated Bluespace Research"
- description = "Bluespace technology using stable and balanced procedures. Required by galactic convention for public use."
- prereq_ids = list("base")
- design_ids = list(
- "spaceship_navigation_beacon",
- )
- research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
-
/datum/techweb_node/unregulated_bluespace
id = "unregulated_bluespace"
display_name = "Unregulated Bluespace Research"
@@ -1228,6 +1218,7 @@
"s_server",
"s_transmitter",
"s_treatment",
+ "gigabeacon",
)
/datum/techweb_node/integrated_hud
diff --git a/code/modules/shuttle/spaceship_navigation_beacon.dm b/code/modules/shuttle/spaceship_navigation_beacon.dm
index 267ef89b789..4ae91af588a 100644
--- a/code/modules/shuttle/spaceship_navigation_beacon.dm
+++ b/code/modules/shuttle/spaceship_navigation_beacon.dm
@@ -1,60 +1,109 @@
-/obj/item/circuitboard/machine/spaceship_navigation_beacon
- name = "Bluespace Navigation Gigabeacon (Machine Board)"
- build_path = /obj/machinery/spaceship_navigation_beacon
- req_components = list()
-
-
/obj/machinery/spaceship_navigation_beacon
- name = "Bluespace Navigation Gigabeacon"
- desc = "A device that creates a bluespace anchor that allow ships jump near to it."
- icon = 'icons/obj/antags/abductor.dmi'
- icon_state = "core"
- base_icon_state = "core"
+ name = "radio navigation gigabeacon"
+ desc = "A device that constantly transmits its position over several different commonly used maritime navigation frequencies. Used to create shuttle navigation waypoints in unexplored or undeveloped areas."
+ icon = 'icons/obj/machines/navigation_beacon.dmi'
+ icon_state = "beacon_active"
+ base_icon_state = "beacon"
density = TRUE
- circuit = /obj/item/circuitboard/machine/spaceship_navigation_beacon
-
- var/locked = FALSE //Locked beacons don't allow to jump to it.
+ flags_1 = NODECONSTRUCT_1
+ /// Locked beacons cannot be jumped to by ships.
+ var/locked = FALSE
+ /// Time between automated messages.
+ var/automatic_message_cooldown = 5 MINUTES
+ /// Next world tick to send an automatic message.
+ var/next_automatic_message_time
+ /// Our internal radio.
+ var/obj/item/radio/radio
/obj/machinery/spaceship_navigation_beacon/Initialize(mapload)
. = ..()
SSshuttle.beacon_list |= src
+ name = "[initial(src.name)] [z]-[rand(0, 999)]"
+
+ var/static/list/multitool_tips = list(
+ TOOL_MULTITOOL = list(
+ SCREENTIP_CONTEXT_LMB = "Edit beacon name",
+ SCREENTIP_CONTEXT_RMB = "Lock/Unlock beacon",
+ )
+ )
+ AddElement(/datum/element/contextual_screentip_tools, multitool_tips)
+
+ radio = new(src)
+ radio.set_listening(FALSE)
+ radio.set_frequency(FREQ_RADIO_NAV_BEACON)
+ radio.freqlock = RADIO_FREQENCY_LOCKED
+ radio.recalculateChannels()
+
+ START_PROCESSING(SSmachines, src)
+ COOLDOWN_START(src, next_automatic_message_time, automatic_message_cooldown)
+
/obj/machinery/spaceship_navigation_beacon/emp_act()
locked = TRUE
+ update_icon_state()
/obj/machinery/spaceship_navigation_beacon/Destroy()
SSshuttle.beacon_list -= src
return ..()
-// update the icon_state
/obj/machinery/spaceship_navigation_beacon/update_icon_state()
- icon_state = "[base_icon_state][powered() ? null : "-open"]"
+ icon_state = "[base_icon_state][locked ? "_locked" : "_active"]"
return ..()
-/obj/machinery/spaceship_navigation_beacon/multitool_act(mob/living/user, obj/item/multitool/I)
+/obj/machinery/spaceship_navigation_beacon/multitool_act(mob/living/user, obj/item/tool)
..()
- if(panel_open)
- var/chosen_tag = tgui_input_text(user, "Enter the custom name for this beacon", "Beacon Reclassification", max_length = MAX_NAME_LEN)
- if(!chosen_tag)
- return
- var/new_name = "Beacon_[chosen_tag]"
- if(new_name && Adjacent(user))
- name = new_name
- to_chat(user, span_notice("You change beacon name to [name]."))
- else
- locked =!locked
- to_chat(user, span_notice("You [locked ? "" : "un"]lock [src]."))
+
+ var/chosen_tag = tgui_input_text(user, "Enter the custom name for this beacon", "Beacon Reclassification", max_length = MAX_NAME_LEN)
+ if(!chosen_tag)
+ return
+
+ var/new_name = "[initial(src.name)] [chosen_tag]"
+ if(new_name && Adjacent(user))
+ name = new_name
+ balloon_alert_to_viewers("beacon renamed")
+
+ return TRUE
+
+/obj/machinery/spaceship_navigation_beacon/multitool_act_secondary(mob/living/user, obj/item/tool)
+ ..()
+
+ locked = !locked
+
+ balloon_alert_to_viewers("[!locked ? "unlocked" : "locked"]")
+ update_icon_state()
+
return TRUE
/obj/machinery/spaceship_navigation_beacon/examine()
.=..()
- . += "Status: [locked ? "LOCKED" : "Stable"] "
+ . += span_notice("'[FREQ_RADIO_NAV_BEACON / 10] kHz' is printed on the side.")
+ if(locked)
+ . += span_warning("The blinking red light on the front indicates that this beacon is LOCKED.")
+ else
+ . += span_notice("The blinking green light on the front indicates that this beacon is operating normally.")
-/obj/machinery/spaceship_navigation_beacon/attackby(obj/item/W, mob/user, params)
- if(default_deconstruction_screwdriver(user, "core-open", "core", W))
- return
- if(default_deconstruction_crowbar(W))
- return
+/obj/machinery/spaceship_navigation_beacon/process(seconds_per_tick)
+ if(COOLDOWN_FINISHED(src, next_automatic_message_time) && radio)
+ var/automatic_nav_message = "[src], Sector [z], [locked ? "Beacon Locked" : "Beacon Operational"], Grid Coordinates, [x] East, [y] North."
- return ..()
+ radio.talk_into(src, "[automatic_nav_message]")
+
+ COOLDOWN_START(src, next_automatic_message_time, automatic_message_cooldown)
+
+// Item used to actually make nav beacons
+
+/obj/item/folded_navigation_gigabeacon
+ name = "compact radio navigation gigabeacon"
+ desc = "A compact radio navigation gigabeacon, a device used to provide shuttle navigation waypoints in unexplored areas. Must be deployed before use."
+ icon = 'icons/obj/machines/navigation_beacon.dmi'
+ icon_state = "beacon_folded"
+
+/obj/item/folded_navigation_gigabeacon/Initialize(mapload)
+ . = ..()
+ AddComponent(/datum/component/deployable, 3 SECONDS, /obj/machinery/spaceship_navigation_beacon, delete_on_use = TRUE)
+
+/obj/item/folded_navigation_gigabeacon/examine()
+ .=..()
+ . += span_notice("The backside has instructions in various galactic languages detailing how this can be deployed in hand without any special tools.")
+ . += span_notice("'[FREQ_RADIO_NAV_BEACON / 10] kHz' is printed on the side.")
diff --git a/icons/obj/machines/navigation_beacon.dmi b/icons/obj/machines/navigation_beacon.dmi
new file mode 100644
index 0000000000000000000000000000000000000000..f20ca068c52d27e8e6ba1fffd4b209d156306493
GIT binary patch
literal 1087
zcmV-F1i<@=P)V=-0C=2JR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+
z(=$pSoZ^zil2jm5DJeBEIX^ExEk7qEHARVwGbOXA7$|PY#hF%=n41b=qpMC#F3BuQ
z#jYA?QA%n~VkJme#{@%bPJVJWE{o8#Dl549xqv+d0A>F_S^myn2owf@DGUIU$pG{q7y`})+&Oc+X$B!KOIB(((d+uf
zi>LbN*>pWB-#Fh#k6ww@$(mZNp1-KDex?w#zV;n<6VN?SO5eH%un4z$!`SJ5`h5Ln
zRBn8lr#U(iSK`H+-&;N6V~=a4Y~Z@QUf3?@-2c_=O;LO>{38^AZYfAoUgXSroeIoD}dVQoON%h`O^H+hFZU;3#-(D;MBZTG-e
zR=&{8!%e4(qy-%UrSwx9&}rrS_u4+^%5(x90)6SLnTDc6pfCN@2Jrq*=W9pP{$wi9
zAy8W1+5j`?%-kB>`rB^rX)tm>IY3E+3W2Tqzpfpo%Vna)$*-C8t+yh0Wp`=nL$tc%
zcsMcLL-!X-(TmGwAmY#X-iYf4dfyYxRt0`1?H5ezUSC^{-{a7;yfo;wZ@s~JMG0JLF@&&>Z>upu+zg2-{DVMU(GZ$NxPPqM+lVGSNA-?>`L;$
zKmK?%dYMUpZHVY5eU&|c;Q_C7a40VO9(;Z2t2KcCd44FaU0+=Y3JrBV0KE>8*3UF$
z&ITlR{_@y`>^6NVWI~YQ{CqUdJs_0)d^FBSlv>f6pN~e(5hb*~FN$>ln8E-s
zYK|y%o4yokk0_z_rBHK339au7HAj@t`o2(iL^;^U)OB(O}e_6GrPx^9SaQN3&Qgvwr{p002ovPDHLk
FV1jM{2CD!7
literal 0
HcmV?d00001