mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
Greek support, modular weather, command history for console window
Former-commit-id: b72d0b018c084e80cf4fef77e1b1a81101d6daea Former-commit-id: 32da6a2998826de6519a901dcff7bf058f689b2f
This commit is contained in:
@@ -22,10 +22,10 @@ class ExportMap : ConsoleCommand {
|
||||
if (args.size == 2) {
|
||||
buildColorTable()
|
||||
|
||||
var mapData = ByteArray(Terrarum.ingame.map.width * Terrarum.ingame.map.height * 3)
|
||||
var mapData = ByteArray(Terrarum.ingame.world.width * Terrarum.ingame.world.height * 3)
|
||||
var mapDataPointer = 0
|
||||
|
||||
for (tile in Terrarum.ingame.map.terrainIterator()) {
|
||||
for (tile in Terrarum.ingame.world.terrainIterator()) {
|
||||
val colArray = (colorTable as Map<Int, Col4096>)
|
||||
.getOrElse(tile, { Col4096(0xFFF) }).toByteArray()
|
||||
|
||||
@@ -44,7 +44,7 @@ class ExportMap : ConsoleCommand {
|
||||
|
||||
try {
|
||||
RasterWriter.writePNG_RGB(
|
||||
Terrarum.ingame.map.width, Terrarum.ingame.map.height, mapData, dir + args[1] + ".png")
|
||||
Terrarum.ingame.world.width, Terrarum.ingame.world.height, mapData, dir + args[1] + ".png")
|
||||
Echo().execute("ExportMap: exported to " + args[1] + ".png")
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user