Update from 22.06.2025: add MapGen mod outline, fix some require() issues

This commit is contained in:
2025-06-22 19:20:06 +07:00
parent 50606c7dfe
commit c0de09d597
45 changed files with 621 additions and 119 deletions

View File

@@ -0,0 +1,20 @@
local math = math
-- Utility class with static methods
local MapGenUtils = {
calculateWeight = function(value, min, max)
local center = (min + max) / 2
local span = (max - min) / 2
return 1 - math.abs((value - center) / span)
end,
---@return boolean
isInRange = function(value, range)
if value >= range.min and value <= range.max then
return true
end
return false
end
}
return MapGenUtils