Use high-res bucket if avail and use loops
|
@ -0,0 +1,41 @@
|
||||||
|
# Changelog
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
|
## [git] - 2019-07-02
|
||||||
|
(poikilos)
|
||||||
|
### Added
|
||||||
|
- Add craftitems (8 Slime + Empty Bucket = 1 Liquid Slime Bucket).
|
||||||
|
- Use high-res bucket image generation if available (from Bucket_Game).
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Rename "slimenodes_slime_solid_*.png" to
|
||||||
|
"slimenodes_block_solid_*.png".
|
||||||
|
- Put everything in loops to make code more maintainable (less
|
||||||
|
redundant).
|
||||||
|
- Make slime bucket cost more (7) glue to craft.
|
||||||
|
|
||||||
|
## [git] - 2018-02-16
|
||||||
|
(poikilos)
|
||||||
|
### Added
|
||||||
|
- Add physics.
|
||||||
|
- Solid is bouncy.
|
||||||
|
- All bouncy slime nodes stop fall damage (-100%; not sure how with
|
||||||
|
liquid slime--engine ignores damage reduction for liquid at high
|
||||||
|
speeds).
|
||||||
|
- Liquid is liquid-like.
|
||||||
|
- Make buckets for all types so collectors are not needed (and so
|
||||||
|
storage is nerfed to one per inventory slot).
|
||||||
|
- Make recipes for all types (only if you have `mesecons_materials:glue`
|
||||||
|
or `technic:glue` since the recipe requires glue).
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Make all liquid blocks behave like each other and all solid blocks
|
||||||
|
behave like each other (though levels differ).
|
||||||
|
- Change sounds so liquid and solid each use a different one of the dug
|
||||||
|
sounds. This doesn't seem to work unless using slime collectors.
|
||||||
|
- Slime collectors cannot be crafted since holding stacks of slime would
|
||||||
|
allow overpowered griefing. They can still be given administratively,
|
||||||
|
but in multiplayer they should only be used for cleanup so they aren't
|
||||||
|
traded or otherwise abused later.
|
26
README.md
|
@ -2,24 +2,18 @@
|
||||||
(minetest mod)\
|
(minetest mod)\
|
||||||
Make bouncy solid slime and non-flowing liquid slime in minetest!
|
Make bouncy solid slime and non-flowing liquid slime in minetest!
|
||||||
|
|
||||||
## Changes in poikilos fork
|
Changes in poikilos fork: see CHANGELOG.md
|
||||||
* added physics
|
|
||||||
* solid is bouncy
|
|
||||||
* all bouncy slime nodes stop fall damage (-100%; not sure how with liquid slime)
|
|
||||||
* liquid is liquid-like
|
|
||||||
* made buckets for all types so collectors are not needed and storage is nerfed by 1 per inventory slot
|
|
||||||
* made recipes for all types (only if you have meseconds installed, since uses glue)
|
|
||||||
* made all liquid blocks behave like each other and all solid blocks behave like each other (though levels differ)
|
|
||||||
* changed sounds so liquid and solid each use a different one of the dug sounds, but this doesn't seem to work unless using slime collectors
|
|
||||||
* slime collectors cannot be crafted since holding stacks of slime would allow overpowered griefing (they can still be given administratively, but in multiplayer they should only be used for cleanup so they aren't traded or otherwise abused later)
|
|
||||||
|
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
* [original version](https://forum.minetest.net/viewtopic.php?t=10423): Wuzzy
|
- [original version](https://forum.minetest.org/viewtopic.php?t=10423)
|
||||||
* sound: Wuzzy
|
(`https://repo.or.cz/minetest_slimenodes.git`):
|
||||||
* full bucket graphics: poikilos (Jake Gustafson), based on empty bucket by ElementW (CC BY-SA 3.0)
|
Wuzzy
|
||||||
* all other graphics: Wuzzy
|
- sound:
|
||||||
|
Wuzzy
|
||||||
|
- bucket graphics:
|
||||||
|
poikilos (Jake Gustafson), ElementW (CC BY-SA 3.0)
|
||||||
|
- all other graphics:
|
||||||
|
Wuzzy
|
||||||
|
|
||||||
## License
|
## License
|
||||||
code: see included [license.txt](https://github.com/poikilos/slimenodes/blob/master/license.txt)
|
code: see included [license.txt](https://github.com/poikilos/slimenodes/blob/master/license.txt)
|
||||||
|
|
126
buckets.lua
|
@ -17,74 +17,64 @@
|
||||||
-- source neighbour, even if defined as 'liquid_renewable = false'.
|
-- source neighbour, even if defined as 'liquid_renewable = false'.
|
||||||
-- Needed to avoid creating holes in sloping rivers.
|
-- Needed to avoid creating holes in sloping rivers.
|
||||||
-- This function can be called from any mod (that depends on bucket).
|
-- This function can be called from any mod (that depends on bucket).
|
||||||
|
-- - OldCoder (Bucket_Game)
|
||||||
|
|
||||||
if rawget(_G, "bucket") and bucket.register_liquid then
|
|
||||||
|
-- craftitems.lua defines slimenodesColorNames
|
||||||
|
if rawget(_G, "bucket") and bucket.register_bucket_hash then
|
||||||
|
for index = 1, #slimenodesColorNames do
|
||||||
|
local descPart = slimenodesColorNames[index]
|
||||||
|
local namePart = descPart:lower()
|
||||||
|
local liquid_bh = {}
|
||||||
|
liquid_bh.bucket_node = "slimenodes:bucket_slime_liquid_" .. namePart
|
||||||
|
liquid_bh.desc = "Liquid " .. descPart .. " Slime Bucket"
|
||||||
|
liquid_bh.source_node = "slimenodes:slime_liquid_" .. namePart
|
||||||
|
liquid_bh.flowing_node = "slimenodes:slime_liquid_" .. namePart -- .. "_slope"
|
||||||
|
liquid_bh.force_renew = false
|
||||||
|
-- groups = -- TODO?
|
||||||
|
-- liquid_bh.inventory_image = "slimenodes_block_liquid_" .. namePart .. ".png"
|
||||||
|
liquid_bh.invsource_image = "slimenodes_block_liquid_" .. namePart .. ".png"
|
||||||
|
bucket.register_bucket_hash(liquid_bh)
|
||||||
|
-- rawget(_G, "ocutil") and bucket.register_node_bucketable then
|
||||||
|
--ocutil.register_node_bucketable ("slimenodes:bucket_slime_solid_" .. namePart, {
|
||||||
|
--description = "Solid " .. descPart .. " Slime Bucket" ,
|
||||||
|
--bucket_base = "slimenodes:slime_solid_" .. namePart ,
|
||||||
|
--tiles = {"slimenodes_block_solid_" .. namePart .. ".png"} ,
|
||||||
|
--groups = {fall_damage_add_percent=-100, disable_jump=1, puts_out_fire=1, cools_lava=1, liquid=3, slimey=3} , -- and levels? see init.lua
|
||||||
|
--sounds = {
|
||||||
|
--dug = {name="slimenodes_dig", gain=0.6},
|
||||||
|
--place = {name="slimenodes_place", gain=0.6},
|
||||||
|
--},
|
||||||
|
--})
|
||||||
|
local solid_bh = {}
|
||||||
|
solid_bh.bucket_node = "slimenodes:bucket_slime_solid_" .. namePart
|
||||||
|
solid_bh.desc = "Solid " .. descPart .. " Slime Bucket"
|
||||||
|
solid_bh.source_node = "slimenodes:slime_solid_" .. namePart
|
||||||
|
solid_bh.flowing_node = "slimenodes:slime_solid_" .. namePart -- .. "_slope"
|
||||||
|
solid_bh.force_renew = false
|
||||||
|
-- groups = -- TODO?
|
||||||
|
-- solid_bh.inventory_image = "slimenodes_block_solid_" .. namePart .. ".png"
|
||||||
|
solid_bh.invsource_image = "slimenodes_block_solid_" .. namePart .. ".png"
|
||||||
|
bucket.register_bucket_hash(solid_bh)
|
||||||
|
end
|
||||||
|
elseif rawget(_G, "bucket") and bucket.register_liquid then
|
||||||
-- source, flowing, itemname, inventory image, name, groups, force_renew
|
-- source, flowing, itemname, inventory image, name, groups, force_renew
|
||||||
bucket.register_liquid(
|
for index = 1, #slimenodesColorNames do
|
||||||
"slimenodes:slime_liquid_cyan",
|
local descPart = slimenodesColorNames[index]
|
||||||
"slimenodes:slime_liquid_cyan",
|
local namePart = descPart:lower()
|
||||||
"slimenodes:bucket_slime_liquid_cyan",
|
bucket.register_liquid(
|
||||||
"slimenodes_bucket_slime_liquid_cyan.png",
|
"slimenodes:slime_liquid_" .. namePart,
|
||||||
"Liquid Cyan Slime Bucket"
|
"slimenodes:slime_liquid_" .. namePart,
|
||||||
)
|
"slimenodes:bucket_slime_liquid_" .. namePart,
|
||||||
bucket.register_liquid(
|
"slimenodes_bucket_slime_liquid_" .. namePart .. ".png",
|
||||||
"slimenodes:slime_solid_cyan",
|
"Liquid "..descPart.." Slime Bucket"
|
||||||
"slimenodes:slime_solid_cyan",
|
)
|
||||||
"slimenodes:bucket_slime_solid_cyan",
|
bucket.register_liquid(
|
||||||
"slimenodes_bucket_slime_solid_cyan.png",
|
"slimenodes:slime_solid_" .. namePart,
|
||||||
"Solid Cyan Slime Bucket"
|
"slimenodes:slime_solid_" .. namePart,
|
||||||
)
|
"slimenodes:bucket_slime_solid_" .. namePart,
|
||||||
|
"slimenodes_bucket_slime_solid_" .. namePart .. ".png",
|
||||||
bucket.register_liquid(
|
"Solid "..descPart.." Slime Bucket"
|
||||||
"slimenodes:slime_liquid_green",
|
)
|
||||||
"slimenodes:slime_liquid_green",
|
end
|
||||||
"slimenodes:bucket_slime_liquid_green",
|
|
||||||
"slimenodes_bucket_slime_liquid_green.png",
|
|
||||||
"Liquid Green Slime Bucket"
|
|
||||||
)
|
|
||||||
bucket.register_liquid(
|
|
||||||
"slimenodes:slime_solid_green",
|
|
||||||
"slimenodes:slime_solid_green",
|
|
||||||
"slimenodes:bucket_slime_solid_green",
|
|
||||||
"slimenodes_bucket_slime_solid_green.png",
|
|
||||||
"Solid Green Slime Bucket"
|
|
||||||
)
|
|
||||||
|
|
||||||
bucket.register_liquid(
|
|
||||||
"slimenodes:slime_liquid_orange",
|
|
||||||
"slimenodes:slime_liquid_orange",
|
|
||||||
"slimenodes:bucket_slime_liquid_orange",
|
|
||||||
"slimenodes_bucket_slime_liquid_orange.png",
|
|
||||||
"Liquid Orange Slime Bucket"
|
|
||||||
)
|
|
||||||
bucket.register_liquid(
|
|
||||||
"slimenodes:slime_solid_orange",
|
|
||||||
"slimenodes:slime_solid_orange",
|
|
||||||
"slimenodes:bucket_slime_solid_orange",
|
|
||||||
"slimenodes_bucket_slime_solid_orange.png",
|
|
||||||
"Solid Orange Slime Bucket"
|
|
||||||
)
|
|
||||||
|
|
||||||
bucket.register_liquid(
|
|
||||||
"slimenodes:slime_liquid_violet",
|
|
||||||
"slimenodes:slime_liquid_violet",
|
|
||||||
"slimenodes:bucket_slime_liquid_violet",
|
|
||||||
"slimenodes_bucket_slime_liquid_violet.png",
|
|
||||||
"Liquid Violet Slime Bucket"
|
|
||||||
)
|
|
||||||
bucket.register_liquid(
|
|
||||||
"slimenodes:slime_solid_violet",
|
|
||||||
"slimenodes:slime_solid_violet",
|
|
||||||
"slimenodes:bucket_slime_solid_violet",
|
|
||||||
"slimenodes_bucket_slime_solid_violet.png",
|
|
||||||
"Solid Violet Slime Bucket"
|
|
||||||
)
|
|
||||||
|
|
||||||
-- minetest.register_craft({
|
|
||||||
-- type = "fuel",
|
|
||||||
-- recipe = "bucket:bucket_lava",
|
|
||||||
-- burntime = 60,
|
|
||||||
-- replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}},
|
|
||||||
-- })
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
for index = 1, #slimenodesColorNames do
|
||||||
|
descPart = slimenodesColorNames[index]
|
||||||
|
namePart = descPart:lower()
|
||||||
|
minetest.register_craftitem("slimenodes:slime_" .. namePart, {
|
||||||
|
description = descPart .. " Slime",
|
||||||
|
inventory_image = "slimenodes_drop_" .. namePart .. ".png",
|
||||||
|
stack_max = 8,
|
||||||
|
})
|
||||||
|
end
|
366
init.lua
|
@ -6,179 +6,217 @@ else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("slimenodes:slime_liquid_cyan", {
|
slimenodesColorNames = { "Cyan", "Green", "Orange", "Violet" }
|
||||||
description = S("Cyan liquid slime"),
|
slimenodesParams = {}
|
||||||
inventory_image = minetest.inventorycube("slimenodes_slime_liquid_cyan.png"),
|
slimenodesParams["cyan"] = {}
|
||||||
drawtype = "liquid",
|
slimenodesParams["cyan"].alpha = 120
|
||||||
tiles = { "slimenodes_slime_liquid_cyan.png" },
|
slimenodesParams["cyan"].liquid_viscosity = 1
|
||||||
special_tiles = {
|
slimenodesParams["cyan"].post_effect_color = {a=16, r=0, g=255, b=255}
|
||||||
{
|
slimenodesParams["green"] = {}
|
||||||
name = "slimenodes_slime_liquid_cyan.png",
|
slimenodesParams["green"].alpha = 170
|
||||||
backface_culling = false
|
slimenodesParams["green"].liquid_viscosity = 2
|
||||||
},
|
slimenodesParams["green"].post_effect_color = {a=64, r=100, g=200, b=100}
|
||||||
},
|
slimenodesParams["orange"] = {}
|
||||||
alpha = 120,
|
slimenodesParams["orange"].alpha = 200
|
||||||
sunlight_propagates = true,
|
slimenodesParams["orange"].liquid_viscosity = 4
|
||||||
paramtype = "light",
|
slimenodesParams["orange"].post_effect_color = {a=96, r=200, g=100, b=0}
|
||||||
walkable = false,
|
slimenodesParams["violet"] = {}
|
||||||
pointable = false,
|
slimenodesParams["violet"].alpha = 220
|
||||||
diggable = true,
|
slimenodesParams["violet"].liquid_viscosity = 6
|
||||||
buildable_to = false,
|
slimenodesParams["violet"].post_effect_color = {a=128, r=50, g=0, b=200}
|
||||||
drop = "slimenodes:slime_liquid_cyan",
|
|
||||||
liquidtype = "source",
|
|
||||||
liquid_alternative_flowing = "slimenodes:slime_liquid_cyan",
|
|
||||||
liquid_alternative_source = "slimenodes:slime_liquid_cyan",
|
|
||||||
liquid_viscosity = 1,
|
|
||||||
liquid_range = 0,
|
|
||||||
liquid_renewable = false,
|
|
||||||
liquids_pointable = true,
|
|
||||||
drowning = 0,
|
|
||||||
post_effect_color = {a=16, r=0, g=255, b=255},
|
|
||||||
groups = {fall_damage_add_percent=-100, disable_jump=1, puts_out_fire=1, cools_lava=1, liquid=3, slimey=3},
|
|
||||||
sounds = {
|
|
||||||
dug = {name="slimenodes_dig", gain=0.6},
|
|
||||||
place = {name="slimenodes_place", gain=0.6},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("slimenodes:slime_liquid_green", {
|
if not deepcopy then
|
||||||
description = S("Green liquid slime"),
|
-- See http://lua-users.org/wiki/CopyTable
|
||||||
inventory_image = minetest.inventorycube("slimenodes_slime_liquid_green.png"),
|
function deepcopy(orig)
|
||||||
drawtype = "liquid",
|
local orig_type = type(orig)
|
||||||
tiles = { "slimenodes_slime_liquid_green.png" },
|
local copy
|
||||||
special_tiles = { { name = "slimenodes_slime_liquid_green.png", backface_culling = false } },
|
if orig_type == 'table' then
|
||||||
alpha = 170,
|
copy = {}
|
||||||
sunlight_propagates = false,
|
for orig_key, orig_value in next, orig, nil do
|
||||||
paramtype = "light",
|
copy[deepcopy(orig_key)] = deepcopy(orig_value)
|
||||||
walkable = false,
|
end
|
||||||
pointable = false,
|
setmetatable(copy, deepcopy(getmetatable(orig)))
|
||||||
diggable = true,
|
else -- number, string, boolean, etc
|
||||||
buildable_to = false,
|
copy = orig
|
||||||
drop = "slimenodes:slime_liquid_green",
|
end
|
||||||
liquidtype = "source",
|
return copy
|
||||||
liquid_alternative_flowing = "slimenodes:slime_liquid_green",
|
end
|
||||||
liquid_alternative_source = "slimenodes:slime_liquid_green",
|
end
|
||||||
liquid_viscosity = 2,
|
|
||||||
liquid_range = 0,
|
|
||||||
liquid_renewable = false,
|
|
||||||
liquids_pointable = true,
|
|
||||||
drowning = 0,
|
|
||||||
post_effect_color = {a=64, r=100, g=200, b=100},
|
|
||||||
groups = {fall_damage_add_percent=-100, disable_jump=1, puts_out_fire=1, cools_lava=1, liquid=3, slimey=3, level=1},
|
|
||||||
sounds = {
|
|
||||||
dug = {name="slimenodes_dig", gain=0.6},
|
|
||||||
place = {name="slimenodes_place", gain=0.6},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("slimenodes:slime_liquid_orange", {
|
if not level1copy then
|
||||||
description = S("Orange liquid slime"),
|
-- See http://lua-users.org/wiki/CopyTable
|
||||||
inventory_image = minetest.inventorycube("slimenodes_slime_liquid_orange.png"),
|
function level1copy(orig)
|
||||||
drawtype = "liquid",
|
local orig_type = type(orig)
|
||||||
tiles = { "slimenodes_slime_liquid_orange.png" },
|
local copy
|
||||||
special_tiles = { { name = "slimenodes_slime_liquid_orange.png", backface_culling = false } },
|
if orig_type == 'table' then
|
||||||
alpha = 200,
|
copy = {}
|
||||||
sunlight_propagates = false,
|
for orig_key, orig_value in next, orig, nil do
|
||||||
paramtype = "light",
|
copy[orig_key] = orig_value
|
||||||
walkable = false,
|
end
|
||||||
pointable = false,
|
else -- number, string, boolean, etc
|
||||||
diggable = true,
|
copy = orig
|
||||||
buildable_to = false,
|
end
|
||||||
drop = "slimenodes:slime_liquid_orange",
|
return copy
|
||||||
liquidtype = "source",
|
end
|
||||||
liquid_alternative_flowing = "slimenodes:slime_liquid_orange",
|
end
|
||||||
liquid_alternative_source = "slimenodes:slime_liquid_orange",
|
|
||||||
liquid_viscosity = 4,
|
|
||||||
liquid_range = 0,
|
|
||||||
liquid_renewable = false,
|
|
||||||
liquids_pointable = true,
|
|
||||||
drowning = 0,
|
|
||||||
post_effect_color = {a=96, r=200, g=100, b=0},
|
|
||||||
groups = {fall_damage_add_percent=-100, disable_jump=1, puts_out_fire=1, cools_lava=1, liquid=3, slimey=3, level=2},
|
|
||||||
sounds = {
|
|
||||||
dug = {name="slimenodes_dig", gain=0.6},
|
|
||||||
place = {name="slimenodes_place", gain=0.6},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("slimenodes:slime_liquid_violet", {
|
dofile(minetest.get_modpath("slimenodes").."/craftitems.lua")
|
||||||
description = S("Violet liquid slime"),
|
|
||||||
inventory_image = minetest.inventorycube("slimenodes_slime_liquid_violet.png"),
|
|
||||||
drawtype = "liquid",
|
|
||||||
tiles = { "slimenodes_slime_liquid_violet.png" },
|
|
||||||
special_tiles = { { name = "slimenodes_slime_liquid_violet.png", backface_culling = false } },
|
|
||||||
alpha = 220,
|
|
||||||
sunlight_propagates = false,
|
|
||||||
paramtype = "light",
|
|
||||||
walkable = false,
|
|
||||||
pointable = false,
|
|
||||||
diggable = true,
|
|
||||||
buildable_to = false,
|
|
||||||
drop = "slimenodes:slime_liquid_violet",
|
|
||||||
liquidtype = "source",
|
|
||||||
liquid_alternative_flowing = "slimenodes:slime_liquid_violet",
|
|
||||||
liquid_alternative_source = "slimenodes:slime_liquid_violet",
|
|
||||||
liquid_viscosity = 6,
|
|
||||||
liquid_range = 0,
|
|
||||||
liquid_renewable = false,
|
|
||||||
liquids_pointable = true,
|
|
||||||
drowning = 0,
|
|
||||||
post_effect_color = {a=128, r=50, g=0, b=200},
|
|
||||||
groups = {fall_damage_add_percent=-100, disable_jump=1, puts_out_fire=1, cools_lava=1, liquid=3, slimey=3, level=3},
|
|
||||||
sounds = {
|
|
||||||
dug = {name="slimenodes_dig", gain=0.6},
|
|
||||||
place = {name="slimenodes_place", gain=0.6},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("slimenodes:slime_solid_cyan", {
|
|
||||||
description = S("Cyan solid slime"),
|
|
||||||
tiles = { "slimenodes_slime_solid_cyan.png" },
|
|
||||||
walkable = true,
|
|
||||||
groups = {bouncy=90, fall_damage_add_percent=-100, slimey=3, level=1},
|
|
||||||
sounds = {
|
|
||||||
dug = {name="slimenodes_dug", gain=0.6},
|
|
||||||
place = {name="slimenodes_place", gain=0.6},
|
|
||||||
footstep = {name="slimenodes_step", gain=0.2},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("slimenodes:slime_solid_green", {
|
-- craftitems.lua defines slimenodesColorNames
|
||||||
description = S("Green solid slime"),
|
local slimeNodeLevel = 0
|
||||||
tiles = { "slimenodes_slime_solid_green.png" },
|
local slimenodesLiqDef = nil
|
||||||
walkable = true,
|
for index = 1, #slimenodesColorNames do
|
||||||
groups = {bouncy=90, fall_damage_add_percent=-100, slimey=3, level=2},
|
descPart = slimenodesColorNames[index]
|
||||||
sounds = {
|
namePart = descPart:lower()
|
||||||
dug = {name="slimenodes_dug", gain=0.6},
|
local snLName = "slimenodes:slime_liquid_" .. namePart
|
||||||
place = {name="slimenodes_place", gain=0.6},
|
local snSName = "slimenodes:slime_solid_" .. namePart
|
||||||
footstep = {name="slimenodes_step", gain=0.3},
|
slimenodesLiqDef = {
|
||||||
|
drawtype = "liquid",
|
||||||
|
alpha = 120,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
pointable = false,
|
||||||
|
diggable = true,
|
||||||
|
buildable_to = false,
|
||||||
|
liquidtype = "source",
|
||||||
|
liquid_viscosity = 1,
|
||||||
|
liquid_range = 0,
|
||||||
|
liquid_renewable = false,
|
||||||
|
liquids_pointable = true,
|
||||||
|
drowning = 0,
|
||||||
|
sounds = {
|
||||||
|
dug = {name="slimenodes_dig", gain=0.6},
|
||||||
|
place = {name="slimenodes_place", gain=0.6},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
if nil then -- rawget(_G, "default") and default.register_water then
|
||||||
|
print("slimenodes is using default.register_water...")
|
||||||
|
-- Liquid:
|
||||||
|
local def = {
|
||||||
|
alpha = slimenodesLiqDef.alpha,
|
||||||
|
basename = "slimenodes:slime_liquid_" .. namePart,
|
||||||
|
light = -1 ,
|
||||||
|
liquid_viscosity = slimenodesLiqDef.liquid_viscosity,
|
||||||
|
liquid_range = slimenodesLiqDef.liquid_range,
|
||||||
|
sounds = slimenodesLiqDef.sounds,
|
||||||
|
drowning = slimenodesLiqDef.drowning,
|
||||||
|
}
|
||||||
|
if slimenodesParams[namePart]
|
||||||
|
and slimenodesParams[namePart].post_effect_color then
|
||||||
|
def.post_effect_color = slimenodesParams[namePart].post_effect_color
|
||||||
|
else
|
||||||
|
def.post_effect_color = nil
|
||||||
|
end
|
||||||
|
default.register_water(def)
|
||||||
|
|
||||||
minetest.register_node("slimenodes:slime_solid_orange", {
|
-- Solid:
|
||||||
description = S("Orange solid slime"),
|
local def = {
|
||||||
tiles = { "slimenodes_slime_solid_orange.png" },
|
alpha = slimenodesLiqDef.alpha,
|
||||||
walkable = true,
|
basename = snSName,
|
||||||
groups = {bouncy=90, fall_damage_add_percent=-100, slimey=3, level=2},
|
light = -1 ,
|
||||||
sounds = {
|
liquid_range = 0,
|
||||||
dug = {name="slimenodes_dug", gain=0.6},
|
sounds = slimenodesLiqDef.sounds,
|
||||||
place = {name="slimenodes_place", gain=0.6},
|
}
|
||||||
footstep = {name="slimenodes_step", gain=0.35},
|
if slimenodesParams[namePart].post_effect_color then
|
||||||
}
|
def.post_effect_color = slimenodesParams[namePart].post_effect_color
|
||||||
})
|
end
|
||||||
|
default.register_water(def)
|
||||||
|
else
|
||||||
|
print("slimenodes is using register_node...")
|
||||||
|
-- Liquid:
|
||||||
|
-- -- why does this commented version of the code cause a block that
|
||||||
|
-- -- tries to flow but has CONTENT_IGNORE error?
|
||||||
|
--local def = slimenodesLiqDef
|
||||||
|
--def.description = S("Liquid " .. descPart .. " Slime Block")
|
||||||
|
--def.inventory_image = minetest.inventorycube(
|
||||||
|
--"slimenodes_block_liquid_" .. namePart .. ".png"
|
||||||
|
--)
|
||||||
|
--def.tiles = { "slimenodes_block_liquid_" .. namePart .. ".png" }
|
||||||
|
--def.special_tiles = {
|
||||||
|
--{
|
||||||
|
--name = "slimenodes_block_liquid_" .. namePart .. ".png",
|
||||||
|
--backface_culling = false
|
||||||
|
--},
|
||||||
|
--}
|
||||||
|
--def.drop = snLName
|
||||||
|
---- liquid_alternative_flowing = "slimenodes:slime_liquid_" .. namePart .. "_slope"
|
||||||
|
--liquid_alternative_flowing = snLName
|
||||||
|
--liquid_alternative_source = snLName
|
||||||
|
--if slimenodesParams[namePart].post_effect_color then
|
||||||
|
--def.post_effect_color = slimenodesParams[namePart].post_effect_color
|
||||||
|
--end
|
||||||
|
--if slimenodesParams[namePart].alpha then
|
||||||
|
--def.alpha = slimenodesParams[namePart].alpha
|
||||||
|
--end
|
||||||
|
--if slimenodesParams[namePart].liquid_viscosity then
|
||||||
|
--def.liquid_viscosity = slimenodesParams[namePart].liquid_viscosity
|
||||||
|
--end
|
||||||
|
--def.groups = {fall_damage_add_percent=-100, disable_jump=1, puts_out_fire=1, cools_lava=1, liquid=3, slimey=3}
|
||||||
|
--if slimeNodeLevel > 0 then
|
||||||
|
--def.groups.level = slimeNodeLevel
|
||||||
|
--end
|
||||||
|
--minetest.register_node(snLName, def)
|
||||||
|
minetest.register_node(snLName, {
|
||||||
|
description = S("Liquid " .. descPart .. " Slime Block"),
|
||||||
|
inventory_image = minetest.inventorycube("slimenodes_block_liquid_" .. namePart .. ".png"),
|
||||||
|
drawtype = "liquid",
|
||||||
|
tiles = { "slimenodes_block_liquid_" .. namePart .. ".png" },
|
||||||
|
special_tiles = {
|
||||||
|
{
|
||||||
|
name = "slimenodes_block_liquid_" .. namePart .. ".png",
|
||||||
|
backface_culling = false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
alpha = slimenodesParams[namePart].alpha or 120,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
pointable = false,
|
||||||
|
diggable = true,
|
||||||
|
buildable_to = false,
|
||||||
|
drop = snLName,
|
||||||
|
liquidtype = "source",
|
||||||
|
liquid_alternative_flowing = snLName,
|
||||||
|
liquid_alternative_source = snLName,
|
||||||
|
liquid_viscosity = slimenodesParams[namePart].liquid_viscosity or 1,
|
||||||
|
liquid_range = 0,
|
||||||
|
liquid_renewable = false,
|
||||||
|
liquids_pointable = true,
|
||||||
|
drowning = 0,
|
||||||
|
post_effect_color = deepcopy(slimenodesParams[namePart].post_effect_color) or {a=16, r=128, g=128, b=128},
|
||||||
|
groups = {fall_damage_add_percent=-100, disable_jump=1, puts_out_fire=1, cools_lava=1, liquid=3, slimey=3},
|
||||||
|
sounds = {
|
||||||
|
dug = {name="slimenodes_dig", gain=0.6},
|
||||||
|
place = {name="slimenodes_place", gain=0.6},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_node("slimenodes:slime_solid_violet", {
|
|
||||||
description = S("Violet solid slime"),
|
|
||||||
tiles = { "slimenodes_slime_solid_violet.png" },
|
|
||||||
walkable = true,
|
|
||||||
groups = {bouncy=90, fall_damage_add_percent=-30, slimey=3, level=3},
|
|
||||||
sounds = {
|
|
||||||
dug = {name="slimenodes_dug", gain=0.6},
|
|
||||||
place = {name="slimenodes_place", gain=0.6},
|
|
||||||
footstep = {name="slimenodes_step", gain=0.4},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
-- Solid:
|
||||||
|
local solidGroups = {bouncy=90, fall_damage_add_percent=-100, slimey=3,}
|
||||||
|
if slimeNodeLevel > 0 then
|
||||||
|
solidGroups.level = slimeNodeLevel
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node(snSName, {
|
||||||
|
description = S("Solid " .. descPart .. " Slime Block"),
|
||||||
|
tiles = { "slimenodes_block_solid_" .. namePart .. ".png" },
|
||||||
|
walkable = true,
|
||||||
|
groups = solidGroups,
|
||||||
|
sounds = {
|
||||||
|
dug = {name="slimenodes_dug", gain=0.6},
|
||||||
|
place = {name="slimenodes_place", gain=0.6},
|
||||||
|
footstep = {name="slimenodes_step", gain=0.2},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
if slimeNodeLevel <= 3 then
|
||||||
|
slimeNodeLevel = slimeNodeLevel + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_tool("slimenodes:collector_lvl1", {
|
minetest.register_tool("slimenodes:collector_lvl1", {
|
||||||
description = S("Slime collector level 1"),
|
description = S("Slime collector level 1"),
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
Cyan liquid slime = Türkiser Flüssigschleim
|
Liquid Cyan Slime Block = Cyan-blauer flüssiger Schleimblock
|
||||||
Cyan solid slime = Türkiser Festschleim
|
Solid Cyan Slime Block = Cyan-blauer fester Schleimblock
|
||||||
Green liquid slime = Grüner Flüssigschleim
|
Cyan Slime = Cyan Schleim
|
||||||
Green solid slime = Grüner Festschleim
|
Liquid Green Slime Block = Grüner flüssiger Schleimblock
|
||||||
Orange liquid slime = Orange Flüssigschleim
|
Solid Green Slime Block = Grüner fester Schleimblock
|
||||||
Orange solid slime = Orange Festschleim
|
Green Slime = Grüner Schleim
|
||||||
Slime collector level 1 = Schleimsammler Stufe 1
|
Liquid Orange Slime Block = Orange flüssiger Schleimblock
|
||||||
Slime collector level 2 = Schleimsammler Stufe 2
|
Solid Orange Slime Block = Orangefarbener fester Schleimblock
|
||||||
Slime collector level 3 = Schleimsammler Stufe 3
|
Orange Slime = Orange Schleim
|
||||||
Slime collector level 4 = Schleimsammler Stufe 4
|
Liquid Violet Slime Block = Violetter flüssiger Schleimblock
|
||||||
Violet liquid slime = Violetter Flüssigschleim
|
Solid Violet Slime Block = Violetter fester Schleimblock
|
||||||
Violet solid slime = Violetter Festschleim
|
Violet Slime = Violetter Schleim
|
||||||
|
Slime Collector Level 1 = Schleimsammler Stufe 1
|
||||||
|
Slime Collector Level 2 = Schleimsammler Stufe 2
|
||||||
|
Slime Collector Level 3 = Schleimsammler Stufe 3
|
||||||
|
Slime Collector Level 4 = Schleimsammler Stufe 4
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
Cyan liquid slime =
|
Liquid Cyan Slime Block =
|
||||||
Cyan solid slime =
|
Solid Cyan Slime Block =
|
||||||
Green liquid slime =
|
Cyan Slime =
|
||||||
Green solid slime =
|
Liquid Green Slime Block =
|
||||||
Orange liquid slime =
|
Solid Green Slime Block =
|
||||||
Orange solid slime =
|
Green Slime =
|
||||||
Slime collector level 1 =
|
Liquid Orange Slime Block =
|
||||||
Slime collector level 2 =
|
Solid Orange Slime Block =
|
||||||
Slime collector level 3 =
|
Orange Slime =
|
||||||
Slime collector level 4 =
|
Liquid Violet Slime Block =
|
||||||
Violet liquid slime =
|
Solid Violet Slime Block =
|
||||||
Violet solid slime =
|
Violet Slime =
|
||||||
|
Slime Collector Level 1 =
|
||||||
|
Slime Collector Level 2 =
|
||||||
|
Slime Collector Level 3 =
|
||||||
|
Slime Collector Level 4 =
|
||||||
|
|
104
recipes.lua
|
@ -1,62 +1,64 @@
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 10,
|
|
||||||
output = "slimenodes:bucket_slime_solid_cyan",
|
|
||||||
recipe = "slimenodes:bucket_slime_liquid_cyan"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
-- craftitems.lua defines slimenodesColorNames
|
||||||
type = "cooking",
|
for index = 1, #slimenodesColorNames do
|
||||||
cooktime = 10,
|
local descPart = slimenodesColorNames[index]
|
||||||
output = "slimenodes:bucket_slime_solid_green",
|
local namePart = descPart:lower()
|
||||||
recipe = "slimenodes:bucket_slime_liquid_green"
|
minetest.register_craft({
|
||||||
})
|
type = "cooking",
|
||||||
|
cooktime = 10,
|
||||||
minetest.register_craft({
|
output = "slimenodes:bucket_slime_solid_" .. namePart,
|
||||||
type = "cooking",
|
recipe = "slimenodes:bucket_slime_liquid_" .. namePart
|
||||||
cooktime = 10,
|
})
|
||||||
output = "slimenodes:bucket_slime_solid_orange",
|
end
|
||||||
recipe = "slimenodes:bucket_slime_liquid_orange"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
cooktime = 10,
|
|
||||||
output = "slimenodes:bucket_slime_solid_violet",
|
|
||||||
recipe = "slimenodes:bucket_slime_liquid_violet"
|
|
||||||
})
|
|
||||||
|
|
||||||
local mesecons_materials = minetest.get_modpath("mesecons_materials")
|
local mesecons_materials = minetest.get_modpath("mesecons_materials")
|
||||||
local technic = minetest.get_modpath("technic")
|
local technic = minetest.get_modpath("technic")
|
||||||
|
|
||||||
local glue_fullname = nil
|
local glue_s = nil
|
||||||
|
|
||||||
if mesecons_materials then
|
if mesecons_materials then
|
||||||
glue_fullname = "mesecons_materials:glue"
|
glue_s = "mesecons_materials:glue"
|
||||||
elseif technic then
|
elseif technic then
|
||||||
glue_fullname = "technic:glue"
|
glue_s = "technic:glue"
|
||||||
end
|
end
|
||||||
if glue_fullname then
|
if glue_s then
|
||||||
minetest.register_craft({
|
-- craftitems.lua defines slimenodesColorNames
|
||||||
type = "shapeless",
|
for index = 1, #slimenodesColorNames do
|
||||||
output = "slimenodes:bucket_slime_liquid_cyan",
|
local descPart = slimenodesColorNames[index]
|
||||||
recipe = {"bucket:bucket_water", glue_fullname, "dye:cyan"},
|
local namePart = descPart:lower()
|
||||||
})
|
local thisDye = "dye:" .. namePart
|
||||||
minetest.register_craft({
|
if minetest.registered_items[thisDye] then
|
||||||
type = "shapeless",
|
minetest.register_craft({
|
||||||
output = "slimenodes:bucket_slime_liquid_green",
|
type = "shapeless",
|
||||||
recipe = {"bucket:bucket_water", glue_fullname, "dye:green"},
|
output = "slimenodes:bucket_slime_liquid_" .. namePart,
|
||||||
})
|
recipe = {
|
||||||
minetest.register_craft({
|
glue_s, glue_s, glue_s,
|
||||||
type = "shapeless",
|
glue_s, thisDye, glue_s,
|
||||||
output = "slimenodes:bucket_slime_liquid_orange",
|
glue_s, "bucket:bucket_water", glue_s,
|
||||||
recipe = {"bucket:bucket_water", glue_fullname, "dye:orange"},
|
},
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
end
|
||||||
type = "shapeless",
|
end
|
||||||
output = "slimenodes:bucket_slime_liquid_violet",
|
|
||||||
recipe = {"bucket:bucket_water", glue_fullname, "dye:violet"},
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for index = 1, #slimenodesColorNames do
|
||||||
|
local descPart = slimenodesColorNames[index]
|
||||||
|
local namePart = descPart:lower()
|
||||||
|
local frag = "slimenodes:slime_" .. namePart
|
||||||
|
local bucketName = "slimenodes:bucket_slime_liquid_" .. namePart
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = bucketName,
|
||||||
|
recipe = {
|
||||||
|
frag, frag, frag,
|
||||||
|
frag, frag, frag,
|
||||||
|
frag, "bucket:bucket_empty", frag,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
output = {frag..' 8', "bucket:bucket_empty"},
|
||||||
|
recipe = {
|
||||||
|
{bucketName},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
Before Width: | Height: | Size: 590 B After Width: | Height: | Size: 590 B |
Before Width: | Height: | Size: 507 B After Width: | Height: | Size: 507 B |
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 648 B |
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 522 B |
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 638 B |
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 547 B |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 6.3 KiB |