break water off

This commit is contained in:
wsor 2021-04-02 20:58:43 -04:00
parent 56d64ab5ff
commit bf20f499b3
13 changed files with 285 additions and 17 deletions

283
mods/fl_liquids/init.lua Normal file
View File

@ -0,0 +1,283 @@
local water_inventory_image =
"[inventorycube{farlands_water_source_animated.png&[verticalframe:16:8"
.. "{farlands_water_source_animated.png&[verticalframe:16:8"
.. "{farlands_water_source_animated.png&[verticalframe:16:8"
local river_water_inventory_image =
"[inventorycube{farlands_river_water_source_animated.png&[verticalframe:16:8"
.. "{farlands_river_water_source_animated.png&[verticalframe:16:8"
.. "{farlands_river_water_source_animated.png&[verticalframe:16:8"
minetest.register_node(":fl_terrain:water_source", {
description = "Water Source",
drawtype = "liquid",
waving = 3,
tiles = {
{
name = "farlands_water_source_animated.png^[opacity:103",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
{
name = "farlands_water_source_animated.png^[opacity:103",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
--below 2 are hacks to deal with alpha being set above
inventory_image = water_inventory_image,
wield_image = "farlands_water_source_animated.png^[verticalframe:16:8",
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "fl_terrain:water_flowing",
liquid_alternative_source = "fl_terrain:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
groups = {water = 3, liquid = 3, cools_lava = 1},
})
minetest.register_node(":fl_terrain:water_flowing", {
description = "Flowing Water",
drawtype = "flowingliquid",
waving = 3,
tiles = {"farlands_water.png"},
special_tiles = {
{
name = "farlands_water_flowing_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 1.5,
},
},
{
name = "farlands_water_flowing_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 1.5,
},
},
},
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "fl_terrain:water_flowing",
liquid_alternative_source = "fl_terrain:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
groups = {water = 3, liquid = 3, not_in_creative_inventory = 1, cools_lava = 1},
})
minetest.register_node(":fl_terrain:river_water_source", {
description = "River Water Source",
drawtype = "liquid",
tiles = {
{
name = "farlands_river_water_source_animated.png^[opacity:103",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
{
name = "farlands_river_water_source_animated.png^[opacity:103",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
--below 2 are hacks to deal with alpha being set above
inventory_image = river_water_inventory_image,
wield_image = "farlands_river_water_source_animated.png^[verticalframe:16:8",
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "fl_terrain:river_water_flowing",
liquid_alternative_source = "fl_terrain:river_water_source",
liquid_viscosity = 1,
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
groups = {water = 3, liquid = 3, cools_lava = 1},
})
minetest.register_node(":fl_terrain:river_water_flowing", {
description = "Flowing River Water",
drawtype = "flowingliquid",
tiles = {"farlands_river_water.png"},
special_tiles = {
{
name = "farlands_river_water_flowing_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 1.5,
},
},
{
name = "farlands_river_water_flowing_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 1.5,
},
},
},
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "fl_terrain:river_water_flowing",
liquid_alternative_source = "fl_terrain:river_water_source",
liquid_viscosity = 1,
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
groups = {water = 3, liquid = 3, not_in_creative_inventory = 1, cools_lava = 1},
})
minetest.register_node(":fl_terrain:lava_source", {
description = "Lava Source",
drawtype = "liquid",
tiles = {
{
name = "farlands_lava_source_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.0,
},
},
{
name = "farlands_lava_source_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.0,
},
},
},
paramtype = "light",
light_source = 14,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "fl_terrain:lava_flowing",
liquid_alternative_source = "fl_terrain:lava_source",
liquid_viscosity = 7,
liquid_renewable = false,
damage_per_second = 4 * 2,
post_effect_color = {a = 191, r = 255, g = 64, b = 0},
groups = {lava = 3, liquid = 2, igniter = 1},
})
minetest.register_node(":fl_terrain:lava_flowing", {
description = "Flowing Lava",
drawtype = "flowingliquid",
tiles = {"farlands_lava.png"},
special_tiles = {
{
name = "farlands_lava_flowing_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.3,
},
},
{
name = "farlands_lava_flowing_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.3,
},
},
},
paramtype = "light",
paramtype2 = "flowingliquid",
light_source = 14,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "fl_terrain:lava_flowing",
liquid_alternative_source = "fl_terrain:lava_source",
liquid_viscosity = 7,
liquid_renewable = false,
damage_per_second = 4 * 2,
post_effect_color = {a = 191, r = 255, g = 64, b = 0},
groups = {lava = 3, liquid = 2, igniter = 1, not_in_creative_inventory = 1},
})

View File

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 555 B

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 328 B

After

Width:  |  Height:  |  Size: 328 B

View File

Before

Width:  |  Height:  |  Size: 837 B

After

Width:  |  Height:  |  Size: 837 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 321 B

View File

Before

Width:  |  Height:  |  Size: 838 B

After

Width:  |  Height:  |  Size: 838 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +1 @@
depends = fl_terrain
depends = fl_terrain, fl_liquids

View File

@ -2,7 +2,7 @@ local modpath = minetest.get_modpath("fl_terrain")
dofile(modpath .. "/stones.lua")
dofile(modpath .. "/ores.lua")
dofile(modpath .. "/liquids.lua")
--dofile(modpath .. "/liquids.lua")
dofile(modpath .. "/topsoil.lua")
dofile(modpath .. "/other.lua")
dofile(modpath .. "/crafts.lua")

View File

@ -27,21 +27,6 @@ local function register_ore(name, block_groups)
end
end
--mithite
--[[
minetest.register_craftitem("fl_terrain:mithite_ore", {
description = "mithite ore",
inventory_image = "farlands_mithite_ore.png"
})
local tiles = minetest.registered_nodes["fl_terrain:stone"]["tiles"]
minetest.register_node("fl_terrain:mithite_in_stone", {
description = "mithite ore in stone",
tiles = {tiles[1] .. "^farlands_mithite_overlay.png"},
groups = {oddly_breakable_by_hand = 3},
drop = "fl_terrain:mithite_ore",
})
--]]
register_ore("mithite")
register_ore("coal")
register_ore("iron")