MapGen: add custom ore type
This commit is contained in:
@@ -6,7 +6,7 @@ local coreGetValueNoise = core.get_value_noise
|
|||||||
|
|
||||||
local getInstance = Class.getInstance
|
local getInstance = Class.getInstance
|
||||||
|
|
||||||
---@alias MapGen.Ore.Type 'cheesed'
|
---@alias MapGen.Ore.Type 'cheesed'|'custom'
|
||||||
---@alias MapGen.Ore.NoiseParams {baseNoise:NoiseParams, xNoise?:NoiseParams, yNoise?:NoiseParams, zNoise?:NoiseParams}
|
---@alias MapGen.Ore.NoiseParams {baseNoise:NoiseParams, xNoise?:NoiseParams, yNoise?:NoiseParams, zNoise?:NoiseParams}
|
||||||
---@alias MapGen.Ore.ValueNoise {baseNoise:ValueNoise, xNoise?:ValueNoise, yNoise?:ValueNoise, zNoise?:ValueNoise}
|
---@alias MapGen.Ore.ValueNoise {baseNoise:ValueNoise, xNoise?:ValueNoise, yNoise?:ValueNoise, zNoise?:ValueNoise}
|
||||||
|
|
||||||
@@ -146,6 +146,8 @@ function Ore:generate(factors, data, data2, index, x, y, z)
|
|||||||
|
|
||||||
if self.type == 'cheesed' then
|
if self.type == 'cheesed' then
|
||||||
return self:generateCheesed(factors, data, data2, index, x, y, z)
|
return self:generateCheesed(factors, data, data2, index, x, y, z)
|
||||||
|
elseif self.type == 'custom' then
|
||||||
|
return self:oreFunc(factors, data, data2, index, x, y, z)
|
||||||
else
|
else
|
||||||
error()
|
error()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user