Actual code changes for ship icons

This commit is contained in:
Aronai Sieyes
2021-06-29 21:22:31 -04:00
parent 3f35658de3
commit fb489e1edc
7 changed files with 104 additions and 37 deletions
+28 -22
View File
@@ -3,20 +3,39 @@
icon = 'icons/obj/overmap.dmi'
icon_state = "object"
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
var/skybox_pixel_x //Shift from lower left corner of skybox
var/skybox_pixel_y //Shift from lower left corner of skybox
var/image/cached_skybox_image //Cachey
/// If set to TRUE will show up on ship sensors for detailed scans
var/scannable
/// Description for scans
var/scanner_desc
/// Icon file to use for skybox
var/skybox_icon
/// Icon state to use for skybox
var/skybox_icon_state
/// Shift from lower left corner of skybox
var/skybox_pixel_x
/// Shift from lower left corner of skybox
var/skybox_pixel_y
/// Cachey
var/image/cached_skybox_image
/// For showing to the pilot of the ship, so they see the 'real' appearance, despite others seeing the unknown ones
var/image/real_appearance
light_system = MOVABLE_LIGHT
light_on = FALSE
/obj/effect/overmap/Initialize()
. = ..()
if(!global.using_map.use_overmap)
return INITIALIZE_HINT_QDEL
/obj/effect/overmap/Destroy()
real_appearance?.loc = null
real_appearance = null
return ..()
//Overlay of how this object should look on other skyboxes
/obj/effect/overmap/proc/get_skybox_representation()
if(!cached_skybox_image)
@@ -45,23 +64,10 @@
SSskybox.rebuild_skyboxes(O.map_z)
/obj/effect/overmap/proc/get_scan_data(mob/user)
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()
. = ..()
if(!global.using_map.use_overmap)
return INITIALIZE_HINT_QDEL
if(known)
plane = PLANE_LIGHTING_ABOVE
for(var/obj/machinery/computer/ship/helm/H in global.machines)
H.get_known_sectors()
/obj/effect/overmap/Crossed(var/obj/effect/overmap/visitable/other)
if(istype(other))
for(var/obj/effect/overmap/visitable/O in loc)