pre-alpha 2

master
runs 2022-03-27 22:02:06 +02:00
parent 200c2d04dc
commit dfb4dbd496
89 changed files with 2275 additions and 379 deletions

21
mods/LICENSE.md Normal file
View File

@ -0,0 +1,21 @@
# Minetest
- The engine to use with this game is Minetest.
- Site: http://www.minetest.net
# Images
- Author: Juanchi
- License: CC BY 4.0 (Attribution 4.0 International)
# Sounds
## bedz_yawn.ogg
- Author: ArrowheadProductions
- License: This work is licensed under the Creative Commons 0 License.
- Site: https://freesound.org/people/ArrowheadProductions/sounds/564231/
## eat_chewing.ogg
- Author: InspectorJ
- License: This work is licensed under the Attribution License.
- Site: https://freesound.org/people/InspectorJ/sounds/412068/

View File

@ -118,6 +118,7 @@ local function awake(player, rest_hours)
if rest_hours then
rest_player(player, rest_hours)
playerz.change_hunger(player, -(rest_hours*(playerz.max_hunger/playerz.starving_hours))) --decrease hunger
sound.play("player", player, "bedz_yawn")
end
return true
else
@ -231,6 +232,11 @@ local function use_bed(pos, player)
end
end
--Check if player is hungry
if playerz.is_starving(player) then
return false, "You are hungry"
end
if bedside == player_name then
return false, S("You are already in bed")
elseif not(bedside == "") then

View File

@ -7,4 +7,5 @@ hours=horas
Leave Bed=Abandonar cama
This bed is already occupied=Esta cama ya está ocupada
You are already in bed=Ya estás en cama
You are hungry=Estás hambriento
You have slept=Has dormido

Binary file not shown.

View File

@ -1,8 +1,13 @@
bucket = {}
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local S = minetest.get_translator(modname)
-- Bucket: Punch liquid source or flowing liquid to collect it
minetest.register_tool("bucket:bucket", {
description = "Bucket".."\n"..
"Picks up liquid nodes",
description = S("Bucket"),
inventory_image = "bucket.png",
stack_max = 1,
liquids_pointable = true,

View File

@ -0,0 +1,2 @@
# textdomain: bucket
Bucket=Cubo

View File

@ -28,6 +28,7 @@ function eat.item_eat(itemstack, user, item_name, hp, hunger)
playerz.change_hp(user, hp or 1, "eat")
eat_particlespawner(user, item_name, itemstack)
playerz.change_hunger(user, hunger or 1)
sound.play("player", user, "eat_chewing")
end
itemstack:take_item()
return itemstack

Binary file not shown.

View File

@ -95,20 +95,37 @@ function farmz.register_hoe(name, def)
end
function farmz.register_plant(name, def)
local plant_name = modname..":"..name
local product_name = modname..":"..name
minetest.register_craftitem(product_name , {
description = S(def.description),
inventory_image = modname.."_"..name..".png",
groups = {fleshy = 3, flammable = 2, wheat = 1},
})
for i = 1,2 do
local description
local _plant_name
local texture
local drop
if i == 1 then
_plant_name = plant_name.."_plant"
_plant_name = product_name.."_plant"
texture = modname.."_"..name.."_plant.png"
description = def.description.." "..S("Plant")
if not def.drop then
local drop_number = def.drop_number or 1
drop = product_name.." "..drop_number
else
drop = def.drop
end
else
_plant_name = plant_name.."_sprout"
_plant_name = product_name.."_sprout"
texture = modname.."_"..name.."_sprout.png"
description = def.description.." "..S("Plant").." ".."("..S("Sprout")..")"
drop = ""
end
minetest.register_node(_plant_name, {
description = description,
inventory_image = def.inventory_image or texture,
@ -126,6 +143,7 @@ function farmz.register_plant(name, def)
type = "fixed",
fixed = def.box,
},
drop = drop,
buildable_to = true,
groups = {crumbly = 1, plant = 1, not_in_creative_inventory = 1},
sounds = sound.dirt(),
@ -137,7 +155,7 @@ function farmz.register_plant(name, def)
end,
on_timer = function(pos)
minetest.set_node(pos, {name = plant_name.."_plant"})
minetest.set_node(pos, {name = product_name.."_plant"})
return false
end,
@ -150,7 +168,8 @@ function farmz.register_plant(name, def)
end
})
end
local seed_name = plant_name.."_seed"
local seed_name = product_name.."_seed"
local seed_name_soil = seed_name.."_soil"
local seed_texture = modname.."_"..name.."_seed.png"
@ -171,9 +190,9 @@ function farmz.register_plant(name, def)
end
if node.name == "farmz:plow" then
minetest.set_node(pos, {name = seed_name_soil})
itemstack:take_item(1)
start_grow(pos, def.grow_time)
end
itemstack:take_item(1)
return itemstack
end
})
@ -194,7 +213,7 @@ function farmz.register_plant(name, def)
end,
on_timer = function(pos)
minetest.set_node(pos, {name = plant_name.."_sprout"})
minetest.set_node(pos, {name = product_name.."_sprout"})
start_grow(pos, def.grow_time)
return false
end,
@ -207,4 +226,24 @@ function farmz.register_plant(name, def)
end
end
})
if def.craft then
local craft_name = modname..":"..def.craft.name
minetest.register_craftitem(craft_name, {
description = S(def.craft.description),
inventory_image = modname.."_"..def.craft.name..".png",
groups = {flour = 1},
})
local recipe = {}
for i = 1, (def.craft.input_amount or 1) do
recipe[#recipe+1] = product_name
end
minetest.register_craft({
output = craft_name,
type = "shapeless",
recipe = recipe,
})
end
end

20
mods/farmz/food.lua Normal file
View File

@ -0,0 +1,20 @@
local S = ...
--Bread
minetest.register_craftitem("farmz:bread", {
description = S("Bread"),
inventory_image = "farmz_bread.png",
groups = {food = 1},
on_use = function(itemstack, user, pointed_thing)
eat.item_eat(itemstack, user, "farmz:bread", 6, 8)
return itemstack
end,
})
minetest.register_craft({
type = "cooking",
output = "farmz:bread",
recipe = "farmz:flour",
cooktime = 3,
})

View File

@ -20,4 +20,13 @@ minetest.register_node("farmz:grass", {
type = "fixed",
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -5 / 16, 6 / 16},
},
drop = {
max_items = 1,
items = {
{
rarity = 5,
items = {"farmz:wheat_seed"},
},
}
}
})

View File

@ -1,5 +1,6 @@
local S = ...
farmz.register_hoe("stone_Hoe" ,{
description = S("Stone Hoe"),
farmz.register_hoe("steel_Hoe" ,{
description = S("Steel Hoe"),
inventory_image = "farmz_hoe_steel.png"
})

View File

@ -5,6 +5,7 @@ local S = minetest.get_translator(modname)
farmz = {}
assert(loadfile(modpath .. "/api.lua"))(S,modname)
assert(loadfile(modpath .. "/food.lua"))(S)
assert(loadfile(modpath .. "/hoes.lua"))(S)
assert(loadfile(modpath .. "/grasses.lua"))(S)
assert(loadfile(modpath .. "/plants.lua"))(S)

View File

@ -1,8 +1,11 @@
# textdomain: farmz
Bread=Pan
Flour=Harina
Plant=Planta
Plowed Soil=Tierra arada
Seed=Semilla
Seed Soil=Cultivo con semillas
Sprout=brote
Steel Hoe=Azada de hierro
Wheat=Trigo

View File

@ -1,7 +1,14 @@
local S = ...
farmz.register_plant("wheat", {
description = S("Wheat"),
description = "Wheat",
box = {-4/16, -0.5, -4/16, 4/16, 4/16, 4/16},
grow_time = 5,
drop_number = 2,
craft = {
name = "flour",
description = "Flour",
input_amount = 4,
ouput_amount = 1,
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

View File

@ -23,7 +23,7 @@ flowers.list = {
name = "rose",
def = {
desc = S("Rose"),
box = {-2/16, -0.5, -2/16, 2/16, 5/16, 2/16},
box = {-2/16, -0.5, -2/16, 2/16, 4/16, 2/16},
groups = {color_red = 1, flammable = 1},
inv_img = false,
deco = {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 572 B

View File

@ -280,6 +280,54 @@ minetest.register_decoration({
flags = "place_center_x, place_center_z, force_placement",
})
--Gravel
minetest.register_decoration({
decoration = "nodez:gravel",
deco_type = "simple",
place_on = {"nodez:dirt_with_grass", "nodez:sand"},
sidelen = 16,
fill_ratio = 0.1,
biomes = {"forest", "forest_ocean", "beach"},
noise_params = {
offset = 0.005,
scale = 0.008,
spread = {x = 250, y = 250, z = 250},
seed = 1630,
octaves = 3,
persist = 0.66
},
y_min = 0,
y_max = 1,
spawn_by = "nodez:water_source",
num_spawn_by = 1,
place_offset_y = -1,
flags = "place_center_x, place_center_z, force_placement",
})
minetest.register_decoration({
decoration = "nodez:gravel",
deco_type = "simple",
place_on = {"nodez:dirt_with_grass", "nodez:sand"},
sidelen = 16,
fill_ratio = 0.1,
biomes = {"forest", "forest_ocean", "beach"},
noise_params = {
offset = 0.8,
scale = 0.9,
spread = {x = 250, y = 250, z = 250},
seed = 1630,
octaves = 3,
persist = 0.66
},
y_min = 0,
y_max = 1,
spawn_by = "nodez:gravel",
num_spawn_by = 1,
place_offset_y = -1,
flags = "place_center_x, place_center_z, force_placement",
})
minetest.register_decoration({
decoration = "nodez:ice",
deco_type = "simple",

View File

@ -0,0 +1,16 @@
MIT License
Copyright (c) 2017-2020 Elijah Duffy and Wuzzy
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.

View File

@ -0,0 +1,39 @@
# Schematic Editor [`schemedit`]
## Version
1.5.0
## Description
This is a mod which allows you to edit and export schematics (`.mts` files).
This mod works in Minetest 5.0.0 or later, but recommended is version 5.1.0
or later.
It supports node probabilities, forced node placement and slice probabilities.
It adds 3 items:
* Schematic Creator: Used to mark a region and export or import it as schematic
* Schematic Void: Marks a position in a schematic which should not replace anything when placed as a schematic
* Schematic Node Probability Tool: Set per-node probabilities and forced node placement
Note: The import feature requires Minetest 5.1.0 or later.
It also adds these server commands:
* `placeschem` to place a schematic
* `mts2lua` to convert .mts files to .lua files (Lua code)
There's also a setting `schemedit_export_lua` to enable automatic export to .lua files.
## Usage help
This mod assumes you already have a basic understanding about how schematics in Minetest work.
If not, refer to the Minetest Lua API documentation to understand more about schematics.
To learn how to use all the items in this mod, read `USAGE.md`.
You can also find the same help texts in-game if you if you use the optional Help modpack
(mods `doc` and `doc_items`).
## License of everything
MIT License

View File

@ -0,0 +1,44 @@
## Usage help
In this section you'll learn how to use the items of this mod.
Note: If you have the `doc` and `doc_items` mods installed, you can also access the same help texts in-game (possibly translated).
### Schematic Creator
The schematic creator is used to save a region of the world into a schematic file (.mts).
#### Usage
To get started, place the block facing directly in front of any bottom left corner of the structure you want to save. This block can only be accessed by the placer or by anyone with the “`schematic_override`” privilege.
To save a region, use the block, enter the size and a schematic name and hit “Export schematic”. The file will always be saved in the world directory. Note you can use this name in the /placeschem command to place the schematic again.
Importing a schematic will load a schematic from the world directory, place it in front of the schematic creator and sets probability and force-place data accordingly.
The other features of the schematic creator are optional and are used to allow to add randomness and fine-tuning.
Y slices are used to remove entire slices based on chance. For each slice of the schematic region along the Y axis, you can specify that it occurs only with a certain chance. In the Y slice tab, you have to specify the Y slice height (0 = bottom) and a probability from 0 to 255 (255 is for 100%). By default, all Y slices occur always.
With a schematic node probability tool, you can set a probability for each node and enable them to overwrite all nodes when placed as schematic. This tool must be used prior to the file export.
### Schematic Node Probability Tool
This is an advanced tool which only makes sense when used together with a schematic creator. It is used to finetune the way how nodes from a schematic are placed.
It allows you to set two things:
1) Set probability: Chance for any particular node to be actually placed (default: always placed)
2) Enable force placement: These nodes replace node other than air and ignore when placed in a schematic (default: off)
#### Usage
BASIC USAGE:
Punch to configure the tool. Select a probability (0-255; 255 is for 100%) and enable or disable force placement. Now place the tool on any node to apply these values to the node. This information is preserved in the node until it is destroyed or changed by the tool again. This tool has no effect on schematic voids.
Now you can use a schematic creator to save a region as usual, the nodes will now be saved with the special node settings applied.
NODE HUD:
To help you remember the node values, the nodes with special values are labelled in the HUD. The first line shows probability and force placement (with “[F]”). The second line is the current distance to the node. Nodes with default settings and schematic voids are not labelled.
To disable the node HUD, unselect the tool or hit “place” while not pointing anything.
UPDATING THE NODE HUD:
The node HUD is not updated automatically and may be outdated. The node HUD only updates the HUD for nodes close to you whenever you place the tool or press the punch and sneak keys simultaneously. If you sneak-punch a schematic creator, then the node HUD is updated for all nodes within the schematic creator's region, even if this region is very big.
### Schematic Void
This is an utility block used in the creation of schematic files. It should be used together with a schematic creator. When saving a schematic, all nodes with a schematic void will be left unchanged when the schematic is placed again. Technically, this is equivalent to a block with the node probability set to 0.
#### Usage
Just place the schematic void like any other block and use the schematic creator to save a portion of the world.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,82 @@
# textdomain: schemedit
<world path>=<Weltpfad>
Insufficient privileges! You need the “@1” privilege to use this.=Unzureichende Privilegien! Sie benötigen das „@1“-Privileg, um dies benutzen zu können.
Probability: @1=Wahrscheinlichkeit: @1
Not Set=Nicht gesetzt
Force placement=Platzierung erzwingen
Import schematic=Schematic importieren
Main=Grundeinstellungen
Hide border=Rand verbergen
Show border=Rand anzeigen
Position: @1=Position: @1
Owner: @1=Eigentümer: @1
Schematic name: @1=Schematic-Name: @1
Size: @1=Größe: @1
Schematic name:=Schematic-Name:
OK=OK
Save schematic name=Schematic-Name speichern
Export schematic=Schematic exportieren
Export/import path:@n@1=Export-/Importpfad:@n@1
<name>=<Name>
Air to voids=Luft zu Lücken
Voids to air=Lücken zu Luft
Turn all air nodes into schematic void nodes=Alle Luft-Nodes zu Schematic-Lücken umwandeln
Turn all schematic void nodes into air nodes=Alle Schematic-Lücken zu Luft-Nodes umwandeln
X size:=X-Größe:
Y size:=Y-Größe:
Z size:=Z-Größe:
Save size=Größe speichern
Help=Hilfe
Exported schematic to @1=Schematic nach @1 exportiert
Failed to export schematic to @1=Schematic konnte nicht nach @1 exportiert werden
Imported schematic from @1=Schematic von @1 importiert
Failed to import schematic from @1=Schematic konnte nicht von @1 importiert werden
Y Slices=Y-Scheiben
Y @= @1; Probability @= @2=Y @= @1; Wahrscheinlichkeit @= @2
Add=Hinzufügen
Apply=Anwenden
Y position (max. @1):=Y-Position (max. @1):
Probability (0-255):=Wahrscheinlichkeit (0-255):
Cancel=Abbrechen
Add slice=Neue Scheibe
Remove slice=Scheibe entfernen
Edit slice=Scheibe anpassen
Back=Zurück
Schematic Node Probability Tool=Schematic-Node-Wahrscheinlichkeitswerkzeug
Probability (0-255)=Wahrscheinlichkeit
Probability that the node will be placed=Wahrscheinlichkeit, dass der Node platizert wird
If enabled, the node will replace nodes other than air and ignore=Wenn aktiviert, wird der Node alle Nodes außer Luft und Ignorieren ersetzen
Allows you to access schemedit nodes not owned by you=Damit können Sie auf Schemedit-Nodes, die ihnen nicht gehören, zugreifen
Importing a schematic will load a schematic from the world directory, place it in front of the schematic creator and sets probability and force-place data accordingly.=Das Importieren eines Schematics wird eine Schematicdatei aus dem Weltverzeichnis laden, sie vor dem Schematic-Macher platzieren und die Wahrscheinlichkeits- und Zwangsplatzierungsdaten entsprechend setzen.
Schematic Creator=Schematic-Macher
The schematic creator is used to save a region of the world into a schematic file (.mts).=Der Schematic-Macher wird benutzt, um eine Region der Welt in eine Schematic-Datei (.mts) zu speichern.
To get started, place the block facing directly in front of any bottom left corner of the structure you want to save. This block can only be accessed by the placer or by anyone with the “schematic_override” privilege.=Um anzufangen, platzieren Sie den Block direkt vor einer beliebigen unteren linken Ecke des Gebäudes, das Sie speichern möchten. Dieser Block kann nur vom Platzierer oder von Spielern mit dem „schematic_override“-Privileg benutzt werden.
To save a region, use the block, enter the size and a schematic name and hit “Export schematic”. The file will always be saved in the world directory. Note you can use this name in the /placeschem command to place the schematic again.=Um eine Region zu speichern, benutzen Sie den Block, geben Sie die Größe und einen Schematic-Namen ein und klicken Sie auf „Schematic exportieren“. Die Datei wird immer im Weltverzeichnis gespeichert. Beachten Sie, dass Sie diesen Namen im „/placeschem“-Befehl benutzen können, um das Schematic erneut zu platzieren.
The other features of the schematic creator are optional and are used to allow to add randomness and fine-tuning.=Die anderen Funktionen des Schematic-Machers sind optional und werden für Zufälligkeit und Feinjustierungen benutzt.
Y slices are used to remove entire slices based on chance. For each slice of the schematic region along the Y axis, you can specify that it occurs only with a certain chance. In the Y slice tab, you have to specify the Y slice height (0 @= bottom) and a probability from 0 to 255 (255 is for 100%). By default, all Y slices occur always.=Y-Scheiben werden benutzt, um ganze Scheiben mit einer gewissen Wahrscheinlichkeit auszulassen. Für jede Scheibe der Schematic-Region entlang der Y-Achse können Sie festlegen, dass sie nur mit einer gewissen Wahrscheinlichkeit auftritt. In der Registerkarte „Y-Scheiben“ müssen Sie die Höhe der Y-Scheibe festlegen (0 @= Boden) sowie eine Wahrscheinlichkeit zwischen 0 und 255 (255 steht für 100%). Standardmäßig treten alle Y-Scheiben immer auf.
With a schematic node probability tool, you can set a probability for each node and enable them to overwrite all nodes when placed as schematic. This tool must be used prior to the file export.=Mit einem Schematic-Node-Wahrscheinlichkeitswerkzeug können Sie die Wahrscheinlichkeit für jeden Node setzen und sie dazu aktivieren, alle Nodes zu ersetzen, wenn sie als Schematic platziert werden. Dieses Werkzeug muss vor dem Dateiexport benutzt werden.
(owned by @1)=(Eigentümer: @1)
This is an advanced tool which only makes sense when used together with a schematic creator. It is used to finetune the way how nodes from a schematic are placed.=Dies ist ein fortgeschrittenes Werkzeug, der nur sinnvoll in Verwendung mit einem Schematic-Macher benutzt werden kann. Er wird benutzt, um die Art und Weise, wie Nodes aus einem Schematic platziert werden, feinzujustieren.
It allows you to set two things:=Damit können Sie zwei Dinge setzen:
1) Set probability: Chance for any particular node to be actually placed (default: always placed)=1) Wahrscheinlichkeit setzen: Wahrscheinlichkeit für einen bestimmten Node, dass er tatsächlich platziert wird (Standard: immer platziert)
2) Enable force placement: These nodes replace node other than air and ignore when placed in a schematic (default: off)=2) Zwangsplatzierung aktivieren: Diese Nodes ersetzen alle Nodes außer Luft und Ignorieren, wenn Sie in einem Schematic platziert werden (Standard: aus)
BASIC USAGE:=GRUNDLEGENDE BENUTZUNG:
Punch to configure the tool. Select a probability (0-255; 255 is for 100%) and enable or disable force placement. Now place the tool on any node to apply these values to the node. This information is preserved in the node until it is destroyed or changed by the tool again. This tool has no effect on schematic voids.=Schlagen Sie zu, um das Werkzeug zu konfigurieren. Wählen Sie eine Wahrscheinlichkeit (0-255; 255 steht für 100%) und aktivieren oder deaktivieren Sie die erzwungene Platzierung. Platzieren Sie nun das Werkzeug auf einen beliebigen Node, um diese Werte auf dem Node anzuwenden. Diese Information bleibt im Node erhalten, bis er zerstört oder erneut vom Werkzeug geändert wird. Dieses Werkzeug hat keine Auswirkung auf Schematic-Lücken.
Now you can use a schematic creator to save a region as usual, the nodes will now be saved with the special node settings applied.=Anschließend können Sie einen Schematic-Macher benutzen, um eine Region wie gewöhnlich zu speichern, die Nodes werden nun mit den besonderen Node-Einstellungen gespeichert.
NODE HUD:=NODE-HUD:
To help you remember the node values, the nodes with special values are labelled in the HUD. The first line shows probability and force placement (with “[F]”). The second line is the current distance to the node. Nodes with default settings and schematic voids are not labelled.=Um Ihnen dabei zu helfen, sich die Node-Werte zu merken, werden die Nodes mit besonderen Werten in der Benutzeroberfläche gekennzeichnet. Die erste Zeile zeigt die Wahrscheinlichkeit und die Zwangsplatzierung (mit „[F]“) an. Die zweite Zeile zeigt die momentane Entfernung zum Node an. Nodes mit den Standardeinstellungen und Schematic-Lücken werden nicht gekennzeichnet.
To disable the node HUD, unselect the tool or hit “place” while not pointing anything.=Um die Node-HUD zu deaktivieren, wählen Sie das Werkzeug ab oder drücken Sie die Platzierentaste, während Sie auf nichts zeigen.
UPDATING THE NODE HUD:=NODE-HUD AKTUALISIEREN:
The node HUD is not updated automatically and may be outdated. The node HUD only updates the HUD for nodes close to you whenever you place the tool or press the punch and sneak keys simultaneously. If you sneak-punch a schematic creator, then the node HUD is updated for all nodes within the schematic creator's region, even if this region is very big.=Die Node-HUD wird nicht automatisch aktualisiert und kann veraltet sein. Die Node-HUD wird nur die HUD für Nodes in Ihrer Nähe aktualisieren oder wenn Sie das Werkzeug benutzen oder gleichzeitig die Schlag- und Schleichtaste drücken. Wenn Sie auf einen Schematic-Macher schleichschlagen, wird die Node-HUD für alle Nodes innerhalb der Region des Schematic-Machers aktualisiert, selbst, wenn diese Region sehr groß ist.
Schematic Void=Schematic-Lücke
This is an utility block used in the creation of schematic files. It should be used together with a schematic creator. When saving a schematic, all nodes with a schematic void will be left unchanged when the schematic is placed again. Technically, this is equivalent to a block with the node probability set to 0.=Dies ist ein Hilfsblock, der bei der Erstellung von Schematic-Dateien benutzt wird. Er sollte zusammen mit einem Schematic-Macher benutzt werden. Wenn ein Schematic gespeichert wird, werden alle Nodes mit einer Schematic-Lücke unverändert gelassen, wenn das Schematic erneut platziert wird. Technisch gesehen ist dieses Verhalten identisch mit einem Block, der eine Node-Wahrscheinlichkeit von 0 hat.
Just place the schematic void like any other block and use the schematic creator to save a portion of the world.=Platzieren Sie einfach die Schematic-Lücke wie jeden anderen Block und benutzen Sie den Schematic-Macher, um einen Teil der Welt zu speichern.
Place schematic at the position specified or the current player position (loaded from @1). “-c” will clear the area first=Schematic an der angegebenen Position oder der aktuellen Spielerposition platzieren (geladen von @1). Mit „-c“ wird das Gebiet zuerst geleert
<schematic name>[.mts] [-c] [<x> <y> <z>]=<Schematic-Name>[.mts] [-c] [<x> <y> <z>]
No schematic file specified.=Keinen Schematic-Namen angegeben.
Schematic file could not be loaded!=Schematic-Datei konnte nicht geladen werden!
List schematic files in world path=Schematic-Dateien im Weltpfad auflisten
No schematic files.=Keine Schematic-Dateien.
Convert .mts schematic file to .lua file (loaded from @1)=„.mts“-Schematicdatei zu „.lua“-Datei konvertieren (geladen von @1)
<schematic name>[.mts] [comments]=<Schematic-Name>[.mts] [comments]
Failed!=Fehlgeschlagen!

View File

@ -0,0 +1,82 @@
# textdomain: schemedit
<world path>=
Insufficient privileges! You need the “@1” privilege to use this.=
Probability: @1=
Not Set=
Force placement=
Import schematic=
Main=
Hide border=
Show border=
Position: @1=
Owner: @1=
Schematic name: @1=
Size: @1=
Schematic name:=
OK=
Save schematic name=
Export schematic=
Export/import path:@n@1=
<name>=
Air to voids=
Voids to air=
Turn all air nodes into schematic void nodes=
Turn all schematic void nodes into air nodes=
X size:=
Y size:=
Z size:=
Save size=
Help=
Exported schematic to @1=
Failed to export schematic to @1=
Imported schematic from @1=
Failed to import schematic from @1=
Y Slices=
Y @= @1; Probability @= @2=
Add=
Apply=
Y position (max. @1):=
Probability (0-255):=
Cancel=
Add slice=
Remove slice=
Edit slice=
Back=
Schematic Node Probability Tool=
Probability (0-255)=
Probability that the node will be placed=
If enabled, the node will replace nodes other than air and ignore=
Allows you to access schemedit nodes not owned by you=
Importing a schematic will load a schematic from the world directory, place it in front of the schematic creator and sets probability and force-place data accordingly.=
Schematic Creator=
The schematic creator is used to save a region of the world into a schematic file (.mts).=
To get started, place the block facing directly in front of any bottom left corner of the structure you want to save. This block can only be accessed by the placer or by anyone with the “schematic_override” privilege.=
To save a region, use the block, enter the size and a schematic name and hit “Export schematic”. The file will always be saved in the world directory. Note you can use this name in the /placeschem command to place the schematic again.=
The other features of the schematic creator are optional and are used to allow to add randomness and fine-tuning.=
Y slices are used to remove entire slices based on chance. For each slice of the schematic region along the Y axis, you can specify that it occurs only with a certain chance. In the Y slice tab, you have to specify the Y slice height (0 @= bottom) and a probability from 0 to 255 (255 is for 100%). By default, all Y slices occur always.=
With a schematic node probability tool, you can set a probability for each node and enable them to overwrite all nodes when placed as schematic. This tool must be used prior to the file export.=
(owned by @1)=
This is an advanced tool which only makes sense when used together with a schematic creator. It is used to finetune the way how nodes from a schematic are placed.=
It allows you to set two things:=
1) Set probability: Chance for any particular node to be actually placed (default: always placed)=
2) Enable force placement: These nodes replace node other than air and ignore when placed in a schematic (default: off)=
BASIC USAGE:=
Punch to configure the tool. Select a probability (0-255; 255 is for 100%) and enable or disable force placement. Now place the tool on any node to apply these values to the node. This information is preserved in the node until it is destroyed or changed by the tool again. This tool has no effect on schematic voids.=
Now you can use a schematic creator to save a region as usual, the nodes will now be saved with the special node settings applied.=
NODE HUD:=
To help you remember the node values, the nodes with special values are labelled in the HUD. The first line shows probability and force placement (with “[F]”). The second line is the current distance to the node. Nodes with default settings and schematic voids are not labelled.=
To disable the node HUD, unselect the tool or hit “place” while not pointing anything.=
UPDATING THE NODE HUD:=
The node HUD is not updated automatically and may be outdated. The node HUD only updates the HUD for nodes close to you whenever you place the tool or press the punch and sneak keys simultaneously. If you sneak-punch a schematic creator, then the node HUD is updated for all nodes within the schematic creator's region, even if this region is very big.=
Schematic Void=
This is an utility block used in the creation of schematic files. It should be used together with a schematic creator. When saving a schematic, all nodes with a schematic void will be left unchanged when the schematic is placed again. Technically, this is equivalent to a block with the node probability set to 0.=
Just place the schematic void like any other block and use the schematic creator to save a portion of the world.=
Place schematic at the position specified or the current player position (loaded from @1). “-c” will clear the area first=
<schematic name>[.mts] [-c] [<x> <y> <z>]=
No schematic file specified.=
Schematic file could not be loaded!=
List schematic files in world path=
No schematic files.=
Convert .mts schematic file to .lua file (loaded from @1)=
<schematic name>[.mts] [comments]=
Failed!=

View File

@ -0,0 +1,69 @@
-- This file adds a command for generating the schemedit usage help readme
-- file, in Markdown format. The text is extracted from the metadata of
-- the items. This is only used for development purposes, after the
-- help text of any of the items was changed.
-- How to use: Temporarily set MAKE_README to true in init.lua, then
-- start the game as admin and run “/make_schemedit_readme”. Copy the
-- generated file back to the mod directory (USAGE.md).
-- Everything here is intentionally NOT translated because it is for text
-- files only.
-- Extract text from item definition
local get_text = function(item, field)
local text = minetest.registered_items[item][field]
-- Remove translation escapes
text = string.gsub(text, "\x1BE", "")
text = string.gsub(text, "\x1B%(T@schemedit%)", "")
-- Fix Markdown syntax error
text = string.gsub(text, "schematic_override", "`schematic_override`")
return text
end
-- Schemedit items to generate the readme from
local items = { "creator", "probtool", "void" }
minetest.register_chatcommand("make_schemedit_readme", {
description = "Generate the schemedit usage help readme file",
privs = {server=true},
func = function(name, param)
local readme = "## Usage help".."\n"
readme = readme .. "In this section you'll learn how to use the items of this mod.".."\n"
readme = readme .. "Note: If you have the `doc` and `doc_items` mods installed, you can also access the same help texts in-game (possibly translated).".."\n\n"
local entries = {}
for i=1, #items do
local item = items[i]
local desc = get_text("schemedit:"..item, "description")
local longdesc = get_text("schemedit:"..item, "_doc_items_longdesc")
local usagehelp = get_text("schemedit:"..item, "_doc_items_usagehelp")
readme = readme .. "### "..desc.."\n"
readme = readme .. longdesc .."\n\n"
readme = readme .. "#### Usage\n"
readme = readme .. usagehelp
if i < #items then
readme = readme .. "\n\n\n"
end
end
local path = minetest.get_worldpath().."/schemedit_readme.md"
local file = io.open(path, "w")
if not file then
return false, "Failed to open file!"
end
local ok = file:write(readme)
file:close()
if ok then
return true, "File written to: "..path
else
return false, "Failed to write file!"
end
end
})

View File

@ -0,0 +1,4 @@
name = schemedit
optional_depends = doc
description = Advanced tool for modders and advanced users to create and edit schematics.
min_minetest_version = 5.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,3 @@
# If enabled, exporting a schematic will also create a .lua file
# in addition to the .mts file.
schemedit_export_lua (.lua file schematic export) bool false

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

View File

@ -110,7 +110,6 @@ minetest.register_node("nodez:clay_bricks", {
sounds = sound.dirt(),
})
minetest.register_craft({
output = "nodez:clay_bricks 1",
type = "shapeless",

View File

@ -26,5 +26,6 @@ Ruby=Rubí
Ruby Ore=Mineral de rubí
Sand=Arena
Sandstone=Piedra arenisca
Silex=Silex
Stone=Piedra
Water Source=Fuente de agua

View File

@ -28,5 +28,23 @@ minetest.register_node("nodez:gravel", {
tiles ={"nodez_gravel.png"},
groups = {crumbly=2},
sounds = sound.gravel(),
drop = {
max_items = 1,
items = {
{
rarity = 10,
items = {"nodez:silex"},
},
{
items = {"nodez:gravel"},
},
}
}
})
--Silex
minetest.register_craftitem("nodez:silex", {
description = S("Silex"),
inventory_image = "nodez_silex.png"
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

View File

@ -27,6 +27,7 @@ minetest.register_node("nodez:water_source", {
liquid_viscosity = WATER_VISC,
post_effect_color = {a = 64, r = 100, g = 100, b = 200},
groups = {water = 3, liquid = 3},
sounds = sound.water(),
})
minetest.register_node("nodez:water_flowing", {
@ -56,6 +57,7 @@ minetest.register_node("nodez:water_flowing", {
liquid_viscosity = WATER_VISC,
post_effect_color = {a = 64, r = 100, g = 100, b = 200},
groups = {water = 3, liquid = 3},
sounds = sound.water(),
})
minetest.register_node("nodez:river_water_source", {
@ -84,6 +86,7 @@ minetest.register_node("nodez:river_water_source", {
liquid_range = 2,
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
groups = {water = 3, liquid = 3, },
sounds = sound.water(),
})
minetest.register_node("nodez:river_water_flowing", {
@ -115,6 +118,7 @@ minetest.register_node("nodez:river_water_flowing", {
liquid_range = 2,
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
groups = {water = 3, liquid = 3, },
sounds = sound.water(),
})
minetest.register_node("nodez:ice", {

View File

@ -10,6 +10,18 @@ local hunger_tick = (playerz.starving_hours * 50)/playerz.max_hunger
--Time to produce health damage when starving
local hunger_tick_damage = 4
--Helper Funtions
function playerz.is_starving(player)
if playerz.get_hunger(player) <= 0 then
return true
else
return false
end
end
--Save/Load Functions
function playerz.save_hunger(player, value)
player:get_meta():set_int("hunger", value)
return value

View File

@ -4,6 +4,20 @@
sound = {}
local DEFAULT_MAX_HEAR_DISTANCE = 5
function sound.play(dest_type, dest, soundfile, max_hear_distance)
if dest_type == "object" then
minetest.sound_play(soundfile, {object = dest, gain = 0.5, max_hear_distance = max_hear_distance or DEFAULT_MAX_HEAR_DISTANCE,})
elseif dest_type == "player" then
local player_name = dest:get_player_name()
--minetest.chat_send_player("singleplayer", player_name..tostring(max_hear_distance))
minetest.sound_play(soundfile, {to_player = player_name, gain = 0.5})
elseif dest_type == "pos" then
minetest.sound_play(soundfile, {pos = dest, gain = 0.5, max_hear_distance = max_hear_distance or DEFAULT_MAX_HEAR_DISTANCE,})
end
end
function sound.defaults(table)
table = table or {}
table.footstep = table.footstep or

27
mods/tools/axes.lua Normal file
View File

@ -0,0 +1,27 @@
S = ...
--
-- Axes (dig choppy)
--
minetest.register_tool("tools:axe_stone", {
description = S("Stone Axe"),
inventory_image = "tools_stoneaxe.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
choppy={times={[2]=1.00, [3]=0.60}, uses=60, maxlevel=0},
},
},
})
minetest.register_tool("tools:axe_steel", {
description = S("Iron Axe"),
inventory_image = "tools_ironaxe.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
choppy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=90, maxlevel=0},
},
},
})

45
mods/tools/hand.lua Normal file
View File

@ -0,0 +1,45 @@
-- The hand
if minetest.settings:get_bool("creative_mode") then
local digtime = 42
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
minetest.register_item(":", {
type = "none",
wield_image = "wieldhand.png",
wield_scale = {x = 1, y = 1, z = 2.5},
range = 10,
tool_capabilities = {
full_punch_interval = 0.5,
max_drop_level = 3,
groupcaps = {
crumbly = caps,
cracky = caps,
snappy = caps,
choppy = caps,
oddly_breakable_by_hand = caps,
-- dig_immediate group doesn't use value 1. Value 3 is instant dig
dig_immediate =
{times = {[2] = digtime, [3] = 0}, uses = 0, maxlevel = 256},
},
damage_groups = {fleshy = 10},
}
})
else
minetest.register_item(":", {
type = "none",
wield_image = "wieldhand.png",
wield_scale = {x = 1, y = 1, z = 2.5},
tool_capabilities = {
full_punch_interval = 0.9,
max_drop_level = 0,
groupcaps = {
crumbly = {times = {[2] = 3.00, [3] = 0.70}, uses = 0, maxlevel = 1},
snappy = {times = {[3] = 0.40}, uses = 0, maxlevel = 1},
oddly_breakable_by_hand =
{times = {[1] = 3.50, [2] = 2.00, [3] = 0.70}, uses = 0}
},
damage_groups = {fleshy = 1},
}
})
end

View File

@ -1,364 +1,13 @@
--
-- Tool definitions
--
tools = {}
--[[ TOOLS SUMMARY:
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local S = minetest.get_translator(modname)
Tool types:
assert(loadfile(modpath .. "/axes.lua"))(S)
assert(loadfile(modpath .. "/hand.lua"))()
assert(loadfile(modpath .. "/pickaxes.lua"))(S)
assert(loadfile(modpath .. "/shears.lua"))(S)
assert(loadfile(modpath .. "/shovels.lua"))(S)
assert(loadfile(modpath .. "/swords.lua"))(S)
* Hand: basic tool/weapon (special capabilities in creative mode)
* Pickaxe: dig cracky
* Axe: dig choppy
* Shovel: dig crumbly
* Shears: dig snappy
* Sword: deal damage
* Dagger: deal damage, but faster
Tool materials:
* Wood: dig nodes of rating 3
* Stone: dig nodes of rating 3 or 2
* Steel: dig nodes of rating 3, 2 or 1
* Mese: dig "everything" instantly
* n-Uses: can be used n times before breaking
]]
-- The hand
if minetest.settings:get_bool("creative_mode") then
local digtime = 42
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
minetest.register_item(":", {
type = "none",
wield_image = "wieldhand.png",
wield_scale = {x = 1, y = 1, z = 2.5},
range = 10,
tool_capabilities = {
full_punch_interval = 0.5,
max_drop_level = 3,
groupcaps = {
crumbly = caps,
cracky = caps,
snappy = caps,
choppy = caps,
oddly_breakable_by_hand = caps,
-- dig_immediate group doesn't use value 1. Value 3 is instant dig
dig_immediate =
{times = {[2] = digtime, [3] = 0}, uses = 0, maxlevel = 256},
},
damage_groups = {fleshy = 10},
}
})
else
minetest.register_item(":", {
type = "none",
wield_image = "wieldhand.png",
wield_scale = {x = 1, y = 1, z = 2.5},
tool_capabilities = {
full_punch_interval = 0.9,
max_drop_level = 0,
groupcaps = {
crumbly = {times = {[2] = 3.00, [3] = 0.70}, uses = 0, maxlevel = 1},
snappy = {times = {[3] = 0.40}, uses = 0, maxlevel = 1},
oddly_breakable_by_hand =
{times = {[1] = 3.50, [2] = 2.00, [3] = 0.70}, uses = 0}
},
damage_groups = {fleshy = 1},
}
})
end
-- Mese Pickaxe: special tool that digs "everything" instantly
minetest.register_tool("tools:pick_mese", {
description = "Mese Pickaxe".."\n"..
"Digs diggable nodes instantly",
inventory_image = "tools_mesepick.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=3,
groupcaps={
cracky={times={[1]=0.0, [2]=0.0, [3]=0.0}, maxlevel=255},
crumbly={times={[1]=0.0, [2]=0.0, [3]=0.0}, maxlevel=255},
snappy={times={[1]=0.0, [2]=0.0, [3]=0.0}, maxlevel=255},
choppy={times={[1]=0.0, [2]=0.0, [3]=0.0}, maxlevel=255},
dig_immediate={times={[1]=0.0, [2]=0.0, [3]=0.0}, maxlevel=255},
},
damage_groups = {fleshy=100},
},
})
--
-- Pickaxes: Dig cracky
--
minetest.register_tool("tools:pick_wood", {
description = "Wooden Pickaxe".."\n"..
"Digs cracky=3",
inventory_image = "tools_woodpick.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
cracky={times={[3]=2.00}, uses=30, maxlevel=0}
},
},
})
minetest.register_tool("tools:pick_stone", {
description = "Stone Pickaxe".."\n"..
"Digs cracky=2..3",
inventory_image = "tools_stonepick.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
cracky={times={[2]=1.20, [3]=0.80}, uses=60, maxlevel=0}
},
},
})
minetest.register_tool("tools:pick_steel", {
description = "Steel Pickaxe".."\n"..
"Digs cracky=1..3",
inventory_image = "tools_steelpick.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=90, maxlevel=0}
},
},
})
minetest.register_tool("tools:pick_steel_l1", {
description = "Steel Pickaxe Level 1".."\n"..
"Digs cracky=1..3".."\n"..
"maxlevel=1",
inventory_image = "tools_steelpick_l1.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=90, maxlevel=1}
},
},
})
minetest.register_tool("tools:pick_steel_l2", {
description = "Steel Pickaxe Level 2".."\n"..
"Digs cracky=1..3".."\n"..
"maxlevel=2",
inventory_image = "tools_steelpick_l2.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=90, maxlevel=2}
},
},
})
--
-- Shovels (dig crumbly)
--
minetest.register_tool("tools:shovel_wood", {
description = "Wooden Shovel".."\n"..
"Digs crumbly=3",
inventory_image = "tools_woodshovel.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
crumbly={times={[3]=0.50}, uses=30, maxlevel=0}
},
},
})
minetest.register_tool("tools:shovel_stone", {
description = "Stone Shovel".."\n"..
"Digs crumbly=2..3",
inventory_image = "tools_stoneshovel.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
crumbly={times={[2]=0.50, [3]=0.30}, uses=60, maxlevel=0}
},
},
})
minetest.register_tool("tools:shovel_steel", {
description = "Steel Shovel".."\n"..
"Digs crumbly=1..3",
inventory_image = "tools_steelshovel.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
crumbly={times={[1]=1.00, [2]=0.70, [3]=0.60}, uses=90, maxlevel=0}
},
},
})
--
-- Axes (dig choppy)
--
minetest.register_tool("tools:axe_wood", {
description = "Wooden Axe".."\n"..
"Digs choppy=3",
inventory_image = "tools_woodaxe.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
choppy={times={[3]=0.80}, uses=30, maxlevel=0},
},
},
})
minetest.register_tool("tools:axe_stone", {
description = "Stone Axe".."\n"..
"Digs choppy=2..3",
inventory_image = "tools_stoneaxe.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
choppy={times={[2]=1.00, [3]=0.60}, uses=60, maxlevel=0},
},
},
})
minetest.register_tool("tools:axe_steel", {
description = "Steel Axe".."\n"..
"Digs choppy=1..3",
inventory_image = "tools_steelaxe.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
choppy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=90, maxlevel=0},
},
},
})
--
-- Shears (dig snappy)
--
minetest.register_tool("tools:shears_wood", {
description = "Wooden Shears".."\n"..
"Digs snappy=3",
inventory_image = "tools_woodshears.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
snappy={times={[3]=1.00}, uses=30, maxlevel=0},
},
},
})
minetest.register_tool("tools:shears_stone", {
description = "Stone Shears".."\n"..
"Digs snappy=2..3",
inventory_image = "tools_stoneshears.png",
tool_capabilities = {
max_drop_level=0,
groupcaps={
snappy={times={[2]=1.00, [3]=0.50}, uses=60, maxlevel=0},
},
},
})
minetest.register_tool("tools:shears_steel", {
description = "Steel Shears".."\n"..
"Digs snappy=1..3",
inventory_image = "tools_steelshears.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
snappy={times={[1]=1.00, [2]=0.50, [3]=0.25}, uses=90, maxlevel=0},
},
},
})
--
-- Swords (deal damage)
--
minetest.register_tool("tools:sword_wood", {
description = "Wooden Sword".."\n"..
"Damage: fleshy=2",
inventory_image = "tools_woodsword.png",
tool_capabilities = {
full_punch_interval = 1.0,
damage_groups = {fleshy=2},
}
})
minetest.register_tool("tools:sword_stone", {
description = "Stone Sword".."\n"..
"Damage: fleshy=4",
inventory_image = "tools_stonesword.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=0,
damage_groups = {fleshy=4},
}
})
minetest.register_tool("tools:sword_steel", {
description = "Steel Sword".."\n"..
"Damage: fleshy=6",
inventory_image = "tools_steelsword.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=1,
damage_groups = {fleshy=6},
}
})
-- Fire/Ice sword: Deal damage to non-fleshy damage groups
minetest.register_tool("tools:sword_fire", {
description = "Fire Sword".."\n"..
"Damage: icy=6",
inventory_image = "tools_firesword.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=0,
damage_groups = {icy=6},
}
})
minetest.register_tool("tools:sword_ice", {
description = "Ice Sword".."\n"..
"Damage: fiery=6",
inventory_image = "tools_icesword.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=0,
damage_groups = {fiery=6},
}
})
--
-- Dagger: Low damage, fast punch interval
--
minetest.register_tool("tools:dagger_steel", {
description = "Steel Dagger".."\n"..
"Damage: fleshy=2".."\n"..
"Full Punch Interval: 0.5s",
inventory_image = "tools_steeldagger.png",
tool_capabilities = {
full_punch_interval = 0.5,
max_drop_level=0,
damage_groups = {fleshy=2},
}
})
-- Test tool uses and punch_attack_uses
local uses = { 1, 2, 3, 5, 10, 50, 100, 1000, 10000, 65535 }
for i=1, #uses do
local u = uses[i]
local color = string.format("#FF00%02X", math.floor(((i-1)/#uses) * 255))
minetest.register_tool("tools:pick_uses_"..string.format("%05d", u), {
description = u.."-Uses Pickaxe".."\n"..
"Digs cracky=3",
inventory_image = "tools_steelpick.png^[colorize:"..color..":127",
tool_capabilities = {
max_drop_level=0,
groupcaps={
cracky={times={[3]=0.1, [2]=0.2, [1]=0.3}, uses=u, maxlevel=0}
},
},
})
minetest.register_tool("tools:sword_uses_"..string.format("%05d", u), {
description = u.."-Uses Sword".."\n"..
"Damage: fleshy=1",
inventory_image = "tools_woodsword.png^[colorize:"..color..":127",
tool_capabilities = {
damage_groups = {fleshy=1},
punch_attack_uses = u,
},
})
end

View File

@ -0,0 +1,11 @@
# textdomain: tools
Fire Sword=Espada de fuego
Ice Sword=Espada de hielo
Iron Axe=Hacha de hierro
Iron Dagger=Daga de hierro
Iron Pickaxe=Pico de hierro
Iron Shears=Tijeras de hierro
Iron Shovel=Pala de hierro
Iron Sword=Espada de hierro
Mese Pickaxe=Pico de Mese
Stone Axe=Hacha de piedra

34
mods/tools/pickaxes.lua Normal file
View File

@ -0,0 +1,34 @@
S = ...
-- Mese Pickaxe: special tool that digs "everything" instantly
minetest.register_tool("tools:pick_mese", {
description = S("Mese Pickaxe"),
inventory_image = "tools_mesepick.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=3,
groupcaps={
cracky={times={[1]=0.0, [2]=0.0, [3]=0.0}, maxlevel=255},
crumbly={times={[1]=0.0, [2]=0.0, [3]=0.0}, maxlevel=255},
snappy={times={[1]=0.0, [2]=0.0, [3]=0.0}, maxlevel=255},
choppy={times={[1]=0.0, [2]=0.0, [3]=0.0}, maxlevel=255},
dig_immediate={times={[1]=0.0, [2]=0.0, [3]=0.0}, maxlevel=255},
},
damage_groups = {fleshy=100},
},
})
--
-- Pickaxes: Dig cracky
--
minetest.register_tool("tools:pick_steel", {
description = S("Iron Pickaxe"),
inventory_image = "tools_ironpick.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=90, maxlevel=0}
},
},
})

16
mods/tools/shears.lua Normal file
View File

@ -0,0 +1,16 @@
S = ...
--
-- Shears (dig snappy)
--
minetest.register_tool("tools:shears_steel", {
description = S("Iron Shears"),
inventory_image = "tools_ironshears.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
snappy={times={[1]=1.00, [2]=0.50, [3]=0.25}, uses=90, maxlevel=0},
},
},
})

20
mods/tools/shovels.lua Normal file
View File

@ -0,0 +1,20 @@
S = ...
--
-- Shovels (dig crumbly)
--
minetest.register_tool("tools:shovel_steel", {
description = S("Iron Shovel"),
inventory_image = "tools_ironshovel.png",
tool_capabilities = {
max_drop_level=1,
groupcaps={
crumbly={times={[1]=1.00, [2]=0.70, [3]=0.60}, uses=90, maxlevel=0}
},
},
})

49
mods/tools/swords.lua Normal file
View File

@ -0,0 +1,49 @@
S = ...
--
-- Swords (deal damage)
--
minetest.register_tool("tools:sword_steel", {
description = S("Iron Sword"),
inventory_image = "tools_ironsword.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=1,
damage_groups = {fleshy=6},
}
})
-- Fire/Ice sword: Deal damage to non-fleshy damage groups
minetest.register_tool("tools:sword_fire", {
description = S("Fire Sword"),
inventory_image = "tools_firesword.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=0,
damage_groups = {icy=6},
}
})
minetest.register_tool("tools:sword_ice", {
description = S("Ice Sword"),
inventory_image = "tools_icesword.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=0,
damage_groups = {fiery=6},
}
})
--
-- Dagger: Low damage, fast punch interval
--
minetest.register_tool("tools:dagger_steel", {
description = S("Iron Dagger"),
inventory_image = "tools_irondagger.png",
tool_capabilities = {
full_punch_interval = 0.5,
max_drop_level=0,
damage_groups = {fleshy=2},
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

View File

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

View File

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

View File

Before

Width:  |  Height:  |  Size: 614 B

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

View File

@ -8,18 +8,25 @@ function treez.register_tree(name, def)
--Fruit
if def.fruit then
local fruit_name = "treez:"..def.fruit.name
local inventory_image
if def.fruit.inv_img then
inventory_image = "treez_"..def.fruit.name.."_inv.png"
else
inventory_image = "treez_"..def.fruit.name..".png"
end
minetest.register_node(fruit_name, {
description = S(def.fruit.description),
drawtype = "plantlike",
tiles = {"treez_"..def.fruit.name..".png"},
inventory_image = "treez_"..def.fruit.name.."_inv.png",
inventory_image = inventory_image,
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
fixed = def.fruit.selection_box
},
groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
leafdecay = 3, leafdecay_drop = 1},
@ -52,6 +59,26 @@ function treez.register_tree(name, def)
end
end,
})
if def.fruit.craft then
local craft_fruit_name = "treez:"..def.fruit.craft.name
minetest.register_craftitem(craft_fruit_name, {
description = S(def.fruit.craft.description),
inventory_image = "treez_"..def.fruit.craft.name..".png",
groups = {fleshy = 3, flammable = 2, food = 1},
on_use = function(itemstack, user, pointed_thing)
eat.item_eat(itemstack, user, craft_fruit_name, def.fruit.craft.hp, def.fruit.craft.hunger)
return itemstack
end,
})
minetest.register_craft({
output = craft_fruit_name,
type = "shapeless",
recipe = {fruit_name},
})
end
end
--Sapling

View File

@ -7,4 +7,7 @@ Apple=Manzana
Apple Tree=de manzano
Cherries=Cerezas
Cherry Tree=de cerezo
Stick=Palo de madera
Chestnut=Castaña
Chestnut Burr=Erizo de castaña
Chestnut Tree=de castaño
Stick=Palo

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 B

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

View File

@ -5,7 +5,9 @@ treez.register_tree("apple_tree", {
name = "apple",
description = "Apple",
hp = 2,
hunger = 1.5
hunger = 1.5,
inv_img = true,
selection_box = {-3/16, -6/16, -3/16, 3/16, 8/16, 3/16}
},
deco = {
biomes = {"forest"},
@ -29,6 +31,8 @@ treez.register_tree("cherry_tree", {
description = "Cherries",
hp = 1.5,
hunger = 1,
inv_img = true,
selection_box = {-3/16, -1/16, -3/16, 3/16, 8/16, 3/16}
},
deco = {
biomes = {"forest"},
@ -43,3 +47,34 @@ treez.register_tree("cherry_tree", {
},
}
})
--Oak Tree
treez.register_tree("chestnut_tree", {
description = "Chestnut Tree",
fruit = {
name = "chestnut_burr",
description = "Chestnut Burr",
hp = -2,
hunger = 0,
inv_img = true,
selection_box = {-3/16, -3/16, -3/16, 3/16, 8/16, 3/16},
craft = {
name= "chestnut",
description = "Chestnut",
hp = 2,
hunger = 3
}
},
deco = {
biomes = {"forest"},
place_on = "nodez:dirt_with_grass",
noise_params = {
offset = -0.005,
scale = 0.008,
spread = {x = 250, y = 250, z = 250},
seed = 6702,
octaves = 3,
persist = 0.66
},
}
})