69 lines
1.8 KiB
Lua
69 lines
1.8 KiB
Lua
local Node, TileSheet = Smc.requireNode(), Smc.requireTileSheet()
|
|
|
|
local PrimitiveCraftHandler = Smc.requireCraftSystemPrimitiveCraftHandler()
|
|
|
|
---@type Node.NodeDefinition
|
|
local defaultRockDef = {
|
|
settings = {
|
|
name = '',
|
|
tiles = {},
|
|
groups = {
|
|
dig_immediate = 2,
|
|
}
|
|
},
|
|
}
|
|
|
|
---@type Node
|
|
local defaultRock = Node:getExtended(defaultRockDef)
|
|
|
|
local rockFactory = defaultRock:getFactory()
|
|
|
|
---@type TileSheet
|
|
local ts = TileSheet:new("rocks_sheet.png", 16, 16)
|
|
|
|
local function registerRocksTypes(postfix, x)
|
|
rockFactory:registerNodesByShortDef({
|
|
{"sylite"..postfix, {ts:t(x, 0)}},
|
|
{"sylite_gray"..postfix, {ts:t(x, 1)}},
|
|
{"sylite_black"..postfix, {ts:t(x, 2)}},
|
|
{"tauitite_light"..postfix, {ts:t(x, 3)}},
|
|
{"tauitite_pink"..postfix, {ts:t(x, 4)}},
|
|
{"tauitite"..postfix, {ts:t(x, 5)}},
|
|
{"falmyte_light"..postfix, {ts:t(x, 6)}},
|
|
{"falmyte_yellow"..postfix, {ts:t(x, 7)}},
|
|
{"falmyte_red"..postfix, {ts:t(x, 8)}},
|
|
{"falmyte_dark"..postfix, {ts:t(x, 9)}},
|
|
{"iyellite"..postfix, {ts:t(x, 14)}},
|
|
{"falmyte"..postfix, {ts:t(x, 14)}},
|
|
{"hapcoryte"..postfix, {ts:t(x, 14)}},
|
|
{"burcite"..postfix, {ts:t(x, 14)}},
|
|
{"felhor"..postfix, {ts:t(x, 14)}},
|
|
{"malachite"..postfix, {ts:t(x, 14)}}
|
|
})
|
|
end
|
|
|
|
local function registerPilarStaff(rock, y)
|
|
local columnTop = ts:t(9, y)
|
|
|
|
rockFactory:registerNodesByShortDef({
|
|
{rock..'_fluted_column', {columnTop, columnTop, ts:t(6, y)}},
|
|
{rock..'_ionic_chapiter', {
|
|
ts:t(3, y),
|
|
columnTop,
|
|
ts:t(7, y),
|
|
ts:t(7, y),
|
|
ts:t(8, y),
|
|
ts:t(8, y)}},
|
|
})
|
|
end
|
|
|
|
registerPilarStaff('sylite', 0)
|
|
registerPilarStaff('sylite_gray', 1)
|
|
registerPilarStaff('sylite_black', 2)
|
|
|
|
registerRocksTypes('', 0)
|
|
registerRocksTypes('_chipped', 1)
|
|
registerRocksTypes('_block', 3)
|
|
registerRocksTypes('_bricks', 4)
|
|
registerRocksTypes('_bricks_2', 5)
|