mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Improve ship scanners
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
var/known = 1 //shows up on nav computers automatically
|
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/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 //Icon file to use for skybox
|
||||||
var/skybox_icon_state //Icon state to use for skybox
|
var/skybox_icon_state //Icon state to use for skybox
|
||||||
@@ -40,7 +42,12 @@
|
|||||||
SSskybox.rebuild_skyboxes(O.map_z)
|
SSskybox.rebuild_skyboxes(O.map_z)
|
||||||
|
|
||||||
/obj/effect/overmap/proc/get_scan_data(mob/user)
|
/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()
|
/obj/effect/overmap/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
/obj/effect/overmap/visitable
|
/obj/effect/overmap/visitable
|
||||||
name = "map object"
|
name = "map object"
|
||||||
scannable = TRUE
|
scannable = TRUE
|
||||||
|
scanner_desc = "!! No Data Available !!"
|
||||||
|
|
||||||
var/list/map_z = list()
|
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
|
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
|
||||||
|
|||||||
@@ -10,8 +10,9 @@
|
|||||||
// Uses Lorentzian dynamics to avoid going too fast.
|
// Uses Lorentzian dynamics to avoid going too fast.
|
||||||
|
|
||||||
/obj/effect/overmap/visitable/ship
|
/obj/effect/overmap/visitable/ship
|
||||||
name = "generic ship"
|
name = "spacecraft"
|
||||||
desc = "Space faring vessel."
|
desc = "This marker represents a spaceship. Scan it for more information."
|
||||||
|
scanner_desc = "Unknown spacefaring vessel."
|
||||||
icon_state = "ship"
|
icon_state = "ship"
|
||||||
var/moving_state = "ship_moving"
|
var/moving_state = "ship_moving"
|
||||||
|
|
||||||
@@ -54,8 +55,19 @@
|
|||||||
|
|
||||||
/obj/effect/overmap/visitable/ship/get_scan_data(mob/user)
|
/obj/effect/overmap/visitable/ship/get_scan_data(mob/user)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
if(!is_still())
|
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
|
//Projected acceleration based on information from engines
|
||||||
/obj/effect/overmap/visitable/ship/proc/get_acceleration()
|
/obj/effect/overmap/visitable/ship/proc/get_acceleration()
|
||||||
|
|||||||
Reference in New Issue
Block a user