write something there
This commit is contained in:
commit
b4b6c08f4f
8546 changed files with 309825 additions and 0 deletions
1
mods/bottles/.gitattributes
vendored
Normal file
1
mods/bottles/.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
screenshot.png export-ignore
|
4
mods/bottles/CREDITS.md
Normal file
4
mods/bottles/CREDITS.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
Bottle mask texture derived from `vessels_glass_bottle.png` supplied in the
|
||||
vessels mod of Minetest Game. Original texture © Vanessa Ezekowitz and Thomas-S
|
||||
and reused under the
|
||||
[Creative Commons Attribution-ShareAlike 3.0 Unported license](https://creativecommons.org/licenses/by/3.0/).
|
31
mods/bottles/LICENSE
Normal file
31
mods/bottles/LICENSE
Normal file
|
@ -0,0 +1,31 @@
|
|||
Code is released under MIT License
|
||||
|
||||
Copyright © 2022 EmptyStar <https://github.com/EmptyStar>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
File `textures/vessels_glass_bottle_mask.png` is released under the [CC-BY-SA 3.0 Unported License](https://creativecommons.org/licenses/by-sa/3.0/) in accordance with its original license as noted in CREDITS.md.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
This license is acceptable for Free Cultural Works.
|
||||
|
||||
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
76
mods/bottles/README.md
Normal file
76
mods/bottles/README.md
Normal file
|
@ -0,0 +1,76 @@
|
|||
Filled Bottles
|
||||
==============
|
||||
|
||||
Fill empty glass bottles with a variety of earthly materials including water, dirt, sand, and more! With an empty glass bottle in hand, simply point at the node that you wish to capture then click to fill the bottle. Conversely, using a filled bottle will empty it, thus allowing you to reuse the empty glass bottle.
|
||||
|
||||
On their own, filled bottles are only good for collecting and decoration. However, other mods may wish to make use of filled bottles for other purposes, such as for ingredients in cooking or chemistry. It's also possible to define your own filled bottles; see the API section below for details.
|
||||
|
||||
Bottles function in a very similar fashion to buckets with two key differences. First, many bottles may be filled from one single node before the node is exhausted (10 bottles by default), and an exhausted node may be fully consumed (e.g., sand or water) or replaced with a "stripped" version of itself (e.g., dirt with grass becomes only dirt). Secondly, emptying a filled bottle does not dispense its contents, it simply becomes an empty glass bottle when emptied. In this way, bottles are effectively "transformed" into other types of bottles but they do not actually carry their contents the way buckets do.
|
||||
|
||||
Also note that partially bottled nodes have a chance to yield no drops when dug. This chance scales with how many times the node is bottled such that bottling a node more times increases the chance that it will not yield drops when dug. This is a balance measure to prevent infinite bottling of a single node.
|
||||
|
||||
The chance to yield no drops does not apply to liquids by default as liquids can easily be exploited to bypass this restriction, but this can be changed via settings if needed for a special case.
|
||||
|
||||
Supported games/mods
|
||||
--------------------
|
||||
|
||||
- Minetest Game and its derivatives such as MeseCraft, Asuna, etc.
|
||||
- Ethereal
|
||||
- Everness
|
||||
- Wilhelmines Living Jungle
|
||||
- Wilhelmines Natural Biomes
|
||||
- Caverealms
|
||||
- Many biomes from the Biomes modpack by Atlante
|
||||
|
||||
API
|
||||
---
|
||||
|
||||
Want to create your own filled bottles? Use the `bottles.register_filled_bottle` function to register a filled bottle for any node you like. The function takes in a single table argument that conforms to the following:
|
||||
|
||||
```lua
|
||||
{
|
||||
target = <string or array>, -- the node to target for a bottle to be filled
|
||||
-- from; either a string for a single node name
|
||||
-- or an array that is a list of node names
|
||||
|
||||
replacement = <string>, -- the node to replace the target node(s) with when
|
||||
-- a target node is fully drained; default is "air"
|
||||
|
||||
name = <string>, -- a name for the filled bottle item; will be prefixed with
|
||||
-- `bottles:`, so don't include any such namespace; default
|
||||
-- value is "bottle_of_" + the name of the target node
|
||||
|
||||
description = <string>, -- the display name of the filled bottle; default
|
||||
-- value is "Bottle of " + the description of the
|
||||
-- target node
|
||||
|
||||
contents = <string>, -- the node that represents the contents of this bottle;
|
||||
-- default value is the target node, or the first node in
|
||||
-- the list of target nodes
|
||||
|
||||
image = <string>, -- the image to use for the contents of the filled bottle;
|
||||
-- the first 16x16 pixels of this image will be rendered
|
||||
-- 'inside' of the bottle; default value is the tile image
|
||||
-- of the target node, or the first of such tiles of the
|
||||
-- target node
|
||||
|
||||
sound = <string>, -- the name of a sound that conforms to the Minetest sound
|
||||
-- spec; played at a high pitch when a bottle is filled or
|
||||
-- spilled; default value is `nil`
|
||||
}
|
||||
```
|
||||
|
||||
For example, this is the registration for a bottle of water:
|
||||
|
||||
```lua
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:water_source",
|
||||
sound = "default_water_footstep",
|
||||
name = "bottle_of_water",
|
||||
description = "Bottle of Water",
|
||||
})
|
||||
```
|
||||
|
||||
Note that this mod expects the target node(s) to be registered with Minetest prior to registering a filled bottle of its type, so if you wish to define new filled bottles with your own node targets, make sure to call `minetest.register_node` before calling `bottles.register_filled_bottle`. Also remember to add `bottles` to your dependency list in your mod's `mod.conf` file.
|
||||
|
||||
If you wish to further extend the uses and capabilities of empty glass bottles or filled bottles, the functions assigned to the `on_use` field of the bottles are defined as `bottles.fill` (assigned to empty glass bottles to fill them with a targeted material) and `bottles.spill` (to empty the contents of a filled bottle). These functions are provided so that you can override them or wrap them in programming logic -- a task that is beyond the scope of this documentation.
|
262
mods/bottles/bottles/init.lua
Normal file
262
mods/bottles/bottles/init.lua
Normal file
|
@ -0,0 +1,262 @@
|
|||
-- Local wrapping functions for on_use reuse
|
||||
local function do_fill(...)
|
||||
return bottles.fill(...)
|
||||
end
|
||||
|
||||
local function do_spill(...)
|
||||
return bottles.spill(...)
|
||||
end
|
||||
|
||||
-- Local map for liquid category to int for simple comparison
|
||||
local liquid_map = {
|
||||
none = 0,
|
||||
source = 1,
|
||||
flowing = 2,
|
||||
}
|
||||
|
||||
-- Globals
|
||||
bottles = {
|
||||
-- Settings
|
||||
settings = {
|
||||
node_fill_limit = tonumber(core.settings:get("bottles.node_fill_limit",10) or 10),
|
||||
liquid_fill_unlimited = (function(value)
|
||||
if value == "all" then
|
||||
return 1
|
||||
elseif value == "flowing" then
|
||||
return 2
|
||||
else
|
||||
return 3
|
||||
end
|
||||
end)(core.settings:get("bottles.liquid_fill_unlimited","all") or "all"),
|
||||
},
|
||||
|
||||
-- Registry of filled bottles
|
||||
registered_filled_bottles = {},
|
||||
|
||||
-- Index target nodes to their filled bottle types
|
||||
target_node_map = {},
|
||||
|
||||
-- Cache node liquid statuses for special liquid handling
|
||||
target_liquid_map = {},
|
||||
|
||||
-- Play a sound whenever a bottle is filled or spilled
|
||||
play_bottle_sound = function(pos,sound)
|
||||
if sound then
|
||||
minetest.sound_play(sound,{
|
||||
pos,
|
||||
gain = 0.25,
|
||||
pitch = 5.0,
|
||||
max_hear_distance = 12,
|
||||
},true)
|
||||
end
|
||||
end,
|
||||
|
||||
-- Fill an empty glass bottle
|
||||
fill = function(itemstack,placer,target)
|
||||
if target.type == "node" and placer:is_player() then
|
||||
-- Get targeted node
|
||||
local pos = target.under
|
||||
local node = minetest.get_node(pos)
|
||||
local filled_bottle = bottles.target_node_map[node.name]
|
||||
if filled_bottle then
|
||||
-- Play contents sound
|
||||
bottles.play_bottle_sound(placer:get_pos(),filled_bottle.sound)
|
||||
|
||||
-- Subtract from stack of empty bottles
|
||||
local count = itemstack:get_count()
|
||||
local retval = nil
|
||||
if count == 1 then
|
||||
itemstack:clear()
|
||||
retval = ItemStack(filled_bottle.name)
|
||||
else
|
||||
itemstack:set_count(count - 1)
|
||||
retval = itemstack
|
||||
local leftover = placer:get_inventory():add_item("main", ItemStack(filled_bottle.name))
|
||||
if not leftover:is_empty() then
|
||||
minetest.add_item(placer:get_pos(),leftover)
|
||||
end
|
||||
end
|
||||
|
||||
-- Set filled node metadata if enabled; special handling for liquids
|
||||
local liquid = bottles.target_liquid_map[node.name]
|
||||
if bottles.settings.node_fill_limit > 0 and liquid < bottles.settings.liquid_fill_unlimited then
|
||||
local meta = core.get_meta(pos)
|
||||
local limit = meta:get_int("bottles.node_fill_limit")
|
||||
limit = limit + 1
|
||||
if limit >= bottles.settings.node_fill_limit then
|
||||
core.set_node(pos,{ name = filled_bottle.replacement })
|
||||
else
|
||||
meta:set_int("bottles.node_fill_limit",limit)
|
||||
end
|
||||
end
|
||||
|
||||
-- Return value
|
||||
return retval, filled_bottle.name
|
||||
end
|
||||
end
|
||||
return itemstack, nil
|
||||
end,
|
||||
|
||||
-- Spill the contents out of a filled bottle
|
||||
spill = function(itemstack,placer)
|
||||
if placer:is_player() then
|
||||
-- Play contents sound
|
||||
bottles.play_bottle_sound(placer:get_pos(),bottles.registered_filled_bottles[itemstack:get_name()].sound)
|
||||
|
||||
-- Subtract from stack of filled bottles and set return value
|
||||
local count = itemstack:get_count()
|
||||
local retval = nil
|
||||
if count == 1 then
|
||||
itemstack:clear()
|
||||
retval = ItemStack("vessels:glass_bottle")
|
||||
else
|
||||
itemstack:set_count(count - 1)
|
||||
retval = itemstack
|
||||
local leftover = placer:get_inventory():add_item("main", ItemStack("vessels:glass_bottle"))
|
||||
if not leftover:is_empty() then
|
||||
minetest.add_item(placer:get_pos(),leftover)
|
||||
end
|
||||
end
|
||||
|
||||
-- Return value
|
||||
return retval
|
||||
else
|
||||
return itemstack
|
||||
end
|
||||
end,
|
||||
|
||||
-- Register a filled bottle
|
||||
register_filled_bottle = function(spec)
|
||||
-- Validate spec, and set defaults
|
||||
if not spec.target then
|
||||
return false
|
||||
end
|
||||
|
||||
local target_type = type(spec.target)
|
||||
|
||||
if not spec.contents then
|
||||
if target_type == "string" then
|
||||
spec.contents = spec.target
|
||||
elseif target_type == "table" then
|
||||
spec.contents = spec.target[1]
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
local contents_node = minetest.registered_nodes[spec.contents]
|
||||
if not contents_node then
|
||||
return false
|
||||
end
|
||||
|
||||
spec.description = spec.description or ("Bottle of " .. contents_node.description:split("\n")[1])
|
||||
|
||||
spec.replacement = spec.replacement or "air"
|
||||
|
||||
if spec.image then
|
||||
-- do nothing
|
||||
elseif type(contents_node.tiles[1]) == "string" then
|
||||
spec.image = contents_node.tiles[1]
|
||||
elseif type(contents_node.tiles[1]) == "table" then
|
||||
spec.image = contents_node.tiles[1].name
|
||||
else
|
||||
return false
|
||||
end
|
||||
spec.image = "[combine:16x16:0,0=" .. spec.image .. "^vessels_glass_bottle_mask.png^[makealpha:0,254,0"
|
||||
spec.name = "bottles:" .. (spec.name or "bottle_of_" .. contents_node.name:split(":")[2])
|
||||
|
||||
-- Ensure that name is not already in use, fail registration if so
|
||||
if bottles.registered_filled_bottles[spec.name] then
|
||||
return false
|
||||
end
|
||||
|
||||
-- Normalize target type
|
||||
if target_type == "string" then
|
||||
spec.target = {spec.target}
|
||||
end
|
||||
|
||||
-- Ensure that target nodes exist and are not already in use, fail registration if so
|
||||
for _,target in ipairs(spec.target) do
|
||||
if bottles.target_node_map[target] or not core.registered_nodes[target] then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- Extract node footstep sounds if possible and if no other sounds are provided
|
||||
if not spec.sound and contents_node.sounds and contents_node.sounds.footstep then
|
||||
spec.sound = contents_node.sounds.footstep.name
|
||||
end
|
||||
|
||||
-- Map target nodes and liquid status to spec
|
||||
for _,target in ipairs(spec.target) do
|
||||
bottles.target_node_map[target] = spec
|
||||
bottles.target_liquid_map[target] = liquid_map[core.registered_nodes[target].liquidtype or "none"]
|
||||
end
|
||||
|
||||
-- Put bottle into map of registered filled bottles
|
||||
bottles.registered_filled_bottles[spec.name] = spec
|
||||
|
||||
-- Register new bottle node
|
||||
minetest.register_node(":" .. spec.name,{
|
||||
description = spec.description,
|
||||
drawtype = "plantlike",
|
||||
tiles = {spec.image},
|
||||
inventory_image = spec.image,
|
||||
wield_image = spec.image,
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
||||
},
|
||||
groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
on_use = do_spill
|
||||
})
|
||||
|
||||
-- Successful registration
|
||||
return true
|
||||
end,
|
||||
|
||||
-- Unregister a filled bottle
|
||||
unregister_filled_bottle = function(name)
|
||||
-- Only unregister if it's already registered
|
||||
local spec = bottles.registered_filled_bottles[name]
|
||||
if not spec then
|
||||
return false
|
||||
end
|
||||
|
||||
-- Remove from registered bottles list and target index
|
||||
bottles.registered_filled_bottles[name] = nil
|
||||
for _,target in ipairs(spec.target) do
|
||||
bottles.target_node_map[target] = nil
|
||||
end
|
||||
|
||||
-- Unregister node
|
||||
minetest.unregister_item(name)
|
||||
|
||||
-- Successfully unregistered filled bottle
|
||||
return true
|
||||
end,
|
||||
}
|
||||
|
||||
-- Make empty glass bottles able to 'point and fill'
|
||||
minetest.override_item("vessels:glass_bottle",{
|
||||
liquids_pointable = true,
|
||||
on_use = do_fill,
|
||||
})
|
||||
|
||||
-- Nodes that have been partially filled have a chance to drop nothing when dug
|
||||
if bottles.settings.node_fill_limit > 0 then
|
||||
local oghnd = core.handle_node_drops
|
||||
core.handle_node_drops = function(pos, drops, digger)
|
||||
local meta = core.get_meta(pos)
|
||||
local limit = meta:get_int("bottles.node_fill_limit")
|
||||
if limit > 0 and math.random(1,bottles.settings.node_fill_limit) <= limit then
|
||||
-- do nothing, node will drop nothing
|
||||
else
|
||||
return oghnd(pos, drops, digger)
|
||||
end
|
||||
end
|
||||
end
|
5
mods/bottles/bottles/mod.conf
Normal file
5
mods/bottles/bottles/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles
|
||||
title = Filled Bottles API
|
||||
description = Filled bottles API
|
||||
depends = vessels
|
||||
author = EmptyStar
|
BIN
mods/bottles/bottles/textures/vessels_glass_bottle_mask.png
Normal file
BIN
mods/bottles/bottles/textures/vessels_glass_bottle_mask.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 299 B |
4
mods/bottles/bottles_badland/init.lua
Normal file
4
mods/bottles/bottles_badland/init.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
bottles.register_filled_bottle({
|
||||
target = "badland:badland_grass",
|
||||
replacement = "default:dirt",
|
||||
})
|
5
mods/bottles/bottles_badland/mod.conf
Normal file
5
mods/bottles/bottles_badland/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_badland
|
||||
title = Badland Bottles
|
||||
description = Filled bottles for the badland mod
|
||||
author = EmptyStar
|
||||
depends = bottles, badland
|
17
mods/bottles/bottles_caverealms/init.lua
Normal file
17
mods/bottles/bottles_caverealms/init.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
bottles.register_filled_bottle({
|
||||
target = "caverealms:stone_with_moss",
|
||||
description = "Bottle of Cave Moss",
|
||||
replacement = "default:cobble",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "caverealms:stone_with_lichen",
|
||||
description = "Bottle of Lichen",
|
||||
replacement = "default:cobble",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "caverealms:stone_with_algae",
|
||||
description = "Bottle of Algae",
|
||||
replacement = "default:cobble",
|
||||
})
|
5
mods/bottles/bottles_caverealms/mod.conf
Normal file
5
mods/bottles/bottles_caverealms/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_caverealms
|
||||
title = Caverealms Bottles
|
||||
description = Filled bottles for the caverealms mod
|
||||
author = EmptyStar
|
||||
depends = bottles, caverealms
|
101
mods/bottles/bottles_default/init.lua
Normal file
101
mods/bottles/bottles_default/init.lua
Normal file
|
@ -0,0 +1,101 @@
|
|||
bottles.register_filled_bottle({
|
||||
target = {"default:water_source","default:water_flowing"},
|
||||
sound = "default_water_footstep",
|
||||
name = "bottle_of_water",
|
||||
description = "Bottle of Water",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = {"default:river_water_source","default:river_water_flowing"},
|
||||
sound = "default_water_footstep",
|
||||
name = "bottle_of_river_water",
|
||||
description = "Bottle of River Water",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = {"default:lava_source","default:lava_flowing"},
|
||||
sound = "default_water_footstep",
|
||||
name = "bottle_of_lava",
|
||||
description = "Bottle of Lava",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:sand",
|
||||
sound = "default_sand_footstep",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:desert_sand",
|
||||
sound = "default_sand_footstep",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:silver_sand",
|
||||
sound = "default_sand_footstep",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:dirt",
|
||||
sound = "default_dig_crumbly",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:dry_dirt",
|
||||
sound = "default_dig_crumbly",
|
||||
name = "bottle_of_dry_dirt",
|
||||
description = "Bottle of Dry Dirt",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:dirt_with_grass",
|
||||
sound = "default_grass_footstep",
|
||||
name = "bottle_of_grass",
|
||||
description = "Bottle of Grass",
|
||||
replacement = "default:dirt",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = {"default:dirt_with_dry_grass","default:dry_dirt_with_dry_grass"},
|
||||
sound = "default_grass_footstep",
|
||||
name = "bottle_of_dry_grass",
|
||||
description = "Bottle of Dry Grass",
|
||||
replacement = "default:dry_dirt",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:dirt_with_coniferous_litter",
|
||||
sound = "default_grass_footstep",
|
||||
name = "bottle_of_coniferous_litter",
|
||||
description = "Bottle of Coniferous Litter",
|
||||
replacement = "default:dirt",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:dirt_with_rainforest_litter",
|
||||
sound = "default_grass_footstep",
|
||||
name = "bottle_of_rainforest_litter",
|
||||
description = "Bottle of Rainforest Litter",
|
||||
replacement = "default:dirt",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:permafrost_with_moss",
|
||||
sound = "default_grass_footstep",
|
||||
name = "bottle_of_moss",
|
||||
description = "Bottle of Tundra Moss",
|
||||
replacement = "default:permafrost_with_stones",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = "default:gravel",
|
||||
sound = "default_gravel_footstep",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = {"default:snow","default:snowblock","default:dirt_with_snow"},
|
||||
sound = "default_sand_footstep",
|
||||
})
|
||||
|
||||
bottles.register_filled_bottle({
|
||||
target = {"default:clay"},
|
||||
})
|
5
mods/bottles/bottles_default/mod.conf
Normal file
5
mods/bottles/bottles_default/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_default
|
||||
title = Minetest Game Bottles
|
||||
description = Filled bottles for the default mod
|
||||
author = EmptyStar
|
||||
depends = bottles, default
|
4
mods/bottles/bottles_dorwinion/init.lua
Normal file
4
mods/bottles/bottles_dorwinion/init.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
bottles.register_filled_bottle({
|
||||
target = "dorwinion:dorwinion_grass",
|
||||
replacement = "dorwinion:dorwinion",
|
||||
})
|
5
mods/bottles/bottles_dorwinion/mod.conf
Normal file
5
mods/bottles/bottles_dorwinion/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_dorwinion
|
||||
title = Dorwinion Bottles
|
||||
description = Filled bottles for the dorwinion mod
|
||||
author = EmptyStar
|
||||
depends = bottles, dorwinion
|
17
mods/bottles/bottles_ethereal/init.lua
Normal file
17
mods/bottles/bottles_ethereal/init.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
for _,dirt in ipairs({
|
||||
"Bamboo",
|
||||
"Jungle",
|
||||
"Grove",
|
||||
"Prairie",
|
||||
"Cold",
|
||||
"Crystal",
|
||||
"Mushroom",
|
||||
"Fiery",
|
||||
"Gray",
|
||||
}) do
|
||||
bottles.register_filled_bottle({
|
||||
target = "ethereal:" .. dirt:lower() .. "_dirt",
|
||||
description = "Bottle of " .. dirt .. " Dirt",
|
||||
replacement = "default:dirt",
|
||||
})
|
||||
end
|
5
mods/bottles/bottles_ethereal/mod.conf
Normal file
5
mods/bottles/bottles_ethereal/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_ethereal
|
||||
title = Ethereal Bottles
|
||||
description = Filled bottles for the ethereal mod
|
||||
author = EmptyStar
|
||||
depends = bottles, ethereal
|
46
mods/bottles/bottles_everness/init.lua
Normal file
46
mods/bottles/bottles_everness/init.lua
Normal file
|
@ -0,0 +1,46 @@
|
|||
for node,data in pairs({
|
||||
["everness:coral_desert_stone_with_moss"] = { "Coral Cave Moss", "everness:coral_desert_stone" },
|
||||
["everness:mold_stone_with_moss"] = { "Moldy Moss" },
|
||||
["everness:coral_dirt"] = {},
|
||||
["everness:cursed_dirt"] = {},
|
||||
["everness:crystal_dirt"] = { "Crystal Dirt", "air", "everness_crystal_dirt" },
|
||||
["everness:forsaken_tundra_dirt"] = {},
|
||||
["everness:forsaken_tundra_dirt_with_grass"] = { "Forsaken Tundra Grass", "everness:forsaken_tundra_dirt" },
|
||||
["everness:dirt_with_coral_grass"] = { "Coral Grass", "everness:coral_dirt" },
|
||||
["everness:dirt_with_cursed_grass"] = { "Cursed Grass", "everness:cursed_dirt" },
|
||||
["everness:dirt_with_crystal_grass"] = { "Crystal Grass", "everness:crystal_dirt" },
|
||||
["everness:dry_ocean_dirt"] = {},
|
||||
["everness:crystal_cave_dirt"] = {},
|
||||
["everness:crystal_cave_dirt_with_moss"] = { "Crystal Cave Moss" },
|
||||
["everness:moss_block"] = { "Moss" },
|
||||
["everness:crystal_moss_block"] = { "Crystal Moss" },
|
||||
["everness:coral_sand"] = {},
|
||||
["everness:coral_white_sand"] = {},
|
||||
["everness:cursed_sand"] = {},
|
||||
["everness:crystal_sand"] = {},
|
||||
["everness:forsaken_tundra_beach_sand"] = {},
|
||||
["everness:forsaken_desert_sand"] = {},
|
||||
["everness:coral_forest_deep_ocean_sand"] = {},
|
||||
["everness:cursed_lands_deep_ocean_sand"] = {},
|
||||
["everness:crystal_forest_deep_ocean_sand"] = {},
|
||||
["everness:mineral_sand"] = {},
|
||||
["everness:frosted_snowblock"] = { "Frosted Snow" },
|
||||
["everness:cursed_mud"] = {},
|
||||
["everness:mineral_lava_stone_with_moss"] = { "Mineral Cave Moss", "everness:mineral_cave_stone" }
|
||||
}) do
|
||||
bottles.register_filled_bottle({
|
||||
name = data[3],
|
||||
target = node,
|
||||
description = data[1] and ("Bottle of " .. data[1]) or nil,
|
||||
replacement = data[2]
|
||||
})
|
||||
end
|
||||
|
||||
-- Mineral water has an extra target
|
||||
bottles.register_filled_bottle({
|
||||
target = {
|
||||
"everness:mineral_water_source",
|
||||
"everness:mineral_water_flowing",
|
||||
},
|
||||
description = "Bottle of Mineral Water",
|
||||
})
|
5
mods/bottles/bottles_everness/mod.conf
Normal file
5
mods/bottles/bottles_everness/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_everness
|
||||
title = Everness Bottles
|
||||
description = Filled bottles for the everness mod
|
||||
author = EmptyStar
|
||||
depends = bottles, everness
|
4
mods/bottles/bottles_frost_land/init.lua
Normal file
4
mods/bottles/bottles_frost_land/init.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
bottles.register_filled_bottle({
|
||||
target = "frost_land:frost_land_grass",
|
||||
replacement = "default:dirt",
|
||||
})
|
5
mods/bottles/bottles_frost_land/mod.conf
Normal file
5
mods/bottles/bottles_frost_land/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_frost_land
|
||||
title = Frost Land Bottles
|
||||
description = Filled bottles for the frost_land mod
|
||||
author = EmptyStar
|
||||
depends = bottles, frost_land
|
5
mods/bottles/bottles_japaneseforest/init.lua
Normal file
5
mods/bottles/bottles_japaneseforest/init.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
bottles.register_filled_bottle({
|
||||
target = "japaneseforest:japanese_dirt_with_grass",
|
||||
description = "Bottle of Japanese Grass",
|
||||
replacement = "default:dirt",
|
||||
})
|
5
mods/bottles/bottles_japaneseforest/mod.conf
Normal file
5
mods/bottles/bottles_japaneseforest/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_japaneseforest
|
||||
title = Japanese Forest Bottles
|
||||
description = Filled bottles for the japaneseforest mod
|
||||
author = EmptyStar
|
||||
depends = bottles, japaneseforest
|
9
mods/bottles/bottles_livingjungle/init.lua
Normal file
9
mods/bottles/bottles_livingjungle/init.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
for _,node in ipairs({
|
||||
"livingjungle:jungleground",
|
||||
"livingjungle:leafyjungleground",
|
||||
}) do
|
||||
bottles.register_filled_bottle({
|
||||
target = node,
|
||||
replacement = "default:dirt",
|
||||
})
|
||||
end
|
5
mods/bottles/bottles_livingjungle/mod.conf
Normal file
5
mods/bottles/bottles_livingjungle/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_livingjungle
|
||||
title = Living Jungle Bottles
|
||||
description = Filled bottles for the livingjungle mod
|
||||
author = EmptyStar
|
||||
depends = bottles, livingjungle
|
22
mods/bottles/bottles_naturalbiomes/init.lua
Normal file
22
mods/bottles/bottles_naturalbiomes/init.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
for node,data in pairs({
|
||||
["naturalbiomes:alderswamp_litter"] = { "Alder Swamp Grass", "naturalbiomes:alderswamp_dirt" },
|
||||
["naturalbiomes:alderswamp_dirt"] = {},
|
||||
["naturalbiomes:alpine_litter"] = { "Alpine Grass", "default:dirt" },
|
||||
["naturalbiomes:bambooforest_litter"] = { "Bamboo Litter" },
|
||||
["naturalbiomes:bushland_bushlandlitter"] = { false, "default:dirt" },
|
||||
["naturalbiomes:bushland_bushlandlitter2"] = {},
|
||||
["naturalbiomes:bushland_bushlandlitter3"] = {},
|
||||
["naturalbiomes:heath_litter"] = { "Heath Litter", "default:sand" },
|
||||
["naturalbiomes:heath_litter2"] = { "Heath Litter", "default:sand" },
|
||||
["naturalbiomes:heath_litter3"] = { "Heath Litter", "default:sand" },
|
||||
["naturalbiomes:mediterran_litter"] = { "Mediterranean Grass", "default:dirt" },
|
||||
["naturalbiomes:outback_litter"] = { "Outback Grass", "naturalbiomes:outback_ground" },
|
||||
["naturalbiomes:palmbeach_sand"] = { "Beach Sand" },
|
||||
["naturalbiomes:savannalitter"] = { "Savanna Litter", "default:dirt" },
|
||||
}) do
|
||||
bottles.register_filled_bottle({
|
||||
target = node,
|
||||
description = data[1] and ("Bottle of " .. data[1]) or nil,
|
||||
replacement = data[2],
|
||||
})
|
||||
end
|
5
mods/bottles/bottles_naturalbiomes/mod.conf
Normal file
5
mods/bottles/bottles_naturalbiomes/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_naturalbiomes
|
||||
title = Natural Biomes Bottles
|
||||
description = Filled bottles for the naturalbiomes mod
|
||||
author = EmptyStar
|
||||
depends = bottles, naturalbiomes
|
5
mods/bottles/bottles_nightshade/init.lua
Normal file
5
mods/bottles/bottles_nightshade/init.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
bottles.register_filled_bottle({
|
||||
target = "nightshade:nightshade_dirt_with_grass",
|
||||
description = "Bottle of Nightshade Grass",
|
||||
replacement = "default:dirt",
|
||||
})
|
5
mods/bottles/bottles_nightshade/mod.conf
Normal file
5
mods/bottles/bottles_nightshade/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_nightshade
|
||||
title = Nightshade Bottles
|
||||
description = Filled bottles for the nightshade mod
|
||||
author = EmptyStar
|
||||
depends = bottles, nightshade
|
5
mods/bottles/bottles_prairie/init.lua
Normal file
5
mods/bottles/bottles_prairie/init.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
bottles.register_filled_bottle({
|
||||
target = "prairie:prairie_dirt_with_grass",
|
||||
description = "Bottle of Prairie Grass",
|
||||
replacement = "default:dirt",
|
||||
})
|
5
mods/bottles/bottles_prairie/mod.conf
Normal file
5
mods/bottles/bottles_prairie/mod.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
name = bottles_prairie
|
||||
title = Prairie Bottles
|
||||
description = Filled bottles for the prairie mod
|
||||
author = EmptyStar
|
||||
depends = bottles, prairie
|
4
mods/bottles/modpack.conf
Normal file
4
mods/bottles/modpack.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
name = bottles
|
||||
title = Filled Bottles Modpack
|
||||
description = Filled bottles for Minetest Game and its supported mods
|
||||
author = EmptyStar
|
0
mods/bottles/modpack.txt
Normal file
0
mods/bottles/modpack.txt
Normal file
9
mods/bottles/settingtypes.txt
Normal file
9
mods/bottles/settingtypes.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
# How many times a node can be collected via bottle before the target node is used up. Used up nodes will be replaced with a registered replacement node and have a chance to drop nothing when mined. Set to 0 for infinite bottle fills per node.
|
||||
bottles.node_fill_limit (Node fill limit) int 10 0 99
|
||||
|
||||
# Allow infinite bottling for liquids:
|
||||
# "all" = all liquids allow infinite bottling
|
||||
# "flowing" = only flowing liquids allow infinite bottling
|
||||
# "none" = no liquids allow infinite bottling
|
||||
# NOTE: This setting can easily be circumvented for most typical liquids
|
||||
bottles.liquid_fill_unlimited (Liquid fill unlimited) enum all all,flowing,none
|
Loading…
Add table
Add a link
Reference in a new issue