mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] Replace render nanomaps workflow with Holomap piggyback (#10976)
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
99882c7113
commit
55d2c85ea1
@@ -21,4 +21,30 @@ SUBSYSTEM_DEF(holomaps)
|
||||
/datum/controller/subsystem/holomaps/stat_entry(msg)
|
||||
if (!GLOB.Debug2)
|
||||
return // Only show up in stat panel if debugging is enabled.
|
||||
return ..() //CHOMPEdit
|
||||
. = ..()
|
||||
|
||||
/datum/controller/subsystem/holomaps/proc/dump_nanomap_icons()
|
||||
. = list()
|
||||
|
||||
for(var/z = 1 to world.maxz)
|
||||
var/icon/base = icon(HOLOMAP_ICON, "blank") // start at 480x480
|
||||
base.Scale(world.maxx, world.maxy) // scale down to perfectly fit the map size
|
||||
|
||||
var/icon/walls = icon(holoMiniMaps[z])
|
||||
var/icon/areas = extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAPAREAS]_[z]"]
|
||||
|
||||
base.Blend(walls, ICON_OVERLAY)
|
||||
if(areas)
|
||||
base.Blend(areas, ICON_OVERLAY)
|
||||
|
||||
var/fname = "data/spritesheets/minimap_[z].png"
|
||||
|
||||
// Copy to a file
|
||||
fcopy(base, fname)
|
||||
|
||||
// Strip DMI metadata to prevent any ~issues~
|
||||
var/error = rustg_dmi_strip_metadata(fname)
|
||||
if(length(error))
|
||||
stack_trace("Failed to strip [fname]: [error]")
|
||||
|
||||
.["minimap_[z].png"] = fname
|
||||
|
||||
Reference in New Issue
Block a user