Sudoku 1.8.0 upload
parent
fa3a344eac
commit
a17fe26c53
34
README.txt
34
README.txt
|
@ -1,28 +1,12 @@
|
|||
Minetest Game [minetest_game]
|
||||
=============================
|
||||
The main subgame for the Minetest engine
|
||||
========================================
|
||||
A Game by 1248
|
||||
|
||||
To use this subgame with the Minetest engine, insert this repository as
|
||||
/games/minetest_game
|
||||
Thanks to:
|
||||
/
|
||||
|
||||
The Minetest engine can be found in:
|
||||
https://github.com/minetest/minetest/
|
||||
Info:
|
||||
Sudoku is a mini game in minetest.
|
||||
Can you solve the Sudoku??
|
||||
|
||||
Compatibility
|
||||
--------------
|
||||
The Minetest Game github master HEAD is generally compatible with the github
|
||||
master HEAD of the Minetest engine.
|
||||
|
||||
Additionally, when the Minetest engine is tagged to be a certain version (eg.
|
||||
0.4.10), Minetest Game is tagged with the version too.
|
||||
|
||||
When stable releases are made, Minetest Game is packaged and made available in
|
||||
http://minetest.net/download
|
||||
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!)
|
||||
|
||||
Licensing
|
||||
---------
|
||||
|
||||
See LICENSE.txt
|
||||
License:
|
||||
See README.txt in each mod for more information
|
||||
Every code written by me is LGPLv2.1
|
BIN
menu/Thumbs.db
BIN
menu/Thumbs.db
Binary file not shown.
|
@ -49,21 +49,24 @@ function beds.register_bed(name, def)
|
|||
local node = minetest.get_node(under)
|
||||
local udef = minetest.registered_nodes[node.name]
|
||||
if udef and udef.on_rightclick and
|
||||
not (placer and placer:get_player_control().sneak) then
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return udef.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
local pos
|
||||
if minetest.registered_items[minetest.get_node(under).name].buildable_to then
|
||||
if udef and udef.buildable_to then
|
||||
pos = under
|
||||
else
|
||||
pos = pointed_thing.above
|
||||
end
|
||||
|
||||
if minetest.is_protected(pos, placer:get_player_name()) and
|
||||
not minetest.check_player_privs(placer, "protection_bypass") then
|
||||
minetest.record_protection_violation(pos, placer:get_player_name())
|
||||
local player_name = placer and placer:get_player_name() or ""
|
||||
|
||||
if minetest.is_protected(pos, player_name) and
|
||||
not minetest.check_player_privs(player_name, "protection_bypass") then
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
return itemstack
|
||||
end
|
||||
|
||||
|
@ -72,12 +75,13 @@ function beds.register_bed(name, def)
|
|||
return itemstack
|
||||
end
|
||||
|
||||
local dir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local dir = placer and placer:get_look_dir() and
|
||||
minetest.dir_to_facedir(placer:get_look_dir()) or 0
|
||||
local botpos = vector.add(pos, minetest.facedir_to_dir(dir))
|
||||
|
||||
if minetest.is_protected(botpos, placer:get_player_name()) and
|
||||
not minetest.check_player_privs(placer, "protection_bypass") then
|
||||
minetest.record_protection_violation(botpos, placer:get_player_name())
|
||||
if minetest.is_protected(botpos, player_name) and
|
||||
not minetest.check_player_privs(player_name, "protection_bypass") then
|
||||
minetest.record_protection_violation(botpos, player_name)
|
||||
return itemstack
|
||||
end
|
||||
|
||||
|
@ -90,7 +94,7 @@ function beds.register_bed(name, def)
|
|||
minetest.set_node(botpos, {name = name .. "_top", param2 = dir})
|
||||
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(placer:get_player_name())) then
|
||||
and creative.is_enabled_for(player_name)) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
|
|
@ -230,7 +230,8 @@ minetest.register_craftitem("boats:boat", {
|
|||
local node = minetest.get_node(under)
|
||||
local udef = minetest.registered_nodes[node.name]
|
||||
if udef and udef.on_rightclick and
|
||||
not (placer and placer:get_player_control().sneak) then
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return udef.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
@ -244,9 +245,12 @@ minetest.register_craftitem("boats:boat", {
|
|||
pointed_thing.under.y = pointed_thing.under.y + 0.5
|
||||
boat = minetest.add_entity(pointed_thing.under, "boats:boat")
|
||||
if boat then
|
||||
boat:setyaw(placer:get_look_horizontal())
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(placer:get_player_name())) then
|
||||
if placer then
|
||||
boat:setyaw(placer:get_look_horizontal())
|
||||
end
|
||||
local player_name = placer and placer:get_player_name() or ""
|
||||
if not (creative and creative.is_enabled_for and
|
||||
creative.is_enabled_for(player_name)) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
end
|
||||
|
|
|
@ -68,6 +68,12 @@ minetest.register_node("bones:bones", {
|
|||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if meta:get_inventory():is_empty("main") then
|
||||
local inv = player:get_inventory()
|
||||
if inv:room_for_item("main", {name = "bones:bones"}) then
|
||||
inv:add_item("main", {name = "bones:bones"})
|
||||
else
|
||||
minetest.add_item(pos, "bones:bones")
|
||||
end
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
end,
|
||||
|
|
|
@ -69,7 +69,8 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
|||
|
||||
-- Call on_rightclick if the pointed node defines it
|
||||
if ndef and ndef.on_rightclick and
|
||||
user and not user:get_player_control().sneak then
|
||||
not (user and user:is_player() and
|
||||
user:get_player_control().sneak) then
|
||||
return ndef.on_rightclick(
|
||||
pointed_thing.under,
|
||||
node, user,
|
||||
|
|
|
@ -58,7 +58,8 @@ end
|
|||
|
||||
function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, direction)
|
||||
local pos = self.object:getpos()
|
||||
if not self.railtype then
|
||||
local vel = self.object:getvelocity()
|
||||
if not self.railtype or vector.equals(vel, {x=0, y=0, z=0}) then
|
||||
local node = minetest.get_node(pos).name
|
||||
self.railtype = minetest.get_item_group(node, "connect_to_raillike")
|
||||
end
|
||||
|
@ -105,7 +106,6 @@ function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities,
|
|||
return
|
||||
end
|
||||
-- Player punches cart to alter velocity
|
||||
local vel = self.object:getvelocity()
|
||||
if puncher:get_player_name() == self.driver then
|
||||
if math.abs(vel.x + vel.z) > carts.punch_speed_max then
|
||||
return
|
||||
|
@ -367,7 +367,8 @@ minetest.register_craftitem("carts:cart", {
|
|||
local node = minetest.get_node(under)
|
||||
local udef = minetest.registered_nodes[node.name]
|
||||
if udef and udef.on_rightclick and
|
||||
not (placer and placer:get_player_control().sneak) then
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return udef.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
|
|
@ -159,23 +159,29 @@ function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
|||
end
|
||||
|
||||
function carts:pathfinder(pos_, old_pos, old_dir, ctrl, pf_switch, railtype)
|
||||
if vector.equals(old_pos, pos_) then
|
||||
return true
|
||||
end
|
||||
|
||||
local pos = vector.round(pos_)
|
||||
local pf_pos = vector.round(old_pos)
|
||||
local pf_dir = vector.new(old_dir)
|
||||
|
||||
for i = 1, 3 do
|
||||
if vector.equals(pf_pos, pos) then
|
||||
-- Success! Cart moved on correctly
|
||||
return true
|
||||
end
|
||||
pf_dir, pf_switch = carts:get_rail_direction(
|
||||
pf_pos, pf_dir, ctrl, pf_switch, railtype)
|
||||
|
||||
pf_dir, pf_switch = carts:get_rail_direction(pf_pos, pf_dir, ctrl, pf_switch, railtype)
|
||||
if vector.equals(pf_dir, {x=0, y=0, z=0}) then
|
||||
-- No way forwards
|
||||
return false
|
||||
end
|
||||
|
||||
pf_pos = vector.add(pf_pos, pf_dir)
|
||||
|
||||
if vector.equals(pf_pos, pos) then
|
||||
-- Success! Cart moved on correctly
|
||||
return true
|
||||
end
|
||||
end
|
||||
-- Cart not found
|
||||
return false
|
||||
|
@ -211,7 +217,12 @@ end
|
|||
|
||||
function carts:get_rail_groups(additional_groups)
|
||||
-- Get the default rail groups and add more when a table is given
|
||||
local groups = {dig_immediate = 2, attached_node = 1, rail = 1, connect_to_raillike = 1}
|
||||
local groups = {
|
||||
dig_immediate = 2,
|
||||
attached_node = 1,
|
||||
rail = 1,
|
||||
connect_to_raillike = minetest.raillike_group("rail")
|
||||
}
|
||||
if type(additional_groups) == "table" then
|
||||
for k, v in pairs(additional_groups) do
|
||||
groups[k] = v
|
||||
|
|
|
@ -40,16 +40,16 @@ end
|
|||
|
||||
-- Unlimited node placement
|
||||
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
|
||||
return creative.is_enabled_for(placer:get_player_name())
|
||||
if placer and placer:is_player() then
|
||||
return creative.is_enabled_for(placer:get_player_name())
|
||||
end
|
||||
end)
|
||||
|
||||
-- Don't pick up if the item is already in the inventory
|
||||
local old_handle_node_drops = minetest.handle_node_drops
|
||||
function minetest.handle_node_drops(pos, drops, digger)
|
||||
if not digger or not digger:is_player() then
|
||||
return
|
||||
end
|
||||
if not creative.is_enabled_for(digger:get_player_name()) then
|
||||
if not digger or not digger:is_player() or
|
||||
not creative.is_enabled_for(digger:get_player_name()) then
|
||||
return old_handle_node_drops(pos, drops, digger)
|
||||
end
|
||||
local inv = digger:get_inventory()
|
||||
|
|
|
@ -1,4 +1,19 @@
|
|||
local player_inventory = {}
|
||||
local inventory_cache = {}
|
||||
|
||||
local function init_creative_cache(items)
|
||||
inventory_cache[items] = {}
|
||||
local i_cache = inventory_cache[items]
|
||||
|
||||
for name, def in pairs(items) do
|
||||
if def.groups.not_in_creative_inventory ~= 1 and
|
||||
def.description and def.description ~= "" then
|
||||
i_cache[name] = def
|
||||
end
|
||||
end
|
||||
table.sort(i_cache)
|
||||
return i_cache
|
||||
end
|
||||
|
||||
function creative.init_creative_inventory(player)
|
||||
local player_name = player:get_player_name()
|
||||
|
@ -10,22 +25,25 @@ function creative.init_creative_inventory(player)
|
|||
|
||||
minetest.create_detached_inventory("creative_" .. player_name, {
|
||||
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player2)
|
||||
if not to_list == "main" then
|
||||
return count
|
||||
else
|
||||
local name = player2 and player2:get_player_name() or ""
|
||||
if not creative.is_enabled_for(name) or
|
||||
to_list == "main" then
|
||||
return 0
|
||||
end
|
||||
return count
|
||||
end,
|
||||
allow_put = function(inv, listname, index, stack, player2)
|
||||
return 0
|
||||
end,
|
||||
allow_take = function(inv, listname, index, stack, player2)
|
||||
local name = player2 and player2:get_player_name() or ""
|
||||
if not creative.is_enabled_for(name) then
|
||||
return 0
|
||||
end
|
||||
return -1
|
||||
end,
|
||||
on_move = function(inv, from_list, from_index, to_list, to_index, count, player2)
|
||||
end,
|
||||
on_put = function(inv, listname, index, stack, player2)
|
||||
end,
|
||||
on_take = function(inv, listname, index, stack, player2)
|
||||
if stack and stack:get_count() > 0 then
|
||||
minetest.log("action", player_name .. " takes " .. stack:get_name().. " from creative inventory")
|
||||
|
@ -42,11 +60,11 @@ function creative.update_creative_inventory(player_name, tab_content)
|
|||
creative.init_creative_inventory(minetest.get_player_by_name(player_name))
|
||||
local player_inv = minetest.get_inventory({type = "detached", name = "creative_" .. player_name})
|
||||
|
||||
for name, def in pairs(tab_content) do
|
||||
if not (def.groups.not_in_creative_inventory == 1) and
|
||||
def.description and def.description ~= "" and
|
||||
(def.name:find(inv.filter, 1, true) or
|
||||
def.description:lower():find(inv.filter, 1, true)) then
|
||||
local items = inventory_cache[tab_content] or init_creative_cache(tab_content)
|
||||
|
||||
for name, def in pairs(items) do
|
||||
if def.name:find(inv.filter, 1, true) or
|
||||
def.description:lower():find(inv.filter, 1, true) then
|
||||
creative_list[#creative_list+1] = name
|
||||
end
|
||||
end
|
||||
|
@ -100,6 +118,8 @@ function creative.register_tab(name, title, items)
|
|||
button[2.75,3.4;0.8,0.5;creative_clear;X]
|
||||
tooltip[creative_search;Search]
|
||||
tooltip[creative_clear;Reset]
|
||||
tooltip[creative_prev;Previous page]
|
||||
tooltip[creative_next;Next page]
|
||||
listring[current_player;main]
|
||||
field_close_on_enter[creative_filter;false]
|
||||
]] ..
|
||||
|
@ -158,10 +178,6 @@ function creative.register_tab(name, title, items)
|
|||
})
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
creative.update_creative_inventory(player:get_player_name(), minetest.registered_items)
|
||||
end)
|
||||
|
||||
creative.register_tab("all", "All", minetest.registered_items)
|
||||
creative.register_tab("nodes", "Nodes", minetest.registered_nodes)
|
||||
creative.register_tab("tools", "Tools", minetest.registered_tools)
|
||||
|
|
|
@ -119,6 +119,7 @@ paramat (CC BY-SA 3.0):
|
|||
default_silver_sandstone.png -- Derived from a texture by GreenXenith (CC-BY-SA 3.0)
|
||||
default_silver_sandstone_brick.png -- Derived from a texture by GreenXenith (CC-BY-SA 3.0)
|
||||
default_silver_sandstone_block.png -- Derived from a texture by GreenXenith (CC-BY-SA 3.0)
|
||||
default_bookshelf_slot.png -- Derived from a texture by Gambit (CC-BY-SA 3.0)
|
||||
|
||||
brunob.santos (CC BY-SA 4.0):
|
||||
default_desert_cobble.png
|
||||
|
@ -131,7 +132,6 @@ BlockMen (CC BY-SA 3.0):
|
|||
default_gold_ingot.png
|
||||
default_tool_steelsword.png
|
||||
default_diamond.png
|
||||
default_book.png
|
||||
default_tool_*.png
|
||||
default_lava_source_animated.png
|
||||
default_lava_flowing_animated.png
|
||||
|
@ -145,11 +145,7 @@ BlockMen (CC BY-SA 3.0):
|
|||
bubble.png
|
||||
gui_*.png
|
||||
|
||||
Wuzzy (CC BY-SA 3.0):
|
||||
default_bookshelf_slot.png (based on default_book.png)
|
||||
|
||||
sofar (CC BY-SA 3.0):
|
||||
default_book_written.png, based on default_book.png
|
||||
default_aspen_sapling
|
||||
default_aspen_tree
|
||||
default_aspen_tree_top, derived from default_pine_tree_top (by paramat)
|
||||
|
@ -186,6 +182,7 @@ Gambit (CC BY-SA 3.0):
|
|||
default_snowball.png
|
||||
default_key.png
|
||||
default_key_skeleton.png
|
||||
default_book.png
|
||||
|
||||
asl97 (CC BY-SA 3.0):
|
||||
default_ice.png
|
||||
|
@ -221,6 +218,9 @@ kilbith (CC BY-SA 3.0):
|
|||
default_tin_ingot.png
|
||||
default_tin_lump.png
|
||||
|
||||
CloudyProton (CC BY-SA 3.0):
|
||||
default_book_written.png, based on default_book.png by Gambit
|
||||
|
||||
Glass breaking sounds (CC BY 3.0):
|
||||
1: http://www.freesound.org/people/cmusounddesign/sounds/71947/
|
||||
2: http://www.freesound.org/people/Tomlija/sounds/97669/
|
||||
|
|
|
@ -190,6 +190,9 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
-- Axes
|
||||
-- Recipes face left to match appearence in textures and inventory
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:axe_wood',
|
||||
recipe = {
|
||||
|
@ -244,60 +247,6 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:axe_wood',
|
||||
recipe = {
|
||||
{'group:wood', 'group:wood'},
|
||||
{'group:stick', 'group:wood'},
|
||||
{'group:stick',''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:axe_stone',
|
||||
recipe = {
|
||||
{'group:stone', 'group:stone'},
|
||||
{'group:stick', 'group:stone'},
|
||||
{'group:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:axe_steel',
|
||||
recipe = {
|
||||
{'default:steel_ingot', 'default:steel_ingot'},
|
||||
{'group:stick', 'default:steel_ingot'},
|
||||
{'group:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:axe_bronze',
|
||||
recipe = {
|
||||
{'default:bronze_ingot', 'default:bronze_ingot'},
|
||||
{'group:stick', 'default:bronze_ingot'},
|
||||
{'group:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:axe_mese',
|
||||
recipe = {
|
||||
{'default:mese_crystal', 'default:mese_crystal'},
|
||||
{'group:stick', 'default:mese_crystal'},
|
||||
{'group:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:axe_diamond',
|
||||
recipe = {
|
||||
{'default:diamond', 'default:diamond'},
|
||||
{'group:stick', 'default:diamond'},
|
||||
{'group:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:sword_wood',
|
||||
recipe = {
|
||||
|
@ -904,7 +853,7 @@ minetest.register_craft({
|
|||
-- Fuels
|
||||
--
|
||||
|
||||
-- Support use of group:tree
|
||||
-- Support use of group:tree, includes default:tree which has the same burn time
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "group:tree",
|
||||
|
@ -927,12 +876,6 @@ minetest.register_craft({
|
|||
burntime = 26,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:tree",
|
||||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:acacia_tree",
|
||||
|
@ -946,7 +889,7 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
|
||||
-- Support use of group:wood
|
||||
-- Support use of group:wood, includes default:wood which has the same burn time
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "group:wood",
|
||||
|
@ -965,12 +908,6 @@ minetest.register_craft({
|
|||
burntime = 6,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:wood",
|
||||
burntime = 7,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:acacia_wood",
|
||||
|
@ -984,53 +921,47 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
|
||||
-- Support use of group:sapling
|
||||
-- Support use of group:sapling, includes default:sapling which has the same burn time
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "group:sapling",
|
||||
burntime = 10,
|
||||
burntime = 5,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:bush_sapling",
|
||||
burntime = 6,
|
||||
burntime = 3,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:acacia_bush_sapling",
|
||||
burntime = 7,
|
||||
burntime = 4,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:aspen_sapling",
|
||||
burntime = 8,
|
||||
burntime = 4,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:pine_sapling",
|
||||
burntime = 9,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:sapling",
|
||||
burntime = 10,
|
||||
burntime = 5,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:acacia_sapling",
|
||||
burntime = 11,
|
||||
burntime = 6,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:junglesapling",
|
||||
burntime = 12,
|
||||
burntime = 6,
|
||||
})
|
||||
|
||||
|
||||
|
@ -1080,13 +1011,13 @@ minetest.register_craft({
|
|||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:junglegrass",
|
||||
burntime = 2,
|
||||
burntime = 3,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "group:leaves",
|
||||
burntime = 1,
|
||||
burntime = 4,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
@ -1098,7 +1029,7 @@ minetest.register_craft({
|
|||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:papyrus",
|
||||
burntime = 1,
|
||||
burntime = 3,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
@ -1110,7 +1041,7 @@ minetest.register_craft({
|
|||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:ladder_wood",
|
||||
burntime = 2,
|
||||
burntime = 7,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
@ -1143,12 +1074,6 @@ minetest.register_craft({
|
|||
burntime = 30,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:apple",
|
||||
burntime = 3,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:coal_lump",
|
||||
|
|
|
@ -75,12 +75,16 @@ local function book_on_use(itemstack, user)
|
|||
return itemstack
|
||||
end
|
||||
|
||||
local max_text_size = 10000
|
||||
local max_title_size = 80
|
||||
local short_title_size = 35
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "default:book" then return end
|
||||
local inv = player:get_inventory()
|
||||
local stack = player:get_wielded_item()
|
||||
|
||||
if fields.save and fields.title ~= "" and fields.text ~= "" then
|
||||
if fields.save and fields.title and fields.text
|
||||
and fields.title ~= "" and fields.text ~= "" then
|
||||
local new_stack, data
|
||||
if stack:get_name() ~= "default:book_written" then
|
||||
local count = stack:get_count()
|
||||
|
@ -99,11 +103,16 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
|
||||
if not data then data = {} end
|
||||
data.title = fields.title
|
||||
data.title = fields.title:sub(1, max_title_size)
|
||||
data.owner = player:get_player_name()
|
||||
data.description = "\""..fields.title.."\" by "..data.owner
|
||||
data.text = fields.text
|
||||
data.text_len = #data.text
|
||||
local short_title = data.title
|
||||
-- Don't bother triming the title if the trailing dots would make it longer
|
||||
if #short_title > short_title_size + 3 then
|
||||
short_title = short_title:sub(1, short_title_size) .. "..."
|
||||
end
|
||||
data.description = "\""..short_title.."\" by "..data.owner
|
||||
data.text = fields.text:sub(1, max_text_size)
|
||||
data.text = data.text:gsub("\r\n", "\n"):gsub("\r", "\n")
|
||||
data.page = 1
|
||||
data.page_max = math.ceil((#data.text:gsub("[^\n]", "") + 1) / lpp)
|
||||
|
||||
|
|
|
@ -136,10 +136,12 @@ if minetest.settings:get_bool("enable_lavacooling") ~= false then
|
|||
label = "Lava cooling",
|
||||
nodenames = {"default:lava_source", "default:lava_flowing"},
|
||||
neighbors = {"group:cools_lava", "group:water"},
|
||||
interval = 1,
|
||||
interval = 2,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = default.cool_lava,
|
||||
action = function(...)
|
||||
default.cool_lava(...)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -222,7 +224,9 @@ minetest.register_abm({
|
|||
neighbors = {"group:sand"},
|
||||
interval = 12,
|
||||
chance = 83,
|
||||
action = default.grow_cactus
|
||||
action = function(...)
|
||||
default.grow_cactus(...)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
|
@ -231,7 +235,9 @@ minetest.register_abm({
|
|||
neighbors = {"default:dirt", "default:dirt_with_grass"},
|
||||
interval = 14,
|
||||
chance = 71,
|
||||
action = default.grow_papyrus
|
||||
action = function(...)
|
||||
default.grow_papyrus(...)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
|
@ -291,7 +297,7 @@ function default.register_fence(name, def)
|
|||
groups = {},
|
||||
}
|
||||
for k, v in pairs(default_fields) do
|
||||
if not def[k] then
|
||||
if def[k] == nil then
|
||||
def[k] = v
|
||||
end
|
||||
end
|
||||
|
@ -313,7 +319,7 @@ end
|
|||
-- Prevent decay of placed leaves
|
||||
|
||||
default.after_place_leaves = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and not placer:get_player_control().sneak then
|
||||
if placer and placer:is_player() and not placer:get_player_control().sneak then
|
||||
local node = minetest.get_node(pos)
|
||||
node.param2 = 1
|
||||
minetest.set_node(pos, node)
|
||||
|
|
|
@ -119,7 +119,7 @@ local function furnace_node_timer(pos, elapsed)
|
|||
local fuel
|
||||
|
||||
local update = true
|
||||
while update do
|
||||
while elapsed > 0 and update do
|
||||
update = false
|
||||
|
||||
srclist = inv:get_list("src")
|
||||
|
@ -134,13 +134,18 @@ local function furnace_node_timer(pos, elapsed)
|
|||
cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
|
||||
cookable = cooked.time ~= 0
|
||||
|
||||
local el = math.min(elapsed, fuel_totaltime - fuel_time)
|
||||
if cookable then -- fuel lasts long enough, adjust el to cooking duration
|
||||
el = math.min(el, cooked.time - src_time)
|
||||
end
|
||||
|
||||
-- Check if we have enough fuel to burn
|
||||
if fuel_time < fuel_totaltime then
|
||||
-- The furnace is currently active and has enough fuel
|
||||
fuel_time = fuel_time + elapsed
|
||||
fuel_time = fuel_time + el
|
||||
-- If there is a cookable item then check if it is ready yet
|
||||
if cookable then
|
||||
src_time = src_time + elapsed
|
||||
src_time = src_time + el
|
||||
if src_time >= cooked.time then
|
||||
-- Place result in dst list if possible
|
||||
if inv:room_for_item("dst", cooked.item) then
|
||||
|
@ -149,6 +154,9 @@ local function furnace_node_timer(pos, elapsed)
|
|||
src_time = src_time - cooked.time
|
||||
update = true
|
||||
end
|
||||
else
|
||||
-- Item could not be cooked: probably missing fuel
|
||||
update = true
|
||||
end
|
||||
end
|
||||
else
|
||||
|
@ -166,8 +174,7 @@ local function furnace_node_timer(pos, elapsed)
|
|||
-- Take fuel from fuel list
|
||||
inv:set_stack("fuel", 1, afterfuel.items[1])
|
||||
update = true
|
||||
fuel_totaltime = fuel.time + (fuel_time - fuel_totaltime)
|
||||
src_time = src_time + elapsed
|
||||
fuel_totaltime = fuel.time + (fuel_totaltime - fuel_time)
|
||||
end
|
||||
else
|
||||
-- We don't need to get new fuel since there is no cookable item
|
||||
|
@ -177,7 +184,7 @@ local function furnace_node_timer(pos, elapsed)
|
|||
fuel_time = 0
|
||||
end
|
||||
|
||||
elapsed = 0
|
||||
elapsed = elapsed - el
|
||||
end
|
||||
|
||||
if fuel and fuel_totaltime > fuel.time then
|
||||
|
|
|
@ -19,7 +19,7 @@ Licenses of media (textures, models and sounds)
|
|||
-----------------------------------------------
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
Copyright (C) 2010-2016:
|
||||
Copyright (C) 2010-2017:
|
||||
celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Cisoun
|
||||
G4JC
|
||||
|
@ -44,6 +44,7 @@ Copyright (C) 2010-2016:
|
|||
GreenXenith
|
||||
kaeza
|
||||
kilbith
|
||||
CloudyProton
|
||||
|
||||
You are free to:
|
||||
Share — copy and redistribute the material in any medium or format.
|
||||
|
@ -111,7 +112,6 @@ http://creativecommons.org/licenses/by-sa/4.0/
|
|||
Attribution-ShareAlike 2.0 Generic (CC BY-SA 2.0)
|
||||
Copyright (C) 2014-2016 Neuromancer
|
||||
|
||||
|
||||
You are free to:
|
||||
Share — copy and redistribute the material in any medium or format.
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||
|
|
|
@ -440,7 +440,7 @@ minetest.register_node("default:dirt_with_snow", {
|
|||
tiles = {"default_snow.png", "default_dirt.png",
|
||||
{name = "default_dirt.png^default_snow_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, spreading_dirt_type = 1, snowy = 1},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1, snowy = 1},
|
||||
drop = 'default:dirt',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_snow_footstep", gain = 0.15},
|
||||
|
@ -608,7 +608,7 @@ minetest.register_node("default:sapling", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
@ -673,9 +673,7 @@ minetest.register_node("default:apple", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "default:apple", param2 = 1})
|
||||
end
|
||||
minetest.set_node(pos, {name = "default:apple", param2 = 1})
|
||||
end,
|
||||
})
|
||||
|
||||
|
@ -742,7 +740,7 @@ minetest.register_node("default:junglesapling", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
@ -821,7 +819,7 @@ minetest.register_node("default:pine_sapling", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
@ -901,7 +899,7 @@ minetest.register_node("default:acacia_sapling", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
@ -979,7 +977,7 @@ minetest.register_node("default:aspen_sapling", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
@ -1362,7 +1360,7 @@ minetest.register_node("default:bush_sapling", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1200, 2400))
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
@ -1433,7 +1431,7 @@ minetest.register_node("default:acacia_bush_sapling", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1200, 2400))
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
@ -1783,13 +1781,14 @@ local function get_chest_formspec(pos)
|
|||
end
|
||||
|
||||
local function chest_lid_obstructed(pos)
|
||||
local above = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local def = minetest.registered_nodes[minetest.get_node(above).name]
|
||||
-- allow ladders, signs, wallmounted things and torches to not obstruct
|
||||
if def.drawtype == "airlike" or
|
||||
if def and
|
||||
(def.drawtype == "airlike" or
|
||||
def.drawtype == "signlike" or
|
||||
def.drawtype == "torchlike" or
|
||||
(def.drawtype == "nodebox" and def.paramtype2 == "wallmounted") then
|
||||
(def.drawtype == "nodebox" and def.paramtype2 == "wallmounted")) then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
|
@ -1797,6 +1796,24 @@ end
|
|||
|
||||
local open_chests = {}
|
||||
|
||||
local function chest_lid_close(pn)
|
||||
local pos = open_chests[pn].pos
|
||||
local sound = open_chests[pn].sound
|
||||
local swap = open_chests[pn].swap
|
||||
|
||||
open_chests[pn] = nil
|
||||
for k, v in pairs(open_chests) do
|
||||
if v.pos.x == pos.x and v.pos.y == pos.y and v.pos.z == pos.z then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
minetest.after(0.2, minetest.swap_node, pos, { name = "default:" .. swap,
|
||||
param2 = node.param2 })
|
||||
minetest.sound_play(sound, {gain = 0.3, pos = pos, max_hear_distance = 10})
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "default:chest" then
|
||||
return
|
||||
|
@ -1810,23 +1827,17 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
return
|
||||
end
|
||||
|
||||
local pos = open_chests[pn].pos
|
||||
local sound = open_chests[pn].sound
|
||||
local swap = open_chests[pn].swap
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
open_chests[pn] = nil
|
||||
for k, v in pairs(open_chests) do
|
||||
if v.pos.x == pos.x and v.pos.y == pos.y and v.pos.z == pos.z then
|
||||
return true
|
||||
end
|
||||
end
|
||||
minetest.after(0.2, minetest.swap_node, pos, { name = "default:" .. swap,
|
||||
param2 = node.param2 })
|
||||
minetest.sound_play(sound, {gain = 0.3, pos = pos, max_hear_distance = 10})
|
||||
chest_lid_close(pn)
|
||||
return true
|
||||
end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
local pn = player:get_player_name()
|
||||
if open_chests[pn] then
|
||||
chest_lid_close(pn)
|
||||
end
|
||||
end)
|
||||
|
||||
function default.register_chest(name, d)
|
||||
local def = table.copy(d)
|
||||
def.drawtype = "mesh"
|
||||
|
@ -1960,6 +1971,13 @@ function default.register_chest(name, d)
|
|||
open_chests[clicker:get_player_name()] = { pos = pos,
|
||||
sound = def.sound_close, swap = name }
|
||||
end
|
||||
def.on_blast = function(pos)
|
||||
local drops = {}
|
||||
default.get_inventory_drops(pos, "main", drops)
|
||||
drops[#drops+1] = "default:" .. name
|
||||
minetest.remove_node(pos)
|
||||
return drops
|
||||
end
|
||||
end
|
||||
|
||||
def.on_metadata_inventory_move = function(pos, from_list, from_index,
|
||||
|
@ -1977,27 +1995,28 @@ function default.register_chest(name, d)
|
|||
" takes " .. stack:get_name() ..
|
||||
" from chest at " .. minetest.pos_to_string(pos))
|
||||
end
|
||||
def.on_blast = function(pos)
|
||||
local drops = {}
|
||||
default.get_inventory_drops(pos, "main", drops)
|
||||
drops[#drops+1] = "default:chest"
|
||||
minetest.remove_node(pos)
|
||||
return drops
|
||||
end
|
||||
|
||||
local def_opened = table.copy(def)
|
||||
local def_closed = table.copy(def)
|
||||
|
||||
def_opened.mesh = "chest_open.obj"
|
||||
for i = 1, #def_opened.tiles do
|
||||
if type(def_opened.tiles[i]) == "string" then
|
||||
def_opened.tiles[i] = {name = def_opened.tiles[i], backface_culling = true}
|
||||
elseif def_opened.tiles[i].backface_culling == nil then
|
||||
def_opened.tiles[i].backface_culling = true
|
||||
end
|
||||
end
|
||||
def_opened.drop = "default:" .. name
|
||||
def_opened.groups.not_in_creative_inventory = 1
|
||||
def_opened.selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -1/2, -1/2, -1/2, 1/2, 3/16, 1/2 },
|
||||
}
|
||||
}
|
||||
def_opened.can_dig = function()
|
||||
return false
|
||||
end
|
||||
def_opened.on_blast = function() end
|
||||
|
||||
def_closed.mesh = nil
|
||||
def_closed.drawtype = nil
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 204 B |
Binary file not shown.
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 262 B |
Binary file not shown.
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 140 B |
|
@ -389,7 +389,8 @@ minetest.register_tool("default:key", {
|
|||
local node = minetest.get_node(under)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
if def and def.on_rightclick and
|
||||
not (placer and placer:get_player_control().sneak) then
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return def.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
|
|
@ -63,7 +63,8 @@ minetest.register_node("default:torch", {
|
|||
local node = minetest.get_node(under)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
if def and def.on_rightclick and
|
||||
((not placer) or (placer and not placer:get_player_control().sneak)) then
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return def.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
|
|
@ -31,12 +31,12 @@ local function is_snow_nearby(pos)
|
|||
end
|
||||
|
||||
|
||||
-- Sapling ABM
|
||||
-- Grow sapling
|
||||
|
||||
function default.grow_sapling(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
-- try again 5 min later
|
||||
minetest.get_node_timer(pos):start(300)
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -94,7 +94,7 @@ minetest.register_lbm({
|
|||
"default:pine_sapling", "default:acacia_sapling",
|
||||
"default:aspen_sapling"},
|
||||
action = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1200, 2400))
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -468,7 +468,9 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
|
|||
local node = minetest.get_node_or_nil(pos)
|
||||
local pdef = node and minetest.registered_nodes[node.name]
|
||||
|
||||
if pdef and pdef.on_rightclick and not placer:get_player_control().sneak then
|
||||
if pdef and pdef.on_rightclick and
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return pdef.on_rightclick(pos, node, placer, itemstack, pointed_thing)
|
||||
end
|
||||
|
||||
|
@ -481,7 +483,7 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
|
|||
end
|
||||
end
|
||||
|
||||
local player_name = placer:get_player_name()
|
||||
local player_name = placer and placer:get_player_name() or ""
|
||||
-- Check sapling position for protection
|
||||
if minetest.is_protected(pos, player_name) then
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
|
|
|
@ -203,12 +203,7 @@ end
|
|||
|
||||
local function can_dig_door(pos, digger)
|
||||
replace_old_owner_information(pos)
|
||||
if default.can_interact_with_node(digger, pos) then
|
||||
return true
|
||||
else
|
||||
minetest.record_protection_violation(pos, digger:get_player_name())
|
||||
return false
|
||||
end
|
||||
return default.can_interact_with_node(digger, pos)
|
||||
end
|
||||
|
||||
function doors.register(name, def)
|
||||
|
@ -266,7 +261,8 @@ function doors.register(name, def)
|
|||
local node = minetest.get_node(pointed_thing.under)
|
||||
local pdef = minetest.registered_nodes[node.name]
|
||||
if pdef and pdef.on_rightclick and
|
||||
not placer:get_player_control().sneak then
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return pdef.on_rightclick(pointed_thing.under,
|
||||
node, placer, itemstack, pointed_thing)
|
||||
end
|
||||
|
@ -290,12 +286,12 @@ function doors.register(name, def)
|
|||
return itemstack
|
||||
end
|
||||
|
||||
local pn = placer:get_player_name()
|
||||
local pn = placer and placer:get_player_name() or ""
|
||||
if minetest.is_protected(pos, pn) or minetest.is_protected(above, pn) then
|
||||
return itemstack
|
||||
end
|
||||
|
||||
local dir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local dir = placer and minetest.dir_to_facedir(placer:get_look_dir()) or 0
|
||||
|
||||
local ref = {
|
||||
{x = -1, y = 0, z = 0},
|
||||
|
@ -712,7 +708,7 @@ function doors.register_fencegate(name, def)
|
|||
local fence = {
|
||||
description = def.description,
|
||||
drawtype = "mesh",
|
||||
tiles = {def.texture},
|
||||
tiles = {},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
|
@ -734,6 +730,16 @@ function doors.register_fencegate(name, def)
|
|||
},
|
||||
}
|
||||
|
||||
|
||||
if type(def.texture) == "string" then
|
||||
fence.tiles[1] = {name = def.texture, backface_culling = true}
|
||||
elseif def.texture.backface_culling == nil then
|
||||
fence.tiles[1] = table.copy(def.texture)
|
||||
fence.tiles[1].backface_culling = true
|
||||
else
|
||||
fence.tiles[1] = def.texture
|
||||
end
|
||||
|
||||
if not fence.sounds then
|
||||
fence.sounds = default.node_sound_wood_defaults()
|
||||
end
|
||||
|
|
|
@ -118,15 +118,6 @@ farming.register_hoe = function(name, def)
|
|||
{"", "group:stick", ""}
|
||||
}
|
||||
})
|
||||
-- Reverse Recipe
|
||||
minetest.register_craft({
|
||||
output = name:sub(2),
|
||||
recipe = {
|
||||
{"", def.material, def.material},
|
||||
{"", "group:stick", ""},
|
||||
{"", "group:stick", ""}
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -153,12 +144,14 @@ farming.place_seed = function(itemstack, placer, pointed_thing, plantname)
|
|||
local under = minetest.get_node(pt.under)
|
||||
local above = minetest.get_node(pt.above)
|
||||
|
||||
if minetest.is_protected(pt.under, placer:get_player_name()) then
|
||||
minetest.record_protection_violation(pt.under, placer:get_player_name())
|
||||
local player_name = placer and placer:get_player_name() or ""
|
||||
|
||||
if minetest.is_protected(pt.under, player_name) then
|
||||
minetest.record_protection_violation(pt.under, player_name)
|
||||
return
|
||||
end
|
||||
if minetest.is_protected(pt.above, placer:get_player_name()) then
|
||||
minetest.record_protection_violation(pt.above, placer:get_player_name())
|
||||
if minetest.is_protected(pt.above, player_name) then
|
||||
minetest.record_protection_violation(pt.above, player_name)
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -189,7 +182,7 @@ farming.place_seed = function(itemstack, placer, pointed_thing, plantname)
|
|||
minetest.add_node(pt.above, {name = plantname, param2 = 1})
|
||||
tick(pt.above)
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(placer:get_player_name())) then
|
||||
and creative.is_enabled_for(player_name)) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
@ -319,7 +312,8 @@ farming.register_plant = function(name, def)
|
|||
local node = minetest.get_node(under)
|
||||
local udef = minetest.registered_nodes[node.name]
|
||||
if udef and udef.on_rightclick and
|
||||
not (placer and placer:get_player_control().sneak) then
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return udef.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
default
|
||||
wool
|
||||
stairs
|
||||
|
|
|
@ -98,6 +98,16 @@ minetest.register_node("farming:straw", {
|
|||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"straw",
|
||||
"farming:straw",
|
||||
{snappy = 3, flammable = 4},
|
||||
{"farming_straw.png"},
|
||||
"Straw Stair",
|
||||
"Straw Slab",
|
||||
default.node_sound_leaves_defaults()
|
||||
)
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Farming soil",
|
||||
nodenames = {"group:field"},
|
||||
|
|
|
@ -127,24 +127,29 @@ function flowers.flower_spread(pos, node)
|
|||
|
||||
local pos0 = vector.subtract(pos, 4)
|
||||
local pos1 = vector.add(pos, 4)
|
||||
if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 3 then
|
||||
-- Maximum flower density created by mapgen is 13 per 9x9 area.
|
||||
-- The limit of 7 below was tuned by in-game testing to result in a maximum
|
||||
-- flower density by ABM spread of 13 per 9x9 area.
|
||||
-- Warning: Setting this limit theoretically without in-game testing
|
||||
-- results in a maximum flower density by ABM spread that is far too high.
|
||||
if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 7 then
|
||||
return
|
||||
end
|
||||
|
||||
local soils = minetest.find_nodes_in_area_under_air(
|
||||
pos0, pos1, "group:soil")
|
||||
if #soils > 0 then
|
||||
local seedling = soils[math.random(#soils)]
|
||||
local seedling_above =
|
||||
{x = seedling.x, y = seedling.y + 1, z = seedling.z}
|
||||
light = minetest.get_node_light(seedling_above)
|
||||
if not light or light < 13 or
|
||||
-- Desert sand is in the soil group
|
||||
minetest.get_node(seedling).name == "default:desert_sand" then
|
||||
return
|
||||
local num_soils = #soils
|
||||
if num_soils >= 1 then
|
||||
for si = 1, math.min(3, num_soils) do
|
||||
local soil = soils[math.random(num_soils)]
|
||||
local soil_above = {x = soil.x, y = soil.y + 1, z = soil.z}
|
||||
light = minetest.get_node_light(soil_above)
|
||||
if light and light >= 13 and
|
||||
-- Desert sand is in the soil group
|
||||
minetest.get_node(soil).name ~= "default:desert_sand" then
|
||||
minetest.set_node(soil_above, {name = node.name})
|
||||
end
|
||||
end
|
||||
|
||||
minetest.set_node(seedling_above, {name = node.name})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -152,7 +157,7 @@ minetest.register_abm({
|
|||
label = "Flower spread",
|
||||
nodenames = {"group:flora"},
|
||||
interval = 13,
|
||||
chance = 96,
|
||||
chance = 300,
|
||||
action = function(...)
|
||||
flowers.flower_spread(...)
|
||||
end,
|
||||
|
@ -204,38 +209,34 @@ minetest.register_node("flowers:mushroom_brown", {
|
|||
|
||||
-- Mushroom spread and death
|
||||
|
||||
function flowers.mushroom_spread(pos, node)
|
||||
if minetest.get_node_light(pos, nil) == 15 then
|
||||
minetest.remove_node(pos)
|
||||
return
|
||||
end
|
||||
local positions = minetest.find_nodes_in_area_under_air(
|
||||
{x = pos.x - 1, y = pos.y - 2, z = pos.z - 1},
|
||||
{x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
|
||||
{"group:soil", "group:tree"})
|
||||
if #positions == 0 then
|
||||
return
|
||||
end
|
||||
local pos2 = positions[math.random(#positions)]
|
||||
pos2.y = pos2.y + 1
|
||||
if minetest.get_node_light(pos, 0.5) <= 3 and
|
||||
minetest.get_node_light(pos2, 0.5) <= 3 then
|
||||
minetest.set_node(pos2, {name = node.name})
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Mushroom spread",
|
||||
nodenames = {"flowers:mushroom_brown", "flowers:mushroom_red"},
|
||||
interval = 11,
|
||||
chance = 50,
|
||||
action = function(pos, node)
|
||||
if minetest.get_node_light(pos, nil) == 15 then
|
||||
minetest.remove_node(pos)
|
||||
return
|
||||
end
|
||||
local random = {
|
||||
x = pos.x + math.random(-2, 2),
|
||||
y = pos.y + math.random(-1, 1),
|
||||
z = pos.z + math.random(-2, 2)
|
||||
}
|
||||
local random_node = minetest.get_node_or_nil(random)
|
||||
if not random_node or random_node.name ~= "air" then
|
||||
return
|
||||
end
|
||||
local node_under = minetest.get_node_or_nil({x = random.x,
|
||||
y = random.y - 1, z = random.z})
|
||||
if not node_under then
|
||||
return
|
||||
end
|
||||
|
||||
if (minetest.get_item_group(node_under.name, "soil") ~= 0 or
|
||||
minetest.get_item_group(node_under.name, "tree") ~= 0) and
|
||||
minetest.get_node_light(pos, 0.5) <= 3 and
|
||||
minetest.get_node_light(random, 0.5) <= 3 then
|
||||
minetest.set_node(random, {name = node.name})
|
||||
end
|
||||
end
|
||||
chance = 150,
|
||||
action = function(...)
|
||||
flowers.mushroom_spread(...)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
@ -280,12 +281,17 @@ minetest.register_node("flowers:waterlily", {
|
|||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
local node = minetest.get_node(pointed_thing.under).name
|
||||
local def = minetest.registered_nodes[node]
|
||||
local player_name = placer:get_player_name()
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
local player_name = placer and placer:get_player_name() or ""
|
||||
|
||||
if def and def.on_rightclick then
|
||||
return def.on_rightclick(pointed_thing.under, node, placer, itemstack,
|
||||
pointed_thing)
|
||||
end
|
||||
|
||||
if def and def.liquidtype == "source" and
|
||||
minetest.get_item_group(node, "water") > 0 then
|
||||
minetest.get_item_group(node.name, "water") > 0 then
|
||||
if not minetest.is_protected(pos, player_name) then
|
||||
minetest.set_node(pos, {name = "flowers:waterlily",
|
||||
param2 = math.random(0, 3)})
|
||||
|
|
|
@ -1,120 +0,0 @@
|
|||
local sound_time = 0
|
||||
local sound_play_on = 0
|
||||
local sound_play_regnum = nil
|
||||
local inst_list = {}
|
||||
minetest.register_globalstep(function(dtime)
|
||||
if sound_play_on == 0 then
|
||||
sound_play_on = 1
|
||||
inst_list = {}
|
||||
for _,player in ipairs(minetest.get_connected_players()) do
|
||||
local player_inv = player:get_inventory()
|
||||
local inst1 = player_inv:get_stack("inst", 1):get_count()
|
||||
local inst2 = player_inv:get_stack("inst", 2):get_count()
|
||||
if inst1 == 1 then
|
||||
table.insert(inst_list, "Theme1")
|
||||
end
|
||||
if inst2 == 1 then
|
||||
table.insert(inst_list, "Theme2")
|
||||
end
|
||||
local inst = inst_list[ math.random(#inst_list)]
|
||||
local music = player_inv:get_stack("music", 1):get_count()
|
||||
if music == 1 then
|
||||
sound_play_regnum = minetest.sound_play(inst, {
|
||||
to_player = player,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
sound_time = sound_time+dtime
|
||||
if sound_time > 120 then
|
||||
sound_time = 0
|
||||
sound_play_on = 0
|
||||
end
|
||||
end)
|
||||
set = {}
|
||||
set.get_formspec = function(player, pos)
|
||||
if player == nil then
|
||||
return
|
||||
end
|
||||
local player_inv = player:get_inventory()
|
||||
player_inv:set_size("music", 1)
|
||||
player_inv:set_size("inst", 10)
|
||||
local music = player_inv:get_stack("music", 1):get_count()
|
||||
local inst1 = player_inv:get_stack("inst", 1):get_count()
|
||||
local inst2 = player_inv:get_stack("inst", 2):get_count()
|
||||
formspec = "size[6,5]"
|
||||
.."background[9,10.3;1,1;gui_formbg.png;true]"
|
||||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
if music == 0 then
|
||||
formspec = formspec.."checkbox[0,0;music;Background Music on;false]"
|
||||
end
|
||||
if music == 1 then
|
||||
formspec = formspec.."checkbox[0,0;music;Background Music on;true]"
|
||||
end
|
||||
if inst1 == 0 and music == 1 then
|
||||
formspec = formspec.."checkbox[0.5,1;inst1;1248's Theme 1;false]"
|
||||
end
|
||||
if inst1 == 1 and music == 1 then
|
||||
formspec = formspec.."checkbox[0.5,1;inst1;1248's Theme 1;true]"
|
||||
end
|
||||
if inst2 == 0 and music == 1 then
|
||||
formspec = formspec.."checkbox[0.5,1.3;inst2;1248's Theme 2;false]"
|
||||
end
|
||||
if inst2 == 1 and music == 1 then
|
||||
formspec = formspec.."checkbox[0.5,1.3;inst2;1248's Theme 2;true]"
|
||||
end
|
||||
return formspec
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
player:set_inventory_formspec(set.get_formspec(player, player:get_pos()))
|
||||
end)
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if player == nil then
|
||||
return
|
||||
end
|
||||
local player_inv = player:get_inventory()
|
||||
if fields.inst1 then
|
||||
local inst = player_inv:get_stack("inst", 1):get_count()
|
||||
if inst == 0 then
|
||||
player_inv:set_stack("inst", 1, "default:dirt")
|
||||
else
|
||||
player_inv:set_stack("inst", 1, nil)
|
||||
end
|
||||
local inst1 = player_inv:get_stack("inst", 1):get_count()
|
||||
local inst2 = player_inv:get_stack("inst", 2):get_count()
|
||||
if inst1 == 0 and inst2 == 0 then
|
||||
player_inv:set_stack("music", 1, nil)
|
||||
end
|
||||
player:set_inventory_formspec(set.get_formspec(player, player:get_pos()))
|
||||
end
|
||||
if fields.inst2 then
|
||||
local inst = player_inv:get_stack("inst", 2):get_count()
|
||||
if inst == 0 then
|
||||
player_inv:set_stack("inst", 2, "default:dirt")
|
||||
else
|
||||
player_inv:set_stack("inst", 2, nil)
|
||||
end
|
||||
local inst1 = player_inv:get_stack("inst", 1):get_count()
|
||||
local inst2 = player_inv:get_stack("inst", 2):get_count()
|
||||
if inst1 == 0 and inst2 == 0 then
|
||||
player_inv:set_stack("music", 1, nil)
|
||||
end
|
||||
player:set_inventory_formspec(set.get_formspec(player, player:get_pos()))
|
||||
end
|
||||
if fields.music then
|
||||
local music = player_inv:get_stack("music", 1):get_count()
|
||||
if music == 0 then
|
||||
player_inv:set_stack("music", 1, "default:dirt")
|
||||
player_inv:set_stack("inst", 1, "default:dirt")
|
||||
player_inv:set_stack("inst", 2, nil)
|
||||
else
|
||||
player_inv:set_stack("music", 1, nil)
|
||||
if sound_play_regnum ~= nil then
|
||||
minetest.sound_stop(sound_play_regnum)
|
||||
end
|
||||
end
|
||||
player:set_inventory_formspec(set.get_formspec(player, player:get_pos()))
|
||||
end
|
||||
end)
|
Binary file not shown.
Binary file not shown.
|
@ -85,9 +85,10 @@ screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses)
|
|||
end
|
||||
|
||||
local pos = pointed_thing.under
|
||||
local player_name = user and user:get_player_name() or ""
|
||||
|
||||
if minetest.is_protected(pos, user:get_player_name()) then
|
||||
minetest.record_protection_violation(pos, user:get_player_name())
|
||||
if minetest.is_protected(pos, player_name) then
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -133,8 +134,8 @@ screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses)
|
|||
minetest.check_for_falling(pos)
|
||||
end
|
||||
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(user:get_player_name())) then
|
||||
if not (creative and creative.is_enabled_for and
|
||||
creative.is_enabled_for(player_name)) then
|
||||
itemstack:add_wear(65535 / ((uses or 200) - 1))
|
||||
end
|
||||
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
default
|
||||
farming
|
||||
|
|
|
@ -22,21 +22,23 @@ local function rotate_and_place(itemstack, placer, pointed_thing)
|
|||
local p1 = pointed_thing.above
|
||||
local param2 = 0
|
||||
|
||||
local placer_pos = placer:getpos()
|
||||
if placer_pos then
|
||||
param2 = minetest.dir_to_facedir(vector.subtract(p1, placer_pos))
|
||||
end
|
||||
if placer then
|
||||
local placer_pos = placer:getpos()
|
||||
if placer_pos then
|
||||
param2 = minetest.dir_to_facedir(vector.subtract(p1, placer_pos))
|
||||
end
|
||||
|
||||
local finepos = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
|
||||
local fpos = finepos.y % 1
|
||||
local finepos = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
|
||||
local fpos = finepos.y % 1
|
||||
|
||||
if p0.y - 1 == p1.y or (fpos > 0 and fpos < 0.5)
|
||||
or (fpos < -0.5 and fpos > -0.999999999) then
|
||||
param2 = param2 + 20
|
||||
if param2 == 21 then
|
||||
param2 = 23
|
||||
elseif param2 == 23 then
|
||||
param2 = 21
|
||||
if p0.y - 1 == p1.y or (fpos > 0 and fpos < 0.5)
|
||||
or (fpos < -0.5 and fpos > -0.999999999) then
|
||||
param2 = param2 + 20
|
||||
if param2 == 21 then
|
||||
param2 = 23
|
||||
elseif param2 == 23 then
|
||||
param2 = 21
|
||||
end
|
||||
end
|
||||
end
|
||||
return minetest.item_place(itemstack, placer, pointed_thing, param2)
|
||||
|
@ -46,16 +48,29 @@ end
|
|||
-- Node will be called stairs:stair_<subname>
|
||||
|
||||
function stairs.register_stair(subname, recipeitem, groups, images, description, sounds)
|
||||
groups.stair = 1
|
||||
local stair_images = {}
|
||||
for i, image in ipairs(images) do
|
||||
if type(image) == "string" then
|
||||
stair_images[i] = {
|
||||
name = image,
|
||||
backface_culling = true,
|
||||
}
|
||||
elseif image.backface_culling == nil then -- override using any other value
|
||||
stair_images[i] = table.copy(image)
|
||||
stair_images[i].backface_culling = true
|
||||
end
|
||||
end
|
||||
local new_groups = table.copy(groups)
|
||||
new_groups.stair = 1
|
||||
minetest.register_node(":stairs:stair_" .. subname, {
|
||||
description = description,
|
||||
drawtype = "mesh",
|
||||
mesh = "stairs_stair.obj",
|
||||
tiles = images,
|
||||
tiles = stair_images,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = groups,
|
||||
groups = new_groups,
|
||||
sounds = sounds,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
|
@ -89,16 +104,7 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
|
|||
end
|
||||
|
||||
if recipeitem then
|
||||
minetest.register_craft({
|
||||
output = 'stairs:stair_' .. subname .. ' 8',
|
||||
recipe = {
|
||||
{recipeitem, "", ""},
|
||||
{recipeitem, recipeitem, ""},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
-- Flipped recipe for the silly minecrafters
|
||||
-- Recipe matches appearence in inventory
|
||||
minetest.register_craft({
|
||||
output = 'stairs:stair_' .. subname .. ' 8',
|
||||
recipe = {
|
||||
|
@ -132,7 +138,8 @@ local slab_trans_dir = {[0] = 8, 0, 2, 1, 3, 4}
|
|||
-- Node will be called stairs:slab_<subname>
|
||||
|
||||
function stairs.register_slab(subname, recipeitem, groups, images, description, sounds)
|
||||
groups.slab = 1
|
||||
local new_groups = table.copy(groups)
|
||||
new_groups.slab = 1
|
||||
minetest.register_node(":stairs:slab_" .. subname, {
|
||||
description = description,
|
||||
drawtype = "nodebox",
|
||||
|
@ -140,7 +147,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
|
|||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = groups,
|
||||
groups = new_groups,
|
||||
sounds = sounds,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
|
@ -149,8 +156,9 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
|
|||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local under = minetest.get_node(pointed_thing.under)
|
||||
local wield_item = itemstack:get_name()
|
||||
local player_name = placer and placer:get_player_name() or ""
|
||||
local creative_enabled = (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(placer:get_player_name()))
|
||||
and creative.is_enabled_for(player_name))
|
||||
|
||||
if under and under.name:find("stairs:slab_") then
|
||||
-- place slab using under node orientation
|
||||
|
@ -166,9 +174,8 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
|
|||
if not recipeitem then
|
||||
return itemstack
|
||||
end
|
||||
local player_name = placer:get_player_name()
|
||||
if minetest.is_protected(pointed_thing.under, player_name) and not
|
||||
minetest.check_player_privs(placer, "protection_bypass") then
|
||||
minetest.check_player_privs(player_name, "protection_bypass") then
|
||||
minetest.record_protection_violation(pointed_thing.under,
|
||||
player_name)
|
||||
return
|
||||
|
@ -538,16 +545,6 @@ stairs.register_stair_and_slab(
|
|||
default.node_sound_stone_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"straw",
|
||||
"farming:straw",
|
||||
{snappy = 3, flammable = 4},
|
||||
{"farming_straw.png"},
|
||||
"Straw Stair",
|
||||
"Straw Slab",
|
||||
default.node_sound_leaves_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"steelblock",
|
||||
"default:steelblock",
|
||||
|
|
|
@ -9,7 +9,7 @@ minetest.register_on_joinplayer(function(player)
|
|||
offset = {x=0, y=10},
|
||||
alignment = {x=1, y=0},
|
||||
number = 0xFFFFFF ,
|
||||
text = "For Minetest : 0.4.16",
|
||||
text = "For Minetest : 0.4.17.x",
|
||||
})
|
||||
player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
|
@ -17,7 +17,7 @@ minetest.register_on_joinplayer(function(player)
|
|||
offset = {x=0, y=30},
|
||||
alignment = {x=1, y=0},
|
||||
number = 0xFFFFFF ,
|
||||
text = "Game Version : 1.7.1",
|
||||
text = "Game Version : 1.8.0",
|
||||
})
|
||||
hud_levels[name] = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
|
@ -28,7 +28,9 @@ minetest.register_on_joinplayer(function(player)
|
|||
text = "Level: /",
|
||||
})
|
||||
end)
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
player:set_inventory_formspec("")
|
||||
end)
|
||||
minetest.register_globalstep(function(dtime)
|
||||
local players = minetest.get_connected_players()
|
||||
for _,player in ipairs(players) do
|
||||
|
@ -1771,7 +1773,7 @@ w31.get_formspec = function(player, pos)
|
|||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/222]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;1]"
|
||||
if tonumber(level2) > 1 then
|
||||
formspec = formspec.."button[1,1;1,1;;2]"
|
||||
|
@ -1864,7 +1866,7 @@ w32.get_formspec = function(player, pos)
|
|||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/222]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;26]"
|
||||
.."button[1.5,6;1,1;waa;<]"
|
||||
if tonumber(level2) > 26 then
|
||||
|
@ -1958,7 +1960,7 @@ w33.get_formspec = function(player, pos)
|
|||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/222]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;51]"
|
||||
.."button[1.5,6;1,1;wab;<]"
|
||||
if tonumber(level2) > 51 then
|
||||
|
@ -2052,7 +2054,7 @@ w34.get_formspec = function(player, pos)
|
|||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/222]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;76]"
|
||||
.."button[1.5,6;1,1;wac;<]"
|
||||
if tonumber(level2) > 76 then
|
||||
|
@ -2146,7 +2148,7 @@ w35.get_formspec = function(player, pos)
|
|||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/222]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;101]"
|
||||
.."button[1.5,6;1,1;wad;<]"
|
||||
if tonumber(level2) > 101 then
|
||||
|
@ -2240,7 +2242,7 @@ w36.get_formspec = function(player, pos)
|
|||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/222]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;126]"
|
||||
.."button[1.5,6;1,1;wae;<]"
|
||||
if tonumber(level2) > 126 then
|
||||
|
@ -2334,7 +2336,7 @@ w37.get_formspec = function(player, pos)
|
|||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/222]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;151]"
|
||||
.."button[1.5,6;1,1;waf;<]"
|
||||
if tonumber(level2) > 151 then
|
||||
|
@ -2428,7 +2430,7 @@ w38.get_formspec = function(player, pos)
|
|||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/222]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;176]"
|
||||
.."button[1.5,6;1,1;wag;<]"
|
||||
if tonumber(level2) > 176 then
|
||||
|
@ -2522,7 +2524,7 @@ w39.get_formspec = function(player, pos)
|
|||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/222]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;201]"
|
||||
.."button[1.5,6;1,1;wah;<]"
|
||||
if tonumber(level2) > 201 then
|
||||
|
@ -2589,7 +2591,435 @@ w39.get_formspec = function(player, pos)
|
|||
formspec = formspec.."button[1,5;1,1;;222]"
|
||||
end
|
||||
if tonumber(level2) > 222 then
|
||||
formspec = formspec.."label[0,5.8;wait until the next update]"
|
||||
formspec = formspec.."button[2,5;1,1;;223]"
|
||||
end
|
||||
if tonumber(level2) > 223 then
|
||||
formspec = formspec.."button[3,5;1,1;;224]"
|
||||
end
|
||||
if tonumber(level2) > 224 then
|
||||
formspec = formspec.."button[4,5;1,1;;225]"
|
||||
end
|
||||
if tonumber(level2) > 225 then
|
||||
formspec = formspec.."button[2.5,6;1,1;waj;>]"
|
||||
end
|
||||
return formspec
|
||||
end
|
||||
local w310 = {}
|
||||
w310.get_formspec = function(player, pos)
|
||||
if player == nil then
|
||||
return
|
||||
end
|
||||
local player_inv = player:get_inventory()
|
||||
lv = io.open(minetest.get_worldpath().."/level3.txt", "r")
|
||||
local level2 = lv:read("*l")
|
||||
lv:close()
|
||||
formspec = "size[5,6.5]"
|
||||
.."background[5,6.5;1,1;gui_formbg.png;true]"
|
||||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;226]"
|
||||
.."button[1.5,6;1,1;wai;<]"
|
||||
if tonumber(level2) > 226 then
|
||||
formspec = formspec.."button[1,1;1,1;;227]"
|
||||
end
|
||||
if tonumber(level2) > 227 then
|
||||
formspec = formspec.."button[2,1;1,1;;228]"
|
||||
end
|
||||
if tonumber(level2) > 228 then
|
||||
formspec = formspec.."button[3,1;1,1;;229]"
|
||||
end
|
||||
if tonumber(level2) > 229 then
|
||||
formspec = formspec.."button[4,1;1,1;;230]"
|
||||
end
|
||||
if tonumber(level2) > 230 then
|
||||
formspec = formspec.."button[0,2;1,1;;231]"
|
||||
end
|
||||
if tonumber(level2) > 231 then
|
||||
formspec = formspec.."button[1,2;1,1;;232]"
|
||||
end
|
||||
if tonumber(level2) > 232 then
|
||||
formspec = formspec.."button[2,2;1,1;;233]"
|
||||
end
|
||||
if tonumber(level2) > 233 then
|
||||
formspec = formspec.."button[3,2;1,1;;234]"
|
||||
end
|
||||
if tonumber(level2) > 234 then
|
||||
formspec = formspec.."button[4,2;1,1;;235]"
|
||||
end
|
||||
if tonumber(level2) > 235 then
|
||||
formspec = formspec.."button[0,3;1,1;;236]"
|
||||
end
|
||||
if tonumber(level2) > 236 then
|
||||
formspec = formspec.."button[1,3;1,1;;237]"
|
||||
end
|
||||
if tonumber(level2) > 237 then
|
||||
formspec = formspec.."button[2,3;1,1;;238]"
|
||||
end
|
||||
if tonumber(level2) > 238 then
|
||||
formspec = formspec.."button[3,3;1,1;;239]"
|
||||
end
|
||||
if tonumber(level2) > 239 then
|
||||
formspec = formspec.."button[4,3;1,1;;240]"
|
||||
end
|
||||
if tonumber(level2) > 240 then
|
||||
formspec = formspec.."button[0,4;1,1;;241]"
|
||||
end
|
||||
if tonumber(level2) > 241 then
|
||||
formspec = formspec.."button[1,4;1,1;;242]"
|
||||
end
|
||||
if tonumber(level2) > 242 then
|
||||
formspec = formspec.."button[2,4;1,1;;243]"
|
||||
end
|
||||
if tonumber(level2) > 243 then
|
||||
formspec = formspec.."button[3,4;1,1;;244]"
|
||||
end
|
||||
if tonumber(level2) > 244 then
|
||||
formspec = formspec.."button[4,4;1,1;;245]"
|
||||
end
|
||||
if tonumber(level2) > 245 then
|
||||
formspec = formspec.."button[0,5;1,1;;246]"
|
||||
end
|
||||
if tonumber(level2) > 246 then
|
||||
formspec = formspec.."button[1,5;1,1;;247]"
|
||||
end
|
||||
if tonumber(level2) > 247 then
|
||||
formspec = formspec.."button[2,5;1,1;;248]"
|
||||
end
|
||||
if tonumber(level2) > 248 then
|
||||
formspec = formspec.."button[3,5;1,1;;249]"
|
||||
end
|
||||
if tonumber(level2) > 249 then
|
||||
formspec = formspec.."button[4,5;1,1;;250]"
|
||||
end
|
||||
if tonumber(level2) > 250 then
|
||||
formspec = formspec.."button[2.5,6;1,1;wak;>]"
|
||||
end
|
||||
return formspec
|
||||
end
|
||||
local w311 = {}
|
||||
w311.get_formspec = function(player, pos)
|
||||
if player == nil then
|
||||
return
|
||||
end
|
||||
local player_inv = player:get_inventory()
|
||||
lv = io.open(minetest.get_worldpath().."/level3.txt", "r")
|
||||
local level2 = lv:read("*l")
|
||||
lv:close()
|
||||
formspec = "size[5,6.5]"
|
||||
.."background[5,6.5;1,1;gui_formbg.png;true]"
|
||||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;251]"
|
||||
.."button[1.5,6;1,1;waj;<]"
|
||||
if tonumber(level2) > 251 then
|
||||
formspec = formspec.."button[1,1;1,1;;252]"
|
||||
end
|
||||
if tonumber(level2) > 252 then
|
||||
formspec = formspec.."button[2,1;1,1;;253]"
|
||||
end
|
||||
if tonumber(level2) > 253 then
|
||||
formspec = formspec.."button[3,1;1,1;;254]"
|
||||
end
|
||||
if tonumber(level2) > 254 then
|
||||
formspec = formspec.."button[4,1;1,1;;255]"
|
||||
end
|
||||
if tonumber(level2) > 255 then
|
||||
formspec = formspec.."button[0,2;1,1;;256]"
|
||||
end
|
||||
if tonumber(level2) > 256 then
|
||||
formspec = formspec.."button[1,2;1,1;;257]"
|
||||
end
|
||||
if tonumber(level2) > 257 then
|
||||
formspec = formspec.."button[2,2;1,1;;258]"
|
||||
end
|
||||
if tonumber(level2) > 258 then
|
||||
formspec = formspec.."button[3,2;1,1;;259]"
|
||||
end
|
||||
if tonumber(level2) > 259 then
|
||||
formspec = formspec.."button[4,2;1,1;;260]"
|
||||
end
|
||||
if tonumber(level2) > 260 then
|
||||
formspec = formspec.."button[0,3;1,1;;261]"
|
||||
end
|
||||
if tonumber(level2) > 261 then
|
||||
formspec = formspec.."button[1,3;1,1;;262]"
|
||||
end
|
||||
if tonumber(level2) > 262 then
|
||||
formspec = formspec.."button[2,3;1,1;;263]"
|
||||
end
|
||||
if tonumber(level2) > 263 then
|
||||
formspec = formspec.."button[3,3;1,1;;264]"
|
||||
end
|
||||
if tonumber(level2) > 264 then
|
||||
formspec = formspec.."button[4,3;1,1;;265]"
|
||||
end
|
||||
if tonumber(level2) > 265 then
|
||||
formspec = formspec.."button[0,4;1,1;;266]"
|
||||
end
|
||||
if tonumber(level2) > 266 then
|
||||
formspec = formspec.."button[1,4;1,1;;267]"
|
||||
end
|
||||
if tonumber(level2) > 267 then
|
||||
formspec = formspec.."button[2,4;1,1;;268]"
|
||||
end
|
||||
if tonumber(level2) > 268 then
|
||||
formspec = formspec.."button[3,4;1,1;;269]"
|
||||
end
|
||||
if tonumber(level2) > 269 then
|
||||
formspec = formspec.."button[4,4;1,1;;270]"
|
||||
end
|
||||
if tonumber(level2) > 270 then
|
||||
formspec = formspec.."button[0,5;1,1;;271]"
|
||||
end
|
||||
if tonumber(level2) > 271 then
|
||||
formspec = formspec.."button[1,5;1,1;;272]"
|
||||
end
|
||||
if tonumber(level2) > 272 then
|
||||
formspec = formspec.."button[2,5;1,1;;273]"
|
||||
end
|
||||
if tonumber(level2) > 273 then
|
||||
formspec = formspec.."button[3,5;1,1;;274]"
|
||||
end
|
||||
if tonumber(level2) > 274 then
|
||||
formspec = formspec.."button[4,5;1,1;;275]"
|
||||
end
|
||||
if tonumber(level2) > 275 then
|
||||
formspec = formspec.."button[2.5,6;1,1;wal;>]"
|
||||
end
|
||||
return formspec
|
||||
end
|
||||
local w312 = {}
|
||||
w312.get_formspec = function(player, pos)
|
||||
if player == nil then
|
||||
return
|
||||
end
|
||||
local player_inv = player:get_inventory()
|
||||
lv = io.open(minetest.get_worldpath().."/level3.txt", "r")
|
||||
local level2 = lv:read("*l")
|
||||
lv:close()
|
||||
formspec = "size[5,6.5]"
|
||||
.."background[5,6.5;1,1;gui_formbg.png;true]"
|
||||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;276]"
|
||||
.."button[1.5,6;1,1;wak;<]"
|
||||
if tonumber(level2) > 276 then
|
||||
formspec = formspec.."button[1,1;1,1;;277]"
|
||||
end
|
||||
if tonumber(level2) > 277 then
|
||||
formspec = formspec.."button[2,1;1,1;;278]"
|
||||
end
|
||||
if tonumber(level2) > 278 then
|
||||
formspec = formspec.."button[3,1;1,1;;279]"
|
||||
end
|
||||
if tonumber(level2) > 279 then
|
||||
formspec = formspec.."button[4,1;1,1;;280]"
|
||||
end
|
||||
if tonumber(level2) > 280 then
|
||||
formspec = formspec.."button[0,2;1,1;;281]"
|
||||
end
|
||||
if tonumber(level2) > 281 then
|
||||
formspec = formspec.."button[1,2;1,1;;282]"
|
||||
end
|
||||
if tonumber(level2) > 282 then
|
||||
formspec = formspec.."button[2,2;1,1;;283]"
|
||||
end
|
||||
if tonumber(level2) > 283 then
|
||||
formspec = formspec.."button[3,2;1,1;;284]"
|
||||
end
|
||||
if tonumber(level2) > 284 then
|
||||
formspec = formspec.."button[4,2;1,1;;285]"
|
||||
end
|
||||
if tonumber(level2) > 285 then
|
||||
formspec = formspec.."button[0,3;1,1;;286]"
|
||||
end
|
||||
if tonumber(level2) > 286 then
|
||||
formspec = formspec.."button[1,3;1,1;;287]"
|
||||
end
|
||||
if tonumber(level2) > 287 then
|
||||
formspec = formspec.."button[2,3;1,1;;288]"
|
||||
end
|
||||
if tonumber(level2) > 288 then
|
||||
formspec = formspec.."button[3,3;1,1;;289]"
|
||||
end
|
||||
if tonumber(level2) > 289 then
|
||||
formspec = formspec.."button[4,3;1,1;;290]"
|
||||
end
|
||||
if tonumber(level2) > 290 then
|
||||
formspec = formspec.."button[0,4;1,1;;291]"
|
||||
end
|
||||
if tonumber(level2) > 291 then
|
||||
formspec = formspec.."button[1,4;1,1;;292]"
|
||||
end
|
||||
if tonumber(level2) > 292 then
|
||||
formspec = formspec.."button[2,4;1,1;;293]"
|
||||
end
|
||||
if tonumber(level2) > 293 then
|
||||
formspec = formspec.."button[3,4;1,1;;294]"
|
||||
end
|
||||
if tonumber(level2) > 294 then
|
||||
formspec = formspec.."button[4,4;1,1;;295]"
|
||||
end
|
||||
if tonumber(level2) > 295 then
|
||||
formspec = formspec.."button[0,5;1,1;;296]"
|
||||
end
|
||||
if tonumber(level2) > 296 then
|
||||
formspec = formspec.."button[1,5;1,1;;297]"
|
||||
end
|
||||
if tonumber(level2) > 297 then
|
||||
formspec = formspec.."button[2,5;1,1;;298]"
|
||||
end
|
||||
if tonumber(level2) > 298 then
|
||||
formspec = formspec.."button[3,5;1,1;;299]"
|
||||
end
|
||||
if tonumber(level2) > 299 then
|
||||
formspec = formspec.."button[4,5;1,1;;300]"
|
||||
end
|
||||
if tonumber(level2) > 300 then
|
||||
formspec = formspec.."button[2.5,6;1,1;wam;>]"
|
||||
end
|
||||
return formspec
|
||||
end
|
||||
local w313 = {}
|
||||
w313.get_formspec = function(player, pos)
|
||||
if player == nil then
|
||||
return
|
||||
end
|
||||
local player_inv = player:get_inventory()
|
||||
lv = io.open(minetest.get_worldpath().."/level3.txt", "r")
|
||||
local level2 = lv:read("*l")
|
||||
lv:close()
|
||||
formspec = "size[5,6.5]"
|
||||
.."background[5,6.5;1,1;gui_formbg.png;true]"
|
||||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;301]"
|
||||
.."button[1.5,6;1,1;wal;<]"
|
||||
if tonumber(level2) > 301 then
|
||||
formspec = formspec.."button[1,1;1,1;;302]"
|
||||
end
|
||||
if tonumber(level2) > 302 then
|
||||
formspec = formspec.."button[2,1;1,1;;303]"
|
||||
end
|
||||
if tonumber(level2) > 303 then
|
||||
formspec = formspec.."button[3,1;1,1;;304]"
|
||||
end
|
||||
if tonumber(level2) > 304 then
|
||||
formspec = formspec.."button[4,1;1,1;;305]"
|
||||
end
|
||||
if tonumber(level2) > 305 then
|
||||
formspec = formspec.."button[0,2;1,1;;306]"
|
||||
end
|
||||
if tonumber(level2) > 306 then
|
||||
formspec = formspec.."button[1,2;1,1;;307]"
|
||||
end
|
||||
if tonumber(level2) > 307 then
|
||||
formspec = formspec.."button[2,2;1,1;;308]"
|
||||
end
|
||||
if tonumber(level2) > 308 then
|
||||
formspec = formspec.."button[3,2;1,1;;309]"
|
||||
end
|
||||
if tonumber(level2) > 309 then
|
||||
formspec = formspec.."button[4,2;1,1;;310]"
|
||||
end
|
||||
if tonumber(level2) > 310 then
|
||||
formspec = formspec.."button[0,3;1,1;;311]"
|
||||
end
|
||||
if tonumber(level2) > 311 then
|
||||
formspec = formspec.."button[1,3;1,1;;312]"
|
||||
end
|
||||
if tonumber(level2) > 312 then
|
||||
formspec = formspec.."button[2,3;1,1;;313]"
|
||||
end
|
||||
if tonumber(level2) > 313 then
|
||||
formspec = formspec.."button[3,3;1,1;;314]"
|
||||
end
|
||||
if tonumber(level2) > 314 then
|
||||
formspec = formspec.."button[4,3;1,1;;315]"
|
||||
end
|
||||
if tonumber(level2) > 315 then
|
||||
formspec = formspec.."button[0,4;1,1;;316]"
|
||||
end
|
||||
if tonumber(level2) > 316 then
|
||||
formspec = formspec.."button[1,4;1,1;;317]"
|
||||
end
|
||||
if tonumber(level2) > 317 then
|
||||
formspec = formspec.."button[2,4;1,1;;318]"
|
||||
end
|
||||
if tonumber(level2) > 318 then
|
||||
formspec = formspec.."button[3,4;1,1;;319]"
|
||||
end
|
||||
if tonumber(level2) > 319 then
|
||||
formspec = formspec.."button[4,4;1,1;;320]"
|
||||
end
|
||||
if tonumber(level2) > 320 then
|
||||
formspec = formspec.."button[0,5;1,1;;321]"
|
||||
end
|
||||
if tonumber(level2) > 321 then
|
||||
formspec = formspec.."button[1,5;1,1;;322]"
|
||||
end
|
||||
if tonumber(level2) > 322 then
|
||||
formspec = formspec.."button[2,5;1,1;;323]"
|
||||
end
|
||||
if tonumber(level2) > 323 then
|
||||
formspec = formspec.."button[3,5;1,1;;324]"
|
||||
end
|
||||
if tonumber(level2) > 324 then
|
||||
formspec = formspec.."button[4,5;1,1;;325]"
|
||||
end
|
||||
if tonumber(level2) > 325 then
|
||||
formspec = formspec.."button[2.5,6;1,1;wan;>]"
|
||||
end
|
||||
return formspec
|
||||
end
|
||||
local w314 = {}
|
||||
w314.get_formspec = function(player, pos)
|
||||
if player == nil then
|
||||
return
|
||||
end
|
||||
local player_inv = player:get_inventory()
|
||||
lv = io.open(minetest.get_worldpath().."/level3.txt", "r")
|
||||
local level2 = lv:read("*l")
|
||||
lv:close()
|
||||
formspec = "size[5,6.5]"
|
||||
.."background[5,6.5;1,1;gui_formbg.png;true]"
|
||||
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
.."bgcolor[#080808BB;true]"
|
||||
.."image_button[4.5,-0.3;0.8,0.8;;esc;X]"
|
||||
.."label[0,0;World Level: "..(tonumber(level2)-1).."/333]"
|
||||
.."button[0,1;1,1;;326]"
|
||||
.."button[1.5,6;1,1;wam;<]"
|
||||
if tonumber(level2) > 326 then
|
||||
formspec = formspec.."button[1,1;1,1;;327]"
|
||||
end
|
||||
if tonumber(level2) > 327 then
|
||||
formspec = formspec.."button[2,1;1,1;;328]"
|
||||
end
|
||||
if tonumber(level2) > 328 then
|
||||
formspec = formspec.."button[3,1;1,1;;329]"
|
||||
end
|
||||
if tonumber(level2) > 329 then
|
||||
formspec = formspec.."button[4,1;1,1;;330]"
|
||||
end
|
||||
if tonumber(level2) > 330 then
|
||||
formspec = formspec.."button[0,2;1,1;;331]"
|
||||
end
|
||||
if tonumber(level2) > 331 then
|
||||
formspec = formspec.."button[1,2;1,1;;332]"
|
||||
end
|
||||
if tonumber(level2) > 332 then
|
||||
formspec = formspec.."button[2,2;1,1;;333]"
|
||||
end
|
||||
if tonumber(level2) > 333 then
|
||||
formspec = formspec.."label[0,3;play world 1 and 2]"
|
||||
end
|
||||
return formspec
|
||||
end
|
||||
|
@ -2681,6 +3111,16 @@ minetest.register_node("sudoku:new_w3",{
|
|||
minetest.show_formspec(player:get_player_name(), "w38" , w38.get_formspec(player))
|
||||
elseif page == 9 then
|
||||
minetest.show_formspec(player:get_player_name(), "w39" , w39.get_formspec(player))
|
||||
elseif page == 10 then
|
||||
minetest.show_formspec(player:get_player_name(), "w310" , w310.get_formspec(player))
|
||||
elseif page == 11 then
|
||||
minetest.show_formspec(player:get_player_name(), "w311" , w311.get_formspec(player))
|
||||
elseif page == 12 then
|
||||
minetest.show_formspec(player:get_player_name(), "w312" , w312.get_formspec(player))
|
||||
elseif page == 13 then
|
||||
minetest.show_formspec(player:get_player_name(), "w313" , w313.get_formspec(player))
|
||||
elseif page == 14 then
|
||||
minetest.show_formspec(player:get_player_name(), "w314" , w314.get_formspec(player))
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
@ -2701,7 +3141,7 @@ minetest.register_node("sudoku:new_w5",{
|
|||
end,
|
||||
})
|
||||
minetest.register_node("sudoku:new_ws",{
|
||||
tiles = {"default_silver_sandstone_block.png","default_silver_sandstone_block.png","default_silver_sandstone_block.png","default_silver_sandstone_block.png","default_silver_sandstone_block.png","default_silver_sandstone_block.png^sudoku_new_ws.png"},
|
||||
tiles = {"default_silver_sandstone_block.png","default_silver_sandstone_block.png","default_silver_sandstone_block.png","default_silver_sandstone_block.png","default_silver_sandstone_block.png","default_silver_sandstone_block.png^sudoku_new_w6.png"},
|
||||
description = "New",
|
||||
--groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||
on_punch = function(pos, node, player, pointed_thing)
|
||||
|
@ -3158,6 +3598,101 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
if fields.wah then
|
||||
player_inv:set_stack("page3", 1,"default:dirt 7")
|
||||
minetest.show_formspec(player:get_player_name(), "w38" , w38.get_formspec(player))
|
||||
elseif fields.waj then
|
||||
player_inv:set_stack("page3", 1, "default:dirt 9")
|
||||
minetest.show_formspec(player:get_player_name(), "w310" , w310.get_formspec(player))
|
||||
else
|
||||
minetest.show_formspec(player:get_player_name(), "", "")
|
||||
end
|
||||
end
|
||||
if formname == "w310" then
|
||||
d = 1
|
||||
for k, v in pairs(fields) do
|
||||
if tonumber(v) ~= nil then
|
||||
New(player,"3_"..v)
|
||||
player_inv:set_stack("l", 3, "default:dirt "..v)
|
||||
player_inv:set_stack("ll", 1, "default:dirt 3")
|
||||
end
|
||||
end
|
||||
if fields.wai then
|
||||
player_inv:set_stack("page3", 1,"default:dirt 8")
|
||||
minetest.show_formspec(player:get_player_name(), "w39" , w39.get_formspec(player))
|
||||
elseif fields.wak then
|
||||
player_inv:set_stack("page3", 1, "default:dirt 10")
|
||||
minetest.show_formspec(player:get_player_name(), "w311" , w311.get_formspec(player))
|
||||
else
|
||||
minetest.show_formspec(player:get_player_name(), "", "")
|
||||
end
|
||||
end
|
||||
if formname == "w311" then
|
||||
d = 1
|
||||
for k, v in pairs(fields) do
|
||||
if tonumber(v) ~= nil then
|
||||
New(player,"3_"..v)
|
||||
player_inv:set_stack("l", 3, "default:dirt "..v)
|
||||
player_inv:set_stack("ll", 1, "default:dirt 3")
|
||||
end
|
||||
end
|
||||
if fields.waj then
|
||||
player_inv:set_stack("page3", 1,"default:dirt 9")
|
||||
minetest.show_formspec(player:get_player_name(), "w310" , w310.get_formspec(player))
|
||||
elseif fields.wal then
|
||||
player_inv:set_stack("page3", 1, "default:dirt 11")
|
||||
minetest.show_formspec(player:get_player_name(), "w312" , w312.get_formspec(player))
|
||||
else
|
||||
minetest.show_formspec(player:get_player_name(), "", "")
|
||||
end
|
||||
end
|
||||
if formname == "w312" then
|
||||
d = 1
|
||||
for k, v in pairs(fields) do
|
||||
if tonumber(v) ~= nil then
|
||||
New(player,"3_"..v)
|
||||
player_inv:set_stack("l", 3, "default:dirt "..v)
|
||||
player_inv:set_stack("ll", 1, "default:dirt 3")
|
||||
end
|
||||
end
|
||||
if fields.wak then
|
||||
player_inv:set_stack("page3", 1,"default:dirt 10")
|
||||
minetest.show_formspec(player:get_player_name(), "w311" , w311.get_formspec(player))
|
||||
elseif fields.wam then
|
||||
player_inv:set_stack("page3", 1, "default:dirt 12")
|
||||
minetest.show_formspec(player:get_player_name(), "w313" , w313.get_formspec(player))
|
||||
else
|
||||
minetest.show_formspec(player:get_player_name(), "", "")
|
||||
end
|
||||
end
|
||||
if formname == "w313" then
|
||||
d = 1
|
||||
for k, v in pairs(fields) do
|
||||
if tonumber(v) ~= nil then
|
||||
New(player,"3_"..v)
|
||||
player_inv:set_stack("l", 3, "default:dirt "..v)
|
||||
player_inv:set_stack("ll", 1, "default:dirt 3")
|
||||
end
|
||||
end
|
||||
if fields.wal then
|
||||
player_inv:set_stack("page3", 1,"default:dirt 11")
|
||||
minetest.show_formspec(player:get_player_name(), "w312" , w312.get_formspec(player))
|
||||
elseif fields.wan then
|
||||
player_inv:set_stack("page3", 1, "default:dirt 13")
|
||||
minetest.show_formspec(player:get_player_name(), "w314" , w314.get_formspec(player))
|
||||
else
|
||||
minetest.show_formspec(player:get_player_name(), "", "")
|
||||
end
|
||||
end
|
||||
if formname == "w314" then
|
||||
d = 1
|
||||
for k, v in pairs(fields) do
|
||||
if tonumber(v) ~= nil then
|
||||
New(player,"3_"..v)
|
||||
player_inv:set_stack("l", 3, "default:dirt "..v)
|
||||
player_inv:set_stack("ll", 1, "default:dirt 3")
|
||||
end
|
||||
end
|
||||
if fields.wam then
|
||||
player_inv:set_stack("page3", 1,"default:dirt 12")
|
||||
minetest.show_formspec(player:get_player_name(), "w313" , w313.get_formspec(player))
|
||||
else
|
||||
minetest.show_formspec(player:get_player_name(), "", "")
|
||||
end
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
059000000
|
||||
600000200
|
||||
008740001
|
||||
005920000
|
||||
400000002
|
||||
000038600
|
||||
200083900
|
||||
001000008
|
||||
000000370
|
|
@ -0,0 +1,9 @@
|
|||
000050400
|
||||
370000001
|
||||
200300060
|
||||
000080003
|
||||
009203600
|
||||
100090000
|
||||
090002005
|
||||
500000084
|
||||
002070000
|
|
@ -0,0 +1,9 @@
|
|||
000003000
|
||||
000860700
|
||||
056000130
|
||||
000000602
|
||||
024000870
|
||||
809000000
|
||||
013000950
|
||||
005016000
|
||||
000400000
|
|
@ -0,0 +1,9 @@
|
|||
000107000
|
||||
006000100
|
||||
090205040
|
||||
000400006
|
||||
041000830
|
||||
900008000
|
||||
010603020
|
||||
007000300
|
||||
000501000
|
|
@ -0,0 +1,9 @@
|
|||
005002000
|
||||
000419000
|
||||
004650000
|
||||
000000403
|
||||
078000620
|
||||
609000000
|
||||
000025100
|
||||
000183000
|
||||
000700500
|
|
@ -0,0 +1,9 @@
|
|||
100405000
|
||||
800060200
|
||||
000300704
|
||||
028000009
|
||||
000000000
|
||||
500000670
|
||||
905003000
|
||||
006080003
|
||||
000601007
|
|
@ -0,0 +1,9 @@
|
|||
030000000
|
||||
100009000
|
||||
050801004
|
||||
090602340
|
||||
000000000
|
||||
065307010
|
||||
700408050
|
||||
000500002
|
||||
000000090
|
|
@ -0,0 +1,9 @@
|
|||
002060103
|
||||
000580020
|
||||
000200008
|
||||
000000036
|
||||
800000004
|
||||
920000000
|
||||
200006000
|
||||
050047000
|
||||
601090700
|
|
@ -0,0 +1,9 @@
|
|||
050070100
|
||||
800004020
|
||||
000000008
|
||||
092000005
|
||||
400503009
|
||||
600000780
|
||||
700000000
|
||||
020400003
|
||||
001060050
|
|
@ -0,0 +1,9 @@
|
|||
000030006
|
||||
800400010
|
||||
002581700
|
||||
509000000
|
||||
000000000
|
||||
000000604
|
||||
001364500
|
||||
040002003
|
||||
900070000
|
|
@ -0,0 +1,9 @@
|
|||
010000002
|
||||
700090005
|
||||
020607080
|
||||
000000034
|
||||
090000020
|
||||
130000000
|
||||
050704090
|
||||
900060001
|
||||
800000070
|
|
@ -0,0 +1,9 @@
|
|||
000000060
|
||||
905300004
|
||||
400780009
|
||||
820000000
|
||||
004000100
|
||||
000000056
|
||||
100079008
|
||||
700002901
|
||||
030000000
|
|
@ -0,0 +1,9 @@
|
|||
003600000
|
||||
150200000
|
||||
900070084
|
||||
030000006
|
||||
001000900
|
||||
700000050
|
||||
380010009
|
||||
000004067
|
||||
000002100
|
|
@ -0,0 +1,9 @@
|
|||
000200008
|
||||
004050076
|
||||
005007900
|
||||
007000003
|
||||
008000600
|
||||
900000400
|
||||
002300100
|
||||
340020500
|
||||
100006000
|
|
@ -0,0 +1,9 @@
|
|||
008006000
|
||||
020470000
|
||||
350009000
|
||||
003000206
|
||||
080000040
|
||||
709000500
|
||||
000100032
|
||||
000068010
|
||||
000900400
|
|
@ -0,0 +1,9 @@
|
|||
000400001
|
||||
000008050
|
||||
000760098
|
||||
240000080
|
||||
800000007
|
||||
050000032
|
||||
410093000
|
||||
060800000
|
||||
700004000
|
|
@ -0,0 +1,9 @@
|
|||
060000800
|
||||
080002093
|
||||
000067100
|
||||
000400300
|
||||
200000001
|
||||
005008000
|
||||
006210000
|
||||
940700010
|
||||
007000050
|
|
@ -0,0 +1,9 @@
|
|||
005000300
|
||||
400000009
|
||||
000714000
|
||||
092000150
|
||||
700000006
|
||||
086000970
|
||||
000853000
|
||||
800000007
|
||||
009000200
|
|
@ -0,0 +1,9 @@
|
|||
406000500
|
||||
000300200
|
||||
070004019
|
||||
600000003
|
||||
008000400
|
||||
500000002
|
||||
810200060
|
||||
004009000
|
||||
003000708
|
|
@ -0,0 +1,9 @@
|
|||
092000070
|
||||
000000605
|
||||
000100900
|
||||
904800000
|
||||
010306090
|
||||
000007204
|
||||
008004000
|
||||
503000000
|
||||
040000520
|
|
@ -0,0 +1,9 @@
|
|||
000000000
|
||||
702000504
|
||||
005108200
|
||||
300205009
|
||||
000000000
|
||||
100607005
|
||||
006804300
|
||||
907000801
|
||||
000000000
|
|
@ -0,0 +1,9 @@
|
|||
001050037
|
||||
005001900
|
||||
000003080
|
||||
900000400
|
||||
800000006
|
||||
002000008
|
||||
060100000
|
||||
009700800
|
||||
340080200
|
|
@ -0,0 +1,9 @@
|
|||
070080504
|
||||
000001026
|
||||
002000000
|
||||
900000600
|
||||
030109040
|
||||
004000001
|
||||
000000300
|
||||
720500000
|
||||
601020080
|
|
@ -0,0 +1,9 @@
|
|||
069000000
|
||||
140080009
|
||||
000000300
|
||||
006002004
|
||||
020804030
|
||||
900700800
|
||||
005000000
|
||||
400010095
|
||||
000000740
|
|
@ -0,0 +1,9 @@
|
|||
600043070
|
||||
000010006
|
||||
000009010
|
||||
080002300
|
||||
100000005
|
||||
002600090
|
||||
060900000
|
||||
700050000
|
||||
040320008
|
|
@ -0,0 +1,9 @@
|
|||
000001090
|
||||
605002000
|
||||
409300000
|
||||
007050900
|
||||
200000008
|
||||
008040100
|
||||
000005309
|
||||
000100706
|
||||
030800000
|
|
@ -0,0 +1,9 @@
|
|||
000600079
|
||||
001200040
|
||||
050000008
|
||||
048300007
|
||||
000000000
|
||||
900006420
|
||||
300000050
|
||||
070008300
|
||||
510009000
|
|
@ -0,0 +1,9 @@
|
|||
000306000
|
||||
100000002
|
||||
079000310
|
||||
007603400
|
||||
000000000
|
||||
001804900
|
||||
083000590
|
||||
200000008
|
||||
000705000
|
|
@ -0,0 +1,9 @@
|
|||
095000630
|
||||
000000000
|
||||
100607004
|
||||
020803090
|
||||
000000000
|
||||
040501060
|
||||
300402006
|
||||
000000000
|
||||
057000480
|
|
@ -0,0 +1,9 @@
|
|||
800002594
|
||||
007003010
|
||||
020000000
|
||||
000600000
|
||||
960000038
|
||||
000004000
|
||||
000000070
|
||||
050300900
|
||||
794100006
|
|
@ -0,0 +1,9 @@
|
|||
002000090
|
||||
801007000
|
||||
000460300
|
||||
050010009
|
||||
003000800
|
||||
600020050
|
||||
007035000
|
||||
000700904
|
||||
080000700
|
|
@ -0,0 +1,9 @@
|
|||
060000710
|
||||
000600003
|
||||
930700000
|
||||
002480000
|
||||
800000007
|
||||
000056100
|
||||
000008059
|
||||
100004000
|
||||
097000020
|
|
@ -0,0 +1,9 @@
|
|||
005008006
|
||||
170040000
|
||||
008006000
|
||||
300200019
|
||||
000000000
|
||||
510007003
|
||||
000500700
|
||||
000060021
|
||||
200900400
|
|
@ -0,0 +1,9 @@
|
|||
004800061
|
||||
000500700
|
||||
600040005
|
||||
050000609
|
||||
000000000
|
||||
201000080
|
||||
100030007
|
||||
003002000
|
||||
460009500
|
|
@ -0,0 +1,9 @@
|
|||
001000008
|
||||
000316002
|
||||
005008900
|
||||
600040090
|
||||
000000000
|
||||
010080003
|
||||
007900800
|
||||
400271000
|
||||
500000600
|
|
@ -0,0 +1,9 @@
|
|||
000900083
|
||||
002005000
|
||||
900470000
|
||||
000000014
|
||||
700806009
|
||||
430000000
|
||||
000059001
|
||||
000200600
|
||||
250008000
|
|
@ -0,0 +1,9 @@
|
|||
902000000
|
||||
080600250
|
||||
003080600
|
||||
000017000
|
||||
600000005
|
||||
000430000
|
||||
001040900
|
||||
079008010
|
||||
000000403
|
|
@ -0,0 +1,9 @@
|
|||
700000800
|
||||
000237001
|
||||
050080000
|
||||
000900310
|
||||
004000500
|
||||
076001000
|
||||
000010040
|
||||
900476000
|
||||
003000002
|
|
@ -0,0 +1,9 @@
|
|||
000004958
|
||||
070000000
|
||||
020060300
|
||||
006050030
|
||||
300000009
|
||||
050070600
|
||||
005090080
|
||||
000000010
|
||||
248100000
|
|
@ -0,0 +1,9 @@
|
|||
600000000
|
||||
850031000
|
||||
040600003
|
||||
095200600
|
||||
000000000
|
||||
001007280
|
||||
900008010
|
||||
000720058
|
||||
000000004
|
|
@ -0,0 +1,9 @@
|
|||
000000040
|
||||
015080000
|
||||
040209060
|
||||
070008006
|
||||
800000001
|
||||
200100030
|
||||
090407080
|
||||
000020310
|
||||
050000000
|
|
@ -0,0 +1,9 @@
|
|||
000041090
|
||||
521000600
|
||||
000000002
|
||||
090400000
|
||||
300705001
|
||||
000003060
|
||||
200000000
|
||||
009000487
|
||||
040830000
|
|
@ -0,0 +1,9 @@
|
|||
500040007
|
||||
000000200
|
||||
009508403
|
||||
003000060
|
||||
000801000
|
||||
090000700
|
||||
608207500
|
||||
002000000
|
||||
900010006
|
|
@ -0,0 +1,9 @@
|
|||
001000080
|
||||
004307000
|
||||
090006000
|
||||
500000098
|
||||
102000703
|
||||
970000004
|
||||
000900050
|
||||
000208600
|
||||
010000200
|
|
@ -0,0 +1,9 @@
|
|||
000000052
|
||||
704005800
|
||||
000206000
|
||||
008100030
|
||||
400000007
|
||||
030004600
|
||||
000502000
|
||||
006800209
|
||||
190000000
|
|
@ -0,0 +1,9 @@
|
|||
480007009
|
||||
002000000
|
||||
001039080
|
||||
050000000
|
||||
109000508
|
||||
000000070
|
||||
040180600
|
||||
000000100
|
||||
600200034
|
|
@ -0,0 +1,9 @@
|
|||
002000010
|
||||
709015008
|
||||
000204060
|
||||
800001000
|
||||
000000000
|
||||
000300004
|
||||
080903000
|
||||
200570301
|
||||
030000600
|
|
@ -0,0 +1,9 @@
|
|||
002708096
|
||||
040000000
|
||||
030201007
|
||||
000000000
|
||||
470000053
|
||||
000000000
|
||||
700809060
|
||||
000000070
|
||||
850107200
|
|
@ -0,0 +1,9 @@
|
|||
600050004
|
||||
000820700
|
||||
000100800
|
||||
070000052
|
||||
400000007
|
||||
120000030
|
||||
004002000
|
||||
009076000
|
||||
300040009
|
|
@ -0,0 +1,9 @@
|
|||
700001005
|
||||
300900210
|
||||
000205000
|
||||
000000804
|
||||
030000020
|
||||
402000000
|
||||
000406000
|
||||
016003007
|
||||
900500002
|
|
@ -0,0 +1,9 @@
|
|||
400000000
|
||||
050980000
|
||||
927005000
|
||||
036000000
|
||||
700401008
|
||||
000000210
|
||||
000300876
|
||||
000079050
|
||||
000000002
|
|
@ -0,0 +1,9 @@
|
|||
000007042
|
||||
000003008
|
||||
004080900
|
||||
300690000
|
||||
001000400
|
||||
000038009
|
||||
003070100
|
||||
500300000
|
||||
680500000
|
|
@ -0,0 +1,9 @@
|
|||
026000005
|
||||
400000620
|
||||
900605070
|
||||
000700100
|
||||
000000000
|
||||
009002000
|
||||
090806007
|
||||
045000006
|
||||
100000480
|
|
@ -0,0 +1,9 @@
|
|||
613000000
|
||||
000084000
|
||||
400900070
|
||||
205008000
|
||||
700000008
|
||||
000400302
|
||||
060005001
|
||||
000290000
|
||||
000000523
|
|
@ -0,0 +1,9 @@
|
|||
530007004
|
||||
000000080
|
||||
408009000
|
||||
800006001
|
||||
002000800
|
||||
300100007
|
||||
000400306
|
||||
090000000
|
||||
600300052
|
|
@ -0,0 +1,9 @@
|
|||
500072100
|
||||
040000002
|
||||
089600000
|
||||
000000403
|
||||
000809000
|
||||
402000000
|
||||
000006970
|
||||
100000030
|
||||
004180005
|
|
@ -0,0 +1,9 @@
|
|||
920000036
|
||||
001000400
|
||||
000094000
|
||||
850100060
|
||||
006000200
|
||||
010008057
|
||||
000530000
|
||||
007000600
|
||||
040000093
|
|
@ -0,0 +1,9 @@
|
|||
009010200
|
||||
064007000
|
||||
030600000
|
||||
000005790
|
||||
000301000
|
||||
026400000
|
||||
000006040
|
||||
000500180
|
||||
008020900
|
|
@ -0,0 +1,9 @@
|
|||
407600002
|
||||
000000007
|
||||
008010000
|
||||
050008200
|
||||
010509070
|
||||
002300080
|
||||
000040300
|
||||
600000000
|
||||
100005908
|
|
@ -0,0 +1,9 @@
|
|||
050000000
|
||||
600070802
|
||||
200301000
|
||||
006000408
|
||||
000508000
|
||||
109000600
|
||||
000902003
|
||||
705030004
|
||||
000000050
|
|
@ -0,0 +1,9 @@
|
|||
000005000
|
||||
100004009
|
||||
080000053
|
||||
400900070
|
||||
906000204
|
||||
030007008
|
||||
750000080
|
||||
200400001
|
||||
000600000
|
|
@ -0,0 +1,9 @@
|
|||
000900400
|
||||
703100005
|
||||
000050018
|
||||
000000080
|
||||
045000790
|
||||
010000000
|
||||
860040000
|
||||
300008602
|
||||
002009000
|
|
@ -0,0 +1,9 @@
|
|||
200000050
|
||||
000006400
|
||||
301705200
|
||||
000000590
|
||||
800000002
|
||||
034000000
|
||||
009108704
|
||||
008600000
|
||||
060000001
|
|
@ -0,0 +1,9 @@
|
|||
000000400
|
||||
080070000
|
||||
003820009
|
||||
038700060
|
||||
004000100
|
||||
020001950
|
||||
500017800
|
||||
000060020
|
||||
009000000
|
|
@ -0,0 +1,9 @@
|
|||
007040000
|
||||
280005400
|
||||
006007000
|
||||
070300085
|
||||
000000000
|
||||
830004060
|
||||
000900800
|
||||
001200097
|
||||
000010200
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue