Survey Probe Language Output (#18920)

Survey probes can now output in different languages. Survey probes with
appropriate languages have also been added to the SCC Scout Ship, COC
Surveyor, Database Freighter and House Volvalaad ships, as these are
scientific/exploration vessels.
This commit is contained in:
RustingWithYou
2024-04-15 08:45:45 +00:00
committed by GitHub
parent 417be39b6a
commit 18ff288a92
6 changed files with 224 additions and 43 deletions
+60 -9
View File
@@ -6,9 +6,7 @@
desc_extended = "\
It has different devices, samplers, and drill bits, as well as internal processing computers, \
to inspect the atmosphere, ground, soil, crust, and many other properties and qualities of planetary bodies. \
Commonly used by surveyors, explorers, pioneers, all over the Spur, looking for planets that are actually worth settling or exploiting for resources. \
This probe was manufactured by Orion Express, but it is based on on older model designed by Hephaestus Industries.\
"
Commonly used by surveyors, explorers, pioneers, all over the Spur, looking for planets that are actually worth settling or exploiting for resources. "
desc_info = "\
The probe has to be deployed first before it is used. Wrench it to deploy, then click with empty hand to activate.\
"
@@ -21,6 +19,18 @@
/// Timer of the survey process.
/// If null, it is not currently surveying.
var/timer_id = null
/// The language that the report will output in.
var/report_language
/// Should this probe start deployed? Used for mapped-in probes
var/start_deployed = FALSE
///Extra information for variant types - manufacturer, faction, etc.
var/desc_extra = "This probe was manufactured by Orion Express, but it is based on on older model designed by Hephaestus Industries."
/obj/structure/survey_probe/Initialize(mapload)
. = ..()
desc_extended += desc_extra
if(start_deployed)
deploy()
/obj/structure/survey_probe/attackby(obj/item/item, mob/living/user)
if(!timer_id && item.iswrench())
@@ -30,18 +40,14 @@
SPAN_NOTICE("You unfasten the locking bolts on \the [src], and it deploys, lowering its devices and drill bits to the ground. It is ready to survey."),
)
item.play_tool_sound(user, 30)
anchored = TRUE
density = TRUE
icon_state = "surveying_probe_deployed"
deploy()
else
user.visible_message(
SPAN_NOTICE("\The [user] fastens the locking bolts on \the [src], stowing it."),
SPAN_NOTICE("You fasten the locking bolts \the [src], stowing it. It retracts its devices and drill bits."),
)
item.play_tool_sound(user, 30)
anchored = FALSE
density = FALSE
icon_state = "surveying_probe"
undeploy()
/obj/structure/survey_probe/attack_hand(mob/user as mob)
if(timer_id)
@@ -58,6 +64,16 @@
else
to_chat(user, SPAN_NOTICE("You try to activate \the [src], but its devices and drill bits are not deployed yet."))
/obj/structure/survey_probe/proc/deploy()
anchored = TRUE
density = TRUE
icon_state = "surveying_probe_deployed"
/obj/structure/survey_probe/proc/undeploy()
anchored = FALSE
density = FALSE
icon_state = "surveying_probe"
/obj/structure/survey_probe/proc/survey_end()
if(timer_id)
// message
@@ -125,6 +141,13 @@
<br><span class=\"paper_field\"></span>\
<br><br>\
"
// Translate to a specific written language
if(report_language)
var/datum/language/L = GLOB.all_languages[report_language]
if(L && L.written_style)
var/languagetext = "\[lang=[L.key]]"
languagetext += "[report_contents]\[/lang]"
report_contents = languagetext
// print the report
playsound(get_turf(src), 'sound/machines/dotprinter.ogg', 30, 1)
@@ -134,3 +157,31 @@
timer_id = null
icon_state = "surveying_probe_deployed"
// Language-specific probe versions for mapping.
/obj/structure/survey_probe/sol
desc_extra = "This probe is an older model, manufactured by Hephaestus Industries. A small emblem on the side bears the flag of the Solarian Alliance."
report_language = LANGUAGE_SOL_COMMON
/obj/structure/survey_probe/pra
desc_extra = "This probe is manufactured by NanoTrasen, based on an older Hephaestus design. A small emblem on the side bears the flag of the People's Republic of Adhomai."
report_language = LANGUAGE_SIIK_MAAS
/obj/structure/survey_probe/elyra
desc_extra = "This probe is a newer model manufactured by the Elyra-based Elco corporation for phoron deposit survey. A small emblem on the side bears the flag of the Republic of Elyra."
report_language = LANGUAGE_ELYRAN_STANDARD
/obj/structure/survey_probe/coc
desc_extra = "This probe was manufactured by Orion Express, but it is based on on older model designed by Hephaestus Industries. A small emblem on the side bears the flag of the Coalition of Colonies."
report_language = LANGUAGE_GUTTER
/obj/structure/survey_probe/hegemony
desc_extra = "This probe is a newer model designed and manufactured by Hephaestus Industries. A small emblem on the side bears the flag of the Izweski Hegemony."
report_language = LANGUAGE_UNATHI
/obj/structure/survey_probe/dominia
desc_extra = "This probe is a newer model designed and manufactured by the Imperial Engineering and Shipbuilding Conglomerate, in collaboration with Zavodskoi Interstellar. A small emblem on the side bears the flag of the Empire of Dominia."
report_language = LANGUAGE_TRADEBAND
/obj/structure/survey_probe/skrell
desc_extra = "This probe is a newer model designed and manufactured by Tuz'qlip Researchers, in collaboration with Einstein Engines. A small emblem on the side bears the flag of the Nralakk Federation."
report_language = LANGUAGE_SKRELLIAN