will this work?
function gadget:GetInfo()
return {
name = "Invert Map",
desc = "Invert Map Height",
author = "SmokeDragon",
date = "2025-09-14",
license = "MIT",
layer = 0,
enabled = true
}
end
if not gadgetHandler:IsSyncedCode() then
return
end
function gadget:Initialize()
local mapSizeX = Game.mapSizeX
local mapSizeZ = Game.mapSizeZ
local step = 8
for x = 0, mapSizeX, step do
for z = 0, mapSizeZ, step do
local h = Spring.GetGroundHeight(x, z)
Spring.SetHeightMap(x, z, -h)
end
end
Spring.RecalculatePathMap()
end