Add skybox planet sprite for Virgo3b, modify midpoint

This commit is contained in:
Chompstation Bot
2021-07-10 23:48:50 +00:00
parent 58f6f5a71a
commit d9cb00a124
10 changed files with 25276 additions and 23 deletions

View File

@@ -93,13 +93,17 @@ SUBSYSTEM_DEF(skybox)
. = ..()
/datum/controller/subsystem/skybox/proc/get_skybox(z)
if(!subsystem_initialized)
return // WAIT
if(!skybox_cache["[z]"])
skybox_cache["[z]"] = generate_skybox(z)
return skybox_cache["[z]"]
/datum/controller/subsystem/skybox/proc/generate_skybox(z)
var/datum/skybox_settings/settings = global.using_map.get_skybox_datum(z)
var/new_overlays = list()
var/image/res = image(settings.icon)
res.appearance_flags = KEEP_TOGETHER
@@ -111,23 +115,26 @@ SUBSYSTEM_DEF(skybox)
stars.appearance_flags = RESET_COLOR
base.overlays += stars
res.overlays += base
new_overlays += base
if(global.using_map.use_overmap && settings.use_overmap_details)
var/obj/effect/overmap/visitable/O = get_overmap_sector(z)
if(istype(O))
var/image/overmap = image(settings.icon)
overmap.overlays += O.generate_skybox()
var/image/self_image = O.generate_skybox(z)
new_overlays += self_image
for(var/obj/effect/overmap/visitable/other in O.loc)
if(other != O)
overmap.overlays += other.get_skybox_representation()
overmap.appearance_flags = RESET_COLOR
res.overlays += overmap
new_overlays += other.get_skybox_representation(z)
// Allow events to apply custom overlays to skybox! (Awesome!)
for(var/datum/event/E in SSevents.active_events)
if(E.has_skybox_image && E.isRunning && (z in E.affecting_z))
res.overlays += E.get_skybox_image()
new_overlays += E.get_skybox_image()
for(var/image/I in new_overlays)
I.appearance_flags |= RESET_COLOR
res.overlays = new_overlays
return res