mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Add skybox planet sprite for Virgo3b, modify midpoint
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user