mod reorganisation and update
|
@ -5,6 +5,7 @@ Work in Progress 0.7 [05.02.2020] Devel
|
|||
bucket-lite - moved to tools
|
||||
comboblock - moved to environment
|
||||
special - renamed to blocks
|
||||
farbows - moved to tools
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Work in Progress 0.6.1 [04.02.2020]
|
||||
|
|
|
@ -13,7 +13,7 @@ cd "$SRC" # for proper resolving the '*'
|
|||
mod_install minetest_game --exclude=farming --exclude=bucket --exclude=doors minetest_game/mods/*
|
||||
|
||||
# Install all other mods
|
||||
mod_install blocks_functions
|
||||
mod_install blocks
|
||||
mod_install buildings
|
||||
mod_install environment
|
||||
mod_install flora
|
||||
|
@ -21,4 +21,4 @@ mod_install gui
|
|||
mod_install lib_api
|
||||
mod_install mobs
|
||||
mod_install player --exclude=3d_armor/3d_armor_ip/ --exclude=3d_armor/3d_armor_ui/
|
||||
mod_install special
|
||||
mod_install tools
|
||||
|
|
|
@ -31,9 +31,9 @@ Mod: minetest_game/mods/weather
|
|||
Mod: minetest_game/mods/wool
|
||||
Mod: minetest_game/mods/xpanes
|
||||
|
||||
origin https://github.com/sirrobzeroone/comboblock (fetch)
|
||||
* master ac04448 [origin/master] Add Spanish and Russian
|
||||
Mod: blocks_functions/comboblock
|
||||
origin git@github.com:pyrollo/display_modpack.git (fetch)
|
||||
* master f5bd6d1 [origin/master] Delete .gitmodules
|
||||
Mod: blocks/display_modpack
|
||||
|
||||
origin git@github.com:Sokomine/bell.git (fetch)
|
||||
* master 6b2eaa6 [origin/master] added depends.txt
|
||||
|
@ -63,9 +63,9 @@ origin git@github.com:minetest-mods/ts_doors.git (fetch)
|
|||
* master 2e8dd2d [origin/master] Add basic_materials to optional dependencies.
|
||||
Mod: buildings/ts_doors
|
||||
|
||||
origin git@gitlab.com:daretmavi/bucket-lite.git (fetch)
|
||||
* master 03a1ebf [origin/master] Merge branch 'devel' into 'master'
|
||||
Mod: environment/bucket-lite
|
||||
origin https://github.com/sirrobzeroone/comboblock (fetch)
|
||||
* master ac04448 [origin/master] Add Spanish and Russian
|
||||
Mod: environment/comboblock
|
||||
|
||||
origin https://github.com/minetest-mods/dynamic_liquid (fetch)
|
||||
* master 186d874 [origin/master] fill in missing translations with Google Translate
|
||||
|
@ -167,10 +167,6 @@ origin https://github.com/minetest-mods/emote (fetch)
|
|||
* master 3c39a8c [origin/master] Default: writable interface used.
|
||||
Mod: player/emote
|
||||
|
||||
origin git@github.com:runsy/farbows.git (fetch)
|
||||
* master d919bbf [origin/master] fixes
|
||||
Mod: player/farbows
|
||||
|
||||
origin https://github.com/minetest-mods/hbsprint/ (fetch)
|
||||
* master 1fe580a [origin/master] Don't drain hunger for players with fast privilege (#29)
|
||||
Mod: player/hbsprint
|
||||
|
@ -191,6 +187,10 @@ origin https://github.com/minetest-mods/wielded_light.git (fetch)
|
|||
* master 60b31d3 [origin/master] fix mt-5.4 compatibility Closes #7
|
||||
Mod: player/wielded_light
|
||||
|
||||
origin git@github.com:pyrollo/display_modpack.git (fetch)
|
||||
* master f5bd6d1 [origin/master] Delete .gitmodules
|
||||
Mod: special/display_modpack
|
||||
origin git@gitlab.com:daretmavi/bucket-lite.git (fetch)
|
||||
* master 03a1ebf [origin/master] Merge branch 'devel' into 'master'
|
||||
Mod: tools/bucket-lite
|
||||
|
||||
origin git@github.com:runsy/farbows.git (fetch)
|
||||
* master d919bbf [origin/master] fixes
|
||||
Mod: tools/farbows
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
name = goblins
|
||||
descriptions = add goblins that dig tunnels, set traps and create lairs.
|
||||
depends = default, mobs
|
||||
optional_depends = ambience, hunger_ng
|
|
@ -1,11 +0,0 @@
|
|||
--- mod.conf
|
||||
+++ mod.conf
|
||||
@@ -2,7 +2,7 @@ name = goblins
|
||||
descriptions = add goblins that dig tunnels, set traps and create lairs.
|
||||
depends = default, mobs
|
||||
optional_depends = ambience, hunger_ng
|
||||
-release = 4547
|
||||
+
|
||||
author = FreeLikeGNU
|
||||
description = (Respectfully) Destructive! Goblin NPCs burrow underground, build lairs, set traps and cultivate foodstuffs. They like to steal torches! This is a Work In Progress, but quite playable!
|
||||
title = Goblins
|
|
@ -3,7 +3,6 @@ Player related mods
|
|||
|
||||
3d_armor - Armor for Players with Model
|
||||
emote - enables model to sit, ...
|
||||
farbows - adds bows
|
||||
hbsprint - enable sprinting
|
||||
hunger_ng - enables eating and extends hunger
|
||||
character_anim - Model animations: head rotate, ...
|
||||
|
|
|
@ -0,0 +1,130 @@
|
|||
--------------------------------------------------
|
||||
Ver. 6.1 [24.01.2021]
|
||||
|
||||
BUG Fix: Lava as fuel for lava enabled buckets
|
||||
|
||||
BUG Fix: Buckets addet to dungeon_loot
|
||||
|
||||
--------------------------------------------------
|
||||
Ver. 6.0 [23.01.2021]
|
||||
|
||||
Added group get_lava
|
||||
- if get_lava=0 the bucket can not take lava
|
||||
Default for wood, bronze, gold
|
||||
- if get_lava=0 the bucket can not take lava
|
||||
Default for stone, steel, mese, diamond, gold
|
||||
|
||||
Added Settings for getting lava
|
||||
# Get lava with steel bucket
|
||||
bucket_getlava_steel (Enable steel bucket) bool true
|
||||
# Get lava with wood bucket
|
||||
bucket_getlava_wood (Enable wood bucket) bool false
|
||||
# Get lava with stone bucket
|
||||
bucket_getlava_stone (Enable stone bucket) bool true
|
||||
# Get lava with bronze bucket
|
||||
bucket_getlava_bronze (Enable bronze bucket) bool false
|
||||
# Get lava with mese bucket
|
||||
bucket_getlava_mese (Enable mese bucket) bool true
|
||||
# Get lava with diamond bucket
|
||||
bucket_getlava_diamond (Enable diamond bucket) bool true
|
||||
# Get lava with gold bucket
|
||||
bucket_getlava_gold (Enable gold bucket) bool false
|
||||
|
||||
--------------------------------------------------
|
||||
Ver. 5.1 [15.01.2021]
|
||||
|
||||
Switches for buckettypes are implemented:
|
||||
# Enable steel bucket
|
||||
bucket_material_steel (Enable steel bucket) bool true
|
||||
# Enable wood bucket
|
||||
bucket_material_wood (Enable wood bucket) bool true
|
||||
# Enable stone bucket
|
||||
bucket_material_stone (Enable stone bucket) bool true
|
||||
# Enable bronze bucket
|
||||
bucket_material_bronze (Enable bronze bucket) bool true
|
||||
# Enable mese bucket
|
||||
bucket_material_mese (Enable mese bucket) bool true
|
||||
Enable diamond bucket
|
||||
bucket_material_diamond (Enable diamond bucket) bool true
|
||||
Enable gold bucket
|
||||
bucket_material_gold (Enable gold bucket) bool true
|
||||
|
||||
|
||||
# Default bucket type
|
||||
# - do not disable defined type, or you get nothing with /giveme bucket
|
||||
bucket_default_type (Bucket default type) enum steel steel,wood,stone,bronze,mese,diamond,gold
|
||||
|
||||
BUG fixed
|
||||
- bucket return not working correctly is itemstack > 1
|
||||
|
||||
--------------------------------------------------
|
||||
Ver. 5.0 [13.01.2021]
|
||||
|
||||
Added settings:
|
||||
bucket_use_clasic_recipe - use clasic recipe for bucket if true
|
||||
bucket_material_... - settings for allowed materials
|
||||
|
||||
Some code cleanup
|
||||
|
||||
Support for other mods defining bucket with own water
|
||||
- all materials are supported
|
||||
- like for water_life muddy water
|
||||
- no special bucket water with reduces flowing is implemented (yet)
|
||||
|
||||
Bucket images are a little bit lighter
|
||||
|
||||
--------------------------------------------------
|
||||
Ver. 4.1 [20.12.2020]
|
||||
|
||||
Added better support for dynamic liquid (patched)
|
||||
- https://github.com/daretmavi/dynamic_liquid
|
||||
- checks if add_to_water_nodes is available
|
||||
|
||||
--------------------------------------------------
|
||||
Ver. 4.0 [05.12.2020]
|
||||
|
||||
Different material for bucket crafting are added
|
||||
local craft_ingreds = {
|
||||
wood = {"group:wood", "default_wood.png"},
|
||||
stone = {"group:stone", "default_stone.png"},
|
||||
steel = {"default:steel_ingot", "default_steel_block.png"},
|
||||
bronze = {"default:bronze_ingot", "default_bronze_block.png"},
|
||||
mese = {"default:mese_crystal", "default_mese_block.png"},
|
||||
diamond = {"default:diamond", "default_diamond_block.png"},
|
||||
gold = {"default:gold_ingot", "default_gold_block.png"}
|
||||
}
|
||||
|
||||
Default bucket is steel
|
||||
|
||||
Translation template update
|
||||
|
||||
SK Translation update
|
||||
|
||||
--------------------------------------------------
|
||||
Ver. 3.0 [27.11.2020]
|
||||
|
||||
Added posibility to take flowing liquid
|
||||
- Source node is taken from flowing (searched in liquid_range)
|
||||
|
||||
Settings added (settingtypes.txt)
|
||||
- bucket_get_flowing (Default = true) - Flowing liwuid can be taken
|
||||
|
||||
--------------------------------------------------
|
||||
Ver. 2.0 [14.11.2020]
|
||||
|
||||
Settings added (settingtypes.txt)
|
||||
- bucket_water_flowing_range (Default = 1)
|
||||
- bucket_lava_flowing_range (Default = 1)
|
||||
|
||||
Code cleanup, global names defined
|
||||
- Liquid_name - all use liquid names
|
||||
.water - all water like names
|
||||
.lava - all lava like names
|
||||
- bucket
|
||||
- bucket names definitions
|
||||
- bucket material defined
|
||||
|
||||
--------------------------------------------------
|
||||
Ver. 1.0 [10.11.2020]
|
||||
|
||||
Fist release
|
|
@ -0,0 +1,169 @@
|
|||
# Bucket lite **[Minetest mod]**
|
||||
|
||||
![Image](screenshot.png)
|
||||
|
||||
Fork of **Minetest Game mod: bucket**
|
||||
|
||||
- only one bucket for all water types
|
||||
- flowing is only one block to prevent flooding with one bucket
|
||||
- If "bucket water" gets in contact with normal water or river water, then the bucket water changes to this type.
|
||||
- If "bucket lava" gets in contact with water, or default lava, the bucket lava changes to default type - this can result in lava flooding. Just don't mess up with lava :)
|
||||
- liquid can be taken from flowing liquid - you don't have to look for source
|
||||
- more buckettypes added (wood, stone, steel, bronze, mese, diamond, gold)
|
||||
- default bucker for aliases is steel
|
||||
|
||||
**Working with other mods:**
|
||||
|
||||
**dynamic_liquid** - actually works (good enough)
|
||||
|
||||
- If you want better support, some changes are needed:
|
||||
- see my fork https://github.com/daretmavi/dynamic_liquid (no warranty)
|
||||
|
||||
## Behavior
|
||||
|
||||
- water flowing from bucket is set to 1 block (default)
|
||||
|
||||
**Screenshots:**
|
||||
|
||||
This is default water behavior:
|
||||
|
||||
![Image](screenshot_old_river_water.png)
|
||||
![Image](screenshot_old_water.png)
|
||||
![Image](screenshot_old_lava.png)
|
||||
|
||||
River water is ok, but normal water and lava can create real flood ... from one bucket. It's crazy.
|
||||
|
||||
This mod changes it to just one block
|
||||
|
||||
![Image](screenshot_new.png)
|
||||
Minetest: https://www.minetest.net/
|
||||
|
||||
## Diferent bucket types:
|
||||
|
||||
![Image](screenshot_buckets.png)
|
||||
|
||||
|
||||
**Support for other mods bucket liquids:**
|
||||
- like muddy water in water_life mod
|
||||
- ![Image](screenshot_buckets_muddy_water_life.png)
|
||||
|
||||
-----
|
||||
## Recipe
|
||||
|
||||
- can be changed with mod setting **bucket_use_clasic_recipe**
|
||||
|
||||
### Default "clasic" recipe:
|
||||
|
||||
![Image](screenshot_bucket_recipe_clasic.png)
|
||||
|
||||
`bucket_use_clasic_recipe = true`
|
||||
|
||||
- can conflict with other mods, like farming:Wooden Bowl - "Wood Empty Bucket" = "Wooden Bowl"
|
||||
|
||||
### NEW Recipe:
|
||||
|
||||
![Image](screenshot_bucket_recipe_new.png)
|
||||
|
||||
`bucket_use_clasic_recipe = false`
|
||||
|
||||
## Other Settings
|
||||
|
||||
**How far will water from bucket flow**
|
||||
|
||||
`bucket_water_flowing_range (Bucket water flowing range) int 1`
|
||||
|
||||
**How far will lava from bucket flow**
|
||||
|
||||
`bucket_lava_flowing_range (Bucket lava flowing range) int 1`
|
||||
|
||||
**Get liquid from flowing liquid**
|
||||
|
||||
`bucket_get_flowing (Flowing liwuid can be taken) bool true`
|
||||
|
||||
- If true, then liquid can be taken even from flowing one
|
||||
- not only from source
|
||||
|
||||
|
||||
**Default bucket type**
|
||||
|
||||
`bucket_default_type (Bucket default type) enum steel steel,wood,stone,bronze,mese,diamond,gold`
|
||||
|
||||
- do not disable defined type, or you get nothing with /giveme bucket
|
||||
|
||||
### Enabled buckettypes
|
||||
|
||||
**Enable steel bucket**
|
||||
|
||||
`bucket_material_steel (Enable steel bucket) bool true`
|
||||
|
||||
**Enable wood bucket**
|
||||
|
||||
`bucket_material_wood (Enable wood bucket) bool true`
|
||||
|
||||
**Enable stone bucket**
|
||||
|
||||
`bucket_material_stone (Enable stone bucket) bool true`
|
||||
|
||||
**Enable bronze bucket**
|
||||
|
||||
`bucket_material_bronze (Enable bronze bucket) bool true`
|
||||
|
||||
**Enable mese bucket**
|
||||
|
||||
`bucket_material_mese (Enable mese bucket) bool true`
|
||||
|
||||
**Enable diamond bucket**
|
||||
|
||||
`bucket_material_diamond (Enable diamond bucket) bool true`
|
||||
|
||||
**Enable gold bucket**
|
||||
`bucket_material_gold (Enable gold bucket) bool true`
|
||||
|
||||
|
||||
### Enable getting lava
|
||||
|
||||
**Get lava with steel bucket**
|
||||
|
||||
`bucket_getlava_steel (Enable steel bucket) bool true`
|
||||
|
||||
**Get lava with wood bucket**
|
||||
|
||||
`bucket_getlava_wood (Enable wood bucket) bool false`
|
||||
|
||||
**Get lava with stone bucket**
|
||||
|
||||
`bucket_getlava_stone (Enable stone bucket) bool true`
|
||||
|
||||
**Get lava with bronze bucket**
|
||||
|
||||
`bucket_getlava_bronze (Enable bronze bucket) bool false`
|
||||
|
||||
**Get lava with mese bucket**
|
||||
|
||||
`bucket_getlava_mese (Enable mese bucket) bool true`
|
||||
|
||||
**Get lava with diamond bucket**
|
||||
|
||||
`bucket_getlava_diamond (Enable diamond bucket) bool true`
|
||||
|
||||
**Get lava with gold bucket**
|
||||
|
||||
`bucket_getlava_gold (Enable gold bucket) bool false`
|
||||
|
||||
|
||||
-----
|
||||
|
||||
**Minetest Game mod: bucket**
|
||||
-----------------------------
|
||||
|
||||
See license.txt for license information.
|
||||
|
||||
Authors of original source code
|
||||
-------------------------------
|
||||
Kahrl <kahrl@gmx.net> (LGPLv2.1+)
|
||||
celeron55, Perttu Ahola <celeron55@gmail.com> (LGPLv2.1+)
|
||||
Various Minetest developers and contributors (LGPLv2.1+)
|
||||
|
||||
Authors of media (textures)
|
||||
---------------------------
|
||||
ElementW (CC BY-SA 3.0)
|
|
@ -0,0 +1,186 @@
|
|||
--
|
||||
-- Load support for MT game translation.
|
||||
local S = minetest.get_translator("bucket")
|
||||
|
||||
-- Default Liquid Namespace
|
||||
Liquid_name = {}
|
||||
Liquid_name.water = {}
|
||||
Liquid_name.lava = {}
|
||||
|
||||
-- Default water and lava
|
||||
Liquid_name.water.source = "default:water_source"
|
||||
Liquid_name.water.flowing = "default:water_flowing"
|
||||
Liquid_name.water.river_source = "default:river_water_source"
|
||||
Liquid_name.water.river_flowing = "default:river_water_flowing"
|
||||
Liquid_name.lava.source = "default:lava_source"
|
||||
Liquid_name.lava.flowing = "default:lava_flowing"
|
||||
|
||||
--bucket waret and lava
|
||||
Liquid_name.water.bucket_source = "bucket:bucket_water_source"
|
||||
Liquid_name.water.bucket_flowing = "bucket:bucket_water_flowing"
|
||||
Liquid_name.lava.bucket_source = "bucket:bucket_lava_source"
|
||||
Liquid_name.lava.bucket_flowing = "bucket:bucket_lava_flowing"
|
||||
--Bucket river water not used (not needed yet)
|
||||
--Liquid_name.water.bucket_river_source = "bucket:bucket_river_water_source"
|
||||
--Liquid_name.water.bucket_river_flowing = "bucket:bucket_river_water_flowing"
|
||||
|
||||
-- Liquid flowing range definitions (Default)
|
||||
local bucket_water_range = 1
|
||||
local bucket_lava_range = 1
|
||||
-- load settingtypes
|
||||
bucket_water_range = minetest.settings:get("bucket_water_flowing_range") or bucket_water_range
|
||||
bucket_lava_range = minetest.settings:get("bucket_lava_flowing_range") or bucket_lava_range
|
||||
|
||||
-- Registred nodes according to aliases
|
||||
local water_source_def = minetest.deserialize(minetest.serialize(minetest.registered_nodes[Liquid_name.water.source]))
|
||||
local water_flowing_def = minetest.deserialize(minetest.serialize(minetest.registered_nodes[Liquid_name.water.flowing]))
|
||||
local lava_source_def = minetest.deserialize(minetest.serialize(minetest.registered_nodes[Liquid_name.lava.source]))
|
||||
local lava_flowing_def = minetest.deserialize(minetest.serialize(minetest.registered_nodes[Liquid_name.lava.flowing]))
|
||||
|
||||
-- NEW liquid definitions "bucket" liquid
|
||||
--minetest.log(dump(minetest.registered_nodes[Liquid_name.water.source]))
|
||||
minetest.register_node(Liquid_name.water.bucket_source, water_source_def)
|
||||
minetest.override_item(Liquid_name.water.bucket_source, {
|
||||
description = S("Bucket Water Source"),
|
||||
liquid_alternative_flowing = Liquid_name.water.bucket_flowing,
|
||||
liquid_alternative_source = Liquid_name.water.bucket_source,
|
||||
liquid_renewable = false,
|
||||
})
|
||||
-- For dynamic_liquid support
|
||||
if minetest.get_modpath("dynamic_liquid") then
|
||||
-- node is detroyed by lava, Lava source blocks will turn these blocks into steam.
|
||||
minetest.registered_nodes[Liquid_name.water.bucket_source].groups.dynamic_lava_source_destroys = 1
|
||||
-- node cools lava
|
||||
minetest.registered_nodes[Liquid_name.water.bucket_source].groups.dynamic_cools_lava_source = 1
|
||||
minetest.registered_nodes[Liquid_name.water.bucket_source].groups.dynamic_cools_lava_flowing = 1
|
||||
end
|
||||
|
||||
minetest.register_node(Liquid_name.water.bucket_flowing, water_flowing_def)
|
||||
minetest.override_item(Liquid_name.water.bucket_flowing, {
|
||||
description = S("Flowing Bucket Water"),
|
||||
liquid_alternative_flowing = Liquid_name.water.bucket_flowing,
|
||||
liquid_alternative_source = Liquid_name.water.bucket_source,
|
||||
liquid_range = bucket_water_range,
|
||||
liquid_renewable = false,
|
||||
})
|
||||
|
||||
-- For dynamic_liquid support
|
||||
if minetest.get_modpath("dynamic_liquid") then
|
||||
-- in dynamic_liquid is flowing water not cooling lava
|
||||
minetest.registered_nodes[Liquid_name.water.bucket_flowing].groups.cools_lava = 0
|
||||
-- node is detroyed by lava, Flowing lava will turn these blocks into steam
|
||||
minetest.registered_nodes[Liquid_name.water.bucket_flowing].groups.dynamic_lava_source_destroys = 1
|
||||
minetest.registered_nodes[Liquid_name.water.bucket_flowing].groups.dynamic_lava_flowing_destroys = 1
|
||||
|
||||
-- gedining bucket water as dynamic liquid
|
||||
dynamic_liquid.liquid_abm(Liquid_name.water.bucket_source, Liquid_name.water.bucket_flowing, 1)
|
||||
|
||||
-- this new funktion is needed, because setting goups is not enough
|
||||
-- not implemented in actrual version (12.12.2020) - musst be added, or use fork https://github.com/daretmavi/dynamic_liquid
|
||||
-- check if add_to_water_nodes is in the mod dynamic_liquid available. _G is a global table on lua that stores every global function in it.
|
||||
if _G["dynamic_liquid"]["add_to_water_nodes"] then
|
||||
dynamic_liquid.add_to_water_nodes(Liquid_name.water.bucket_source, Liquid_name.water.bucket_flowing)
|
||||
else
|
||||
local Dyn_liq_error = S("Mod: dynamic_liquid is not changed. add_to_water_nodes function is missing! Lava colling will not work the same ways, as the default water-lava interaction works.")
|
||||
minetest.log(Dyn_liq_error)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node(Liquid_name.lava.bucket_source, lava_source_def)
|
||||
minetest.override_item(Liquid_name.lava.bucket_source, {
|
||||
description = S("Bucket Lava Source"),
|
||||
liquid_alternative_flowing = Liquid_name.lava.bucket_flowing,
|
||||
liquid_alternative_source = Liquid_name.lava.bucket_source,
|
||||
liquid_renewable = false,
|
||||
})
|
||||
|
||||
minetest.register_node(Liquid_name.lava.bucket_flowing, lava_flowing_def)
|
||||
minetest.override_item(Liquid_name.lava.bucket_flowing, {
|
||||
description = S("Bucket Lava Source"),
|
||||
liquid_alternative_flowing = Liquid_name.lava.bucket_flowing,
|
||||
liquid_alternative_source = Liquid_name.lava.bucket_source,
|
||||
liquid_range = bucket_lava_range,
|
||||
liquid_renewable = false,
|
||||
})
|
||||
|
||||
|
||||
-- Change Bucket Water to normal "water_source" on contact with it
|
||||
minetest.register_abm({
|
||||
label = "Water Source normalization",
|
||||
nodenames = {Liquid_name.water.bucket_source},
|
||||
neighbors = {Liquid_name.water.source,
|
||||
Liquid_name.water.flowing},
|
||||
interval = 1.0, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 nod
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local pos = {x = pos.x, y = pos.y, z = pos.z}
|
||||
minetest.set_node(pos, {name = Liquid_name.water.source})
|
||||
end
|
||||
})
|
||||
|
||||
--
|
||||
minetest.register_abm({
|
||||
label = "Water Flowing normalization",
|
||||
nodenames = {Liquid_name.water.bucket_flowing},
|
||||
neighbors = {Liquid_name.water.source,
|
||||
Liquid_name.water.flowing},
|
||||
interval = 1.0, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 nod
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local pos = {x = pos.x, y = pos.y, z = pos.z}
|
||||
minetest.set_node(pos, {name = Liquid_name.water.flowing})
|
||||
end
|
||||
})
|
||||
|
||||
-- Change Bucket Water to normal "river_water_source" on contact with it
|
||||
minetest.register_abm({
|
||||
label = "River Water Source normalization",
|
||||
nodenames = {Liquid_name.water.bucket_source},
|
||||
neighbors = {Liquid_name.water.river_source,
|
||||
Liquid_name.water.river_flowing},
|
||||
interval = 1.0, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 nod
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local pos = {x = pos.x, y = pos.y, z = pos.z}
|
||||
minetest.set_node(pos, {name = Liquid_name.water.river_source})
|
||||
end
|
||||
})
|
||||
|
||||
-- Change Bucket Lava to normal on contact with lava or water
|
||||
minetest.register_abm({
|
||||
label = "Lava Source normalization",
|
||||
nodenames = {Liquid_name.lava.bucket_source},
|
||||
neighbors = {Liquid_name.lava.source,
|
||||
Liquid_name.lava.flowing,
|
||||
Liquid_name.water.source,
|
||||
Liquid_name.water.flowing,
|
||||
Liquid_name.water.river_source,
|
||||
Liquid_name.water.river_flowing,
|
||||
Liquid_name.water.bucket_source,
|
||||
Liquid_name.water.bucket_flowing},
|
||||
interval = 1.0, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 nod
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local pos = {x = pos.x, y = pos.y, z = pos.z}
|
||||
minetest.set_node(pos, {name = Liquid_name.lava.source})
|
||||
end
|
||||
})
|
||||
|
||||
-- Bucket flowing Lava to normal on contact with lava or water
|
||||
minetest.register_abm({
|
||||
label = "Lava Flowing normalization",
|
||||
nodenames = {Liquid_name.lava.bucket_flowing},
|
||||
neighbors = {Liquid_name.lava.source,
|
||||
Liquid_name.lava.flowing,
|
||||
Liquid_name.water.source,
|
||||
Liquid_name.water.flowing,
|
||||
Liquid_name.water.river_source,
|
||||
Liquid_name.water.river_flowing,
|
||||
Liquid_name.water.bucket_source},
|
||||
interval = 1.0, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 nod
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local pos = {x = pos.x, y = pos.y, z = pos.z}
|
||||
minetest.set_node(pos, {name = Liquid_name.lava.flowing})
|
||||
end
|
||||
})
|
|
@ -0,0 +1,523 @@
|
|||
-- Minetest mod: bucket (Fork of Minetest mod)
|
||||
-- See README.md for licensing and other information.
|
||||
|
||||
-- Load support for MT game translation.
|
||||
local S = minetest.get_translator("bucket")
|
||||
|
||||
-- bucket item definitions
|
||||
bucket = {}
|
||||
|
||||
bucket.empty = "bucket:bucket_empty" -- empty bucket name prefix
|
||||
bucket.water = "bucket:bucket_water_uni" -- water bucket name prefix
|
||||
bucket.lava = "bucket:bucket_lava_uni" -- lava bucket name prefix
|
||||
bucket.default = {} -- default bucket names
|
||||
bucket.default_material = minetest.settings:get("bucket_default_type") or "steel" -- default material for bucket
|
||||
bucket.liquids = {} -- all buckets for defined liquid
|
||||
|
||||
-- standard bucket recipe (like in minecraft)
|
||||
-- conflicts "Wood Empty Bucket" with farming "Wooden Bowl"
|
||||
bucket.recipe_clasic ={
|
||||
{"MATERIAL", "", "MATERIAL"},
|
||||
{"", "MATERIAL", ""}
|
||||
}
|
||||
-- new recipe for bucket
|
||||
bucket.recipe_new ={
|
||||
{"MATERIAL", "", "MATERIAL"},
|
||||
{"MATERIAL", "", "MATERIAL"},
|
||||
{"MATERIAL", "MATERIAL", "MATERIAL"}
|
||||
}
|
||||
|
||||
-- define bucket liquids and Liquid_name
|
||||
dofile(minetest.get_modpath("bucket") .. "/bucket_liquids.lua")
|
||||
|
||||
-- Read settinf in boolean and return integer
|
||||
-- Used for get lava groups
|
||||
local function Bool2Int_setting(settingtype, default_setting)
|
||||
if minetest.settings:get_bool(settingtype, default_setting) then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
-- craft diferent types of bucket
|
||||
-- recipe can be anjustet for every material type
|
||||
local craft_ingreds = {
|
||||
wood = {"group:wood", "default_wood.png",
|
||||
recipe = table.copy(bucket.recipe_clasic),
|
||||
enabled = minetest.settings:get_bool("bucket_material_wood", true),
|
||||
groups = {tool = 1, get_lava = Bool2Int_setting("bucket_getlava_wood", false)}
|
||||
},
|
||||
stone = {"group:stone", "default_stone.png",
|
||||
recipe = table.copy(bucket.recipe_clasic),
|
||||
enabled = minetest.settings:get_bool("bucket_material_stone", true),
|
||||
groups = {tool = 1, get_lava = Bool2Int_setting("bucket_getlava_stone", true)}
|
||||
},
|
||||
steel = {"default:steel_ingot", "default_steel_block.png",
|
||||
recipe = table.copy(bucket.recipe_clasic),
|
||||
enabled = minetest.settings:get_bool("bucket_material_steel", true),
|
||||
groups = {tool = 1, get_lava = Bool2Int_setting("bucket_getlava_steel", true)}
|
||||
},
|
||||
bronze = {"default:bronze_ingot", "default_bronze_block.png",
|
||||
recipe = table.copy(bucket.recipe_clasic),
|
||||
enabled = minetest.settings:get_bool("bucket_material_bronze", true),
|
||||
groups = {tool = 1, get_lava = Bool2Int_setting("bucket_getlava_bronze", false)}
|
||||
},
|
||||
mese = {"default:mese_crystal", "default_mese_block.png",
|
||||
recipe = table.copy(bucket.recipe_clasic),
|
||||
enabled = minetest.settings:get_bool("bucket_material_mese", true),
|
||||
groups = {tool = 1, get_lava = Bool2Int_setting("bucket_getlava_mese", true)}
|
||||
},
|
||||
diamond = {"default:diamond", "default_diamond_block.png",
|
||||
recipe = table.copy(bucket.recipe_clasic),
|
||||
enabled = minetest.settings:get_bool("bucket_material_diamond", true),
|
||||
groups = {tool = 1, get_lava = Bool2Int_setting("bucket_getlava_diamond", true)}
|
||||
},
|
||||
gold = {"default:gold_ingot", "default_gold_block.png",
|
||||
recipe = table.copy(bucket.recipe_clasic),
|
||||
enabled = minetest.settings:get_bool("bucket_material_gold", true),
|
||||
groups = {tool = 1, get_lava = Bool2Int_setting("bucket_getlava_gold", false)}
|
||||
}
|
||||
}
|
||||
|
||||
-- Default bucket names
|
||||
bucket.default.empty = bucket.empty.."_"..bucket.default_material
|
||||
bucket.default.water = bucket.water.."_"..bucket.default_material
|
||||
bucket.default.lava = bucket.lava.."_"..bucket.default_material
|
||||
|
||||
-- Bucket aliases - default bucket ist steel
|
||||
minetest.register_alias("bucket", bucket.default.empty)
|
||||
minetest.register_alias("bucket_water", bucket.default.water)
|
||||
minetest.register_alias("bucket_lava", bucket.default.lava)
|
||||
-- for compatibility witk old bucket mod
|
||||
minetest.register_alias("bucket:bucket_empty", bucket.default.empty)
|
||||
minetest.register_alias("bucket:bucket_water", bucket.default.water)
|
||||
minetest.register_alias("bucket:bucket_lava", bucket.default.lava)
|
||||
|
||||
-- set new recipe if enabled
|
||||
local use_clasic_recipe = minetest.settings:get_bool("bucket_use_clasic_recipe", true)
|
||||
|
||||
if not use_clasic_recipe then
|
||||
for idx, mat in pairs(craft_ingreds) do
|
||||
craft_ingreds[idx].recipe = table.copy(bucket.recipe_new)
|
||||
end
|
||||
end
|
||||
|
||||
-- according to source (liquid type) assign bucket with "bucket" liquid
|
||||
-- with this you can override the mod setting
|
||||
bucket.giving_back={
|
||||
-- return bucket for standard water and lava
|
||||
-- [Liquid_name.lava.source]=bucket.lava,
|
||||
-- [Liquid_name.water.source]=bucket.water,
|
||||
-- return bucket for river water
|
||||
-- [Liquid_name.water.river_source ]=bucket.water,
|
||||
-- return bucket for bucket water and lava
|
||||
-- [Liquid_name.lava.bucket_source]=bucket.lava,
|
||||
-- [Liquid_name.water.bucket_source]=bucket.water,
|
||||
}
|
||||
|
||||
-- if true, the flowing water can be taken in the bucket
|
||||
-- load settingtypes
|
||||
local get_flowing_liquid = minetest.settings:get_bool("bucket_get_flowing", true)
|
||||
|
||||
-- Function relpaces all "MATERIAL" with new/real material definition new_mat
|
||||
local function replace_recipe_material(recipe_def, new_mat)
|
||||
local recipe_mat = table.copy(recipe_def)
|
||||
for r_row_idx, r_row in pairs(recipe_def) do
|
||||
for r_idx, r_mat in pairs(r_row) do
|
||||
if r_mat=="MATERIAL" then
|
||||
recipe_mat[r_row_idx][r_idx]=new_mat
|
||||
end
|
||||
end
|
||||
end
|
||||
return recipe_mat
|
||||
end
|
||||
|
||||
-- Register empty buckets crafting recipes
|
||||
for name, mat in pairs(craft_ingreds) do
|
||||
-- replace "MATERIAL" with correct one
|
||||
local bucket_recipe = replace_recipe_material(mat.recipe, mat[1])
|
||||
|
||||
-- register new empty bucket crafting recipe
|
||||
minetest.register_craft({
|
||||
output = "bucket:bucket_empty".."_"..name,
|
||||
recipe = table.copy(bucket_recipe)
|
||||
})
|
||||
end
|
||||
|
||||
-- for compatibility
|
||||
minetest.register_alias("bucket:bucket_empty", "bucket:bucket_empty_steel")
|
||||
|
||||
-- protection - from original bucket mod
|
||||
-- not analysed yet
|
||||
local function check_protection(pos, name, text)
|
||||
if minetest.is_protected(pos, name) then
|
||||
minetest.log("action", (name ~= "" and name or "A mod")
|
||||
.. " tried to " .. text
|
||||
.. " at protected position "
|
||||
.. minetest.pos_to_string(pos)
|
||||
.. " with a bucket")
|
||||
minetest.record_protection_violation(pos, name)
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- ============================================================================
|
||||
-- Register a new liquid
|
||||
-- source = name of the source node
|
||||
-- flowing = name of the flowing node
|
||||
-- itemname = name of the new bucket item (or nil if liquid is not takeable)
|
||||
-- inventory_image = texture of the new bucket item (ignored if itemname == nil)
|
||||
-- - this new bucket mod version defines is as table, e.g. {empty = "bucket_uni.png", materials = craft_ingreds, fill = "bucket_uni_lava.png"}
|
||||
-- - if only one image is defined, then thi imege is used for liquid and bucket materials are from this mod
|
||||
-- name = text description of the bucket item
|
||||
-- groups = (optional) groups of the bucket item, for example {water_bucket = 1}
|
||||
-- force_renew = (optional) bool. Force the liquid source to renew if it has a
|
||||
-- source neighbour, even if defined as 'liquid_renewable = false'.
|
||||
-- Needed to avoid creating holes in sloping rivers.
|
||||
-- giving_back = (NEW) defines the bucket to return
|
||||
-- This function can be called from any mod (that depends on bucket).
|
||||
|
||||
local function register_full_bucket(source, flowing, itemname, inventory_image, name,
|
||||
groups, force_renew, giving_back)
|
||||
minetest.register_craftitem(itemname, {
|
||||
description = name,
|
||||
inventory_image = inventory_image,
|
||||
stack_max = 1,
|
||||
liquids_pointable = true,
|
||||
groups = groups,
|
||||
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
-- Must be pointing to node
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
local node = minetest.get_node_or_nil(pointed_thing.under)
|
||||
local ndef = node and minetest.registered_nodes[node.name]
|
||||
|
||||
-- Call on_rightclick if the pointed node defines it
|
||||
if ndef and ndef.on_rightclick and
|
||||
not (user and user:is_player() and
|
||||
user:get_player_control().sneak) then
|
||||
return ndef.on_rightclick(
|
||||
pointed_thing.under,
|
||||
node, user,
|
||||
itemstack)
|
||||
end
|
||||
|
||||
local lpos
|
||||
|
||||
-- Check if pointing to a buildable node
|
||||
if ndef and ndef.buildable_to then
|
||||
-- buildable; replace the node
|
||||
lpos = pointed_thing.under
|
||||
else
|
||||
-- not buildable to; place the liquid above
|
||||
-- check if the node above can be replaced
|
||||
|
||||
lpos = pointed_thing.above
|
||||
node = minetest.get_node_or_nil(lpos)
|
||||
local above_ndef = node and minetest.registered_nodes[node.name]
|
||||
|
||||
if not above_ndef or not above_ndef.buildable_to then
|
||||
-- do not remove the bucket with the liquid
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
|
||||
if check_protection(lpos, user
|
||||
and user:get_player_name()
|
||||
or "", "place "..source) then
|
||||
return
|
||||
end
|
||||
|
||||
minetest.set_node(lpos, {name = source})
|
||||
return ItemStack(giving_back)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
-- Function to register new liquid in bucket
|
||||
function bucket.register_liquid(source, flowing, itemname, inventory_image, name,
|
||||
groups, force_renew, giving_back)
|
||||
|
||||
bucket.liquids[source] = {
|
||||
source = source,
|
||||
flowing = flowing,
|
||||
itemname = itemname,
|
||||
force_renew = force_renew,
|
||||
}
|
||||
bucket.liquids[flowing] = bucket.liquids[source]
|
||||
|
||||
if itemname ~= nil then
|
||||
local inv_images
|
||||
|
||||
if type(inventory_image) == "string" then
|
||||
-- if only one image is defined (like from other mod)
|
||||
-- material are from predefined craft_ingreds
|
||||
-- fill/liquid image ist taken from the inventory_image
|
||||
inv_images = {empty = "bucket_uni.png", materials = craft_ingreds, fill = "bucket_uni_fill.png"}
|
||||
else
|
||||
-- if more images in table are defined = more materials
|
||||
-- suplied materials and images are used - has to be like in this mod defined
|
||||
inv_images = inventory_image
|
||||
end
|
||||
|
||||
bucket.liquids[source].itemname = {} -- all buckets for defined source
|
||||
|
||||
-- loop for all materials in inv_images
|
||||
for mat_name, mat in pairs(inv_images["materials"]) do
|
||||
if mat["enabled"] then
|
||||
local Mat_name = mat_name:gsub("^%l", string.upper)
|
||||
local bucket_name = S(Mat_name.." "..name)
|
||||
local bucket_itemname = itemname.."_"..mat_name
|
||||
giving_back = bucket.empty.."_"..mat_name
|
||||
bucket.liquids[source].itemname[mat_name]=bucket_itemname
|
||||
|
||||
-- different image creation ist defined for all material, or only liquid it in inventory_image
|
||||
local bucket_inv_image
|
||||
|
||||
if type(inventory_image) == "string" then
|
||||
-- inly one image was delivered - inventory_image = liquid
|
||||
-- like from other mods
|
||||
local bucket_fill_image = "("..inventory_image.."^[resize:16x16".."^[colorize:#fff:30^"..inv_images["fill"].."^[noalpha^[makealpha:0,255,0)"
|
||||
bucket_inv_image = mat[2].."^[resize:16x16".."^[colorize:#fff:30^bucket_uni.png".."^[noalpha^[makealpha:0,255,0^"..bucket_fill_image
|
||||
else
|
||||
-- all images for bucket are defined
|
||||
-- definition in this mod
|
||||
bucket_inv_image = mat[2].."^[resize:16x16".."^[colorize:#fff:30^bucket_uni.png^"..inv_images["fill"].."^[noalpha^[makealpha:0,255,0"
|
||||
end
|
||||
|
||||
register_full_bucket(source, flowing, bucket_itemname, bucket_inv_image, bucket_name,
|
||||
groups, force_renew, giving_back)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- ============================================================================
|
||||
|
||||
-- Register Empty buckets
|
||||
for mat_name, mat in pairs(craft_ingreds) do
|
||||
if mat["enabled"] then
|
||||
-- Capitalise first character
|
||||
local Name = mat_name:gsub("^%l", string.upper)
|
||||
-- register all empty buckets
|
||||
local bucket_empty = bucket.empty.."_"..mat_name
|
||||
minetest.register_craftitem(bucket_empty, {
|
||||
description = S(Name.." ".."Empty Bucket"),
|
||||
--inventory_image = "bucket.png",
|
||||
-- inventory_image created from bucket_uni.png and defined material texture mat[2] (craft_ingreds)
|
||||
inventory_image = mat[2].."^[resize:16x16".."^[colorize:#fff:30^bucket_uni.png^[noalpha^[makealpha:0,255,0",
|
||||
--groups = {tool = 1},
|
||||
groups = mat["groups"],
|
||||
liquids_pointable = true,
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type == "object" then
|
||||
pointed_thing.ref:punch(user, 1.0, { full_punch_interval=1.0 }, nil)
|
||||
return user:get_wielded_item()
|
||||
elseif pointed_thing.type ~= "node" then
|
||||
-- do nothing if it's neither object nor node
|
||||
return
|
||||
end
|
||||
-- Check if pointing to a liquid source
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
local liquiddef = bucket.liquids[node.name]
|
||||
local item_count = user:get_wielded_item():get_count()
|
||||
|
||||
-- Check if is lava and if lava can be taken
|
||||
-- exit if it not allowed - group get_lava = 0
|
||||
local bucket_name = itemstack:get_name()
|
||||
if minetest.registered_nodes[node.name].groups.lava and minetest.get_item_group(bucket_name, "get_lava")==0 then
|
||||
return
|
||||
end
|
||||
-- node.name == liquiddef.flowing return water even from flowing liquid
|
||||
-- get_flowing_liquid - if this is enabled
|
||||
if liquiddef ~= nil
|
||||
and liquiddef.itemname ~= nil
|
||||
and (node.name == liquiddef.source
|
||||
or (node.name == liquiddef.flowing and get_flowing_liquid)) then
|
||||
if check_protection(pointed_thing.under,
|
||||
user:get_player_name(),
|
||||
"take ".. node.name) then
|
||||
return
|
||||
end
|
||||
|
||||
-- find source for the flowing liquid
|
||||
if node.name == liquiddef.flowing then
|
||||
-- source_dist max. distance from flowing node, if Nil, the max. = 8 is used
|
||||
local source_dist = tonumber(minetest.registered_nodes[liquiddef.flowing].liquid_range) or 8
|
||||
-- Find source node position
|
||||
local source_pos = minetest.find_node_near(pointed_thing.under, source_dist, liquiddef.source) -- position of the source node
|
||||
-- If found, then replace with flowing node
|
||||
if source_pos ~= nil then
|
||||
minetest.set_node(source_pos, {name = liquiddef.flowing})
|
||||
else
|
||||
-- if source not found, then do nothing
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- default set to return filled bucket
|
||||
-- defined in this script
|
||||
local giving_back = bucket.giving_back[liquiddef.source]
|
||||
|
||||
-- giving_back from original bucket
|
||||
if giving_back == nil then
|
||||
-- if type(liquiddef.itemname) == "string" then
|
||||
-- giving_back = liquiddef.itemname
|
||||
-- else
|
||||
giving_back = liquiddef.itemname[mat_name]
|
||||
-- end
|
||||
end
|
||||
|
||||
-- check if holding more than 1 empty bucket
|
||||
if item_count > 1 then
|
||||
|
||||
-- if space in inventory add filled bucked, otherwise drop as item
|
||||
local inv = user:get_inventory()
|
||||
if inv:room_for_item("main", {name=giving_back}) then
|
||||
inv:add_item("main", giving_back)
|
||||
else
|
||||
local pos = user:get_pos()
|
||||
pos.y = math.floor(pos.y + 0.5)
|
||||
minetest.add_item(pos, giving_back)
|
||||
end
|
||||
|
||||
-- set to return empty buckets minus 1
|
||||
itemstack:take_item()
|
||||
giving_back = itemstack
|
||||
|
||||
end
|
||||
|
||||
-- force_renew requires a source neighbour
|
||||
local source_neighbor = false
|
||||
if liquiddef.force_renew then
|
||||
source_neighbor =
|
||||
minetest.find_node_near(pointed_thing.under, 1, liquiddef.source)
|
||||
end
|
||||
if not (source_neighbor and liquiddef.force_renew) then
|
||||
minetest.add_node(pointed_thing.under, {name = "air"})
|
||||
end
|
||||
|
||||
return ItemStack(giving_back)
|
||||
else
|
||||
-- non-liquid nodes will have their on_punch triggered
|
||||
local node_def = minetest.registered_nodes[node.name]
|
||||
if node_def then
|
||||
node_def.on_punch(pointed_thing.under, node, user, pointed_thing)
|
||||
end
|
||||
return user:get_wielded_item()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-- original bucket - to take the original liquit sources
|
||||
-- uses new bucket uni
|
||||
bucket.register_liquid(
|
||||
Liquid_name.water.source,
|
||||
Liquid_name.water.flowing,
|
||||
bucket.water,
|
||||
{empty = "bucket_uni.png", materials = craft_ingreds, fill = "bucket_uni_water.png"},
|
||||
"Water Bucket",
|
||||
{tool = 1, water_bucket = 1},
|
||||
false
|
||||
)
|
||||
|
||||
-- River water source is 'liquid_renewable = false' to avoid horizontal spread
|
||||
-- of water sources in sloping rivers that can cause water to overflow
|
||||
-- riverbanks and cause floods.
|
||||
-- River water source is instead made renewable by the 'force renew' option
|
||||
-- used here.
|
||||
|
||||
bucket.register_liquid(
|
||||
Liquid_name.water.river_source ,
|
||||
Liquid_name.water.river_flowing,
|
||||
bucket.water,
|
||||
{empty = "bucket_uni.png", materials = craft_ingreds, fill = "bucket_uni_water.png"},
|
||||
"Water Bucket",
|
||||
{tool = 1, water_bucket = 1},
|
||||
false
|
||||
)
|
||||
|
||||
bucket.register_liquid(
|
||||
Liquid_name.lava.source,
|
||||
Liquid_name.lava.flowing,
|
||||
bucket.lava,
|
||||
{empty = "bucket_uni.png", materials = craft_ingreds, fill = "bucket_uni_lava.png"},
|
||||
"Lava Bucket",
|
||||
{tool = 1},
|
||||
false
|
||||
)
|
||||
|
||||
-- Unified bucket
|
||||
-- every bucket will be change to this
|
||||
|
||||
bucket.register_liquid(
|
||||
Liquid_name.water.bucket_source,
|
||||
Liquid_name.water.bucket_flowing,
|
||||
bucket.water,
|
||||
{empty = "bucket_uni.png", materials = craft_ingreds, fill = "bucket_uni_water.png"},
|
||||
"Water Bucket",
|
||||
{tool = 1, water_bucket = 1},
|
||||
false
|
||||
)
|
||||
|
||||
bucket.register_liquid(
|
||||
Liquid_name.lava.bucket_source,
|
||||
Liquid_name.lava.bucket_flowing,
|
||||
bucket.lava,
|
||||
{empty = "bucket_uni.png", materials = craft_ingreds, fill = "bucket_uni_lava.png"},
|
||||
"Lava Bucket",
|
||||
{tool = 1},
|
||||
false
|
||||
)
|
||||
|
||||
----
|
||||
|
||||
-- Add lava as fuel
|
||||
for mat_name, mat in pairs(craft_ingreds) do
|
||||
local bucket_empty = bucket.empty.."_"..mat_name
|
||||
local bucket_lava = bucket.lava.."_"..mat_name
|
||||
|
||||
if mat["enabled"] and mat["groups"].get_lava==1 then
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = bucket_lava,
|
||||
burntime = 60,
|
||||
replacements = {{bucket_lava, bucket_empty}},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-- Register buckets as dungeon loot
|
||||
if minetest.global_exists("dungeon_loot") then
|
||||
for mat_name, mat in pairs(craft_ingreds) do
|
||||
local bucket_empty = bucket.empty.."_"..mat_name
|
||||
local bucket_lava = bucket.lava.."_"..mat_name
|
||||
local bucket_water = bucket.water.."_"..mat_name
|
||||
|
||||
if mat["enabled"] then
|
||||
-- water in deserts/ice or above ground, lava otherwise if enabled
|
||||
dungeon_loot.register({
|
||||
{name = bucket_empty, chance = 0.55},
|
||||
{name = bucket_water, chance = 0.45,
|
||||
types = {"sandstone", "desert", "ice"}},
|
||||
{name = bucket_water, chance = 0.45, y = {0, 32768},
|
||||
types = {"normal"}},
|
||||
})
|
||||
|
||||
if mat["groups"].get_lava==1 then
|
||||
dungeon_loot.register({
|
||||
{name = bucket_lava, chance = 0.45, y = {-32768, -1},
|
||||
types = {"normal"}},
|
||||
})
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,51 @@
|
|||
License of source code
|
||||
----------------------
|
||||
|
||||
GNU Lesser General Public License, version 2.1
|
||||
Copyright (C) 2011-2016 Kahrl <kahrl@gmx.net>
|
||||
Copyright (C) 2011-2016 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Copyright (C) 2011-2016 Various Minetest developers and contributors
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms
|
||||
of the GNU Lesser General Public License as published by the Free Software Foundation;
|
||||
either version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details:
|
||||
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
|
||||
|
||||
|
||||
Licenses of media (textures)
|
||||
----------------------------
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
Copyright (C) 2015-2016 ElementW
|
||||
|
||||
You are free to:
|
||||
Share — copy and redistribute the material in any medium or format.
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||
indicate if changes were made. You may do so in any reasonable manner, but not in any way
|
||||
that suggests the licensor endorses you or your use.
|
||||
|
||||
ShareAlike — If you remix, transform, or build upon the material, you must distribute
|
||||
your contributions under the same license as the original.
|
||||
|
||||
No additional restrictions — You may not apply legal terms or technological measures that
|
||||
legally restrict others from doing anything the license permits.
|
||||
|
||||
Notices:
|
||||
|
||||
You do not have to comply with the license for elements of the material in the public
|
||||
domain or where your use is permitted by an applicable exception or limitation.
|
||||
No warranties are given. The license may not give you all of the permissions necessary
|
||||
for your intended use. For example, other rights such as publicity, privacy, or moral
|
||||
rights may limit how you use the material.
|
||||
|
||||
For more details:
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
|
@ -0,0 +1,9 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=Leerer Eimer
|
||||
Water Bucket=Wassereimer
|
||||
River Water Bucket=Flusswassereimer
|
||||
Lava Bucket=Lavaeimer
|
||||
Bucket Water Source=Eimerwasserquelle
|
||||
Flowing Bucket Water=Fliesende Eimerwasser
|
||||
Bucket Lava Source=Eimerlavaquelle
|
||||
Flowing Bucket Lava=Fliesende Eimerlava
|
|
@ -0,0 +1,5 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=Cubo vacío
|
||||
Water Bucket=Cubo con agua
|
||||
River Water Bucket=Cubo con agua de río
|
||||
Lava Bucket=Cubo con lava
|
|
@ -0,0 +1,5 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=Seau vide
|
||||
Water Bucket=Seau d'eau
|
||||
River Water Bucket=Seau d'eau de rivière
|
||||
Lava Bucket=Seau de lave
|
|
@ -0,0 +1,5 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=Ember Kosong
|
||||
Water Bucket=Ember Air
|
||||
River Water Bucket=Ember Air Sungai
|
||||
Lava Bucket=Ember Lava
|
|
@ -0,0 +1,5 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=Secchio vuoto
|
||||
Water Bucket=Secchio d'acqua
|
||||
River Water Bucket=Secchio d'acqua di fiume
|
||||
Lava Bucket=Secchio di lava
|
|
@ -0,0 +1,5 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=Baldi Kosong
|
||||
Water Bucket=Baldi Air
|
||||
River Water Bucket=Baldi Air Sungai
|
||||
Lava Bucket=Baldi Lava
|
|
@ -0,0 +1,5 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=Пустое Ведро
|
||||
Water Bucket=Ведро с Водой
|
||||
River Water Bucket=Ведро с Речной Водой
|
||||
Lava Bucket=Ведро с Лавой
|
|
@ -0,0 +1,5 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=Tom hink
|
||||
Water Bucket=Vatten hink
|
||||
River Water Bucket=Flodvatten hink
|
||||
Lava Bucket=Lava hink
|
|
@ -0,0 +1,31 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=Prázdne vedro
|
||||
Water Bucket=Vedro s vodou
|
||||
River Water Bucket=Vedro s vodou z rieky
|
||||
Lava Bucket=Vedro s lávou
|
||||
Bucket Water Source= Zdroj vody z vedra
|
||||
Flowing Bucket Water=Tečúca voda z vedra
|
||||
Bucket Lava Source=Zdroj lávy z vedra
|
||||
Flowing Bucket Lava=Tečúca láva z vedra
|
||||
Wood Empty Bucket=Drevené prázdne vedro
|
||||
Wood Water Bucket=Drevené vedro s vodou
|
||||
Wood Lava Bucket=Drevené vedro s lávou
|
||||
Stone Empty Bucket=Kamenné prázdne vedro
|
||||
Stone Water Bucket=Kamenné vedro s vodou
|
||||
Stone Lava Bucket=Kamenné vedro s lávou
|
||||
Steel Empty Bucket=Oceľové prázdne vedro
|
||||
Steel Water Bucket=Oceľové vedro s vodou
|
||||
Steel Lava Bucket=Oceľové vedro s lávou
|
||||
Bronze Empty Bucket=Bronzové prázdne vedro
|
||||
Bronze Water Bucket=Bronzové vedro s vodou
|
||||
Bronze Lava Bucket=Bronzové vedro s lávou
|
||||
Mese Empty Bucket=Mese prázdne vedro
|
||||
Mese Water Bucket=Mese vedro s vodou
|
||||
Mese Lava Bucket=Mese vedro s lávou
|
||||
Diamond Empty Bucket=Diamantové prázdne vedro
|
||||
Diamond Water Bucket=Diamantové vedro s vodou
|
||||
Diamond Lava Bucket=Diamantové vedro s lávou
|
||||
Gold Empty Bucket=Zlaté prázdne vedro
|
||||
Gold Water Bucket=Zlaté vedro s vodou
|
||||
Gold Lava Bucket=Zlaté vedro s lávou
|
||||
Mod: dynamic_liquid is not changed. add_to_water_nodes function is missing! Lava colling will not work the same ways, as the default water-lava interaction works.=Rozšírenie dynamic_liquid nie je zmenené. Chýba funkcia add_to_water_nodes! Ochladzovanie lávy nebude fungovať rovnako, ako funguje štandardná interakcia voda-láva.
|
|
@ -0,0 +1,5 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=空桶
|
||||
Water Bucket=水桶
|
||||
River Water Bucket=河水桶
|
||||
Lava Bucket=岩浆桶
|
|
@ -0,0 +1,5 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=空桶
|
||||
Water Bucket=水桶
|
||||
River Water Bucket=河水桶
|
||||
Lava Bucket=岩漿桶
|
|
@ -0,0 +1,31 @@
|
|||
# textdomain: bucket
|
||||
Empty Bucket=
|
||||
Water Bucket=
|
||||
River Water Bucket=
|
||||
Lava Bucket=
|
||||
Bucket Water Source=
|
||||
Flowing Bucket Water=
|
||||
Bucket Lava Source=
|
||||
Flowing Bucket Lava=
|
||||
Wood Empty Bucket=
|
||||
Wood Water Bucket=
|
||||
Wood Lava Bucket=
|
||||
Stone Empty Bucket=
|
||||
Stone Water Bucket=
|
||||
Stone Lava Bucket=
|
||||
Steel Empty Bucket=
|
||||
Steel Water Bucket=
|
||||
Steel Lava Bucket=
|
||||
Bronze Empty Bucket=
|
||||
Bronze Water Bucket=
|
||||
Bronze Lava Bucket=
|
||||
Mese Empty Bucket=
|
||||
Mese Water Bucket=
|
||||
Mese Lava Bucket=
|
||||
Diamond Empty Bucket=
|
||||
Diamond Water Bucket=
|
||||
Diamond Lava Bucket=
|
||||
Gold Empty Bucket=
|
||||
Gold Water Bucket=
|
||||
Gold Lava Bucket=
|
||||
Mod: dynamic_liquid is not changed. add_to_water_nodes function is missing! Lava colling will not work the same ways, as the default water-lava interaction works.=
|
|
@ -0,0 +1,4 @@
|
|||
name = bucket
|
||||
description = Bucket - fork of Minetest Game mod with reduced "bucket" liquid flowing
|
||||
depends = default
|
||||
optional_depends = dungeon_loot, dynamic_liquid
|
After Width: | Height: | Size: 464 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 581 KiB |
After Width: | Height: | Size: 682 KiB |
After Width: | Height: | Size: 652 KiB |
After Width: | Height: | Size: 591 KiB |
|
@ -0,0 +1,61 @@
|
|||
# How far will water from bucket flow
|
||||
bucket_water_flowing_range (Bucket water flowing range) int 1
|
||||
|
||||
# How far will lava from bucket flow
|
||||
bucket_lava_flowing_range (Bucket lava flowing range) int 1
|
||||
|
||||
# If true, then liquid can be taken even from flowing one
|
||||
# (not only from source)
|
||||
bucket_get_flowing (Flowing liwuid can be taken) bool true
|
||||
|
||||
# Use "clasic" bucket recipe
|
||||
# - This can interfere with farming mod Wood Empty Bucket = Wooden Bowl
|
||||
# + X + - + X +
|
||||
# + - + X + - +
|
||||
#
|
||||
# NEW Recipe
|
||||
# + X + - + X +
|
||||
# + X + - + X +
|
||||
# + X + X + X +
|
||||
bucket_use_clasic_recipe (Use clasic recipe for bucket) bool true
|
||||
|
||||
# Enabled buckettypes
|
||||
[Bucket types]
|
||||
|
||||
# Default bucket type
|
||||
# - do not disable defined type, or you get nothing with /giveme bucket
|
||||
bucket_default_type (Bucket default type) enum steel steel,wood,stone,bronze,mese,diamond,gold
|
||||
|
||||
# Enable steel bucket
|
||||
bucket_material_steel (Enable steel bucket) bool true
|
||||
# Enable wood bucket
|
||||
bucket_material_wood (Enable wood bucket) bool true
|
||||
# Enable stone bucket
|
||||
bucket_material_stone (Enable stone bucket) bool true
|
||||
# Enable bronze bucket
|
||||
bucket_material_bronze (Enable bronze bucket) bool true
|
||||
# Enable mese bucket
|
||||
bucket_material_mese (Enable mese bucket) bool true
|
||||
# Enable diamond bucket
|
||||
bucket_material_diamond (Enable diamond bucket) bool true
|
||||
# Enable gold bucket
|
||||
bucket_material_gold (Enable gold bucket) bool true
|
||||
|
||||
# Enable getting lava with buckettypes
|
||||
[Get lava types]
|
||||
|
||||
# Get lava with steel bucket
|
||||
bucket_getlava_steel (Enable steel bucket) bool true
|
||||
# Get lava with wood bucket
|
||||
bucket_getlava_wood (Enable wood bucket) bool false
|
||||
# Get lava with stone bucket
|
||||
bucket_getlava_stone (Enable stone bucket) bool true
|
||||
# Get lava with bronze bucket
|
||||
bucket_getlava_bronze (Enable bronze bucket) bool false
|
||||
# Get lava with mese bucket
|
||||
bucket_getlava_mese (Enable mese bucket) bool true
|
||||
# Get lava with diamond bucket
|
||||
bucket_getlava_diamond (Enable diamond bucket) bool true
|
||||
# Get lava with gold bucket
|
||||
bucket_getlava_gold (Enable gold bucket) bool false
|
||||
|
After Width: | Height: | Size: 205 B |
After Width: | Height: | Size: 221 B |
After Width: | Height: | Size: 221 B |
After Width: | Height: | Size: 230 B |
After Width: | Height: | Size: 124 B |
After Width: | Height: | Size: 187 B |
After Width: | Height: | Size: 187 B |
After Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 846 B After Width: | Height: | Size: 846 B |
Before Width: | Height: | Size: 668 B After Width: | Height: | Size: 668 B |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
@ -2,4 +2,5 @@ description = """
|
|||
Mods with extra tools
|
||||
|
||||
bucket-lite - better bucket
|
||||
farbows - adds bows
|
||||
"""
|
||||
|
|