mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-14 23:21:07 +01:00
Merge branch 'master' into buckets
This commit is contained in:
commit
44063bca93
8 changed files with 48 additions and 6 deletions
|
@ -52,17 +52,17 @@ Each mod must provide `mod.conf`.
|
|||
Each mod which add API functions should store functions inside a global table named like the mod.
|
||||
Public functions should not use self references but rather just access the table directly.
|
||||
Functions should be defined in this way:
|
||||
```
|
||||
```lua
|
||||
function mcl_xyz.stuff(param) end
|
||||
```
|
||||
Insteed of this way:
|
||||
```
|
||||
```lua
|
||||
mcl_xyz.stuff = function(param) end
|
||||
```
|
||||
Indentation must be unified, more likely with tabs.
|
||||
|
||||
Time sensitive mods should make a local copy of most used API functions to improve performances.
|
||||
```
|
||||
```lua
|
||||
local vector = vector
|
||||
local get_node = minetest.get_node
|
||||
```
|
||||
|
|
35
mods/HELP/mcl_item_id/init.lua
Normal file
35
mods/HELP/mcl_item_id/init.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
local game = "mineclone"
|
||||
|
||||
local same_id = {
|
||||
heads = { "skeleton", "zombie", "creeper", "wither_skeleton" },
|
||||
mobitems = { "rabbit", "chicken" },
|
||||
walls = {
|
||||
"andesite", "brick", "cobble", "diorite", "endbricks",
|
||||
"granite", "mossycobble", "netherbrick", "prismarine",
|
||||
"rednetherbrick", "redsandstone", "sandstone",
|
||||
"stonebrick", "stonebrickmossy",
|
||||
},
|
||||
wool = {
|
||||
"black", "blue", "brown", "cyan", "green",
|
||||
"grey", "light_blue", "lime", "magenta", "orange",
|
||||
"pink", "purple", "red", "silver", "white", "yellow",
|
||||
},
|
||||
}
|
||||
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
local desc = def.description
|
||||
local item_split = itemstring:find(":")
|
||||
local new_id = game .. itemstring:sub(item_split)
|
||||
for mod, ids in pairs(same_id) do
|
||||
for _, id in pairs(ids) do
|
||||
if itemstring == "mcl_" .. mod .. ":" .. id then
|
||||
new_id = game .. ":" .. id .. "_" .. mod:gsub("s", "")
|
||||
end
|
||||
end
|
||||
end
|
||||
minetest.register_alias(new_id, itemstring)
|
||||
if minetest.settings:get_bool("mcl_item_id_debug", true) then
|
||||
return new_id, "#555555"
|
||||
end
|
||||
end)
|
3
mods/HELP/mcl_item_id/mod.conf
Normal file
3
mods/HELP/mcl_item_id/mod.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
name = mcl_item_id
|
||||
author = NO11
|
||||
depends = tt
|
|
@ -1,5 +1,5 @@
|
|||
name = mcl_armor
|
||||
author = stu
|
||||
description = Adds craftable armor that is visible to other players.
|
||||
depends = mcl_core, mcl_player, mcl_enchanting
|
||||
depends = mcl_core, mcl_player, mcl_enchanting, mcl_damage
|
||||
optional_depends = mcl_fire, ethereal, bakedclay
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 409 B |
|
@ -1,4 +1,4 @@
|
|||
name = mcl_brewing
|
||||
author = bzoss
|
||||
depends = mcl_init, mcl_formspec, mcl_sounds, mcl_potions, mcl_mobitems
|
||||
optional_depends = mcl_core, doc, screwdriver
|
||||
optional_depends = mcl_core, doc, screwdriver, mesecons_mvps
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name = mcl_playerplus
|
||||
author = TenPlus1
|
||||
description = Adds some simple player-related gameplay effects: Hurt by touching a cactus, suffocation and more.
|
||||
depends = mcl_init, mcl_core, mcl_particles, mcl_hunger, playerphysics, mcl_playerinfo, mcl_weather, mcl_spawn, mcl_enchanting, mcl_damage
|
||||
depends = mcl_init, mcl_core, mcl_particles, mcl_hunger, playerphysics, mcl_playerinfo, mcl_weather, mcl_spawn, mcl_enchanting, mcl_damage, mcl_sprint
|
||||
|
||||
|
|
|
@ -153,3 +153,7 @@ fix_doubleplants (Mcimport double plant fixes) bool true
|
|||
|
||||
# Allow players to create Minecraft-like maps.
|
||||
enable_real_maps (Enable Real Maps) bool true
|
||||
|
||||
[Debugging]
|
||||
# If enabled, this will show the itemstring of an item in the description.
|
||||
mcl_item_id_debug (Item ID Debug) bool false
|
Loading…
Reference in a new issue