Expedition Fluff Expansion - New Survey Probes (#19364)

Splits the current survey probes into two types: Atmosphere and Ground,
as well as adding a Geomagnetic variant. Replaces some of the currently
mapped in atmosphere probes with the two other types.
This commit is contained in:
Sparky
2024-06-26 10:26:53 +00:00
committed by GitHub
parent d75afedaef
commit af359ab854
13 changed files with 298 additions and 72 deletions
+120 -57
View File
@@ -1,12 +1,12 @@
/obj/structure/survey_probe
name = "survey probe"
name = "atmosphere probe"
desc = "\
All-in-one survey probe, able to provide preliminary analysis of planetary bodies. \
An atmospheric survey probe, able to provide preliminary analysis of the atmosphere and weather patterns of planetary bodies. \
"
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. "
It has different devices and samplers, as well as internal processing computers, \
to inspect the atmosphere and other properties and qualities of planetary bodies. \
Commonly used by surveyors, explorers, pioneers, all over the Spur, looking to determine the suitability of planets for settlement. "
desc_info = "\
The probe has to be deployed first before it is used. Wrench it to deploy, then click with empty hand to activate.\
"
@@ -25,6 +25,7 @@
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."
var/survey_type = "atmospheric"
/obj/structure/survey_probe/Initialize(mapload)
. = ..()
@@ -51,28 +52,28 @@
/obj/structure/survey_probe/attack_hand(mob/user as mob)
if(timer_id)
to_chat(user, SPAN_NOTICE("\The [src] is active, sampling the ground and atmosphere."))
to_chat(user, SPAN_NOTICE("\The [src] is active."))
return
if(anchored)
user.visible_message(
SPAN_NOTICE("\The [user] activates \the [src], starting the surveying process."),
SPAN_NOTICE("You activate \the [src], starting the surveying process. It begins drilling into the ground and sampling the atmosphere."),
SPAN_NOTICE("You activate \the [src], starting the surveying process."),
)
timer_id = addtimer(CALLBACK(src, PROC_REF(survey_end)), 20 SECONDS)
icon_state = "surveying_probe_active"
icon_state = "[initial(icon_state)]_active"
else
to_chat(user, SPAN_NOTICE("You try to activate \the [src], but its devices and drill bits are not deployed yet."))
to_chat(user, SPAN_NOTICE("You try to activate \the [src], but it is not deployed yet."))
/obj/structure/survey_probe/proc/deploy()
anchored = TRUE
density = TRUE
icon_state = "surveying_probe_deployed"
icon_state = "[initial(icon_state)]_deployed"
/obj/structure/survey_probe/proc/undeploy()
anchored = FALSE
density = FALSE
icon_state = "surveying_probe"
icon_state = initial(icon_state)
/obj/structure/survey_probe/proc/survey_end()
if(timer_id)
@@ -81,66 +82,28 @@
SPAN_NOTICE("\The [src] finishes the surveying process, and prints out a report."),
)
// report vars and default vals
var/report_location = "unknown/invalid"
var/ground_report = "Invalid or insufficient data, ground survey unsuccessful. "
var/atmos_report = "Invalid or insufficient data, atmospheric survey unsuccessful. "
// turf
var/turf/turf = get_turf(src)
var/turf_is_exoplanet = istype(turf, /turf/simulated/floor/exoplanet)
var/turf_is_asteroid = istype(turf, /turf/unsimulated/floor/asteroid)
var/turf_is_hard_floor = istype(turf, /turf/simulated/floor/tiled)
var/turf_is_fake_grass = istype(turf, /turf/simulated/floor/grass)
// atmos
var/datum/gas_mixture/air = turf.return_air()
if(air.total_moles>0)
atmos_report = english_list(atmosanalyzer_scan(turf, air))
// not exoplanet turf
if(turf_is_hard_floor)
ground_report += "The probe cannot penetrate the hard metal floor."
else if(turf_is_fake_grass)
ground_report += "The probe detects soft soil, but it cannot penetrate the ground deep enough to get any meaningful data."
else if(!(turf_is_exoplanet || turf_is_asteroid))
ground_report += "The probe cannot penetrate the ground deep enough to get any meaningful data."
// ground survey from sector / exoplanet
if((turf_is_exoplanet || turf_is_asteroid) && SSatlas.current_map.use_overmap)
var/obj/effect/overmap/visitable/sector/sector = GLOB.map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/exoplanet = sector
if(istype(sector))
report_location = sector.name
ground_report = ""
if(istype(exoplanet))
ground_report += "<b>Estimated Mass and Volume: </b>[exoplanet.massvolume]BSS(Biesels)"
ground_report += "<br><b>Surface Gravity: </b>[exoplanet.surfacegravity]Gs"
ground_report += "<br><b>Geological Variables: </b>[exoplanet.geology]"
ground_report += "<br><b>Surface Water Coverage: </b>[exoplanet.surfacewater]"
ground_report += "<br><b>Apparent Weather Data: </b>[exoplanet.weather]"
ground_report += "<br>"
if(sector.ground_survey_result)
ground_report += sector.ground_survey_result
// report vars and default vals
var/report_location = get_location()
var/report = get_report(turf, turf_is_exoplanet, turf_is_asteroid)
// report text
var/timestamp = "[GLOB.game_year]-[time2text(world.realtime, "MM-DD")] [worldtime2text()]"
var/report_name = "surveying report - [report_location]"
var/report_name = "[survey_type] survey report - [report_location]"
var/report_contents = "\
<br><large><b>Survey target: </b>[report_location]</large>\
<br><b>Timestamp of survey: </b>[timestamp]\
<br><b>Signature of surveyor: </b><span class=\"paper_field\"></span>\
<br><br>\
<br><b>Ground survey results:</b>\
<br><small>[ground_report]</small>\
<br><br>\
<br><b>Atmospheric survey results:</b>\
<br><small>[atmos_report]</small>\
<br>[report]\
<br><br>\
<br><b>Additional notes: </b><span class=\"paper_field\"></span>\
<br><span class=\"paper_field\"></span>\
<br><br>\
"
<br><br>"
// Translate to a specific written language
if(report_language)
var/datum/language/L = GLOB.all_languages[report_language]
@@ -151,11 +114,33 @@
// print the report
playsound(get_turf(src), 'sound/machines/dotprinter.ogg', 30, 1)
new/obj/item/paper/(get_turf(src), report_contents, report_name)
new /obj/item/paper/(get_turf(src), report_contents, report_name)
// fin
timer_id = null
icon_state = "surveying_probe_deployed"
icon_state = "[initial(icon_state)]_deployed"
/obj/structure/survey_probe/proc/get_report(var/turf/T, var/is_exoplanet, var/is_asteroid)
. = "<b>Atmospheric survey results:</b>"
var/datum/gas_mixture/air = T.return_air()
if(air && air.total_moles>0)
. += "<br><small>[english_list(atmosanalyzer_scan(T, air))]</small>"
if((is_exoplanet || is_asteroid) && SSatlas.current_map.use_overmap)
var/obj/effect/overmap/visitable/sector/exoplanet/exoplanet = GLOB.map_sectors["[z]"]
if(istype(exoplanet))
. += "<br><b>Apparent Weather Data: </b>[exoplanet.weather]"
else
. += "<br>No local weather patterns detected"
else
. += "<br>No atmospheric data available"
else
. += "<br>No atmosphere detected"
/obj/structure/survey_probe/proc/get_location()
var/obj/effect/overmap/visitable/sector/sector = GLOB.map_sectors["[z]"]
if(istype(sector))
return sector.name
return "Unknown location"
// Language-specific probe versions for mapping.
/obj/structure/survey_probe/sol
@@ -185,3 +170,81 @@
/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
/obj/structure/survey_probe/ground
name = "ground probe"
desc = "\
An ground survey probe, able to provide preliminary analysis of the surface of planetary bodies. \
"
desc_extended = "\
It has different devices and drill bits, as well as internal processing computers, \
to inspect the ground, soil and crust of planetary bodies. \
Commonly used by surveyors, explorers, pioneers, all over the Spur, looking to determine the mineral value of planets for settlement. "
desc_info = "\
The probe has to be deployed first before it is used. Wrench it to deploy, then click with empty hand to activate."
icon_state = "ground_probe"
survey_type = "ground"
/obj/structure/survey_probe/ground/get_report(T, is_exoplanet, is_asteroid)
// turf
var/is_hard_floor = istype(T, /turf/simulated/floor/tiled)
var/is_fake_grass = istype(T, /turf/simulated/floor/grass)
. = "<b>Ground survey results:</b>"
// not exoplanet turf
if(is_hard_floor)
. += "The probe cannot penetrate the hard metal floor."
else if(is_fake_grass)
. += "The probe detects soft soil, but it cannot penetrate the ground deep enough to get any meaningful data."
else if(!(is_exoplanet || is_asteroid))
. += "The probe cannot penetrate the ground deep enough to get any meaningful data."
// survey from sector / exoplanet
if((is_exoplanet || is_asteroid) && SSatlas.current_map.use_overmap)
var/obj/effect/overmap/visitable/sector/sector = GLOB.map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/exoplanet = sector
if(istype(sector))
if(istype(exoplanet))
. += "<br><b>Estimated Mass and Volume: </b>[exoplanet.massvolume]BSS(Biesels)"
. += "<br><b>Surface Gravity: </b>[exoplanet.surfacegravity]Gs"
. += "<br><b>Geological Variables: </b>[exoplanet.geology]"
. += "<br><b>Surface Water Coverage: </b>[exoplanet.surfacewater]"
if(sector.ground_survey_result)
. += sector.ground_survey_result
else
. += "<br>No data available from ground analysis"
/obj/structure/survey_probe/magnet
name = "geomagnetic probe"
desc = "\
An geomagnetic survey probe, able to provide preliminary analysis of the magnetic field of planetary bodies. \
"
desc_extended = "\
It has different devices and instruments bits, as well as internal processing computers, \
to inspect the magnetic field and magnetosphere of planetary bodies. \
Commonly used by surveyors, explorers, pioneers, all over the Spur, looking to determine the sefety and comfort of planets for settlement. "
desc_info = "\
The probe has to be deployed first before it is used. Wrench it to deploy, then click with empty hand to activate."
icon_state = "magnet_probe"
survey_type = "geomagnetic"
/obj/structure/survey_probe/magnet/get_report(T, is_exoplanet, is_asteroid)
. = "<b>Geomagnetic survey results:</b>"
// survey from sector / exoplanet
if((is_exoplanet || is_asteroid) && SSatlas.current_map.use_overmap)
var/obj/effect/overmap/visitable/sector/sector = GLOB.map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/exoplanet = sector
if(istype(sector))
if(istype(exoplanet))
. += "<br><b>Magnetic Field Strength: </b>[exoplanet.magnet_strength]"
. += "<br><b>True North/Magnetic North Differential: </b>[exoplanet.magnet_difference]"
. += "<br><b>Detected Magnetosphere Particles: </b>[exoplanet.magnet_particles]"
. += "<br><b>Planetary Cycle Period: </b>[exoplanet.day_length]"
if(sector.magnet_survey_result)
. += sector.magnet_survey_result
else
. += "<br>No data available from geomagnetic analysis"
else
. += "<br>No data available from geomagnetic analysis"