Improve ship scanners

This commit is contained in:
Aronai Sieyes
2020-04-17 13:11:03 -04:00
parent de1dac382e
commit 3551edd8cc
3 changed files with 24 additions and 4 deletions

View File

@@ -5,6 +5,8 @@
var/known = 1 //shows up on nav computers automatically
var/scannable //if set to TRUE will show up on ship sensors for detailed scans
var/scanner_name //name for scans, replaces name once scanned
var/scanner_desc //description for scans
var/skybox_icon //Icon file to use for skybox
var/skybox_icon_state //Icon state to use for skybox
@@ -40,7 +42,12 @@
SSskybox.rebuild_skyboxes(O.map_z)
/obj/effect/overmap/proc/get_scan_data(mob/user)
return desc
if(scanner_name && (name != scanner_name)) //A silly check, but 'name' is part of appearance, so more expensive than you might think
name = scanner_name
var/dat = {"\[b\]Scan conducted at\[/b\]: [stationtime2text()] [stationdate2text()]\n\[b\]Grid coordinates\[/b\]: [x],[y]\n\n[scanner_desc]"}
return dat
/obj/effect/overmap/Initialize()
. = ..()

View File

@@ -4,6 +4,7 @@
/obj/effect/overmap/visitable
name = "map object"
scannable = TRUE
scanner_desc = "!! No Data Available !!"
var/list/map_z = list()
var/list/extra_z_levels //if you need to manually insist that these z-levels are part of this sector, for things like edge-of-map step trigger transitions rather than multi-z complexes

View File

@@ -10,8 +10,9 @@
// Uses Lorentzian dynamics to avoid going too fast.
/obj/effect/overmap/visitable/ship
name = "generic ship"
desc = "Space faring vessel."
name = "spacecraft"
desc = "This marker represents a spaceship. Scan it for more information."
scanner_desc = "Unknown spacefaring vessel."
icon_state = "ship"
var/moving_state = "ship_moving"
@@ -54,8 +55,19 @@
/obj/effect/overmap/visitable/ship/get_scan_data(mob/user)
. = ..()
if(!is_still())
. += "<br>Heading: [get_heading_degrees()], speed [get_speed() * 1000]"
. += {"\n\[i\]Heading\[/i\]: [get_heading_degrees()]\n\[i\]Velocity\[/i\]: [get_speed() * 1000]"}
else
. += {"\n\[i\]Vessel was stationary at time of scan.\[/i\]\n"}
var/life = 0
for(var/mob/living/L in living_mob_list)
if(L.z in map_z) //Things inside things we'll consider shielded, otherwise we'd want to use get_z(L)
life++
. += {"\[i\]Life Signs\[/i\]: [life ? life : "None"]"}
//Projected acceleration based on information from engines
/obj/effect/overmap/visitable/ship/proc/get_acceleration()