Create liquids mod
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
name = smc__game__items__items_loader
|
name = smc__game__items__items_loader
|
||||||
description = Include this mod in your `depends` to ensure all items are registered
|
description = Include this mod in your `depends` to ensure all items are registered
|
||||||
depends = smc__game__items__rocks, smc__game__items__log,
|
depends = smc__game__items__rocks, smc__game__items__log, smc__game__items__soils, smc__game__items__liquids
|
||||||
|
|||||||
94
mods/GAME/ITEMS/Liquids/init.lua
Normal file
94
mods/GAME/ITEMS/Liquids/init.lua
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
---@type Node.NodeDefinition
|
||||||
|
local defaultLiquidDef = {
|
||||||
|
settings = {
|
||||||
|
name = '',
|
||||||
|
tiles = {},
|
||||||
|
waving = 3,
|
||||||
|
use_texture_alpha = "blend",
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
pointable = false,
|
||||||
|
diggable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
is_ground_content = false,
|
||||||
|
drop = "",
|
||||||
|
drowning = 1,
|
||||||
|
liquid_viscosity = 1,
|
||||||
|
groups = {water = 3, liquid = 3,}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
---@type Node
|
||||||
|
local defaultLiquid = Core.Node.Class:getExtended(defaultLiquidDef)
|
||||||
|
|
||||||
|
local liquidFactory = defaultLiquid:getFactory()
|
||||||
|
|
||||||
|
liquidFactory:registerItems({
|
||||||
|
---@type Node.NodeDefinition
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
name = "liquids:water_source",
|
||||||
|
drawtype = "liquid",
|
||||||
|
tiles = {
|
||||||
|
{
|
||||||
|
name = "liquids_water_source.png",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 16,
|
||||||
|
aspect_h = 16,
|
||||||
|
length = 2.0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "liquids_water_source.png",
|
||||||
|
backface_culling = true,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 16,
|
||||||
|
aspect_h = 16,
|
||||||
|
length = 2.0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
liquidtype = "source",
|
||||||
|
liquid_alternative_flowing = "liquids:water_flowing",
|
||||||
|
liquid_alternative_source = "liquids:water_source",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
---@type Node.NodeDefinition
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
name = "liquids:water_flowing",
|
||||||
|
drawtype = "flowingliquid",
|
||||||
|
tiles = {"default_water.png"},
|
||||||
|
special_tiles = {
|
||||||
|
{
|
||||||
|
name = "default_water_flowing_animated.png",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 16,
|
||||||
|
aspect_h = 16,
|
||||||
|
length = 0.5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "default_water_flowing_animated.png",
|
||||||
|
backface_culling = true,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 16,
|
||||||
|
aspect_h = 16,
|
||||||
|
length = 0.5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
liquidtype = "flowing",
|
||||||
|
liquid_alternative_flowing = "liquids:water_flowing",
|
||||||
|
liquid_alternative_source = "liquids:water_source",
|
||||||
|
paramtype2 = "flowingliquid",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, false)
|
||||||
2
mods/GAME/ITEMS/Liquids/mod.conf
Normal file
2
mods/GAME/ITEMS/Liquids/mod.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
name = smc__game__items__liquids
|
||||||
|
depends = smc__core__node
|
||||||
BIN
mods/GAME/ITEMS/Liquids/textures/liquids_water_source.png
Normal file
BIN
mods/GAME/ITEMS/Liquids/textures/liquids_water_source.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Reference in New Issue
Block a user