147 lines
3.2 KiB
Lua
147 lines
3.2 KiB
Lua
---@type TileSheet
|
|
local TileSheet = Mod.getInfo('smc__core__tilesheet').require('TileSheet')
|
|
|
|
---@type Node
|
|
local Node = Mod.getInfo('smc__core__node').require('Node')
|
|
|
|
---@type Node.NodeDefinition
|
|
local defaultRockDef = {
|
|
settings = {
|
|
name = "",
|
|
_description = "A rocks",
|
|
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_black', 2)
|
|
|
|
registerRocksTypes('', 0)
|
|
registerRocksTypes('_chipped', 1)
|
|
registerRocksTypes('_block', 3)
|
|
registerRocksTypes('_bricks', 4)
|
|
registerRocksTypes('_bricks_2', 5)
|
|
|
|
--[[
|
|
rockFactory:registerItems({
|
|
---@type Node.NodeDefinition
|
|
{
|
|
settings = {
|
|
name = "sylite",
|
|
title = "Sylite",
|
|
--description = "",
|
|
tiles = {"rocks_sheet.png^[sheet:7x15:0,0"},
|
|
},
|
|
},
|
|
---@type Node.NodeDefinition
|
|
{
|
|
settings = {
|
|
name = "tauitite",
|
|
title = "Tauitite",
|
|
--description = "",
|
|
tiles = {"rocks_sheet.png^[sheet:7x15:0,2"},
|
|
},
|
|
},
|
|
---@type Node.NodeDefinition
|
|
{
|
|
settings = {
|
|
name = "iyellite",
|
|
title = "Iyellite",
|
|
--description = "",
|
|
tiles = {"rocks_sheet.png^[sheet:7x15:0,4"},
|
|
},
|
|
},
|
|
---@type Node.NodeDefinition
|
|
{
|
|
settings = {
|
|
name = "falmyte",
|
|
title = "Falmyte",
|
|
--description = "",
|
|
tiles = {"rocks_sheet.png^[sheet:7x15:0,6"},
|
|
},
|
|
},
|
|
---@type Node.NodeDefinition
|
|
{
|
|
settings = {
|
|
name = "hapcoryte",
|
|
title = "Hapcoryte",
|
|
--description = "",
|
|
tiles = {"rocks_sheet.png^[sheet:7x15:0,8"},
|
|
},
|
|
},
|
|
---@type Node.NodeDefinition
|
|
{
|
|
settings = {
|
|
name = "burcite",
|
|
title = "Burcite",
|
|
--description = "",
|
|
tiles = {"rocks_sheet.png^[sheet:7x15:0,10"},
|
|
},
|
|
},
|
|
---@type Node.NodeDefinition
|
|
{
|
|
settings = {
|
|
name = "felhor",
|
|
title = "Felhor",
|
|
--description = "",
|
|
tiles = {"rocks_sheet.png^[sheet:7x15:0,12"},
|
|
},
|
|
},
|
|
---@type Node.NodeDefinition
|
|
{
|
|
settings = {
|
|
name = "malachite",
|
|
title = "Malachite",
|
|
--description = "",
|
|
tiles = {"rocks_sheet.png^[sheet:7x15:0,14"},
|
|
},
|
|
},
|
|
})
|
|
|
|
--]] |