Skip to content

Commit

Permalink
Fix global world var
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymtorres committed Oct 22, 2024
1 parent 09c5b26 commit b2ec883
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions export-map.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ end

-- copied from agitation-rebalance.lua
-- check only one tile at the center of the map at ground lvl
-- (this ignore different biomes on the edges of the map)
-- (this ignores different biomes on the edges of the map)
local function get_evilness()
-- check around ground level
local lvls_above_ground = world.worldgen.worldgen_parms.levels_above_ground
local ground_z = (world.map.z_count - 2) - lvls_above_ground

local lvls_above
lvls_above = df.global.world.worldgen.worldgen_parms.levels_above_ground
local ground_z = (df.global.world.map.z_count - 2) - lvls_above
local xmax, ymax = dfhack.maps.getTileSize()
local center_x, center_y = math.floor(xmax/2), math.floor(ymax/2)
local rgnX, rgnY = dfhack.maps.getTileBiomeRgn(center_x, center_y, ground_z)
Expand Down Expand Up @@ -183,7 +185,7 @@ local function export_all_z_levels(fortress_name, folder, options)
end

-- start from bottom z-level (underworld) to top z-level (sky)
for z = zmin, zmax-1 do
for z = 0, 1-1 do
local level_data = {}
for y = 0, ymax - 1 do
local row_data = {}
Expand Down

0 comments on commit b2ec883

Please sign in to comment.