Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
226ccd07b7 |
29
.gitignore
vendored
Normal file → Executable file
@ -1,9 +1,22 @@
|
|||||||
## Generic ignorable patterns and files
|
|
||||||
*~
|
|
||||||
.*.swp
|
|
||||||
*bak*
|
|
||||||
tags
|
|
||||||
*.vim
|
|
||||||
|
|
||||||
## Files related to minetest development cycle
|
## Files related to minetest development cycle
|
||||||
*.patch
|
/*.patch
|
||||||
|
# GNU Patch reject file
|
||||||
|
*.rej
|
||||||
|
|
||||||
|
## Editors and Development environments
|
||||||
|
*~
|
||||||
|
*.swp
|
||||||
|
*.bak*
|
||||||
|
*.orig
|
||||||
|
# Vim
|
||||||
|
*.vim
|
||||||
|
# Kate
|
||||||
|
.*.kate-swp
|
||||||
|
.swp.*
|
||||||
|
# Eclipse (LDT)
|
||||||
|
.project
|
||||||
|
.settings/
|
||||||
|
.buildpath
|
||||||
|
.metadata
|
||||||
|
# Idea IDE
|
||||||
|
.idea/*
|
||||||
|
23
README.txt
Normal file → Executable file
@ -1,22 +1,23 @@
|
|||||||
The main game for the Minetest game engine [minetest_game]
|
Minetest Game [minetest_game]
|
||||||
==========================================================
|
=============================
|
||||||
|
The main subgame for the Minetest engine
|
||||||
|
========================================
|
||||||
|
|
||||||
To use this game with Minetest, insert this repository as
|
To use this subgame with the Minetest engine, insert this repository as
|
||||||
/games/minetest_game
|
/games/minetest_game
|
||||||
in the Minetest Engine.
|
|
||||||
|
|
||||||
The Minetest Engine can be found in:
|
The Minetest engine can be found in:
|
||||||
https://github.com/minetest/minetest/
|
https://github.com/minetest/minetest/
|
||||||
|
|
||||||
Compatibility
|
Compatibility
|
||||||
--------------
|
--------------
|
||||||
The minetest_game github master HEAD is generally compatible with the github
|
The Minetest Game github master HEAD is generally compatible with the github
|
||||||
master HEAD of minetest.
|
master HEAD of the Minetest engine.
|
||||||
|
|
||||||
Additionally, when the minetest engine is tagged to be a certain version (eg.
|
Additionally, when the Minetest engine is tagged to be a certain version (eg.
|
||||||
0.4.10), minetest_game is tagged with the version too.
|
0.4.10), Minetest Game is tagged with the version too.
|
||||||
|
|
||||||
When stable releases are made, minetest_game is packaged and made available in
|
When stable releases are made, Minetest Game is packaged and made available in
|
||||||
http://minetest.net/download
|
http://minetest.net/download
|
||||||
and in case the repository has grown too much, it may be reset. In that sense,
|
and in case the repository has grown too much, it may be reset. In that sense,
|
||||||
this is not a "real" git repository. (Package maintainers please note!)
|
this is not a "real" git repository. (Package maintainers please note!)
|
||||||
@ -49,4 +50,4 @@ Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
|||||||
http://creativecommons.org/licenses/by-sa/3.0/
|
http://creativecommons.org/licenses/by-sa/3.0/
|
||||||
|
|
||||||
License of menu/header.png
|
License of menu/header.png
|
||||||
Copyright (C) 2013 BlockMen CC BY-3.0
|
Copyright (C) 2015 paramat CC BY-SA 3.0
|
||||||
|
2
game.conf
Normal file → Executable file
@ -1 +1 @@
|
|||||||
name = Minetest
|
name = MinetestForFun Game
|
||||||
|
696
game_api.txt
Normal file → Executable file
@ -1,126 +1,199 @@
|
|||||||
minetest_game API
|
Minetest Game API
|
||||||
======================
|
=================
|
||||||
GitHub Repo: https://github.com/minetest/minetest_game
|
GitHub Repo: https://github.com/minetest/minetest_game
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
The minetest_game gamemode offers multiple new possibilities in addition to Minetest's built-in API, allowing you to
|
|
||||||
add new plants to farming mod, buckets for new liquids, new stairs and custom panes.
|
The Minetest Game subgame offers multiple new possibilities in addition to the Minetest engine's built-in API,
|
||||||
|
allowing you to add new plants to farming mod, buckets for new liquids, new stairs and custom panes.
|
||||||
For information on the Minetest API, visit https://github.com/minetest/minetest/blob/master/doc/lua_api.txt
|
For information on the Minetest API, visit https://github.com/minetest/minetest/blob/master/doc/lua_api.txt
|
||||||
Please note:
|
Please note:
|
||||||
[XYZ] refers to a section the Minetest API
|
|
||||||
[#ABC] refers to a section in this document
|
* [XYZ] refers to a section the Minetest API
|
||||||
^ Explanation for line above
|
* [#ABC] refers to a section in this document
|
||||||
|
* [pos] refers to a position table `{x = -5, y = 0, z = 200}`
|
||||||
|
|
||||||
Bucket API
|
Bucket API
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The bucket API allows registering new types of buckets for non-default liquids.
|
The bucket API allows registering new types of buckets for non-default liquids.
|
||||||
|
|
||||||
bucket.register_liquid(
|
bucket.register_liquid(
|
||||||
"default:lava_source", -- Source node name
|
"default:lava_source", -- name of the source node
|
||||||
"default:lava_flowing", -- Flowing node name
|
"default:lava_flowing", -- name of the flowing node
|
||||||
"bucket:bucket_lava", -- Name to be used for bucket
|
"bucket:bucket_lava", -- name of the new bucket item (or nil if liquid is not takeable)
|
||||||
"bucket_lava.png", -- Bucket texture (for wielditem and inventory_image)
|
"bucket_lava.png", -- texture of the new bucket item (ignored if itemname == nil)
|
||||||
"Lava Bucket" -- Bucket description
|
"Lava Bucket", -- text description of the bucket item
|
||||||
|
{lava_bucket = 1}, -- groups of the bucket item, OPTIONAL
|
||||||
|
false -- force-renew, OPTIONAL. 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.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
The filled bucket item is returned to the player that uses an empty bucket pointing to the given liquid source.
|
||||||
|
When punching with an empty bucket pointing to an entity or a non-liquid node, the on_punch of the entity or node will be triggered.
|
||||||
|
|
||||||
Beds API
|
Beds API
|
||||||
--------
|
--------
|
||||||
|
|
||||||
beds.register_bed(
|
beds.register_bed(
|
||||||
"beds:bed", -- Bed name
|
"beds:bed", -- Bed name
|
||||||
def: See [#Bed definition] -- Bed definition
|
def -- See [#Bed definition]
|
||||||
)
|
)
|
||||||
|
|
||||||
beds.read_spawns() -- returns a table containing players respawn positions
|
* `beds.read_spawns() ` Returns a table containing players respawn positions
|
||||||
beds.kick_players() -- forces all players to leave bed
|
* `beds.kick_players()` Forces all players to leave bed
|
||||||
beds.skip_night() -- sets world time to morning and saves respawn position of all players currently sleeping
|
* `beds.skip_night()` Sets world time to morning and saves respawn position of all players currently sleeping
|
||||||
|
|
||||||
|
### Bed definition
|
||||||
|
|
||||||
#Bed definition
|
|
||||||
---------------
|
|
||||||
{
|
{
|
||||||
description = "Simple Bed",
|
description = "Simple Bed",
|
||||||
inventory_image = "beds_bed.png",
|
inventory_image = "beds_bed.png",
|
||||||
wield_image = "beds_bed.png",
|
wield_image = "beds_bed.png",
|
||||||
tiles = {
|
tiles = {
|
||||||
bottom = {[Tile definition],
|
bottom = {'Tile definition'}, -- the tiles of the bottom part of the bed.
|
||||||
^ the tiles of the bottom part of the bed
|
top = {Tile definition} -- the tiles of the bottom part of the bed.
|
||||||
},
|
|
||||||
top = {[Tile definition],
|
|
||||||
^ the tiles of the bottom part of the bed
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
nodebox = {
|
nodebox = {
|
||||||
bottom = regular nodebox, see [Node boxes], -- bottm part of bed
|
bottom = 'regular nodebox', -- bottom part of bed (see [Node boxes])
|
||||||
top = regular nodebox, see [Node boxes], -- top part of bed
|
top = 'regular nodebox', -- top part of bed (see [Node boxes])
|
||||||
},
|
},
|
||||||
selectionbox = regular nodebox, see [Node boxes], -- for both nodeboxes
|
selectionbox = 'regular nodebox', -- for both nodeboxes (see [Node boxes])
|
||||||
recipe = { -- Craft recipe
|
recipe = { -- Craft recipe
|
||||||
{"group:wool", "group:wool", "group:wool"},
|
{"group:wool", "group:wool", "group:wool"},
|
||||||
{"group:wood", "group:wood", "group:wood"}
|
{"group:wood", "group:wood", "group:wood"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Creative API
|
||||||
|
------------
|
||||||
|
|
||||||
|
A global string called `creative.formspec_add` was added which allows mods to add additional formspec elements onto the default creative inventory formspec to be drawn after each update.
|
||||||
|
|
||||||
Doors API
|
Doors API
|
||||||
---------
|
---------
|
||||||
|
|
||||||
The doors mod allows modders to register custom doors and trapdoors.
|
The doors mod allows modders to register custom doors and trapdoors.
|
||||||
|
|
||||||
doors.register_door(name, def)
|
`doors.register_door(name, def)`
|
||||||
^ name: "Door name"
|
|
||||||
^ def: See [#Door definition]
|
|
||||||
-> Registers new door
|
|
||||||
|
|
||||||
doors.register_trapdoor(name, def)
|
* Registers new door
|
||||||
^ name: "Trapdoor name"
|
* `name` Name for door
|
||||||
^ def: See [#Trapdoor definition]
|
* `def` See [#Door definition]
|
||||||
-> Registers new trapdoor
|
|
||||||
|
`doors.register_trapdoor(name, def)`
|
||||||
|
|
||||||
|
* Registers new trapdoor
|
||||||
|
* `name` Name for trapdoor
|
||||||
|
* `def` See [#Trapdoor definition]
|
||||||
|
|
||||||
|
`doors.register_fencegate(name, def)`
|
||||||
|
|
||||||
|
* Registers new fence gate
|
||||||
|
* `name` Name for fence gate
|
||||||
|
* `def` See [#Fence gate definition]
|
||||||
|
|
||||||
|
`doors.get(pos)`
|
||||||
|
|
||||||
|
* `pos` A position as a table, e.g `{x = 1, y = 1, z = 1}`
|
||||||
|
* Returns an ObjectRef to a door, or nil if the position does not contain a door
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
|
||||||
|
:open(player) -- Open the door object, returns if door was opened
|
||||||
|
:close(player) -- Close the door object, returns if door was closed
|
||||||
|
:toggle(player) -- Toggle the door state, returns if state was toggled
|
||||||
|
:state() -- returns the door state, true = open, false = closed
|
||||||
|
|
||||||
|
the "player" parameter can be omitted in all methods. If passed then
|
||||||
|
the usual permission checks will be performed to make sure the player
|
||||||
|
has the permissions needed to open this door. If omitted then no
|
||||||
|
permission checks are performed.
|
||||||
|
|
||||||
|
### Door definition
|
||||||
|
|
||||||
#Door definition
|
|
||||||
----------------
|
|
||||||
{
|
|
||||||
description = "Door description",
|
description = "Door description",
|
||||||
inventory_image = "mod_door_inv.png",
|
inventory_image = "mod_door_inv.png",
|
||||||
groups = {group = 1},
|
groups = {choppy = 2},
|
||||||
tiles_bottom: [Tile definition],
|
tiles = {"mod_door.png"}, -- UV map.
|
||||||
^ the tiles of the bottom part of the door {front, side}
|
recipe = craftrecipe,
|
||||||
tiles_top: [Tile definition],
|
sounds = default.node_sound_wood_defaults(), -- optional
|
||||||
^ the tiles of the bottom part of the door {front, side}
|
sound_open = sound play for open door, -- optional
|
||||||
node_box_bottom = regular nodebox, see [Node boxes], OPTIONAL,
|
sound_close = sound play for close door, -- optional
|
||||||
node_box_top = regular nodebox, see [Node boxes], OPTIONAL,
|
protected = false, -- If true, only placer can open the door (locked for others)
|
||||||
selection_box_bottom = regular nodebox, see [Node boxes], OPTIONAL,
|
|
||||||
selection_box_top = regular nodebox, see [Node boxes], OPTIONAL,
|
|
||||||
sound_open_door = sound play for open door, OPTIONAL,
|
|
||||||
sound_close_door = sound play for close door, OPTIONAL,
|
|
||||||
only_placer_can_open = true/false,
|
|
||||||
^ If true, only placer can open the door (locked for others)
|
|
||||||
}
|
|
||||||
|
|
||||||
#Trapdoor definition
|
### Trapdoor definition
|
||||||
----------------
|
|
||||||
{
|
description = "Trapdoor description",
|
||||||
tile_front = "doors_trapdoor.png",
|
inventory_image = "mod_trapdoor_inv.png",
|
||||||
^ the texture for the front and back of the trapdoor
|
groups = {choppy = 2},
|
||||||
tile_side: "doors_trapdoor_side.png",
|
tile_front = "doors_trapdoor.png", -- the texture for the front and back of the trapdoor
|
||||||
^ the tiles of the four side parts of the trapdoor
|
tile_side = "doors_trapdoor_side.png", -- the tiles of the four side parts of the trapdoor
|
||||||
sound_open = sound to play when opening the trapdoor, OPTIONAL,
|
sounds = default.node_sound_wood_defaults(), -- optional
|
||||||
sound_close = sound to play when closing the trapdoor, OPTIONAL,
|
sound_open = sound play for open door, -- optional
|
||||||
-> You can add any other node definition properties for minetest.register_node,
|
sound_close = sound play for close door, -- optional
|
||||||
such as wield_image, inventory_image, sounds, groups, description, ...
|
protected = false, -- If true, only placer can open the door (locked for others)
|
||||||
Only node_box, selection_box, tiles, drop, drawtype, paramtype, paramtype2, on_rightclick
|
|
||||||
will be overwritten by the trapdoor registration function
|
### Fence gate definition
|
||||||
}
|
|
||||||
|
description = "Wooden Fence Gate",
|
||||||
|
texture = "default_wood.png",
|
||||||
|
material = "default:wood",
|
||||||
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||||
|
sounds = default.node_sound_wood_defaults(), -- optional
|
||||||
|
|
||||||
|
Fence API
|
||||||
|
---------
|
||||||
|
|
||||||
|
Allows creation of new fences with "fencelike" drawtype.
|
||||||
|
|
||||||
|
`default.register_fence(name, item definition)`
|
||||||
|
|
||||||
|
Registers a new fence. Custom fields texture and material are required, as
|
||||||
|
are name and description. The rest is optional. You can pass most normal
|
||||||
|
nodedef fields here except drawtype. The fence group will always be added
|
||||||
|
for this node.
|
||||||
|
|
||||||
|
### fence definition
|
||||||
|
|
||||||
|
name = "default:fence_wood",
|
||||||
|
description = "Wooden Fence",
|
||||||
|
texture = "default_wood.png",
|
||||||
|
material = "default:wood",
|
||||||
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
|
Walls API
|
||||||
|
---------
|
||||||
|
|
||||||
|
The walls API allows easy addition of stone auto-connecting wall nodes.
|
||||||
|
|
||||||
|
walls.register(name, desc, texture, mat, sounds)
|
||||||
|
^ name = "walls:stone_wall". Node name.
|
||||||
|
^ desc = "A Stone wall"
|
||||||
|
^ texture = "default_stone.png"
|
||||||
|
^ mat = "default:stone". Used to auto-generate crafting recipe.
|
||||||
|
^ sounds = sounds: see [#Default sounds]
|
||||||
|
|
||||||
Farming API
|
Farming API
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The farming API allows you to easily register plants and hoes.
|
The farming API allows you to easily register plants and hoes.
|
||||||
|
|
||||||
farming.register_hoe(name, hoe definition)
|
`farming.register_hoe(name, hoe definition)`
|
||||||
-> Register a new hoe, see [#hoe definition]
|
* Register a new hoe, see [#hoe definition]
|
||||||
|
|
||||||
|
`farming.register_plant(name, Plant definition)`
|
||||||
|
* Register a new growing plant, see [#Plant definition]
|
||||||
|
|
||||||
|
`farming.registered_plants[name] = definition`
|
||||||
|
* Table of registered plants, indexed by plant name
|
||||||
|
|
||||||
|
### Hoe Definition
|
||||||
|
|
||||||
farming.register_plant(name, Plant definition)
|
|
||||||
-> Register a new growing plant, see [#Plant definition]
|
|
||||||
|
|
||||||
#Hoe Definition
|
|
||||||
---------------
|
|
||||||
{
|
{
|
||||||
description = "", -- Description for tooltip
|
description = "", -- Description for tooltip
|
||||||
inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image
|
inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image
|
||||||
@ -133,90 +206,252 @@ farming.register_plant(name, Plant definition)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Plant definition
|
### Plant definition
|
||||||
-----------------
|
|
||||||
{
|
{
|
||||||
description = "", -- Description of seed item
|
description = "", -- Description of seed item
|
||||||
inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image
|
inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image
|
||||||
steps = 8, -- How many steps the plant has to grow, until it can be harvested
|
steps = 8, -- How many steps the plant has to grow, until it can be harvested
|
||||||
^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber)
|
-- ^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber)
|
||||||
minlight = 13, -- Minimum light to grow
|
minlight = 13, -- Minimum light to grow
|
||||||
maxlight = default.LIGHT_MAX -- Maximum light to grow
|
maxlight = default.LIGHT_MAX -- Maximum light to grow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Fire API
|
||||||
|
--------
|
||||||
|
|
||||||
|
New node def property:
|
||||||
|
|
||||||
|
`on_burn(pos)`
|
||||||
|
|
||||||
|
* Called when fire attempts to remove a burning node.
|
||||||
|
* `pos` Position of the burning node.
|
||||||
|
|
||||||
|
`on_ignite(pos, igniter)`
|
||||||
|
|
||||||
|
* Called when Flint and steel (or a mod defined ignitor) is used on a node.
|
||||||
|
Defining it may prevent the default action (spawning flames) from triggering.
|
||||||
|
* `pos` Position of the ignited node.
|
||||||
|
* `igniter` Player that used the tool, when available.
|
||||||
|
|
||||||
|
|
||||||
|
Give Initial Stuff API
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
`give_initial_stuff.give(player)`
|
||||||
|
|
||||||
|
^ Give initial stuff to "player"
|
||||||
|
|
||||||
|
`give_initial_stuff.add(stack)`
|
||||||
|
|
||||||
|
^ Add item to the initial stuff
|
||||||
|
^ Stack can be an ItemStack or a item name eg: "default:dirt 99"
|
||||||
|
^ Can be called after the game has loaded
|
||||||
|
|
||||||
|
`give_initial_stuff.clear()`
|
||||||
|
|
||||||
|
^ Removes all items from the initial stuff
|
||||||
|
^ Can be called after the game has loaded
|
||||||
|
|
||||||
|
`give_initial_stuff.get_list()`
|
||||||
|
|
||||||
|
^ returns list of item stacks
|
||||||
|
|
||||||
|
`give_initial_stuff.set_list(list)`
|
||||||
|
|
||||||
|
^ List of initial items with numeric indices.
|
||||||
|
|
||||||
|
`give_initial_stuff.add_from_csv(str)`
|
||||||
|
|
||||||
|
^ str is a comma separated list of initial stuff
|
||||||
|
^ Adds items to the list of items to be given
|
||||||
|
|
||||||
|
Nyancat API
|
||||||
|
-----------
|
||||||
|
|
||||||
|
`nyancat.place(pos, facedir, length)`
|
||||||
|
|
||||||
|
^ Place a cat at `pos` facing `facedir` with tail length `length`
|
||||||
|
Only accepts facedir 0-3, if facedir > 3 then it will be interpreted as facedir = 0
|
||||||
|
|
||||||
|
`nyancat.generate(minp, maxp, seed)`
|
||||||
|
|
||||||
|
^ Called by `minetest.register_on_generated`. To disable nyancat generation,
|
||||||
|
you can redefine nyancat.generate() to be an empty function
|
||||||
|
|
||||||
|
TNT API
|
||||||
|
----------
|
||||||
|
|
||||||
|
`tnt.register_tnt(definition)`
|
||||||
|
|
||||||
|
^ Register a new type of tnt.
|
||||||
|
|
||||||
|
* `name` The name of the node. If no prefix is given `tnt` is used.
|
||||||
|
* `description` A description for your TNT.
|
||||||
|
* `radius` The radius within which the TNT can destroy nodes. The default is 3.
|
||||||
|
* `damage_radius` The radius within which the TNT can damage players and mobs. By default it is twice the `radius`.
|
||||||
|
* `disable_drops` Disable drops. By default it is set to false.
|
||||||
|
* `ignore_protection` Don't check `minetest.is_protected` before removing a node.
|
||||||
|
* `ignore_on_blast` Don't call `on_blast` even if a node has one.
|
||||||
|
* `tiles` Textures for node
|
||||||
|
* `side` Side tiles. By default the name of the tnt with a suffix of `_side.png`.
|
||||||
|
* `top` Top tile. By default the name of the tnt with a suffix of `_top.png`.
|
||||||
|
* `bottom` Bottom tile. By default the name of the tnt with a suffix of `_bottom.png`.
|
||||||
|
* `burning` Top tile when lit. By default the name of the tnt with a suffix of `_top_burning_animated.png".
|
||||||
|
|
||||||
|
`tnt.boom(position, definition)`
|
||||||
|
|
||||||
|
^ Create an explosion.
|
||||||
|
|
||||||
|
* `position` The center of explosion.
|
||||||
|
* `definition` The TNT definion as passed to `tnt.register`
|
||||||
|
|
||||||
|
`tnt.burn(position, [nodename])`
|
||||||
|
|
||||||
|
^ Ignite TNT at position, nodename isn't required unless already known.
|
||||||
|
|
||||||
|
|
||||||
|
To make dropping items from node inventories easier, you can use the
|
||||||
|
following helper function from 'default':
|
||||||
|
|
||||||
|
default.get_inventory_drops(pos, inventory, drops)
|
||||||
|
|
||||||
|
^ Return drops from node inventory "inventory" in drops.
|
||||||
|
|
||||||
|
* `pos` - the node position
|
||||||
|
* `inventory` - the name of the inventory (string)
|
||||||
|
* `drops` - an initialized list
|
||||||
|
|
||||||
|
The function returns no values. The drops are returned in the `drops`
|
||||||
|
parameter, and drops is not reinitialized so you can call it several
|
||||||
|
times in a row to add more inventory items to it.
|
||||||
|
|
||||||
|
|
||||||
|
`on_blast` callbacks:
|
||||||
|
|
||||||
|
Both nodedefs and entitydefs can provide an `on_blast()` callback
|
||||||
|
|
||||||
|
`nodedef.on_blast(pos, intensity)`
|
||||||
|
^ Allow drop and node removal overriding
|
||||||
|
* `pos` - node position
|
||||||
|
* `intensity` - TNT explosion measure. larger or equal to 1.0
|
||||||
|
^ Should return a list of drops (e.g. {"default:stone"})
|
||||||
|
^ Should perform node removal itself. If callback exists in the nodedef
|
||||||
|
^ then the TNT code will not destroy this node.
|
||||||
|
|
||||||
|
`entitydef.on_blast(luaobj, damage)`
|
||||||
|
^ Allow TNT effects on entities to be overridden
|
||||||
|
* `luaobj` - LuaEntityRef of the entity
|
||||||
|
* `damage` - suggested HP damage value
|
||||||
|
^ Should return a list of (bool do_damage, bool do_knockback, table drops)
|
||||||
|
* `do_damage` - if true then TNT mod wil damage the entity
|
||||||
|
* `do_knockback` - if true then TNT mod will knock the entity away
|
||||||
|
* `drops` - a list of drops, e.g. {"wool:red"}
|
||||||
|
|
||||||
|
|
||||||
Screwdriver API
|
Screwdriver API
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
The screwdriver API allows you to control a node's behaviour when a screwdriver is used on it.
|
The screwdriver API allows you to control a node's behaviour when a screwdriver is used on it.
|
||||||
To use it, add the on_screwdriver function to the node definition.
|
To use it, add the `on_screwdriver` function to the node definition.
|
||||||
on_rotate(pos, node, user, mode, new_param2)
|
|
||||||
^ pos: position of the node that the screwdriver is being used on
|
`on_rotate(pos, node, user, mode, new_param2)`
|
||||||
^ node: that node
|
|
||||||
^ user: the player who used the screwdriver
|
* `pos` Position of the node that the screwdriver is being used on
|
||||||
^ mode: screwdriver.ROTATE_FACE or screwdriver.ROTATE_AXIS
|
* `node` that node
|
||||||
^ new_param2: the new value of param2 that would have been set if on_rotate wasn't there
|
* `user` The player who used the screwdriver
|
||||||
^ return value: false to disallow rotation, nil to keep default behaviour, true to allow
|
* `mode` screwdriver.ROTATE_FACE or screwdriver.ROTATE_AXIS
|
||||||
|
* `new_param2` the new value of param2 that would have been set if on_rotate wasn't there
|
||||||
|
* return value: false to disallow rotation, nil to keep default behaviour, true to allow
|
||||||
it but to indicate that changed have already been made (so the screwdriver will wear out)
|
it but to indicate that changed have already been made (so the screwdriver will wear out)
|
||||||
^ use on_rotate = screwdriver.disallow to always disallow rotation
|
* use `on_rotate = false` to always disallow rotation
|
||||||
^ use on_rotate = screwdriver.rotate_simple to allow only face rotation
|
* use `on_rotate = screwdriver.rotate_simple` to allow only face rotation
|
||||||
|
|
||||||
|
|
||||||
|
Sethome API
|
||||||
|
-----------
|
||||||
|
|
||||||
|
The sethome API adds three global functions to allow mods to read a players home position,
|
||||||
|
set a players home position and teleport a player to home position.
|
||||||
|
|
||||||
|
`sethome.get(name)`
|
||||||
|
|
||||||
|
* `name` Player who's home position you wish to get
|
||||||
|
* return value: false if no player home coords exist, position table if true
|
||||||
|
|
||||||
|
`sethome.set(name, pos)`
|
||||||
|
|
||||||
|
* `name` Player who's home position you wish to set
|
||||||
|
* `pos` Position table containing coords of home position
|
||||||
|
* return value: false if unable to set and save new home position, otherwise true
|
||||||
|
|
||||||
|
`sethome.go(name)`
|
||||||
|
|
||||||
|
* `name` Player you wish to teleport to their home position
|
||||||
|
* return value: false if player cannot be sent home, otherwise true
|
||||||
|
|
||||||
|
|
||||||
Stairs API
|
Stairs API
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The stairs API lets you register stairs and slabs and ensures that they are registered the same way as those
|
The stairs API lets you register stairs and slabs and ensures that they are registered the same way as those
|
||||||
delivered with minetest_game, to keep them compatible with other mods.
|
delivered with Minetest Game, to keep them compatible with other mods.
|
||||||
|
|
||||||
stairs.register_stair(subname, recipeitem, groups, images, description, sounds)
|
`stairs.register_stair(subname, recipeitem, groups, images, description, sounds)`
|
||||||
-> Registers a stair.
|
|
||||||
-> subname: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname"
|
|
||||||
-> recipeitem: Item used in the craft recipe, e.g. "default:cobble"
|
|
||||||
-> groups: see [Known damage and digging time defining groups]
|
|
||||||
-> images: see [Tile definition]
|
|
||||||
-> description: used for the description field in the stair's definition
|
|
||||||
-> sounds: see [#Default sounds]
|
|
||||||
|
|
||||||
stairs.register_slab(subname, recipeitem, groups, images, description, sounds)
|
* Registers a stair.
|
||||||
-> Registers a slabs
|
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname"
|
||||||
-> subname: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname"
|
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
|
||||||
-> recipeitem: Item used in the craft recipe, e.g. "default:cobble"
|
* `groups`: see [Known damage and digging time defining groups]
|
||||||
-> groups: see [Known damage and digging time defining groups]
|
* `images`: see [Tile definition]
|
||||||
-> images: see [Tile definition]
|
* `description`: used for the description field in the stair's definition
|
||||||
-> description: used for the description field in the stair's definition
|
* `sounds`: see [#Default sounds]
|
||||||
-> sounds: see [#Default sounds]
|
|
||||||
|
|
||||||
stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds)
|
`stairs.register_slab(subname, recipeitem, groups, images, description, sounds)`
|
||||||
-> A wrapper for stairs.register_stair and stairs.register_slab
|
|
||||||
-> Uses almost the same arguments as stairs.register_stair
|
* Registers a slabs
|
||||||
-> desc_stair: Description for stair node
|
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname"
|
||||||
-> desc_slab: Description for slab node
|
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble"
|
||||||
|
* `groups`: see [Known damage and digging time defining groups]
|
||||||
|
* `images`: see [Tile definition]
|
||||||
|
* `description`: used for the description field in the stair's definition
|
||||||
|
* `sounds`: see [#Default sounds]
|
||||||
|
|
||||||
|
`stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds)`
|
||||||
|
|
||||||
|
* A wrapper for stairs.register_stair and stairs.register_slab
|
||||||
|
* Uses almost the same arguments as stairs.register_stair
|
||||||
|
* `desc_stair`: Description for stair node
|
||||||
|
* `desc_slab`: Description for slab node
|
||||||
|
|
||||||
Xpanes API
|
Xpanes API
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Creates panes that automatically connect to each other
|
Creates panes that automatically connect to each other
|
||||||
|
|
||||||
xpanes.register_pane(subname, def)
|
`xpanes.register_pane(subname, def)`
|
||||||
-> subname: used for nodename. Result: "xpanes:subname" and "xpanes:subname_{2..15}"
|
|
||||||
-> def: See [#Pane definition]
|
* `subname`: used for nodename. Result: "xpanes:subname" and "xpanes:subname_{2..15}"
|
||||||
|
* `def`: See [#Pane definition]
|
||||||
|
|
||||||
|
### Pane definition
|
||||||
|
|
||||||
#Pane definition
|
|
||||||
----------------
|
|
||||||
{
|
{
|
||||||
textures = {"texture_Bottom_top", "texture_left_right", "texture_front_back"},
|
textures = {"texture for sides", (unused), "texture for top and bottom"}, -- More tiles aren't supported
|
||||||
^ More tiles aren't supported
|
groups = {group = rating}, -- Uses the known node groups, see [Known damage and digging time defining groups]
|
||||||
groups = {group = rating},
|
sounds = SoundSpec, -- See [#Default sounds]
|
||||||
^ Uses the known node groups, see [Known damage and digging time defining groups]
|
recipe = {{"","","","","","","","",""}}, -- Recipe field only
|
||||||
sounds = SoundSpec,
|
|
||||||
^ See [#Default sounds]
|
|
||||||
recipe = {{"","","","","","","","",""}},
|
|
||||||
^ Recipe field only
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Raillike definitions
|
Raillike definitions
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
The following nodes use the group `connect_to_raillike` and will only connect to
|
The following nodes use the group `connect_to_raillike` and will only connect to
|
||||||
raillike nodes within this group and the same group value.
|
raillike nodes within this group and the same group value.
|
||||||
Use `minetest.raillike_group(<Name>)` to get the group value.
|
Use `minetest.raillike_group(<Name>)` to get the group value.
|
||||||
|
|
||||||
| Node type | Raillike group name
|
| Node type | Raillike group name
|
||||||
+-----------------------+----------------------------------
|
|-----------------------|---------------------
|
||||||
| default:rail | "rail"
|
| default:rail | "rail"
|
||||||
| tnt:gunpowder | "gunpowder"
|
| tnt:gunpowder | "gunpowder"
|
||||||
| tnt:gunpowder_burning | "gunpowder"
|
| tnt:gunpowder_burning | "gunpowder"
|
||||||
@ -229,156 +464,189 @@ of your node.
|
|||||||
|
|
||||||
Default sounds
|
Default sounds
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Sounds inside the default table can be used within the sounds field of node definitions.
|
Sounds inside the default table can be used within the sounds field of node definitions.
|
||||||
|
|
||||||
default.node_sound_defaults()
|
* `default.node_sound_defaults()`
|
||||||
default.node_sound_stone_defaults()
|
* `default.node_sound_stone_defaults()`
|
||||||
default.node_sound_dirt_defaults()
|
* `default.node_sound_dirt_defaults()`
|
||||||
default.node_sound_sand_defaults()
|
* `default.node_sound_sand_defaults()`
|
||||||
default.node_sound_wood_defaults()
|
* `default.node_sound_wood_defaults()`
|
||||||
default.node_sound_leaves_defaults()
|
* `default.node_sound_leaves_defaults()`
|
||||||
default.node_sound_glass_defaults()
|
* `default.node_sound_glass_defaults()`
|
||||||
|
* `default.node_sound_metal_defaults()`
|
||||||
|
|
||||||
Default constants
|
Default constants
|
||||||
-----------------
|
-----------------
|
||||||
default.LIGHT_MAX
|
|
||||||
^ The maximum light level (see [Node definition] light_source)
|
`default.LIGHT_MAX` The maximum light level (see [Node definition] light_source)
|
||||||
|
|
||||||
Player API
|
Player API
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The player API can register player models and update the player's appearence
|
The player API can register player models and update the player's appearence
|
||||||
|
|
||||||
default.player_register_model(name, def)
|
`default.player_register_model(name, def)`
|
||||||
^ Register a new model to be used by players.
|
|
||||||
-> name: model filename such as "character.x", "foo.b3d", etc.
|
|
||||||
-> def: See [#Model definition]
|
|
||||||
|
|
||||||
default.registered_player_models[name]
|
* Register a new model to be used by players.
|
||||||
^ Get a model's definition
|
* name: model filename such as "character.x", "foo.b3d", etc.
|
||||||
-> see [#Model definition]
|
* def: See [#Model definition]
|
||||||
|
|
||||||
default.player_set_model(player, model_name)
|
`default.registered_player_models[name]`
|
||||||
^ Change a player's model
|
|
||||||
-> player: PlayerRef
|
|
||||||
-> model_name: model registered with player_register_model()
|
|
||||||
|
|
||||||
default.player_set_animation(player, anim_name [, speed])
|
* Get a model's definition
|
||||||
^ Applies an animation to a player
|
* see [#Model definition]
|
||||||
-> anim_name: name of the animation.
|
|
||||||
-> speed: frames per second. If nil, default from the model is used
|
|
||||||
|
|
||||||
default.player_set_textures(player, textures)
|
`default.player_set_model(player, model_name)`
|
||||||
^ Sets player textures
|
|
||||||
-> player: PlayerRef
|
* Change a player's model
|
||||||
-> textures: array of textures
|
* `player`: PlayerRef
|
||||||
^ If <textures> is nil, the default textures from the model def are used
|
* `model_name`: model registered with player_register_model()
|
||||||
|
|
||||||
|
`default.player_set_animation(player, anim_name [, speed])`
|
||||||
|
|
||||||
|
* Applies an animation to a player
|
||||||
|
* anim_name: name of the animation.
|
||||||
|
* speed: frames per second. If nil, default from the model is used
|
||||||
|
|
||||||
|
`default.player_set_textures(player, textures)`
|
||||||
|
|
||||||
|
* Sets player textures
|
||||||
|
* `player`: PlayerRef
|
||||||
|
* `textures`: array of textures, If `textures` is nil, the default textures from the model def are used
|
||||||
|
|
||||||
default.player_get_animation(player)
|
default.player_get_animation(player)
|
||||||
^ Returns a table containing fields "model", "textures" and "animation".
|
|
||||||
^ Any of the fields of the returned table may be nil.
|
|
||||||
-> player: PlayerRef
|
|
||||||
|
|
||||||
Model Definition
|
* Returns a table containing fields `model`, `textures` and `animation`.
|
||||||
----------------
|
* Any of the fields of the returned table may be nil.
|
||||||
|
* player: PlayerRef
|
||||||
|
|
||||||
|
### Model Definition
|
||||||
|
|
||||||
{
|
{
|
||||||
animation_speed = 30, -- Default animation speed, in FPS.
|
animation_speed = 30, -- Default animation speed, in FPS.
|
||||||
textures = {"character.png", }, -- Default array of textures.
|
textures = {"character.png", }, -- Default array of textures.
|
||||||
visual_size = {x=1, y=1,}, -- Used to scale the model.
|
visual_size = {x = 1, y = 1}, -- Used to scale the model.
|
||||||
animations = {
|
animations = {
|
||||||
-- <anim_name> = { x=<start_frame>, y=<end_frame>, },
|
-- <anim_name> = {x = <start_frame>, y = <end_frame>},
|
||||||
foo = { x= 0, y=19, },
|
foo = {x = 0, y = 19},
|
||||||
bar = { x=20, y=39, },
|
bar = {x = 20, y = 39},
|
||||||
-- ...
|
-- ...
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
Leafdecay
|
Leafdecay
|
||||||
---------
|
---------
|
||||||
To enable leaf decay for a node, add it to the "leafdecay" group.
|
|
||||||
|
|
||||||
The rating of the group determines how far from a node in the group "tree"
|
To enable leaf decay for a node, add it to the `leafdecay` group.
|
||||||
|
|
||||||
|
The rating of the group determines how far from a node in the group `tree`
|
||||||
the node can be without decaying.
|
the node can be without decaying.
|
||||||
|
|
||||||
If param2 of the node is ~= 0, the node will always be preserved. Thus, if
|
If `param2` of the node is ~= 0, the node will always be preserved. Thus, if
|
||||||
the player places a node of that kind, you will want to set param2=1 or so.
|
the player places a node of that kind, you will want to set `param2 = 1` or so.
|
||||||
|
|
||||||
The function default.after_place_leaves can be set as after_place_node of a node
|
The function `default.after_place_leaves` can be set as `after_place_node of a node`
|
||||||
to set param2 to 1 if the player places the node (should not be used for nodes
|
to set param2 to 1 if the player places the node (should not be used for nodes
|
||||||
that use param2 otherwise (e.g. facedir)).
|
that use param2 otherwise (e.g. facedir)).
|
||||||
|
|
||||||
If the node is in the leafdecay_drop group then it will always be dropped as an
|
If the node is in the `leafdecay_drop` group then it will always be dropped as an
|
||||||
item.
|
item.
|
||||||
|
|
||||||
Dyes
|
Dyes
|
||||||
----
|
----
|
||||||
|
|
||||||
To make recipes that will work with any dye ever made by anybody, define
|
To make recipes that will work with any dye ever made by anybody, define
|
||||||
them based on groups. You can select any group of groups, based on your need for
|
them based on groups. You can select any group of groups, based on your need for
|
||||||
amount of colors.
|
amount of colors.
|
||||||
|
|
||||||
#Color groups
|
### Color groups
|
||||||
-------------
|
|
||||||
Base color groups:
|
|
||||||
- basecolor_white
|
|
||||||
- basecolor_grey
|
|
||||||
- basecolor_black
|
|
||||||
- basecolor_red
|
|
||||||
- basecolor_yellow
|
|
||||||
- basecolor_green
|
|
||||||
- basecolor_cyan
|
|
||||||
- basecolor_blue
|
|
||||||
- basecolor_magenta
|
|
||||||
|
|
||||||
Extended color groups (* = equal to a base color):
|
Base color groups:
|
||||||
* excolor_white
|
|
||||||
- excolor_lightgrey
|
* `basecolor_white`
|
||||||
* excolor_grey
|
* `basecolor_grey`
|
||||||
- excolor_darkgrey
|
* `basecolor_black`
|
||||||
* excolor_black
|
* `basecolor_red`
|
||||||
* excolor_red
|
* `basecolor_yellow`
|
||||||
- excolor_orange
|
* `basecolor_green`
|
||||||
* excolor_yellow
|
* `basecolor_cyan`
|
||||||
- excolor_lime
|
* `basecolor_blue`
|
||||||
* excolor_green
|
* `basecolor_magenta`
|
||||||
- excolor_aqua
|
|
||||||
* excolor_cyan
|
Extended color groups ( * means also base color )
|
||||||
- excolor_sky_blue
|
|
||||||
* excolor_blue
|
* `excolor_white` *
|
||||||
- excolor_violet
|
* `excolor_lightgrey`
|
||||||
* excolor_magenta
|
* `excolor_grey` *
|
||||||
- excolor_red_violet
|
* `excolor_darkgrey`
|
||||||
|
* `excolor_black` *
|
||||||
|
* `excolor_red` *
|
||||||
|
* `excolor_orange`
|
||||||
|
* `excolor_yellow` *
|
||||||
|
* `excolor_lime`
|
||||||
|
* `excolor_green` *
|
||||||
|
* `excolor_aqua`
|
||||||
|
* `excolor_cyan` *
|
||||||
|
* `excolor_sky_blue`
|
||||||
|
* `excolor_blue` *
|
||||||
|
* `excolor_violet`
|
||||||
|
* `excolor_magenta` *
|
||||||
|
* `excolor_red_violet`
|
||||||
|
|
||||||
The whole unifieddyes palette as groups:
|
The whole unifieddyes palette as groups:
|
||||||
- unicolor_<excolor>
|
|
||||||
|
* `unicolor_<excolor>`
|
||||||
|
|
||||||
For the following, no white/grey/black is allowed:
|
For the following, no white/grey/black is allowed:
|
||||||
- unicolor_medium_<excolor>
|
|
||||||
- unicolor_dark_<excolor>
|
* `unicolor_medium_<excolor>`
|
||||||
- unicolor_light_<excolor>
|
* `unicolor_dark_<excolor>`
|
||||||
- unicolor_<excolor>_s50
|
* `unicolor_light_<excolor>`
|
||||||
- unicolor_medium_<excolor>_s50
|
* `unicolor_<excolor>_s50`
|
||||||
- unicolor_dark_<excolor>_s50
|
* `unicolor_medium_<excolor>_s50`
|
||||||
|
* `unicolor_dark_<excolor>_s50`
|
||||||
|
|
||||||
Example of one shapeless recipe using a color group:
|
Example of one shapeless recipe using a color group:
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = '<mod>:item_yellow',
|
output = '<mod>:item_yellow',
|
||||||
recipe = {'<mod>:item_no_color', 'group:basecolor_yellow'},
|
recipe = {'<mod>:item_no_color', 'group:basecolor_yellow'},
|
||||||
})
|
})
|
||||||
|
|
||||||
#Color lists
|
### Color lists
|
||||||
------------
|
|
||||||
dye.basecolors
|
|
||||||
^ Array containing the names of available base colors
|
|
||||||
|
|
||||||
dye.excolors
|
* `dye.basecolors` are an array containing the names of available base colors
|
||||||
^ Array containing the names of the available extended colors
|
|
||||||
|
* `dye.excolors` are an array containing the names of the available extended colors
|
||||||
|
|
||||||
Trees
|
Trees
|
||||||
-----
|
-----
|
||||||
default.grow_tree(pos, is_apple_tree)
|
|
||||||
^ Grows a tree or apple tree at pos
|
|
||||||
|
|
||||||
default.grow_jungle_tree(pos)
|
* `default.grow_tree(pos, is_apple_tree)`
|
||||||
^ Grows a jungletree at pos
|
* Grows a mgv6 tree or apple tree at pos
|
||||||
|
|
||||||
default.grow_pine_tree(pos)
|
* `default.grow_jungle_tree(pos)`
|
||||||
^ Grows a pinetree at pos
|
* Grows a mgv6 jungletree at pos
|
||||||
|
|
||||||
|
* `default.grow_pine_tree(pos)`
|
||||||
|
* Grows a mgv6 pinetree at pos
|
||||||
|
|
||||||
|
* `default.grow_new_apple_tree(pos)`
|
||||||
|
* Grows a new design apple tree at pos
|
||||||
|
|
||||||
|
* `default.grow_new_jungle_tree(pos)`
|
||||||
|
* Grows a new design jungle tree at pos
|
||||||
|
|
||||||
|
* `default.grow_new_pine_tree(pos)`
|
||||||
|
* Grows a new design pine tree at pos
|
||||||
|
|
||||||
|
* `default.grow_new_acacia_tree(pos)`
|
||||||
|
* Grows a new design acacia tree at pos
|
||||||
|
|
||||||
|
* `default.grow_new_aspen_tree(pos)`
|
||||||
|
* Grows a new design aspen tree at pos
|
||||||
|
|
||||||
|
* `default.grow_new_snowy_pine_tree(pos)`
|
||||||
|
* Grows a new design snowy pine tree at pos
|
||||||
|
BIN
menu/header.png
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 904 B |
0
menu/icon.png
Normal file → Executable file
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
3
minetest.conf
Normal file → Executable file
@ -0,0 +1,3 @@
|
|||||||
|
# Enable jungles on new worlds, disable biome blend and mud flow (faster, looks better).
|
||||||
|
mgv6_spflags = jungles, nobiomeblend, nomudflow
|
||||||
|
disable_fire = true
|
||||||
|
31
minetest.conf.example
Normal file → Executable file
@ -1,21 +1,32 @@
|
|||||||
# This file contains settings of minetest_game that can be changed in
|
# This file contains settings of Minetest Game that can be changed in minetest.conf
|
||||||
# minetest.conf
|
|
||||||
#
|
|
||||||
# By default, all the settings are commented and not functional.
|
# By default, all the settings are commented and not functional.
|
||||||
# Uncomment settings by removing the preceding #.
|
# Uncomment settings by removing the preceding #.
|
||||||
|
|
||||||
# Whether creative mode (fast digging of all blocks, unlimited resources) should be enabled
|
# Whether creative mode (fast digging of all blocks, unlimited resources) should be enabled
|
||||||
#creative_mode = false
|
#creative_mode = false
|
||||||
|
|
||||||
|
# Sets the behaviour of the inventory items when a player dies.
|
||||||
|
# "bones": Store all items inside a bone node but drop items if inside protected area
|
||||||
|
# "drop": Drop all items on the ground
|
||||||
|
# "keep": Player keeps all items
|
||||||
|
#bones_mode = "bones"
|
||||||
|
|
||||||
# The time in seconds after which the bones of a dead player can be looted by everyone
|
# The time in seconds after which the bones of a dead player can be looted by everyone
|
||||||
# 0 to disable
|
# 0 to disable
|
||||||
#share_bones_time = 1200
|
#share_bones_time = 1200
|
||||||
|
|
||||||
# Whether fire should be disabled (all fire nodes will instantly disappear)
|
# How much earlier the bones of a dead player can be looted by
|
||||||
#disable_fire = false
|
# everyone if the player dies in a protected area they don't own.
|
||||||
|
# 0 to disable. By default it is "share_bones_time" divide by four.
|
||||||
|
#share_bones_time_early = 300
|
||||||
|
|
||||||
# Whether steel tools, torches and cobblestone should be given to new players
|
# Whether fire should be enabled. If disabled, 'basic flame' nodes will disappear.
|
||||||
|
# 'permanent flame' nodes will remain with either setting.
|
||||||
|
#enable_fire = true
|
||||||
|
|
||||||
|
# Whether the stuff in initial_stuff should be given to new players
|
||||||
#give_initial_stuff = false
|
#give_initial_stuff = false
|
||||||
|
#initial_stuff = default:pick_steel,default:axe_steel,default:shovel_steel,default:torch 99,default:cobble 99
|
||||||
|
|
||||||
# Whether the TNT mod should be enabled
|
# Whether the TNT mod should be enabled
|
||||||
#enable_tnt = <true in singleplayer, false in multiplayer>
|
#enable_tnt = <true in singleplayer, false in multiplayer>
|
||||||
@ -26,3 +37,11 @@
|
|||||||
# Enable the stairs mod ABM that replaces the old 'upside down'
|
# Enable the stairs mod ABM that replaces the old 'upside down'
|
||||||
# stair and slab nodes in old maps with the new param2 versions.
|
# stair and slab nodes in old maps with the new param2 versions.
|
||||||
#enable_stairs_replace_abm = false
|
#enable_stairs_replace_abm = false
|
||||||
|
|
||||||
|
# Whether you allow respawning in beds
|
||||||
|
# Default value is true
|
||||||
|
#enable_bed_respawn = true
|
||||||
|
|
||||||
|
# Whether players can skip night by sleeping
|
||||||
|
# Default value is true
|
||||||
|
#enable_bed_night_skip = true
|
||||||
|
9
mods/_misc_init/init.lua
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
----------------------------------------
|
||||||
|
-- Server Misc Mod - pre-default init --
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
local cwd = minetest.get_modpath(minetest.get_current_modname())
|
||||||
|
|
||||||
|
-- Inventory refill function override
|
||||||
|
-- see https://github.com/MinetestForFun/server-minetestforfun/issues/462
|
||||||
|
dofile(cwd.."/inventory_rotate_node.lua")
|
22
mods/_misc_init/inventory_rotate_node.lua
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--rewrite function minetest.rotate_node(itemstack, placer, pointed_thing) to refill inventory
|
||||||
|
local old_rotate_node = minetest.rotate_node
|
||||||
|
function minetest.rotate_node(itemstack, placer, pointed_thing)
|
||||||
|
local stack_name = itemstack:get_name()
|
||||||
|
local ret = old_rotate_node(itemstack, placer, pointed_thing)
|
||||||
|
if ret:get_count() == 0 and not minetest.setting_getbool("creative_mode") then
|
||||||
|
local index = placer:get_wield_index()
|
||||||
|
local inv = placer:get_inventory()
|
||||||
|
if inv:get_list("main") then
|
||||||
|
for i, stack in ipairs(inv:get_list("main")) do
|
||||||
|
if i ~= index and stack:get_name() == stack_name then
|
||||||
|
ret:add_item(stack)
|
||||||
|
stack:clear()
|
||||||
|
inv:set_stack("main", i, stack)
|
||||||
|
minetest.log("action", "Inventory Tweaks: refilled stack("..stack_name..") of " .. placer:get_player_name())
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return ret
|
||||||
|
end
|
@ -1,18 +0,0 @@
|
|||||||
1.0.1 beta
|
|
||||||
----------
|
|
||||||
- Add backwards compatibility with PilzAdam's beds mod
|
|
||||||
- Fix placement
|
|
||||||
- Fix small bugs
|
|
||||||
- Prevent possible crash
|
|
||||||
|
|
||||||
1.1
|
|
||||||
---
|
|
||||||
- Add fancy bed model (based on jp's model)
|
|
||||||
- Add API to register beds
|
|
||||||
- Allow players always to detach from bed (by donat-b)
|
|
||||||
- If more than 50% of players want sleep they can skip the night
|
|
||||||
- Don't show sleep dialog in singleplayer
|
|
||||||
|
|
||||||
1.1.1
|
|
||||||
-----
|
|
||||||
- Prevent possbile crash by trying to reposition leaving players
|
|
7
mods/beds/README.txt
Normal file → Executable file
@ -1,5 +1,5 @@
|
|||||||
Minetest mod "Beds"
|
Minetest Game mod: beds
|
||||||
===================
|
=======================
|
||||||
by BlockMen (c) 2014-2015
|
by BlockMen (c) 2014-2015
|
||||||
|
|
||||||
Version: 1.1.1
|
Version: 1.1.1
|
||||||
@ -14,7 +14,8 @@ if more than 50% of the players are lying in bed and use this option.
|
|||||||
Another feature is a controled respawning. If you have slept in bed (not just lying in it) your respawn point
|
Another feature is a controled respawning. If you have slept in bed (not just lying in it) your respawn point
|
||||||
is set to the beds location and you will respawn there after death.
|
is set to the beds location and you will respawn there after death.
|
||||||
You can disable the respawn at beds by setting "enable_bed_respawn = false" in minetest.conf
|
You can disable the respawn at beds by setting "enable_bed_respawn = false" in minetest.conf
|
||||||
|
You can also disable the night skip feature by setting "enable_bed_night_skip = false" in minetest.conf or by using
|
||||||
|
the /set command ingame.
|
||||||
|
|
||||||
|
|
||||||
License of source code, textures: WTFPL
|
License of source code, textures: WTFPL
|
||||||
|
12
mods/beds/api.lua
Normal file → Executable file
@ -18,7 +18,6 @@ function beds.register_bed(name, def)
|
|||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = def.selectionbox,
|
fixed = def.selectionbox,
|
||||||
|
|
||||||
},
|
},
|
||||||
after_place_node = function(pos, placer, itemstack)
|
after_place_node = function(pos, placer, itemstack)
|
||||||
local n = minetest.get_node_or_nil(pos)
|
local n = minetest.get_node_or_nil(pos)
|
||||||
@ -47,6 +46,12 @@ function beds.register_bed(name, def)
|
|||||||
minetest.remove_node(p)
|
minetest.remove_node(p)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
|
local name = digger:get_player_name()
|
||||||
|
if not name or name == "" then return end
|
||||||
|
beds.spawn[name] = nil
|
||||||
|
beds.save_spawns()
|
||||||
|
end,
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
beds.on_rightclick(pos, clicker)
|
beds.on_rightclick(pos, clicker)
|
||||||
end,
|
end,
|
||||||
@ -89,16 +94,13 @@ function beds.register_bed(name, def)
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
|
pointable = false,
|
||||||
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2},
|
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = def.nodebox.top,
|
fixed = def.nodebox.top,
|
||||||
},
|
},
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {0, 0, 0, 0, 0, 0},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias(name, name .. "_bottom")
|
minetest.register_alias(name, name .. "_bottom")
|
||||||
|
60
mods/beds/beds.lua
Normal file → Executable file
@ -1,22 +1,22 @@
|
|||||||
-- fancy shaped bed
|
for _, colour in pairs({"red", "white", "black", "blue", "green"}) do-- fancy shaped bed
|
||||||
beds.register_bed("beds:fancy_bed", {
|
beds.register_bed("beds:fancy_bed_" .. colour, {
|
||||||
description = "Fancy Bed",
|
description = "Fancy Bed (" .. colour .. ")",
|
||||||
inventory_image = "beds_bed_fancy.png",
|
inventory_image = "beds_bed_fancy_" .. colour .. ".png",
|
||||||
wield_image = "beds_bed_fancy.png",
|
wield_image = "beds_bed_fancy_" .. colour .. ".png",
|
||||||
tiles = {
|
tiles = {
|
||||||
bottom = {
|
bottom = {
|
||||||
"beds_bed_top1.png",
|
"beds_bed_top1_" .. colour .. ".png",
|
||||||
"default_wood.png",
|
"default_wood.png",
|
||||||
"beds_bed_side1.png",
|
"beds_bed_side1_" .. colour .. ".png",
|
||||||
"beds_bed_side1.png^[transformFX",
|
"beds_bed_side1_" .. colour .. ".png^[transformFX",
|
||||||
"default_wood.png",
|
"default_wood.png",
|
||||||
"beds_bed_foot.png",
|
"beds_bed_foot_" .. colour .. ".png",
|
||||||
},
|
},
|
||||||
top = {
|
top = {
|
||||||
"beds_bed_top2.png",
|
"beds_bed_top2_" .. colour .. ".png",
|
||||||
"default_wood.png",
|
"default_wood.png",
|
||||||
"beds_bed_side2.png",
|
"beds_bed_side2_" .. colour .. ".png",
|
||||||
"beds_bed_side2.png^[transformFX",
|
"beds_bed_side2_" .. colour .. ".png^[transformFX",
|
||||||
"beds_bed_head.png",
|
"beds_bed_head.png",
|
||||||
"default_wood.png",
|
"default_wood.png",
|
||||||
}
|
}
|
||||||
@ -43,30 +43,30 @@ beds.register_bed("beds:fancy_bed", {
|
|||||||
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
|
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", "", "group:stick"},
|
{"", "", "group:stick"},
|
||||||
{"wool:red", "wool:red", "wool:white"},
|
{"wool:" .. colour, "wool:" .. colour, "wool:white"},
|
||||||
{"group:wood", "group:wood", "group:wood"},
|
{"group:wood", "group:wood", "group:wood"},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- simple shaped bed
|
-- simple shaped bed
|
||||||
beds.register_bed("beds:bed", {
|
beds.register_bed("beds:bed_" .. colour, {
|
||||||
description = "Simple Bed",
|
description = "Simple Bed (" .. colour .. ")",
|
||||||
inventory_image = "beds_bed.png",
|
inventory_image = "beds_bed_" .. colour .. ".png",
|
||||||
wield_image = "beds_bed.png",
|
wield_image = "beds_bed_" .. colour .. ".png",
|
||||||
tiles = {
|
tiles = {
|
||||||
bottom = {
|
bottom = {
|
||||||
"beds_bed_top_bottom.png^[transformR90",
|
"beds_bed_top_bottom_" .. colour .. ".png^[transformR90",
|
||||||
"default_wood.png",
|
"default_wood.png",
|
||||||
"beds_bed_side_bottom_r.png",
|
"beds_bed_side_bottom_r_" .. colour .. ".png",
|
||||||
"beds_bed_side_bottom_r.png^[transformfx",
|
"beds_bed_side_bottom_r_" .. colour .. ".png^[transformfx",
|
||||||
"beds_transparent.png",
|
"beds_transparent.png",
|
||||||
"beds_bed_side_bottom.png"
|
"beds_bed_side_bottom_" .. colour .. ".png"
|
||||||
},
|
},
|
||||||
top = {
|
top = {
|
||||||
"beds_bed_top_top.png^[transformR90",
|
"beds_bed_top_top_" .. colour .. ".png^[transformR90",
|
||||||
"default_wood.png",
|
"default_wood.png",
|
||||||
"beds_bed_side_top_r.png",
|
"beds_bed_side_top_r_" .. colour .. ".png",
|
||||||
"beds_bed_side_top_r.png^[transformfx",
|
"beds_bed_side_top_r_" .. colour .. ".png^[transformfx",
|
||||||
"beds_bed_side_top.png",
|
"beds_bed_side_top.png",
|
||||||
"beds_transparent.png",
|
"beds_transparent.png",
|
||||||
}
|
}
|
||||||
@ -77,12 +77,16 @@ beds.register_bed("beds:bed", {
|
|||||||
},
|
},
|
||||||
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
|
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
|
||||||
recipe = {
|
recipe = {
|
||||||
{"wool:red", "wool:red", "wool:white"},
|
{"wool:" .. colour, "wool:" .. colour, "wool:white"},
|
||||||
{"group:wood", "group:wood", "group:wood"}
|
{"group:wood", "group:wood", "group:wood"}
|
||||||
},
|
},
|
||||||
|
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- aliases for PA's beds mod
|
minetest.register_alias("beds:bed", "beds:bed_red")
|
||||||
minetest.register_alias("beds:bed_bottom_red", "beds:bed_bottom")
|
minetest.register_alias("beds:fancy_bed", "beds:fancy_bed_red")
|
||||||
minetest.register_alias("beds:bed_top_red", "beds:bed_top")
|
minetest.register_alias("beds:bed_bottom", "beds:bed_red_bottom")
|
||||||
|
minetest.register_alias("beds:bed_top", "beds:bed_red_top")
|
||||||
|
minetest.register_alias("beds:fancy_bed_top", "beds:fancy_bed_red_top")
|
||||||
|
minetest.register_alias("beds:fancy_bed_bottom", "beds:fancy_bed_red_bottom")
|
||||||
|
1
mods/beds/depends.txt
Normal file → Executable file
@ -1,2 +1,3 @@
|
|||||||
default
|
default
|
||||||
wool
|
wool
|
||||||
|
areas
|
||||||
|
82
mods/beds/functions.lua
Normal file → Executable file
@ -1,3 +1,4 @@
|
|||||||
|
local pi = math.pi
|
||||||
local player_in_bed = 0
|
local player_in_bed = 0
|
||||||
local is_sp = minetest.is_singleplayer()
|
local is_sp = minetest.is_singleplayer()
|
||||||
local enable_respawn = minetest.setting_getbool("enable_bed_respawn")
|
local enable_respawn = minetest.setting_getbool("enable_bed_respawn")
|
||||||
@ -11,16 +12,24 @@ end
|
|||||||
local function get_look_yaw(pos)
|
local function get_look_yaw(pos)
|
||||||
local n = minetest.get_node(pos)
|
local n = minetest.get_node(pos)
|
||||||
if n.param2 == 1 then
|
if n.param2 == 1 then
|
||||||
return 7.9, n.param2
|
return pi/2, n.param2
|
||||||
elseif n.param2 == 3 then
|
elseif n.param2 == 3 then
|
||||||
return 4.75, n.param2
|
return -pi/2, n.param2
|
||||||
elseif n.param2 == 0 then
|
elseif n.param2 == 0 then
|
||||||
return 3.15, n.param2
|
return pi, n.param2
|
||||||
else
|
else
|
||||||
return 6.28, n.param2
|
return 0, n.param2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function is_night_skip_enabled()
|
||||||
|
local enable_night_skip = minetest.setting_getbool("enable_bed_night_skip")
|
||||||
|
if enable_night_skip == nil then
|
||||||
|
enable_night_skip = true
|
||||||
|
end
|
||||||
|
return enable_night_skip
|
||||||
|
end
|
||||||
|
|
||||||
local function check_in_beds(players)
|
local function check_in_beds(players)
|
||||||
local in_bed = beds.player
|
local in_bed = beds.player
|
||||||
if not players then
|
if not players then
|
||||||
@ -101,7 +110,7 @@ local function update_formspecs(finished)
|
|||||||
else
|
else
|
||||||
form_n = beds.formspec ..
|
form_n = beds.formspec ..
|
||||||
"label[2.2,11;"..tostring(player_in_bed).." of "..tostring(ges).." players are in bed]"
|
"label[2.2,11;"..tostring(player_in_bed).." of "..tostring(ges).." players are in bed]"
|
||||||
if is_majority then
|
if is_majority and is_night_skip_enabled() then
|
||||||
form_n = form_n ..
|
form_n = form_n ..
|
||||||
"button_exit[2,8;4,0.75;force;Force night skip]"
|
"button_exit[2,8;4,0.75;force;Force night skip]"
|
||||||
end
|
end
|
||||||
@ -154,24 +163,46 @@ function beds.on_rightclick(pos, player)
|
|||||||
-- skip the night and let all players stand up
|
-- skip the night and let all players stand up
|
||||||
if check_in_beds() then
|
if check_in_beds() then
|
||||||
minetest.after(2, function()
|
minetest.after(2, function()
|
||||||
beds.skip_night()
|
|
||||||
if not is_sp then
|
if not is_sp then
|
||||||
update_formspecs(true)
|
update_formspecs(is_night_skip_enabled())
|
||||||
end
|
end
|
||||||
|
if is_night_skip_enabled() then
|
||||||
|
beds.skip_night()
|
||||||
beds.kick_players()
|
beds.kick_players()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- callbacks
|
-- callbacks
|
||||||
|
--[[ --MFF (Crabman) It's useless to read each join player, read only once at load. function moved/called in spawn.lua
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
beds.read_spawns()
|
beds.read_spawns()
|
||||||
end)
|
end)
|
||||||
|
--]]
|
||||||
|
|
||||||
-- respawn player at bed if enabled and valid position is found
|
|
||||||
minetest.register_on_respawnplayer(function(player)
|
local dead_players = {}
|
||||||
|
local have_areas_mod = false
|
||||||
|
if (minetest.get_modpath("areas") ~= nil) and areas.getSpawn then
|
||||||
|
have_areas_mod = true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function teleport_player(player, clear)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not name or name == "" then return false end
|
||||||
|
if have_areas_mod and dead_players[name] ~= nil then
|
||||||
|
local pos = areas:getSpawn(dead_players[name])
|
||||||
|
if clear then
|
||||||
|
dead_players[name] = nil
|
||||||
|
end
|
||||||
|
if pos then
|
||||||
|
player:setpos(pos)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
if not enable_respawn then
|
if not enable_respawn then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@ -181,17 +212,42 @@ minetest.register_on_respawnplayer(function(player)
|
|||||||
player:setpos(pos)
|
player:setpos(pos)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
--if not areas or bed spawnpoint, tp to the spawn
|
||||||
|
local spawn = minetest.string_to_pos(minetest.setting_get("static_spawnpoint") or "0,0,0")
|
||||||
|
player:setpos(spawn)
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_on_dieplayer(function(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not name or name == "" then return end
|
||||||
|
if have_areas_mod then
|
||||||
|
local pos = player:getpos()
|
||||||
|
if pos then
|
||||||
|
dead_players[name] = pos
|
||||||
|
end
|
||||||
|
end
|
||||||
|
minetest.after(0.20, teleport_player, player) -- tp after all others on_dieplayer callback otherwise their pos is wrong
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- respawn player at bed if enabled and valid position is found
|
||||||
|
minetest.register_on_respawnplayer(function(player)
|
||||||
|
return teleport_player(player, true)
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
lay_down(player, nil, nil, false, true)
|
lay_down(player, nil, nil, false, true)
|
||||||
beds.player[name] = nil
|
beds.player[name] = nil
|
||||||
if check_in_beds() then
|
if check_in_beds() then
|
||||||
minetest.after(2, function()
|
minetest.after(2, function()
|
||||||
|
update_formspecs(is_night_skip_enabled())
|
||||||
|
if is_night_skip_enabled() then
|
||||||
beds.skip_night()
|
beds.skip_night()
|
||||||
update_formspecs(true)
|
|
||||||
beds.kick_players()
|
beds.kick_players()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@ -206,8 +262,10 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if fields.force then
|
if fields.force then
|
||||||
|
update_formspecs(is_night_skip_enabled())
|
||||||
|
if is_night_skip_enabled() then
|
||||||
beds.skip_night()
|
beds.skip_night()
|
||||||
update_formspecs(true)
|
|
||||||
beds.kick_players()
|
beds.kick_players()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
0
mods/beds/init.lua
Normal file → Executable file
160
mods/beds/models/fancy_bed.obj
Executable file
@ -0,0 +1,160 @@
|
|||||||
|
# Blender v2.69 (sub 0) OBJ File: ''
|
||||||
|
# www.blender.org
|
||||||
|
mtllib fancy_bed.mtl
|
||||||
|
o mattress_Mattress_nodebox-6_none.001_fancy_bed.png.001
|
||||||
|
v 0.437500 -0.312500 -0.437501
|
||||||
|
v 0.437500 -0.062500 -0.437501
|
||||||
|
v 0.437500 -0.062500 1.437499
|
||||||
|
v 0.437500 -0.312500 1.437499
|
||||||
|
v -0.437500 -0.312500 -0.437501
|
||||||
|
v -0.437500 -0.312500 1.437499
|
||||||
|
v -0.437500 -0.062500 1.437499
|
||||||
|
v -0.437500 -0.062500 -0.437501
|
||||||
|
v 0.437500 -0.176793 -0.437501
|
||||||
|
v -0.437500 -0.176793 -0.437501
|
||||||
|
vt 0.000171 0.499972
|
||||||
|
vt 0.000161 0.000182
|
||||||
|
vt 0.999791 0.000253
|
||||||
|
vt 0.999873 0.500022
|
||||||
|
vt 0.749576 0.000208
|
||||||
|
vt 0.749876 0.499854
|
||||||
|
vt 0.999848 0.999750
|
||||||
|
vt 0.000152 0.999750
|
||||||
|
vt 0.749276 0.130648
|
||||||
|
vt 0.000112 0.130648
|
||||||
|
g mattress_Mattress_nodebox-6_none.001_fancy_bed.png.001_none.001_fancy_bed.png.001
|
||||||
|
usemtl none.001_fancy_bed.png.001
|
||||||
|
s off
|
||||||
|
f 1/1 2/2 3/3 4/4
|
||||||
|
f 5/2 6/3 7/4 8/1
|
||||||
|
f 4/5 3/2 7/1 6/6
|
||||||
|
f 1/1 4/4 6/7 5/8
|
||||||
|
f 2/1 8/2 7/3 3/4
|
||||||
|
f 8/2 2/5 9/9 10/10
|
||||||
|
o wood_structure_Wood_structure_nodebox-4.001_none.002
|
||||||
|
v 0.374999 -0.375000 1.437499
|
||||||
|
v 0.374999 -0.125000 1.437499
|
||||||
|
v 0.374999 -0.125000 1.499999
|
||||||
|
v 0.374999 -0.375000 1.499999
|
||||||
|
v -0.374999 -0.375000 1.437499
|
||||||
|
v -0.374999 -0.375000 1.499999
|
||||||
|
v -0.374999 -0.125000 1.499999
|
||||||
|
v -0.374999 -0.125000 1.437499
|
||||||
|
v -0.375000 -0.500000 1.437499
|
||||||
|
v -0.375000 0.187500 1.437499
|
||||||
|
v -0.375000 0.187500 1.499999
|
||||||
|
v -0.375000 -0.500000 1.499999
|
||||||
|
v -0.500000 -0.500000 1.437499
|
||||||
|
v -0.500000 -0.500000 1.499999
|
||||||
|
v -0.500000 0.187500 1.499999
|
||||||
|
v -0.500000 0.187500 1.437499
|
||||||
|
v -0.437500 -0.375000 -0.437501
|
||||||
|
v -0.437500 -0.125000 -0.437501
|
||||||
|
v -0.437500 -0.125000 1.437498
|
||||||
|
v -0.437500 -0.375000 1.437498
|
||||||
|
v -0.500000 -0.375000 -0.437501
|
||||||
|
v -0.500000 -0.375000 1.437498
|
||||||
|
v -0.500000 -0.125000 1.437498
|
||||||
|
v -0.500000 -0.125000 -0.437501
|
||||||
|
v 0.375001 -0.000000 1.437499
|
||||||
|
v 0.375001 0.125000 1.437499
|
||||||
|
v 0.375001 0.125000 1.499999
|
||||||
|
v 0.375001 -0.000000 1.499999
|
||||||
|
v -0.375001 -0.000000 1.437499
|
||||||
|
v -0.375001 -0.000000 1.499999
|
||||||
|
v -0.375001 0.125000 1.499999
|
||||||
|
v -0.375001 0.125000 1.437499
|
||||||
|
v 0.500000 -0.500000 1.437499
|
||||||
|
v 0.500000 0.187500 1.437499
|
||||||
|
v 0.500000 0.187500 1.499999
|
||||||
|
v 0.500000 -0.500000 1.499999
|
||||||
|
v 0.375000 -0.500000 1.437499
|
||||||
|
v 0.375000 -0.500000 1.499999
|
||||||
|
v 0.375000 0.187500 1.499999
|
||||||
|
v 0.375000 0.187500 1.437499
|
||||||
|
v 0.500000 -0.375000 -0.437501
|
||||||
|
v 0.500000 -0.125000 -0.437501
|
||||||
|
v 0.500000 -0.125000 1.437499
|
||||||
|
v 0.500000 -0.375000 1.437499
|
||||||
|
v 0.437500 -0.375000 -0.437501
|
||||||
|
v 0.437500 -0.375000 1.437499
|
||||||
|
v 0.437500 -0.125000 1.437499
|
||||||
|
v 0.437500 -0.125000 -0.437501
|
||||||
|
v -0.375000 -0.500000 -0.500000
|
||||||
|
v -0.375000 -0.065000 -0.500000
|
||||||
|
v -0.375000 -0.065000 -0.437500
|
||||||
|
v -0.375000 -0.500000 -0.437500
|
||||||
|
v -0.500000 -0.500000 -0.500000
|
||||||
|
v -0.500000 -0.500000 -0.437500
|
||||||
|
v -0.500000 -0.065000 -0.437500
|
||||||
|
v -0.500000 -0.065000 -0.500000
|
||||||
|
v 0.375006 -0.375000 -0.500000
|
||||||
|
v 0.375006 -0.125000 -0.500000
|
||||||
|
v 0.375006 -0.125000 -0.437500
|
||||||
|
v 0.375006 -0.375000 -0.437500
|
||||||
|
v -0.375006 -0.375000 -0.500000
|
||||||
|
v -0.375006 -0.375000 -0.437500
|
||||||
|
v -0.375006 -0.125000 -0.437500
|
||||||
|
v -0.375006 -0.125000 -0.500000
|
||||||
|
v 0.500000 -0.500000 -0.500000
|
||||||
|
v 0.500000 -0.065000 -0.500000
|
||||||
|
v 0.500000 -0.065000 -0.437500
|
||||||
|
v 0.500000 -0.500000 -0.437500
|
||||||
|
v 0.375000 -0.500000 -0.500000
|
||||||
|
v 0.375000 -0.500000 -0.437500
|
||||||
|
v 0.375000 -0.065000 -0.437500
|
||||||
|
v 0.375000 -0.065000 -0.500000
|
||||||
|
vt 0.377610 0.378205
|
||||||
|
vt 0.622484 0.378175
|
||||||
|
vt 0.622515 0.623120
|
||||||
|
vt 0.377671 0.623151
|
||||||
|
g wood_structure_Wood_structure_nodebox-4.001_none.002_none.002
|
||||||
|
usemtl none.002
|
||||||
|
s off
|
||||||
|
f 59/11 60/12 61/13 62/14
|
||||||
|
f 63/14 64/11 65/12 66/13
|
||||||
|
f 59/11 63/14 66/13 60/12
|
||||||
|
f 62/14 61/13 65/12 64/11
|
||||||
|
f 59/11 62/14 64/13 63/12
|
||||||
|
f 60/12 66/11 65/14 61/13
|
||||||
|
f 67/11 71/12 74/13 68/14
|
||||||
|
f 70/14 69/11 73/12 72/13
|
||||||
|
f 67/11 70/12 72/13 71/14
|
||||||
|
f 68/11 74/12 73/13 69/14
|
||||||
|
f 75/11 76/12 77/13 78/14
|
||||||
|
f 79/14 80/11 81/12 82/13
|
||||||
|
f 75/14 79/11 82/12 76/13
|
||||||
|
f 78/11 77/12 81/13 80/14
|
||||||
|
f 75/11 78/12 80/13 79/14
|
||||||
|
f 76/11 82/12 81/13 77/14
|
||||||
|
g wood_structure_Wood_structure_nodebox-4.001_none.002_none.003
|
||||||
|
usemtl none.003
|
||||||
|
f 15/11 16/12 17/13 18/14
|
||||||
|
f 11/13 15/14 18/11 12/12
|
||||||
|
f 14/14 13/11 17/12 16/13
|
||||||
|
f 11/14 14/11 16/12 15/13
|
||||||
|
f 12/11 18/12 17/13 13/14
|
||||||
|
f 19/11 20/12 21/13 22/14
|
||||||
|
f 23/14 24/11 25/12 26/13
|
||||||
|
f 19/14 23/11 26/12 20/13
|
||||||
|
f 22/11 21/12 25/13 24/14
|
||||||
|
f 19/11 22/12 24/13 23/14
|
||||||
|
f 20/11 26/12 25/13 21/14
|
||||||
|
f 27/14 28/11 29/12 30/13
|
||||||
|
f 31/11 32/12 33/13 34/14
|
||||||
|
f 27/11 30/12 32/13 31/14
|
||||||
|
f 28/14 34/11 33/12 29/13
|
||||||
|
f 35/11 39/12 42/13 36/14
|
||||||
|
f 38/14 37/11 41/12 40/13
|
||||||
|
f 35/14 38/11 40/12 39/13
|
||||||
|
f 36/11 42/12 41/13 37/14
|
||||||
|
f 43/11 44/12 45/13 46/14
|
||||||
|
f 47/14 48/11 49/12 50/13
|
||||||
|
f 43/14 47/11 50/12 44/13
|
||||||
|
f 46/11 45/12 49/13 48/14
|
||||||
|
f 43/11 46/12 48/13 47/14
|
||||||
|
f 44/11 50/12 49/13 45/14
|
||||||
|
f 51/14 52/11 53/12 54/13
|
||||||
|
f 55/13 56/14 57/11 58/12
|
||||||
|
f 51/11 54/12 56/13 55/14
|
||||||
|
f 52/14 58/11 57/12 53/13
|
32
mods/beds/models/simple_bed.obj
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
# Blender v2.69 (sub 0) OBJ File: ''
|
||||||
|
# www.blender.org
|
||||||
|
mtllib simple_bed.mtl
|
||||||
|
o Simple_Bed
|
||||||
|
v 0.500000 -0.500000 -0.500000
|
||||||
|
v 0.500000 0.060000 -0.500000
|
||||||
|
v 0.500000 0.060000 1.500000
|
||||||
|
v 0.500000 -0.500000 1.500000
|
||||||
|
v -0.500000 -0.500000 -0.500000
|
||||||
|
v -0.500000 -0.500000 1.500000
|
||||||
|
v -0.500000 0.060000 1.500000
|
||||||
|
v -0.500000 0.060000 -0.500000
|
||||||
|
vt 0.000112 0.780442
|
||||||
|
vt 0.000110 0.999969
|
||||||
|
vt 0.780324 0.999889
|
||||||
|
vt 0.780377 0.780471
|
||||||
|
vt 0.780636 0.390284
|
||||||
|
vt 0.999906 0.780382
|
||||||
|
vt 0.999906 0.390284
|
||||||
|
vt 0.780636 0.000047
|
||||||
|
vt 0.999906 0.000094
|
||||||
|
vt 0.390235 0.780320
|
||||||
|
vt 0.390235 0.000071
|
||||||
|
vt 0.000142 0.000142
|
||||||
|
usemtl none.002
|
||||||
|
s off
|
||||||
|
f 1/1 2/2 3/3 4/4
|
||||||
|
f 5/1 6/4 7/3 8/2
|
||||||
|
f 1/5 5/4 8/6 2/7
|
||||||
|
f 4/8 3/9 7/7 6/5
|
||||||
|
f 1/8 4/4 6/10 5/11
|
||||||
|
f 2/11 8/12 7/1 3/10
|
2
mods/beds/spawns.lua
Normal file → Executable file
@ -56,3 +56,5 @@ function beds.set_spawns()
|
|||||||
end
|
end
|
||||||
beds.save_spawns()
|
beds.save_spawns()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
beds.read_spawns()
|
||||||
|
BIN
mods/beds/textures/beds_bed_black.png
Executable file
After Width: | Height: | Size: 429 B |
BIN
mods/beds/textures/beds_bed_blue.png
Executable file
After Width: | Height: | Size: 545 B |
BIN
mods/beds/textures/beds_bed_fancy_black.png
Executable file
After Width: | Height: | Size: 432 B |
BIN
mods/beds/textures/beds_bed_fancy_blue.png
Executable file
After Width: | Height: | Size: 545 B |
BIN
mods/beds/textures/beds_bed_fancy_green.png
Executable file
After Width: | Height: | Size: 521 B |
0
mods/beds/textures/beds_bed_fancy.png → mods/beds/textures/beds_bed_fancy_red.png
Normal file → Executable file
Before Width: | Height: | Size: 537 B After Width: | Height: | Size: 537 B |
BIN
mods/beds/textures/beds_bed_fancy_white.png
Executable file
After Width: | Height: | Size: 540 B |
BIN
mods/beds/textures/beds_bed_foot_black.png
Executable file
After Width: | Height: | Size: 366 B |
BIN
mods/beds/textures/beds_bed_foot_blue.png
Executable file
After Width: | Height: | Size: 416 B |
BIN
mods/beds/textures/beds_bed_foot_green.png
Executable file
After Width: | Height: | Size: 400 B |
0
mods/beds/textures/beds_bed_foot.png → mods/beds/textures/beds_bed_foot_red.png
Normal file → Executable file
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 390 B |
BIN
mods/beds/textures/beds_bed_foot_white.png
Executable file
After Width: | Height: | Size: 408 B |
BIN
mods/beds/textures/beds_bed_green.png
Executable file
After Width: | Height: | Size: 523 B |
BIN
mods/beds/textures/beds_bed_head.png
Normal file → Executable file
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 347 B |
0
mods/beds/textures/beds_bed.png → mods/beds/textures/beds_bed_red.png
Normal file → Executable file
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 296 B |
BIN
mods/beds/textures/beds_bed_side1_black.png
Executable file
After Width: | Height: | Size: 274 B |
BIN
mods/beds/textures/beds_bed_side1_blue.png
Executable file
After Width: | Height: | Size: 308 B |
BIN
mods/beds/textures/beds_bed_side1_green.png
Executable file
After Width: | Height: | Size: 299 B |
BIN
mods/beds/textures/beds_bed_side1_red.png
Executable file
After Width: | Height: | Size: 271 B |
BIN
mods/beds/textures/beds_bed_side1_white.png
Executable file
After Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 316 B |
BIN
mods/beds/textures/beds_bed_side2_black.png
Executable file
After Width: | Height: | Size: 317 B |
BIN
mods/beds/textures/beds_bed_side2_blue.png
Executable file
After Width: | Height: | Size: 331 B |
BIN
mods/beds/textures/beds_bed_side2_green.png
Executable file
After Width: | Height: | Size: 326 B |
BIN
mods/beds/textures/beds_bed_side2_red.png
Executable file
After Width: | Height: | Size: 283 B |
BIN
mods/beds/textures/beds_bed_side2_white.png
Executable file
After Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 561 B |
BIN
mods/beds/textures/beds_bed_side_bottom_black.png
Executable file
After Width: | Height: | Size: 358 B |
BIN
mods/beds/textures/beds_bed_side_bottom_blue.png
Executable file
After Width: | Height: | Size: 456 B |
BIN
mods/beds/textures/beds_bed_side_bottom_green.png
Executable file
After Width: | Height: | Size: 427 B |
BIN
mods/beds/textures/beds_bed_side_bottom_r_black.png
Executable file
After Width: | Height: | Size: 343 B |
BIN
mods/beds/textures/beds_bed_side_bottom_r_blue.png
Executable file
After Width: | Height: | Size: 456 B |
BIN
mods/beds/textures/beds_bed_side_bottom_r_green.png
Executable file
After Width: | Height: | Size: 422 B |
0
mods/beds/textures/beds_bed_side_bottom_r.png → mods/beds/textures/beds_bed_side_bottom_r_red.png
Normal file → Executable file
Before Width: | Height: | Size: 537 B After Width: | Height: | Size: 537 B |
BIN
mods/beds/textures/beds_bed_side_bottom_r_white.png
Executable file
After Width: | Height: | Size: 434 B |
BIN
mods/beds/textures/beds_bed_side_bottom_red.png
Executable file
After Width: | Height: | Size: 523 B |
BIN
mods/beds/textures/beds_bed_side_bottom_white.png
Executable file
After Width: | Height: | Size: 439 B |
BIN
mods/beds/textures/beds_bed_side_top.png
Normal file → Executable file
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 596 B |
BIN
mods/beds/textures/beds_bed_side_top_r_black.png
Executable file
After Width: | Height: | Size: 429 B |
BIN
mods/beds/textures/beds_bed_side_top_r_blue.png
Executable file
After Width: | Height: | Size: 478 B |
BIN
mods/beds/textures/beds_bed_side_top_r_green.png
Executable file
After Width: | Height: | Size: 463 B |
BIN
mods/beds/textures/beds_bed_side_top_r_red.png
Executable file
After Width: | Height: | Size: 560 B |
BIN
mods/beds/textures/beds_bed_side_top_r_white.png
Executable file
After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 583 B |
BIN
mods/beds/textures/beds_bed_top1_black.png
Executable file
After Width: | Height: | Size: 241 B |
BIN
mods/beds/textures/beds_bed_top1_blue.png
Executable file
After Width: | Height: | Size: 494 B |
BIN
mods/beds/textures/beds_bed_top1_green.png
Executable file
After Width: | Height: | Size: 448 B |
BIN
mods/beds/textures/beds_bed_top1_red.png
Executable file
After Width: | Height: | Size: 548 B |
BIN
mods/beds/textures/beds_bed_top1_white.png
Executable file
After Width: | Height: | Size: 478 B |
BIN
mods/beds/textures/beds_bed_top2_black.png
Executable file
After Width: | Height: | Size: 465 B |
BIN
mods/beds/textures/beds_bed_top2_blue.png
Executable file
After Width: | Height: | Size: 609 B |
BIN
mods/beds/textures/beds_bed_top2_green.png
Executable file
After Width: | Height: | Size: 586 B |
0
mods/beds/textures/beds_bed_top2.png → mods/beds/textures/beds_bed_top2_red.png
Normal file → Executable file
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 616 B |
BIN
mods/beds/textures/beds_bed_top2_white.png
Executable file
After Width: | Height: | Size: 573 B |
BIN
mods/beds/textures/beds_bed_top_bottom_black.png
Executable file
After Width: | Height: | Size: 126 B |
BIN
mods/beds/textures/beds_bed_top_bottom_blue.png
Executable file
After Width: | Height: | Size: 434 B |
BIN
mods/beds/textures/beds_bed_top_bottom_green.png
Executable file
After Width: | Height: | Size: 343 B |
0
mods/beds/textures/beds_bed_top_bottom.png → mods/beds/textures/beds_bed_top_bottom_red.png
Normal file → Executable file
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 495 B |
BIN
mods/beds/textures/beds_bed_top_bottom_white.png
Executable file
After Width: | Height: | Size: 339 B |
BIN
mods/beds/textures/beds_bed_top_top_black.png
Executable file
After Width: | Height: | Size: 376 B |
BIN
mods/beds/textures/beds_bed_top_top_blue.png
Executable file
After Width: | Height: | Size: 568 B |
BIN
mods/beds/textures/beds_bed_top_top_green.png
Executable file
After Width: | Height: | Size: 525 B |
0
mods/beds/textures/beds_bed_top_top.png → mods/beds/textures/beds_bed_top_top_red.png
Normal file → Executable file
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
BIN
mods/beds/textures/beds_bed_top_top_white.png
Executable file
After Width: | Height: | Size: 480 B |
BIN
mods/beds/textures/beds_bed_white.png
Executable file
After Width: | Height: | Size: 525 B |
BIN
mods/beds/textures/beds_transparent.png
Normal file → Executable file
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 96 B |
BIN
mods/beds/textures/fancy_bed_black.png
Executable file
After Width: | Height: | Size: 705 B |
BIN
mods/beds/textures/fancy_bed_blue.png
Executable file
After Width: | Height: | Size: 1.0 KiB |
BIN
mods/beds/textures/fancy_bed_green.png
Executable file
After Width: | Height: | Size: 969 B |
BIN
mods/beds/textures/fancy_bed_red.png
Executable file
After Width: | Height: | Size: 552 B |
BIN
mods/beds/textures/fancy_bed_white.png
Executable file
After Width: | Height: | Size: 1.0 KiB |
BIN
mods/beds/textures/simple_bed_black.png
Executable file
After Width: | Height: | Size: 1.7 KiB |
BIN
mods/beds/textures/simple_bed_blue.png
Executable file
After Width: | Height: | Size: 2.3 KiB |
BIN
mods/beds/textures/simple_bed_green.png
Executable file
After Width: | Height: | Size: 2.1 KiB |
BIN
mods/beds/textures/simple_bed_red.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
mods/beds/textures/simple_bed_white.png
Executable file
After Width: | Height: | Size: 2.1 KiB |
6
mods/boats/README.txt
Normal file → Executable file
@ -1,6 +1,6 @@
|
|||||||
Minetest 0.4 mod: boats
|
Minetest Game mod: boats
|
||||||
=======================
|
========================
|
||||||
by PilzAdam, slightly modified for NeXt
|
by PilzAdam
|
||||||
|
|
||||||
License of source code:
|
License of source code:
|
||||||
-----------------------
|
-----------------------
|
||||||
|