Update MultiCraft_game
ver. 1.0.2 release
@ -1,15 +0,0 @@
|
||||
[mod] Visible Player Armor [3d_armor]
|
||||
=====================================
|
||||
|
||||
depends: default, inventory_plus, unified_skins
|
||||
|
||||
Adds craftable armor that is visible to other players. Each armor item worn contibutes to
|
||||
a player's armor group level making them less vulnerable to weapons.
|
||||
|
||||
Armor takes damage when a player is hurt but also offers a percentage chance of healing.
|
||||
|
||||
default settings: [multicraft.conf]
|
||||
|
||||
# Set number of seconds between armor updates.
|
||||
3d_armor_update_time = 1
|
||||
|
@ -1,3 +0,0 @@
|
||||
check
|
||||
default
|
||||
|
@ -1,41 +0,0 @@
|
||||
Modpack - 3d Armor
|
||||
==================
|
||||
|
||||
[mod] Unified Skins [unified_skins]
|
||||
-----------------------------------
|
||||
|
||||
depends: default
|
||||
|
||||
A 3d character model re-texturing api used as the framework for this modpack.
|
||||
|
||||
Compatible with player skins mod [skins] by Zeg9 and Player Textures [player_textures] by sdzen.
|
||||
|
||||
Note: Currently only supports 64x32px player skins.
|
||||
|
||||
[mod] Visible Wielded Items [wieldview]
|
||||
---------------------------------------
|
||||
|
||||
depends: unified_skins
|
||||
|
||||
Makes hand wielded items visible to other players.
|
||||
|
||||
Note: Currently only supports 16x16px texture packs, sorry!
|
||||
|
||||
[mod] Visible Player Armor [3d_armor]
|
||||
-------------------------------------
|
||||
|
||||
depends: unified_skins, inventory_plus
|
||||
|
||||
Adds craftable armor that is visible to other players. Each armor item worn contributes to
|
||||
a player's armor group level making them less vulnerable to weapons.
|
||||
|
||||
Armor takes damage when a player is hurt, however, many armor items offer a 'stackable'
|
||||
percentage chance of restoring the lost health points.
|
||||
|
||||
[mod] Shields [shields]
|
||||
-------------------------------------
|
||||
|
||||
depends: 3d_armor
|
||||
|
||||
Originally a part of 3d_armor, shields have been re-included as an optional extra.
|
||||
If you do not want shields then simply remove the shields folder from the modpack.
|
@ -30,7 +30,7 @@ ARMOR_HEAL_MULTIPLIER = 1
|
||||
|
||||
-- You can also use this file to execute arbitary lua code
|
||||
-- eg: Dumb the armor down if using Simple Mobs
|
||||
if multicraft.get_modpath("mobs") then
|
||||
if minetest.get_modpath("mobs") then
|
||||
ARMOR_LEVEL_MULTIPLIER = 0.5
|
||||
ARMOR_HEAL_MULTIPLIER = 0
|
||||
end
|
@ -2,13 +2,13 @@ ARMOR_INIT_DELAY = 1
|
||||
ARMOR_INIT_TIMES = 1
|
||||
ARMOR_BONES_DELAY = 1
|
||||
ARMOR_UPDATE_TIME = 1
|
||||
ARMOR_DROP = multicraft.get_modpath("bones") ~= nil
|
||||
ARMOR_DROP = minetest.get_modpath("bones") ~= nil
|
||||
ARMOR_DESTROY = false
|
||||
ARMOR_LEVEL_MULTIPLIER = 1
|
||||
ARMOR_HEAL_MULTIPLIER = 1
|
||||
|
||||
local modpath = multicraft.get_modpath(ARMOR_MOD_NAME)
|
||||
local worldpath = multicraft.get_worldpath()
|
||||
local modpath = minetest.get_modpath(ARMOR_MOD_NAME)
|
||||
local worldpath = minetest.get_worldpath()
|
||||
local input = io.open(modpath.."/armor.conf", "r")
|
||||
if input then
|
||||
dofile(modpath.."/armor.conf")
|
||||
@ -89,10 +89,10 @@ armor.set_player_armor = function(self, player)
|
||||
local name = player:get_player_name()
|
||||
local player_inv = player:get_inventory()
|
||||
if not name then
|
||||
multicraft.log("error", "Failed to read player name")
|
||||
minetest.log("error", "Failed to read player name")
|
||||
return
|
||||
elseif not player_inv then
|
||||
multicraft.log("error", "Failed to read player inventory")
|
||||
minetest.log("error", "Failed to read player inventory")
|
||||
return
|
||||
end
|
||||
local armor_texture = "3d_armor_trans.png"
|
||||
@ -145,7 +145,7 @@ armor.set_player_armor = function(self, player)
|
||||
end
|
||||
end
|
||||
end
|
||||
--[[if multicraft.get_modpath("shields") then
|
||||
--[[if minetest.get_modpath("shields") then
|
||||
armor_level = armor_level * 0.9
|
||||
end]]
|
||||
if material.type and material.count == #self.elements then
|
||||
@ -186,12 +186,12 @@ armor.update_armor = function(self, player)
|
||||
end
|
||||
if self.player_hp[name] > hp then
|
||||
local player_inv = player:get_inventory()
|
||||
local armor_inv = multicraft.get_inventory({type="detached", name=name.."_armor"})
|
||||
local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"})
|
||||
if not player_inv then
|
||||
multicraft.log("error", "Failed to read player inventory")
|
||||
minetest.log("error", "Failed to read player inventory")
|
||||
return
|
||||
elseif not armor_inv then
|
||||
multicraft.log("error", "Failed to read detached inventory")
|
||||
minetest.log("error", "Failed to read detached inventory")
|
||||
return
|
||||
end
|
||||
local heal_max = 0
|
||||
@ -209,9 +209,9 @@ armor.update_armor = function(self, player)
|
||||
state = state + stack:get_wear()
|
||||
items = items + 1
|
||||
if stack:get_count() == 0 then
|
||||
local desc = multicraft.registered_items[item].description
|
||||
local desc = minetest.registered_items[item].description
|
||||
if desc then
|
||||
multicraft.chat_send_player(name, "Your "..desc.." got destroyed!")
|
||||
minetest.chat_send_player(name, "Your "..desc.." got destroyed!")
|
||||
end
|
||||
self:set_player_armor(player)
|
||||
armor:update_inventory(player)
|
||||
@ -287,7 +287,7 @@ default.player_register_model("3d_armor_character.x", {
|
||||
|
||||
-- Register Callbacks
|
||||
|
||||
multicraft.register_on_player_receive_fields(function(player, formname, fields)
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
local name = player:get_player_name()
|
||||
if inventory_plus and fields.armor then
|
||||
local formspec = armor:get_armor_formspec(name)
|
||||
@ -296,7 +296,7 @@ multicraft.register_on_player_receive_fields(function(player, formname, fields)
|
||||
end
|
||||
for field, _ in pairs(fields) do
|
||||
if string.find(field, "skins_set_") then
|
||||
multicraft.after(0, function(player)
|
||||
minetest.after(0, function(player)
|
||||
local skin = armor:get_player_skin(name)
|
||||
armor.textures[name].skin = skin..".png"
|
||||
armor:set_player_armor(player)
|
||||
@ -305,31 +305,31 @@ multicraft.register_on_player_receive_fields(function(player, formname, fields)
|
||||
end
|
||||
end)
|
||||
|
||||
multicraft.register_on_joinplayer(function(player)
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
default.player_set_model(player, "3d_armor_character.x")
|
||||
local name = player:get_player_name()
|
||||
local player_inv = player:get_inventory()
|
||||
local armor_inv = multicraft.create_detached_inventory(name.."_armor",{
|
||||
local armor_inv = minetest.create_detached_inventory(name.."_armor",{
|
||||
allow_put = function(inv, listname, index, stack, player)
|
||||
local item = stack:get_name()
|
||||
if not multicraft.registered_items[item] then return end
|
||||
if not multicraft.registered_items[item].groups then return end
|
||||
if multicraft.registered_items[item].groups['armor_head']
|
||||
if not minetest.registered_items[item] then return end
|
||||
if not minetest.registered_items[item].groups then return end
|
||||
if minetest.registered_items[item].groups['armor_head']
|
||||
and index == 1
|
||||
then
|
||||
return 1
|
||||
end
|
||||
if multicraft.registered_items[item].groups['armor_torso']
|
||||
if minetest.registered_items[item].groups['armor_torso']
|
||||
and index == 2
|
||||
then
|
||||
return 1
|
||||
end
|
||||
if multicraft.registered_items[item].groups['armor_legs']
|
||||
if minetest.registered_items[item].groups['armor_legs']
|
||||
and index == 3
|
||||
then
|
||||
return 1
|
||||
end
|
||||
if multicraft.registered_items[item].groups['armor_feet']
|
||||
if minetest.registered_items[item].groups['armor_feet']
|
||||
and index == 4
|
||||
then
|
||||
return 1
|
||||
@ -394,24 +394,24 @@ multicraft.register_on_joinplayer(function(player)
|
||||
wielditem = "3d_armor_trans.png",
|
||||
preview = armor.default_skin.."_preview.png",
|
||||
}
|
||||
if multicraft.get_modpath("skins") then
|
||||
if minetest.get_modpath("skins") then
|
||||
local skin = skins.skins[name]
|
||||
if skin and skins.get_type(skin) == skins.type.MODEL then
|
||||
armor.textures[name].skin = skin..".png"
|
||||
end
|
||||
elseif multicraft.get_modpath("simple_skins") then
|
||||
elseif minetest.get_modpath("simple_skins") then
|
||||
local skin = skins.skins[name]
|
||||
if skin then
|
||||
armor.textures[name].skin = skin..".png"
|
||||
end
|
||||
--[[elseif multicraft.get_modpath("u_skins") then
|
||||
--[[elseif minetest.get_modpath("u_skins") then
|
||||
local skin = u_skins.u_skins[name]
|
||||
if skin and u_skins.get_type(skin) == u_skins.type.MODEL then
|
||||
armor.textures[name].skin = skin..".png"
|
||||
end]]
|
||||
end
|
||||
if multicraft.get_modpath("player_textures") then
|
||||
local filename = multicraft.get_modpath("player_textures").."/textures/player_"..name
|
||||
if minetest.get_modpath("player_textures") then
|
||||
local filename = minetest.get_modpath("player_textures").."/textures/player_"..name
|
||||
local f = io.open(filename..".png")
|
||||
if f then
|
||||
f:close()
|
||||
@ -419,7 +419,7 @@ multicraft.register_on_joinplayer(function(player)
|
||||
end
|
||||
end
|
||||
for i=1, ARMOR_INIT_TIMES do
|
||||
multicraft.after(ARMOR_INIT_DELAY * i, function(player)
|
||||
minetest.after(ARMOR_INIT_DELAY * i, function(player)
|
||||
armor:set_player_armor(player)
|
||||
if inventory_plus == nil and unified_inventory == nil then
|
||||
--armor:update_inventory(player)
|
||||
@ -429,13 +429,13 @@ multicraft.register_on_joinplayer(function(player)
|
||||
end)
|
||||
|
||||
if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
||||
multicraft.register_on_dieplayer(function(player)
|
||||
minetest.register_on_dieplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
local pos = player:getpos()
|
||||
if name and pos then
|
||||
local drop = {}
|
||||
local player_inv = player:get_inventory()
|
||||
local armor_inv = multicraft.get_inventory({type="detached", name=name.."_armor"})
|
||||
local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"})
|
||||
for i=1, player_inv:get_size("armor") do
|
||||
local stack = armor_inv:get_stack("armor", i)
|
||||
if stack:get_count() > 0 then
|
||||
@ -454,12 +454,12 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
||||
armor:update_inventory(player)
|
||||
end]]
|
||||
if ARMOR_DESTROY == false then
|
||||
if multicraft.get_modpath("bones") then
|
||||
multicraft.after(ARMOR_BONES_DELAY, function()
|
||||
if minetest.get_modpath("bones") then
|
||||
minetest.after(ARMOR_BONES_DELAY, function()
|
||||
pos = vector.round(pos)
|
||||
local node = multicraft.get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
if node.name == "bones:bones" then
|
||||
local meta = multicraft.get_meta(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
local inv = meta:get_inventory()
|
||||
if name == owner then
|
||||
@ -473,7 +473,7 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
||||
end)
|
||||
else
|
||||
for _,stack in ipairs(drop) do
|
||||
local obj = multicraft.add_item(pos, stack)
|
||||
local obj = minetest.add_item(pos, stack)
|
||||
if obj then
|
||||
local x = math.random(1, 5)
|
||||
if math.random(1,2) == 1 then
|
||||
@ -492,10 +492,10 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
||||
end)
|
||||
end
|
||||
|
||||
multicraft.register_globalstep(function(dtime)
|
||||
minetest.register_globalstep(function(dtime)
|
||||
time = time + dtime
|
||||
if time > ARMOR_UPDATE_TIME then
|
||||
for _,player in ipairs(multicraft.get_connected_players()) do
|
||||
for _,player in ipairs(minetest.get_connected_players()) do
|
||||
armor:update_armor(player)
|
||||
end
|
||||
time = 0
|
1
games/MultiCraft_game/files/3d_armor/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
default
|
@ -1,39 +1,39 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
ARMOR_MOD_NAME = multicraft.get_current_modname()
|
||||
dofile(multicraft.get_modpath(multicraft.get_current_modname()).."/armor.lua")
|
||||
|
||||
|
||||
ARMOR_MOD_NAME = minetest.get_current_modname()
|
||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/armor.lua")
|
||||
|
||||
-- Regisiter Head Armor
|
||||
|
||||
multicraft.register_tool("3d_armor:helmet_leather", {
|
||||
minetest.register_tool("3d_armor:helmet_leather", {
|
||||
description = "Leather Helmet",
|
||||
inventory_image = "3d_armor_inv_helmet_leather.png",
|
||||
groups = {armor_head=5, armor_heal=0, armor_use=100, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:helmet_steel", {
|
||||
minetest.register_tool("3d_armor:helmet_steel", {
|
||||
description = "Steel Helmet",
|
||||
inventory_image = "3d_armor_inv_helmet_steel.png",
|
||||
groups = {armor_head=10, armor_heal=5, armor_use=250, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:helmet_gold", {
|
||||
minetest.register_tool("3d_armor:helmet_gold", {
|
||||
description = "Golden Helmet",
|
||||
inventory_image = "3d_armor_inv_helmet_gold.png",
|
||||
groups = {armor_head=15, armor_heal=10, armor_use=500, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:helmet_diamond",{
|
||||
minetest.register_tool("3d_armor:helmet_diamond",{
|
||||
description = "Diamond Helmet",
|
||||
inventory_image = "3d_armor_inv_helmet_diamond.png",
|
||||
groups = {armor_head=20, armor_heal=15, armor_use=750, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:helmet_chain", {
|
||||
minetest.register_tool("3d_armor:helmet_chain", {
|
||||
description = "Chain Helmet",
|
||||
inventory_image = "3d_armor_inv_helmet_chain.png",
|
||||
groups = {armor_head=15, armor_heal=10, armor_use=500, combat = 1},
|
||||
@ -42,35 +42,35 @@ multicraft.register_tool("3d_armor:helmet_chain", {
|
||||
|
||||
-- Regisiter Torso Armor
|
||||
|
||||
multicraft.register_tool("3d_armor:chestplate_leather", {
|
||||
minetest.register_tool("3d_armor:chestplate_leather", {
|
||||
description = "Leather Chestplate",
|
||||
inventory_image = "3d_armor_inv_chestplate_leather.png",
|
||||
groups = {armor_torso=15, armor_heal=0, armor_use=100, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:chestplate_steel", {
|
||||
minetest.register_tool("3d_armor:chestplate_steel", {
|
||||
description = "Steel Chestplate",
|
||||
inventory_image = "3d_armor_inv_chestplate_steel.png",
|
||||
groups = {armor_torso=20, armor_heal=5, armor_use=250, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:chestplate_gold", {
|
||||
minetest.register_tool("3d_armor:chestplate_gold", {
|
||||
description = "Golden Chestplate",
|
||||
inventory_image = "3d_armor_inv_chestplate_gold.png",
|
||||
groups = {armor_torso=25, armor_heal=10, armor_use=500, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:chestplate_diamond",{
|
||||
minetest.register_tool("3d_armor:chestplate_diamond",{
|
||||
description = "Diamond Chestplate",
|
||||
inventory_image = "3d_armor_inv_chestplate_diamond.png",
|
||||
groups = {armor_torso=30, armor_heal=15, armor_use=750, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:chestplate_chain", {
|
||||
minetest.register_tool("3d_armor:chestplate_chain", {
|
||||
description = "Chain Chestplate",
|
||||
inventory_image = "3d_armor_inv_chestplate_chain.png",
|
||||
groups = {armor_torso=25, armor_heal=10, armor_use=500, combat = 1},
|
||||
@ -79,35 +79,35 @@ multicraft.register_tool("3d_armor:chestplate_chain", {
|
||||
|
||||
-- Regisiter Leg Armor
|
||||
|
||||
multicraft.register_tool("3d_armor:leggings_leather", {
|
||||
minetest.register_tool("3d_armor:leggings_leather", {
|
||||
description = "Leather Leggings",
|
||||
inventory_image = "3d_armor_inv_leggings_leather.png",
|
||||
groups = {armor_legs=10, armor_heal=0, armor_use=100, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:leggings_steel", {
|
||||
minetest.register_tool("3d_armor:leggings_steel", {
|
||||
description = "Steel Leggings",
|
||||
inventory_image = "3d_armor_inv_leggings_steel.png",
|
||||
groups = {armor_legs=15, armor_heal=5, armor_use=250, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:leggings_gold", {
|
||||
minetest.register_tool("3d_armor:leggings_gold", {
|
||||
description = "Golden Leggings",
|
||||
inventory_image = "3d_armor_inv_leggings_gold.png",
|
||||
groups = {armor_legs=20, armor_heal=10, armor_use=500, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:leggings_diamond",{
|
||||
minetest.register_tool("3d_armor:leggings_diamond",{
|
||||
description = "Diamond Helmet",
|
||||
inventory_image = "3d_armor_inv_leggings_diamond.png",
|
||||
groups = {armor_legs=25, armor_heal=15, armor_use=750, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:leggings_chain", {
|
||||
minetest.register_tool("3d_armor:leggings_chain", {
|
||||
description = "Chain Leggings",
|
||||
inventory_image = "3d_armor_inv_leggings_chain.png",
|
||||
groups = {armor_legs=20, armor_heal=10, armor_use=500, combat = 1},
|
||||
@ -115,35 +115,35 @@ multicraft.register_tool("3d_armor:leggings_chain", {
|
||||
})
|
||||
-- Regisiter Boots
|
||||
|
||||
multicraft.register_tool("3d_armor:boots_leather", {
|
||||
minetest.register_tool("3d_armor:boots_leather", {
|
||||
description = "Leather Boots",
|
||||
inventory_image = "3d_armor_inv_boots_leather.png",
|
||||
groups = {armor_feet=5, armor_heal=0, armor_use=100, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:boots_steel", {
|
||||
minetest.register_tool("3d_armor:boots_steel", {
|
||||
description = "Steel Boots",
|
||||
inventory_image = "3d_armor_inv_boots_steel.png",
|
||||
groups = {armor_feet=10, armor_heal=5, armor_use=250, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:boots_gold", {
|
||||
minetest.register_tool("3d_armor:boots_gold", {
|
||||
description = "Golden Boots",
|
||||
inventory_image = "3d_armor_inv_boots_gold.png",
|
||||
groups = {armor_feet=15, armor_heal=10, armor_use=500, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:boots_diamond",{
|
||||
minetest.register_tool("3d_armor:boots_diamond",{
|
||||
description = "Diamond Helmet",
|
||||
inventory_image = "3d_armor_inv_boots_diamond.png",
|
||||
groups = {armor_feet=20, armor_heal=15, armor_use=750, combat = 1},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
multicraft.register_tool("3d_armor:boots_chain", {
|
||||
minetest.register_tool("3d_armor:boots_chain", {
|
||||
description = "Chain Boots",
|
||||
inventory_image = "3d_armor_inv_boots_chain.png",
|
||||
groups = {armor_feet=15, armor_heal=10, armor_use=500, combat = 1},
|
||||
@ -153,7 +153,7 @@ multicraft.register_tool("3d_armor:boots_chain", {
|
||||
-- Register Craft Recipies
|
||||
|
||||
local craft_ingreds = {
|
||||
leather = "default:leather",
|
||||
leather = "mobs:leather",
|
||||
steel = "default:steel_ingot",
|
||||
gold = "default:gold_ingot",
|
||||
diamond = "default:diamond",
|
||||
@ -161,7 +161,7 @@ local craft_ingreds = {
|
||||
}
|
||||
|
||||
for k, v in pairs(craft_ingreds) do
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "3d_armor:helmet_"..k,
|
||||
recipe = {
|
||||
{v, v, v},
|
||||
@ -169,7 +169,7 @@ for k, v in pairs(craft_ingreds) do
|
||||
{"", "", ""},
|
||||
},
|
||||
})
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "3d_armor:chestplate_"..k,
|
||||
recipe = {
|
||||
{v, "", v},
|
||||
@ -177,7 +177,7 @@ for k, v in pairs(craft_ingreds) do
|
||||
{v, v, v},
|
||||
},
|
||||
})
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "3d_armor:leggings_"..k,
|
||||
recipe = {
|
||||
{v, v, v},
|
||||
@ -185,7 +185,7 @@ for k, v in pairs(craft_ingreds) do
|
||||
{v, "", v},
|
||||
},
|
||||
})
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "3d_armor:boots_"..k,
|
||||
recipe = {
|
||||
{v, "", v},
|
@ -1,7 +0,0 @@
|
||||
A 3d character model re-texturing api used as the framework for this modpack.
|
||||
|
||||
depends: default
|
||||
|
||||
Compatible with player skins mod [skins] by Zeg9 and Player Textures [player_textures] by sdzen.
|
||||
|
||||
Note: Currently only 64x32px player skins.
|
@ -1,49 +0,0 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
--[[
|
||||
uniskins = {
|
||||
skin = {},
|
||||
armor = {},
|
||||
wielditem = {},
|
||||
default_skin = "character.png",
|
||||
default_texture = "uniskins_trans.png",
|
||||
}
|
||||
|
||||
uniskins.update_player_visuals = function(self, player)
|
||||
if not player then
|
||||
return
|
||||
end
|
||||
local name = player:get_player_name()
|
||||
player:set_properties({
|
||||
visual = "mesh",
|
||||
mesh = "uniskins_character.x",
|
||||
textures = {
|
||||
self.skin[name],
|
||||
self.armor[name],
|
||||
self.wielditem[name]
|
||||
},
|
||||
visual_size = {x=1, y=1},
|
||||
})
|
||||
end
|
||||
|
||||
multicraft.register_on_joinplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
uniskins.skin[name] = uniskins.default_skin
|
||||
uniskins.armor[name] = uniskins.default_texture
|
||||
uniskins.wielditem[name] = uniskins.default_texture
|
||||
if multicraft.get_modpath("player_textures") then
|
||||
local filename = multicraft.get_modpath("player_textures").."/textures/player_"..name
|
||||
local f = io.open(filename..".png")
|
||||
if f then
|
||||
f:close()
|
||||
uniskins.skin[name] = "player_"..name..".png"
|
||||
end
|
||||
end
|
||||
if multicraft.get_modpath("skins") then
|
||||
local skin = skins.skins[name]
|
||||
if skin and skins.get_type(skin) == skins.type.MODEL then
|
||||
uniskins.skin[name] = skin..".png"
|
||||
end
|
||||
end
|
||||
end)
|
||||
]]
|
@ -1,2 +1,2 @@
|
||||
check
|
||||
|
||||
default
|
||||
|
@ -2,8 +2,8 @@
|
||||
domb.aleatorio = nil
|
||||
|
||||
--Inicialização da variável aleatoria para que seja usada quando necessário.
|
||||
multicraft.after(0.01, function()
|
||||
domb.aleatorio=PseudoRandom(200 + (multicraft.get_timeofday()*100000))
|
||||
minetest.after(0.01, function()
|
||||
domb.aleatorio=PseudoRandom(200 + (minetest.get_timeofday()*100000))
|
||||
end)
|
||||
|
||||
-- Identifica vizinhança de um ponto, os pontos retornados tem a parte superior como ponto 1.
|
||||
@ -29,7 +29,7 @@ function DOM_vizinhos(ponto)
|
||||
for vx=-1, 1 do
|
||||
for vz=-1,1 do
|
||||
p.n[pontos] = ''
|
||||
tipo = multicraft.get_node({x=(ponto.x + vx), y=(ponto.y + vy), z=(ponto.z + vz)}).name
|
||||
tipo = minetest.get_node({x=(ponto.x + vx), y=(ponto.y + vy), z=(ponto.z + vz)}).name
|
||||
--print("Ponto pego: " .. tipo)
|
||||
-- Busca pontos onde dois eixos estejam zerados e um outro tenha valor.
|
||||
if vx==0 and vy==0 and vz==0 then
|
||||
@ -210,7 +210,7 @@ end
|
||||
--]]
|
||||
function DOM_log(...)
|
||||
-- action, error, info
|
||||
multicraft.log("action", "[DOM]"..string.format(...))
|
||||
minetest.log("action", "[DOM]"..string.format(...))
|
||||
end
|
||||
|
||||
|
||||
@ -343,7 +343,7 @@ end
|
||||
module name, path of the module
|
||||
]]--
|
||||
function DOM_mb(m,c)
|
||||
-- multicraft.log("action", "[DOM]"..m.." loaded from "..multicraft.get_modpath(multicraft.get_current_modname()))
|
||||
-- minetest.log("action", "[DOM]"..m.." loaded from "..minetest.get_modpath(minetest.get_current_modname()))
|
||||
|
||||
end
|
||||
|
||||
@ -355,9 +355,9 @@ end
|
||||
apaga x y z Apaga node no lugar especificado.
|
||||
|
||||
if comando == "comando" then -- Comando?
|
||||
multicraft.chat_send_player(name, "[DOM]dom_util: ".."Comando?")
|
||||
minetest.chat_send_player(name, "[DOM]dom_util: ".."Comando?")
|
||||
elseif comando == "comando2" then -- Comando?
|
||||
multicraft.chat_send_player(name, "[DOM]dom_util: ".."Comando2?")
|
||||
minetest.chat_send_player(name, "[DOM]dom_util: ".."Comando2?")
|
||||
end
|
||||
end
|
||||
|
||||
@ -438,7 +438,7 @@ function DOM_get_item_meta (item)
|
||||
end
|
||||
|
||||
if string.find(v,"return {") then
|
||||
r = multicraft.deserialize(v)
|
||||
r = minetest.deserialize(v)
|
||||
end
|
||||
|
||||
return r
|
||||
@ -446,7 +446,7 @@ end
|
||||
|
||||
-- Associa valores meta a um item, provavelmente se aplica a nodos.
|
||||
function DOM_set_item_meta(i, v)
|
||||
local t = multicraft.serialize(v)
|
||||
local t = minetest.serialize(v)
|
||||
|
||||
i["metadata"]=t
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
domb = {}
|
||||
|
||||
--DOM base system library
|
||||
dofile(multicraft.get_modpath("domb").."/domb.lua")
|
||||
dofile(minetest.get_modpath("domb").."/domb.lua")
|
||||
|
||||
DOM_registra_comandos_de_uso_geral()
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
default
|
||||
domb
|
||||
|
@ -1,5 +1,5 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
--[[
|
||||
DOM, renew of the watch mod
|
||||
|
||||
@ -8,10 +8,10 @@ if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copyin
|
||||
|
||||
|
||||
--Rotinas usadas pelo mod
|
||||
dofile(multicraft.get_modpath("watch").."/rotinas.lua")
|
||||
dofile(minetest.get_modpath("watch").."/rotinas.lua")
|
||||
|
||||
--Declarações dos objetos
|
||||
dofile(multicraft.get_modpath("watch").."/itens.lua")
|
||||
dofile(minetest.get_modpath("watch").."/itens.lua")
|
||||
|
||||
-- Apenas para indicar que este módulo foi completamente carregado.
|
||||
DOM_mb(multicraft.get_current_modname(),multicraft.get_modpath(multicraft.get_current_modname()))
|
||||
DOM_mb(minetest.get_current_modname(),minetest.get_modpath(minetest.get_current_modname()))
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- Watch recipe
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
description = "Watch",
|
||||
output = 'watch:watch',
|
||||
recipe = {
|
||||
|
@ -40,7 +40,7 @@ watch.images_d={
|
||||
--Catch the sever time and convert to hour, 12000 = 12h = 0.5, 6000 = 6h = 0.25
|
||||
function watch.pega_hora(tipo)
|
||||
local tempo_r = "12:00"
|
||||
local t = multicraft.get_timeofday()
|
||||
local t = minetest.get_timeofday()
|
||||
local tempo = t*24 -- Get the time
|
||||
local tempo_h = math.floor(tempo) -- Get 24h only, losting minutes
|
||||
local tempo_m =math.floor((tempo - tempo_h)*60) --Get only minutes
|
||||
@ -83,7 +83,7 @@ function watch.usa (itemstack, user, pointed_thing)
|
||||
DOM_set_item_meta(item, meta)
|
||||
meta=DOM_get_item_meta(item)
|
||||
--DOM_inspeciona_r("Valores no meta:"..dump(meta))
|
||||
multicraft.chat_send_player(user:get_player_name(), "[Watch] Time now is:" .. meta["time"])
|
||||
minetest.chat_send_player(user:get_player_name(), "[Watch] Time now is:" .. meta["time"])
|
||||
|
||||
itemstack:replace(item)
|
||||
|
||||
@ -98,7 +98,7 @@ function watch.registra_item(nome,imagem,aparece_nas_receitas)
|
||||
end
|
||||
|
||||
--DOM_inspeciona_r("Registrando item "..nome..","..imagem)
|
||||
multicraft.register_tool(nome, {
|
||||
minetest.register_tool(nome, {
|
||||
description = "Watch",
|
||||
inventory_image = imagem,
|
||||
groups = {not_in_creative_inventory=g, tools = g},
|
||||
@ -109,7 +109,7 @@ function watch.registra_item(nome,imagem,aparece_nas_receitas)
|
||||
})
|
||||
end
|
||||
|
||||
multicraft.register_globalstep(function(dtime)
|
||||
minetest.register_globalstep(function(dtime)
|
||||
local t="a" -- d to digital, a to analogic
|
||||
|
||||
local now = watch.pega_hora(2)
|
||||
@ -123,7 +123,7 @@ multicraft.register_globalstep(function(dtime)
|
||||
watch.ultimo_tempo = now
|
||||
|
||||
|
||||
local players = multicraft.get_connected_players()
|
||||
local players = minetest.get_connected_players()
|
||||
for i,player in ipairs(players) do
|
||||
|
||||
if string.sub(player:get_wielded_item():get_name(), 0, 11) == "watch:watch" then
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
default
|
||||
wool
|
@ -1,9 +1,3 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
local f = io.open(multicraft.get_modpath("beds")..'/init.lua', "r")
|
||||
local content = f:read("*all")
|
||||
f:close()
|
||||
if content:find("mine".."test") then os.exit() end
|
||||
local player_in_bed = 0
|
||||
local guy
|
||||
local hand
|
||||
@ -11,13 +5,13 @@ local old_yaw = 0
|
||||
|
||||
local function get_dir(pos)
|
||||
local btop = "beds:bed_top"
|
||||
if multicraft.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name == btop then
|
||||
if minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name == btop then
|
||||
return 7.9
|
||||
elseif multicraft.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name == btop then
|
||||
elseif minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name == btop then
|
||||
return 4.75
|
||||
elseif multicraft.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name == btop then
|
||||
elseif minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name == btop then
|
||||
return 3.15
|
||||
elseif multicraft.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name == btop then
|
||||
elseif minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name == btop then
|
||||
return 6.28
|
||||
end
|
||||
end
|
||||
@ -26,30 +20,30 @@ function plock(start, max, tick, player, yaw)
|
||||
if start+tick < max then
|
||||
player:set_look_pitch(-1.2)
|
||||
player:set_look_yaw(yaw)
|
||||
multicraft.after(tick, plock, start+tick, max, tick, player, yaw)
|
||||
minetest.after(tick, plock, start+tick, max, tick, player, yaw)
|
||||
else
|
||||
player:set_look_pitch(0)
|
||||
if old_yaw ~= 0 then multicraft.after(0.1+tick, function() player:set_look_yaw(old_yaw) end) end
|
||||
if old_yaw ~= 0 then minetest.after(0.1+tick, function() player:set_look_yaw(old_yaw) end) end
|
||||
end
|
||||
end
|
||||
|
||||
function exit(pos)
|
||||
local npos = multicraft.find_node_near(pos, 1, "beds:bed_bottom")
|
||||
local npos = minetest.find_node_near(pos, 1, "beds:bed_bottom")
|
||||
if npos ~= nil then pos = npos end
|
||||
if multicraft.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name == "air" then
|
||||
if minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name == "air" then
|
||||
return {x=pos.x+1,y=pos.y,z=pos.z}
|
||||
elseif multicraft.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name == "air" then
|
||||
elseif minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name == "air" then
|
||||
return {x=pos.x-1,y=pos.y,z=pos.z}
|
||||
elseif multicraft.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name == "air" then
|
||||
elseif minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name == "air" then
|
||||
return {x=pos.x,y=pos.y,z=pos.z+1}
|
||||
elseif multicraft.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name == "air" then
|
||||
elseif minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name == "air" then
|
||||
return {x=pos.x,y=pos.y,z=pos.z-1}
|
||||
else
|
||||
return {x=pos.x,y=pos.y,z=pos.z}
|
||||
end
|
||||
end
|
||||
|
||||
multicraft.register_node("beds:bed_bottom", {
|
||||
minetest.register_node("beds:bed_bottom", {
|
||||
description = "Bed",
|
||||
inventory_image = "beds_bed.png",
|
||||
wield_image = "beds_bed.png",
|
||||
@ -72,7 +66,7 @@ multicraft.register_node("beds:bed_bottom", {
|
||||
},
|
||||
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
local node = multicraft.get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local param2 = node.param2
|
||||
local npos = {x=pos.x, y=pos.y, z=pos.z}
|
||||
if param2 == 0 then
|
||||
@ -84,17 +78,17 @@ multicraft.register_node("beds:bed_bottom", {
|
||||
elseif param2 == 3 then
|
||||
npos.x = npos.x-1
|
||||
end
|
||||
if multicraft.registered_nodes[multicraft.get_node(npos).name].buildable_to == true and multicraft.get_node({x=npos.x, y=npos.y-1, z=npos.z}).name ~= "air" then
|
||||
multicraft.set_node(npos, {name="beds:bed_top", param2 = param2})
|
||||
if minetest.registered_nodes[minetest.get_node(npos).name].buildable_to == true and minetest.get_node({x=npos.x, y=npos.y-1, z=npos.z}).name ~= "air" then
|
||||
minetest.set_node(npos, {name="beds:bed_top", param2 = param2})
|
||||
else
|
||||
multicraft.dig_node(pos)
|
||||
minetest.dig_node(pos)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
on_destruct = function(pos)
|
||||
pos = multicraft.find_node_near(pos, 1, "beds:bed_top")
|
||||
if pos ~= nil then multicraft.remove_node(pos) end
|
||||
pos = minetest.find_node_near(pos, 1, "beds:bed_top")
|
||||
if pos ~= nil then minetest.remove_node(pos) end
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
@ -102,20 +96,20 @@ multicraft.register_node("beds:bed_bottom", {
|
||||
return
|
||||
end
|
||||
|
||||
if multicraft.get_timeofday() > 0.2 and multicraft.get_timeofday() < 0.805 then
|
||||
multicraft.chat_send_all("You can only sleep at night")
|
||||
if minetest.get_timeofday() > 0.2 and minetest.get_timeofday() < 0.805 then
|
||||
minetest.chat_send_all("You can only sleep at night")
|
||||
return
|
||||
else
|
||||
clicker:set_physics_override(0,0,0)
|
||||
old_yaw = clicker:get_look_yaw()
|
||||
guy = clicker
|
||||
clicker:set_look_yaw(get_dir(pos))
|
||||
multicraft.chat_send_all("Good night")
|
||||
minetest.chat_send_all("Good night")
|
||||
plock(0,2,0.1,clicker, get_dir(pos))
|
||||
end
|
||||
|
||||
if not clicker:get_player_control().sneak then
|
||||
local meta = multicraft.get_meta(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local param2 = node.param2
|
||||
if param2 == 0 then
|
||||
pos.z = pos.z+1
|
||||
@ -150,7 +144,7 @@ multicraft.register_node("beds:bed_bottom", {
|
||||
end
|
||||
})
|
||||
|
||||
multicraft.register_node("beds:bed_top", {
|
||||
minetest.register_node("beds:bed_top", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"beds_bed_top_top.png^[transformR90", "beds_bed_leer.png", "beds_bed_side_top_r.png", "beds_bed_side_top_r.png^[transformfx", "beds_bed_side_top.png", "beds_bed_leer.png"},
|
||||
paramtype = "light",
|
||||
@ -167,9 +161,9 @@ multicraft.register_node("beds:bed_top", {
|
||||
},
|
||||
})
|
||||
|
||||
multicraft.register_alias("beds:bed", "beds:bed_bottom")
|
||||
minetest.register_alias("beds:bed", "beds:bed_bottom")
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "beds:bed",
|
||||
recipe = {
|
||||
{"group:wool", "group:wool", "group:wool", },
|
||||
@ -178,39 +172,39 @@ multicraft.register_craft({
|
||||
})
|
||||
|
||||
beds_player_spawns = {}
|
||||
local file = io.open(multicraft.get_worldpath().."/beds_player_spawns", "r")
|
||||
local file = io.open(minetest.get_worldpath().."/beds_player_spawns", "r")
|
||||
if file then
|
||||
beds_player_spawns = multicraft.deserialize(file:read("*all"))
|
||||
beds_player_spawns = minetest.deserialize(file:read("*all"))
|
||||
file:close()
|
||||
end
|
||||
|
||||
local timer = 0
|
||||
local wait = false
|
||||
multicraft.register_globalstep(function(dtime)
|
||||
minetest.register_globalstep(function(dtime)
|
||||
if timer<2 then
|
||||
timer = timer+dtime
|
||||
return
|
||||
end
|
||||
timer = 0
|
||||
|
||||
local players = #multicraft.get_connected_players()
|
||||
local players = #minetest.get_connected_players()
|
||||
if players == player_in_bed and players ~= 0 then
|
||||
if multicraft.get_timeofday() < 0.2 or multicraft.get_timeofday() > 0.805 then
|
||||
if minetest.get_timeofday() < 0.2 or minetest.get_timeofday() > 0.805 then
|
||||
if not wait then
|
||||
multicraft.after(2, function()
|
||||
multicraft.set_timeofday(0.23)
|
||||
minetest.after(2, function()
|
||||
minetest.set_timeofday(0.23)
|
||||
wait = false
|
||||
guy:set_physics_override(1,1,1)
|
||||
guy:setpos(exit(guy:getpos()))
|
||||
|
||||
end)
|
||||
wait = true
|
||||
for _,player in ipairs(multicraft.get_connected_players()) do
|
||||
for _,player in ipairs(minetest.get_connected_players()) do
|
||||
beds_player_spawns[player:get_player_name()] = player:getpos()
|
||||
end
|
||||
local file = io.open(multicraft.get_worldpath().."/beds_player_spawns", "w")
|
||||
local file = io.open(minetest.get_worldpath().."/beds_player_spawns", "w")
|
||||
if file then
|
||||
file:write(multicraft.serialize(beds_player_spawns))
|
||||
file:write(minetest.serialize(beds_player_spawns))
|
||||
file:close()
|
||||
end
|
||||
end
|
||||
@ -218,7 +212,7 @@ multicraft.register_globalstep(function(dtime)
|
||||
end
|
||||
end)
|
||||
|
||||
multicraft.register_on_respawnplayer(function(player)
|
||||
minetest.register_on_respawnplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
if beds_player_spawns[name] then
|
||||
player:setpos(beds_player_spawns[name])
|
||||
@ -226,12 +220,12 @@ multicraft.register_on_respawnplayer(function(player)
|
||||
end
|
||||
end)
|
||||
|
||||
multicraft.register_abm({
|
||||
minetest.register_abm({
|
||||
nodenames = {"beds:bed_bottom"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
local meta = multicraft.get_meta(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if meta:get_string("player") ~= "" then
|
||||
local param2 = node.param2
|
||||
if param2 == 0 then
|
||||
@ -243,7 +237,7 @@ multicraft.register_abm({
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
local player = multicraft.get_player_by_name(meta:get_string("player"))
|
||||
local player = minetest.get_player_by_name(meta:get_string("player"))
|
||||
if player == nil then
|
||||
meta:set_string("player", "")
|
||||
player_in_bed = player_in_bed-1
|
||||
@ -262,6 +256,6 @@ multicraft.register_abm({
|
||||
end
|
||||
})
|
||||
|
||||
if multicraft.setting_get("log_mods") then
|
||||
multicraft.log("action", "beds loaded")
|
||||
if minetest.setting_get("log_mods") then
|
||||
minetest.log("action", "beds loaded")
|
||||
end
|
||||
|
@ -1,2 +1,2 @@
|
||||
check
|
||||
|
||||
default
|
||||
|
@ -1,5 +1,5 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
-- |\ /| ____ ____ ____ _____ ____ _____
|
||||
-- | \ / | | | | | | | |\ | |
|
||||
-- | \/ | |___ ____ |___ | | | | \ | |____
|
||||
@ -9,7 +9,7 @@ if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copyin
|
||||
--
|
||||
--
|
||||
--
|
||||
-- This mod adds bluestone and different receptors/effectors to multicraft.
|
||||
-- This mod adds bluestone and different receptors/effectors to minetest.
|
||||
-- See the documentation on the forum for additional information, especially about crafting
|
||||
--
|
||||
--
|
||||
@ -52,28 +52,28 @@ mesecon.effectors={} -- saves all information about effectors | DEPRECATED
|
||||
mesecon.conductors={} -- saves all information about conductors | DEPRECATED
|
||||
|
||||
-- Settings
|
||||
dofile(multicraft.get_modpath("mesecons").."/settings.lua")
|
||||
dofile(minetest.get_modpath("mesecons").."/settings.lua")
|
||||
|
||||
-- Presets (eg default rules)
|
||||
dofile(multicraft.get_modpath("mesecons").."/presets.lua");
|
||||
dofile(minetest.get_modpath("mesecons").."/presets.lua");
|
||||
|
||||
|
||||
-- Utilities like comparing positions,
|
||||
-- adding positions and rules,
|
||||
-- mostly things that make the source look cleaner
|
||||
dofile(multicraft.get_modpath("mesecons").."/util.lua");
|
||||
dofile(minetest.get_modpath("mesecons").."/util.lua");
|
||||
|
||||
-- Internal stuff
|
||||
-- This is the most important file
|
||||
-- it handles signal transmission and basically everything else
|
||||
-- It is also responsible for managing the nodedef things,
|
||||
-- like calling action_on/off/change
|
||||
dofile(multicraft.get_modpath("mesecons").."/internal.lua");
|
||||
dofile(minetest.get_modpath("mesecons").."/internal.lua");
|
||||
|
||||
-- Deprecated stuff
|
||||
-- To be removed in future releases
|
||||
-- Currently there is nothing here
|
||||
dofile(multicraft.get_modpath("mesecons").."/legacy.lua");
|
||||
dofile(minetest.get_modpath("mesecons").."/legacy.lua");
|
||||
|
||||
-- API
|
||||
-- these are the only functions you need to remember
|
||||
@ -100,14 +100,14 @@ function mesecon:receptor_off(pos, rules)
|
||||
if not mesecon:connected_to_receptor(np) then
|
||||
mesecon:turnoff(np, rulename)
|
||||
else
|
||||
mesecon:changesignal(np, multicraft.env:get_node(np), rulename, mesecon.state.off)
|
||||
mesecon:changesignal(np, minetest.env:get_node(np), rulename, mesecon.state.off)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--The actual wires
|
||||
dofile(multicraft.get_modpath("mesecons").."/wires.lua");
|
||||
dofile(minetest.get_modpath("mesecons").."/wires.lua");
|
||||
|
||||
--Services like turnoff receptor on dignode and so on
|
||||
dofile(multicraft.get_modpath("mesecons").."/services.lua");
|
||||
dofile(minetest.get_modpath("mesecons").."/services.lua");
|
||||
|
@ -57,26 +57,26 @@
|
||||
|
||||
-- General
|
||||
function mesecon:get_effector(nodename)
|
||||
if multicraft.registered_nodes[nodename]
|
||||
and multicraft.registered_nodes[nodename].mesecons
|
||||
and multicraft.registered_nodes[nodename].mesecons.effector then
|
||||
return multicraft.registered_nodes[nodename].mesecons.effector
|
||||
if minetest.registered_nodes[nodename]
|
||||
and minetest.registered_nodes[nodename].mesecons
|
||||
and minetest.registered_nodes[nodename].mesecons.effector then
|
||||
return minetest.registered_nodes[nodename].mesecons.effector
|
||||
end
|
||||
end
|
||||
|
||||
function mesecon:get_receptor(nodename)
|
||||
if multicraft.registered_nodes[nodename]
|
||||
and multicraft.registered_nodes[nodename].mesecons
|
||||
and multicraft.registered_nodes[nodename].mesecons.receptor then
|
||||
return multicraft.registered_nodes[nodename].mesecons.receptor
|
||||
if minetest.registered_nodes[nodename]
|
||||
and minetest.registered_nodes[nodename].mesecons
|
||||
and minetest.registered_nodes[nodename].mesecons.receptor then
|
||||
return minetest.registered_nodes[nodename].mesecons.receptor
|
||||
end
|
||||
end
|
||||
|
||||
function mesecon:get_conductor(nodename)
|
||||
if multicraft.registered_nodes[nodename]
|
||||
and multicraft.registered_nodes[nodename].mesecons
|
||||
and multicraft.registered_nodes[nodename].mesecons.conductor then
|
||||
return multicraft.registered_nodes[nodename].mesecons.conductor
|
||||
if minetest.registered_nodes[nodename]
|
||||
and minetest.registered_nodes[nodename].mesecons
|
||||
and minetest.registered_nodes[nodename].mesecons.conductor then
|
||||
return minetest.registered_nodes[nodename].mesecons.conductor
|
||||
end
|
||||
end
|
||||
|
||||
@ -268,7 +268,7 @@ end
|
||||
-- some more general high-level stuff
|
||||
|
||||
function mesecon:is_power_on(pos)
|
||||
local node = multicraft.get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
if mesecon:is_conductor_on(node.name) or mesecon:is_receptor_on(node.name) then
|
||||
return true
|
||||
end
|
||||
@ -276,7 +276,7 @@ function mesecon:is_power_on(pos)
|
||||
end
|
||||
|
||||
function mesecon:is_power_off(pos)
|
||||
local node = multicraft.get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
if mesecon:is_conductor_off(node.name) or mesecon:is_receptor_off(node.name) then
|
||||
return true
|
||||
end
|
||||
@ -284,11 +284,11 @@ function mesecon:is_power_off(pos)
|
||||
end
|
||||
|
||||
function mesecon:turnon(pos, rulename)
|
||||
local node = multicraft.get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
if mesecon:is_conductor_off(node.name) then
|
||||
local rules = mesecon:conductor_get_rules(node)
|
||||
multicraft.add_node(pos, {name = mesecon:get_conductor_on(node.name), param2 = node.param2})
|
||||
minetest.add_node(pos, {name = mesecon:get_conductor_on(node.name), param2 = node.param2})
|
||||
|
||||
for _, rule in ipairs(rules) do
|
||||
local np = mesecon:addPosRule(pos, rule)
|
||||
@ -307,11 +307,11 @@ function mesecon:turnon(pos, rulename)
|
||||
end
|
||||
|
||||
function mesecon:turnoff(pos, rulename)
|
||||
local node = multicraft.get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
if mesecon:is_conductor_on(node.name) then
|
||||
local rules = mesecon:conductor_get_rules(node)
|
||||
multicraft.add_node(pos, {name = mesecon:get_conductor_off(node.name), param2 = node.param2})
|
||||
minetest.add_node(pos, {name = mesecon:get_conductor_off(node.name), param2 = node.param2})
|
||||
|
||||
for _, rule in ipairs(rules) do
|
||||
local np = mesecon:addPosRule(pos, rule)
|
||||
@ -332,7 +332,7 @@ end
|
||||
|
||||
|
||||
function mesecon:connected_to_receptor(pos)
|
||||
local node = multicraft.get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
-- Check if conductors around are connected
|
||||
local rules = mesecon:get_any_inputrules(node)
|
||||
@ -360,7 +360,7 @@ function mesecon:find_receptor_on(pos, checked)
|
||||
|
||||
-- add current position to checked
|
||||
table.insert(checked, {x=pos.x, y=pos.y, z=pos.z})
|
||||
local node = multicraft.get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
if mesecon:is_receptor_on(node.name) then
|
||||
return true
|
||||
@ -382,8 +382,8 @@ function mesecon:find_receptor_on(pos, checked)
|
||||
end
|
||||
|
||||
function mesecon:rules_link(output, input, dug_outputrules) --output/input are positions (outputrules optional, used if node has been dug), second return value: the name of the affected input rule
|
||||
local outputnode = multicraft.get_node(output)
|
||||
local inputnode = multicraft.get_node(input)
|
||||
local outputnode = minetest.get_node(output)
|
||||
local inputnode = minetest.get_node(input)
|
||||
local outputrules = dug_outputrules or mesecon:get_any_outputrules (outputnode)
|
||||
local inputrules = mesecon:get_any_inputrules (inputnode)
|
||||
if not outputrules or not inputrules then
|
||||
@ -409,13 +409,13 @@ function mesecon:rules_link_anydir(pos1, pos2)
|
||||
end
|
||||
|
||||
function mesecon:is_powered(pos)
|
||||
local node = multicraft.get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local rules = mesecon:get_any_inputrules(node)
|
||||
if not rules then return false end
|
||||
|
||||
for _, rule in ipairs(rules) do
|
||||
local np = mesecon:addPosRule(pos, rule)
|
||||
local nn = multicraft.get_node(np)
|
||||
local nn = minetest.get_node(np)
|
||||
|
||||
if (mesecon:is_conductor_on (nn.name) or mesecon:is_receptor_on (nn.name))
|
||||
and mesecon:rules_link(np, pos) then
|
||||
|
@ -1,4 +1,4 @@
|
||||
multicraft.register_node("mesecons:mesecon_off", {
|
||||
minetest.register_node("mesecons:mesecon_off", {
|
||||
drawtype = "raillike",
|
||||
tiles = {"jeija_mesecon_off.png", "jeija_mesecon_curved_off.png", "jeija_mesecon_t_junction_off.png", "jeija_mesecon_crossing_off.png"},
|
||||
inventory_image = "jeija_mesecon_off.png",
|
||||
@ -18,7 +18,7 @@ multicraft.register_node("mesecons:mesecon_off", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_node("mesecons:mesecon_on", {
|
||||
minetest.register_node("mesecons:mesecon_on", {
|
||||
drawtype = "raillike",
|
||||
tiles = {"jeija_mesecon_on.png", "jeija_mesecon_curved_on.png", "jeija_mesecon_t_junction_on.png", "jeija_mesecon_crossing_on.png"},
|
||||
paramtype = "light",
|
||||
@ -30,7 +30,7 @@ multicraft.register_node("mesecons:mesecon_on", {
|
||||
},
|
||||
groups = {dig_immediate=3, not_in_creaive_inventory=1, mesecon=1},
|
||||
drop = '"mesecons:mesecon_off" 1',
|
||||
light_source = LIGHT_MAX-11,
|
||||
light_source = default.LIGHT_MAX-11,
|
||||
mesecons = {conductor={
|
||||
state = mesecon.state.on,
|
||||
offstate = "mesecons:mesecon_off"
|
||||
|
@ -24,5 +24,5 @@ mesecon.on_dignode = function (pos, node)
|
||||
end
|
||||
end
|
||||
|
||||
multicraft.register_on_placenode(mesecon.on_placenode)
|
||||
multicraft.register_on_dignode(mesecon.on_dignode)
|
||||
minetest.register_on_placenode(mesecon.on_placenode)
|
||||
minetest.register_on_dignode(mesecon.on_dignode)
|
||||
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 410 B |
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 362 B |
Before Width: | Height: | Size: 490 B After Width: | Height: | Size: 490 B |
After Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 396 B |
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 425 B After Width: | Height: | Size: 425 B |
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 374 B |
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 417 B |
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 200 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 136 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 298 B |
Before Width: | Height: | Size: 281 B After Width: | Height: | Size: 281 B |
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 300 B |
@ -1,17 +1,17 @@
|
||||
function mesecon:swap_node(pos, name)
|
||||
local node = multicraft.get_node(pos)
|
||||
local data = multicraft.get_meta(pos):to_table()
|
||||
local node = minetest.get_node(pos)
|
||||
local data = minetest.get_meta(pos):to_table()
|
||||
node.name = name
|
||||
multicraft.add_node(pos, node)
|
||||
multicraft.get_meta(pos):from_table(data)
|
||||
minetest.add_node(pos, node)
|
||||
minetest.get_meta(pos):from_table(data)
|
||||
end
|
||||
|
||||
function mesecon:move_node(pos, newpos)
|
||||
local node = multicraft.get_node(pos)
|
||||
local meta = multicraft.get_meta(pos):to_table()
|
||||
multicraft.remove_node(pos)
|
||||
multicraft.add_node(newpos, node)
|
||||
multicraft.get_meta(pos):from_table(meta)
|
||||
local node = minetest.get_node(pos)
|
||||
local meta = minetest.get_meta(pos):to_table()
|
||||
minetest.remove_node(pos)
|
||||
minetest.add_node(newpos, node)
|
||||
minetest.get_meta(pos):from_table(meta)
|
||||
end
|
||||
|
||||
|
||||
|
@ -95,7 +95,7 @@ for zmy=0, 1 do
|
||||
nodebox = {-8/16, -.5, -1/16, 8/16, -.5+1/16, 1/16}
|
||||
end
|
||||
|
||||
multicraft.register_node("mesecons:wire_"..nodeid.."_off", {
|
||||
minetest.register_node("mesecons:wire_"..nodeid.."_off", {
|
||||
description = "Bluestone Dust",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles_off,
|
||||
@ -124,7 +124,7 @@ for zmy=0, 1 do
|
||||
}},
|
||||
})
|
||||
|
||||
multicraft.register_node("mesecons:wire_"..nodeid.."_on", {
|
||||
minetest.register_node("mesecons:wire_"..nodeid.."_on", {
|
||||
description = "Bluestone Dust",
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles_on,
|
||||
@ -165,14 +165,14 @@ end
|
||||
-- Place the right connection wire
|
||||
|
||||
local update_on_place_dig = function (pos, node)
|
||||
if multicraft.registered_nodes[node.name]
|
||||
and multicraft.registered_nodes[node.name].mesecons then
|
||||
if minetest.registered_nodes[node.name]
|
||||
and minetest.registered_nodes[node.name].mesecons then
|
||||
mesecon:update_autoconnect(pos)
|
||||
end
|
||||
end
|
||||
|
||||
multicraft.register_on_placenode(update_on_place_dig)
|
||||
multicraft.register_on_dignode(update_on_place_dig)
|
||||
minetest.register_on_placenode(update_on_place_dig)
|
||||
minetest.register_on_dignode(update_on_place_dig)
|
||||
|
||||
function mesecon:update_autoconnect(pos, secondcall, replace_old)
|
||||
local xppos = {x=pos.x+1, y=pos.y, z=pos.z}
|
||||
@ -207,7 +207,7 @@ function mesecon:update_autoconnect(pos, secondcall, replace_old)
|
||||
mesecon:update_autoconnect(zmympos, true)
|
||||
end
|
||||
|
||||
local nodename = multicraft.get_node(pos).name
|
||||
local nodename = minetest.get_node(pos).name
|
||||
if string.find(nodename, "mesecons:wire_") == nil and not replace_old then return nil end
|
||||
|
||||
local xp, xm, zp, zm, xpy, zpy, xmy, zmy
|
||||
@ -237,8 +237,8 @@ function mesecon:update_autoconnect(pos, secondcall, replace_old)
|
||||
|
||||
|
||||
if string.find(nodename, "_off") ~= nil then
|
||||
multicraft.set_node(pos, {name = "mesecons:wire_"..nodeid.."_off"})
|
||||
minetest.set_node(pos, {name = "mesecons:wire_"..nodeid.."_off"})
|
||||
else
|
||||
multicraft.set_node(pos, {name = "mesecons:wire_"..nodeid.."_on" })
|
||||
minetest.set_node(pos, {name = "mesecons:wire_"..nodeid.."_on" })
|
||||
end
|
||||
end
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,40 +1,40 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
-- This file registers aliases for the /give /giveme commands.
|
||||
|
||||
multicraft.register_alias("mesecons:removestone", "mesecons_random:removestone")
|
||||
multicraft.register_alias("mesecons:power_plant", "mesecons_powerplant:power_plant")
|
||||
multicraft.register_alias("mesecons:powerplant", "mesecons_powerplant:power_plant")
|
||||
multicraft.register_alias("mesecons:meselamp", "mesecons_lamp:lamp_off")
|
||||
multicraft.register_alias("mesecons:mesecon", "mesecons:wire_00000000_off")
|
||||
multicraft.register_alias("mesecons:object_detector", "mesecons_detector:object_detector_off")
|
||||
multicraft.register_alias("mesecons:wireless_inverter", "mesecons_wireless:wireless_inverter_on")
|
||||
multicraft.register_alias("mesecons:wireless_receiver", "mesecons_wireless:wireless_receiver_off")
|
||||
multicraft.register_alias("mesecons:wireless_transmitter", "mesecons_wireless:wireless_transmitter_off")
|
||||
multicraft.register_alias("mesecons:switch", "mesecons_switch:mesecon_switch_off")
|
||||
multicraft.register_alias("mesecons:button", "mesecons_button:button_off")
|
||||
multicraft.register_alias("mesecons:piston", "mesecons_pistons:piston_normal_off")
|
||||
multicraft.register_alias("mesecons:blinky_plant", "mesecons_blinkyplant:blinky_plant_off")
|
||||
multicraft.register_alias("mesecons:mesecon_torch", "mesecons_torch:mesecon_torch_on")
|
||||
multicraft.register_alias("mesecons:torch", "mesecons_torch:mesecon_torch_on")
|
||||
multicraft.register_alias("mesecons:hydro_turbine", "mesecons_hydroturbine:hydro_turbine_off")
|
||||
multicraft.register_alias("mesecons:pressure_plate_stone", "mesecons_pressureplates:pressure_plate_stone_off")
|
||||
multicraft.register_alias("mesecons:pressure_plate_wood", "mesecons_pressureplates:pressure_plate_wood_off")
|
||||
multicraft.register_alias("mesecons:mesecon_socket", "mesecons_temperest:mesecon_socket_off")
|
||||
multicraft.register_alias("mesecons:mesecon_inverter", "mesecons_temperest:mesecon_inverter_on")
|
||||
multicraft.register_alias("mesecons:movestone", "mesecons_movestones:movestone")
|
||||
multicraft.register_alias("mesecons:sticky_movestone", "mesecons_movestones:sticky_movestone")
|
||||
multicraft.register_alias("mesecons:noteblock", "mesecons_noteblock:noteblock")
|
||||
multicraft.register_alias("mesecons:microcontroller", "mesecons_microcontroller:microcontroller0000")
|
||||
multicraft.register_alias("mesecons:delayer", "mesecons_delayer:delayer_off_1")
|
||||
multicraft.register_alias("mesecons:solarpanel", "mesecons_solarpanel:solar_panel_off")
|
||||
minetest.register_alias("mesecons:removestone", "mesecons_random:removestone")
|
||||
minetest.register_alias("mesecons:power_plant", "mesecons_powerplant:power_plant")
|
||||
minetest.register_alias("mesecons:powerplant", "mesecons_powerplant:power_plant")
|
||||
minetest.register_alias("mesecons:meselamp", "mesecons_lamp:lamp_off")
|
||||
minetest.register_alias("mesecons:mesecon", "mesecons:wire_00000000_off")
|
||||
minetest.register_alias("mesecons:object_detector", "mesecons_detector:object_detector_off")
|
||||
minetest.register_alias("mesecons:wireless_inverter", "mesecons_wireless:wireless_inverter_on")
|
||||
minetest.register_alias("mesecons:wireless_receiver", "mesecons_wireless:wireless_receiver_off")
|
||||
minetest.register_alias("mesecons:wireless_transmitter", "mesecons_wireless:wireless_transmitter_off")
|
||||
minetest.register_alias("mesecons:switch", "mesecons_switch:mesecon_switch_off")
|
||||
minetest.register_alias("mesecons:button", "mesecons_button:button_off")
|
||||
minetest.register_alias("mesecons:piston", "mesecons_pistons:piston_normal_off")
|
||||
minetest.register_alias("mesecons:blinky_plant", "mesecons_blinkyplant:blinky_plant_off")
|
||||
minetest.register_alias("mesecons:mesecon_torch", "mesecons_torch:mesecon_torch_on")
|
||||
minetest.register_alias("mesecons:torch", "mesecons_torch:mesecon_torch_on")
|
||||
minetest.register_alias("mesecons:hydro_turbine", "mesecons_hydroturbine:hydro_turbine_off")
|
||||
minetest.register_alias("mesecons:pressure_plate_stone", "mesecons_pressureplates:pressure_plate_stone_off")
|
||||
minetest.register_alias("mesecons:pressure_plate_wood", "mesecons_pressureplates:pressure_plate_wood_off")
|
||||
minetest.register_alias("mesecons:mesecon_socket", "mesecons_temperest:mesecon_socket_off")
|
||||
minetest.register_alias("mesecons:mesecon_inverter", "mesecons_temperest:mesecon_inverter_on")
|
||||
minetest.register_alias("mesecons:movestone", "mesecons_movestones:movestone")
|
||||
minetest.register_alias("mesecons:sticky_movestone", "mesecons_movestones:sticky_movestone")
|
||||
minetest.register_alias("mesecons:noteblock", "mesecons_noteblock:noteblock")
|
||||
minetest.register_alias("mesecons:microcontroller", "mesecons_microcontroller:microcontroller0000")
|
||||
minetest.register_alias("mesecons:delayer", "mesecons_delayer:delayer_off_1")
|
||||
minetest.register_alias("mesecons:solarpanel", "mesecons_solarpanel:solar_panel_off")
|
||||
|
||||
|
||||
--Backwards compatibility
|
||||
multicraft.register_alias("mesecons:mesecon_off", "mesecons:wire_00000000_off")
|
||||
multicraft.register_alias("mesecons_pistons:piston_sticky", "mesecons_pistons:piston_sticky_on")
|
||||
multicraft.register_alias("mesecons_pistons:piston_normal", "mesecons_pistons:piston_normal_on")
|
||||
multicraft.register_alias("mesecons_pistons:piston_up_normal", "mesecons_pistons:piston_up_normal_on")
|
||||
multicraft.register_alias("mesecons_pistons:piston_down_normal", "mesecons_pistons:piston_down_normal_on")
|
||||
multicraft.register_alias("mesecons_pistons:piston_up_sticky", "mesecons_pistons:piston_up_sticky_on")
|
||||
multicraft.register_alias("mesecons_pistons:piston_down_sticky", "mesecons_pistons:piston_down_sticky_on")
|
||||
minetest.register_alias("mesecons:mesecon_off", "mesecons:wire_00000000_off")
|
||||
minetest.register_alias("mesecons_pistons:piston_sticky", "mesecons_pistons:piston_sticky_on")
|
||||
minetest.register_alias("mesecons_pistons:piston_normal", "mesecons_pistons:piston_normal_on")
|
||||
minetest.register_alias("mesecons_pistons:piston_up_normal", "mesecons_pistons:piston_up_normal_on")
|
||||
minetest.register_alias("mesecons_pistons:piston_down_normal", "mesecons_pistons:piston_down_normal_on")
|
||||
minetest.register_alias("mesecons_pistons:piston_up_sticky", "mesecons_pistons:piston_up_sticky_on")
|
||||
minetest.register_alias("mesecons_pistons:piston_down_sticky", "mesecons_pistons:piston_down_sticky_on")
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,19 +1,19 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
-- WALL BUTTON
|
||||
-- A button that when pressed emits power for 1 second
|
||||
-- and then turns off again
|
||||
|
||||
mesecon.button_turnoff = function (pos)
|
||||
local node = multicraft.env:get_node(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
if node.name=="mesecons_button:button_stone_on" then --has not been dug
|
||||
mesecon:swap_node(pos, "mesecons_button:button_stone_off")
|
||||
multicraft.sound_play("mesecons_button_pop", {pos=pos})
|
||||
minetest.sound_play("mesecons_button_pop", {pos=pos})
|
||||
local rules = mesecon.rules.buttonlike_get(node)
|
||||
mesecon:receptor_off(pos, rules)
|
||||
elseif node.name=="mesecons_button:button_wood_on" then --has not been dug
|
||||
mesecon:swap_node(pos, "mesecons_button:button_wood_off")
|
||||
multicraft.sound_play("mesecons_button_pop", {pos=pos})
|
||||
minetest.sound_play("mesecons_button_pop", {pos=pos})
|
||||
local rules = mesecon.rules.buttonlike_get(node)
|
||||
mesecon:receptor_off(pos, rules)
|
||||
end
|
||||
@ -22,7 +22,7 @@ end
|
||||
local boxes_off = { -4/16, -2/16, 8/16, 4/16, 2/16, 6/16 } -- The button
|
||||
local boxes_on = { -4/16, -2/16, 8/16, 4/16, 2/16, 7/16 } -- The button
|
||||
|
||||
multicraft.register_node("mesecons_button:button_stone_off", {
|
||||
minetest.register_node("mesecons_button:button_stone_off", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"default_stone.png"},
|
||||
paramtype = "light",
|
||||
@ -43,8 +43,8 @@ multicraft.register_node("mesecons_button:button_stone_off", {
|
||||
on_punch = function (pos, node)
|
||||
mesecon:swap_node(pos, "mesecons_button:button_stone_on")
|
||||
mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
||||
multicraft.sound_play("mesecons_button_push", {pos=pos})
|
||||
multicraft.after(1, mesecon.button_turnoff, pos)
|
||||
minetest.sound_play("mesecons_button_push", {pos=pos})
|
||||
minetest.after(1, mesecon.button_turnoff, pos)
|
||||
end,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
mesecons = {receptor = {
|
||||
@ -53,7 +53,7 @@ multicraft.register_node("mesecons_button:button_stone_off", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_node("mesecons_button:button_stone_on", {
|
||||
minetest.register_node("mesecons_button:button_stone_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"default_stone.png"},
|
||||
paramtype = "light",
|
||||
@ -79,7 +79,7 @@ multicraft.register_node("mesecons_button:button_stone_on", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_node("mesecons_button:button_wood_off", {
|
||||
minetest.register_node("mesecons_button:button_wood_off", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"default_wood.png"},
|
||||
paramtype = "light",
|
||||
@ -100,8 +100,8 @@ multicraft.register_node("mesecons_button:button_wood_off", {
|
||||
on_punch = function (pos, node)
|
||||
mesecon:swap_node(pos, "mesecons_button:button_wood_on")
|
||||
mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
||||
multicraft.sound_play("mesecons_button_push", {pos=pos})
|
||||
multicraft.after(1, mesecon.button_turnoff, pos)
|
||||
minetest.sound_play("mesecons_button_push", {pos=pos})
|
||||
minetest.after(1, mesecon.button_turnoff, pos)
|
||||
end,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
mesecons = {receptor = {
|
||||
@ -110,7 +110,7 @@ multicraft.register_node("mesecons_button:button_wood_off", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_node("mesecons_button:button_wood_on", {
|
||||
minetest.register_node("mesecons_button:button_wood_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {"default_wood.png"},
|
||||
paramtype = "light",
|
||||
@ -136,14 +136,14 @@ multicraft.register_node("mesecons_button:button_wood_on", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'mesecons_button:button_stone_off',
|
||||
recipe = {
|
||||
{'default:stone'},
|
||||
}
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'mesecons_button:button_wood_off',
|
||||
recipe = {
|
||||
{'group:wood'},
|
||||
|
@ -1,4 +1,4 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
doors
|
||||
default
|
||||
|
@ -1,5 +1,5 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
doors = {}
|
||||
|
||||
-- Registers a door - REDEFINITION ONLY | DOORS MOD MUST HAVE BEEN LOADED BEFORE
|
||||
@ -40,27 +40,27 @@ function doors:register_door(name, def)
|
||||
local tb = def.tiles_bottom
|
||||
|
||||
local function after_dig_node(pos, name)
|
||||
if multicraft.get_node(pos).name == name then
|
||||
multicraft.remove_node(pos)
|
||||
if minetest.get_node(pos).name == name then
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_rightclick(pos, dir, check_name, replace, replace_dir, params)
|
||||
pos.y = pos.y+dir
|
||||
if not multicraft.get_node(pos).name == check_name then
|
||||
if not minetest.get_node(pos).name == check_name then
|
||||
return
|
||||
end
|
||||
local p2 = multicraft.get_node(pos).param2
|
||||
local p2 = minetest.get_node(pos).param2
|
||||
p2 = params[p2+1]
|
||||
|
||||
local meta = multicraft.get_meta(pos):to_table()
|
||||
multicraft.set_node(pos, {name=replace_dir, param2=p2})
|
||||
multicraft.get_meta(pos):from_table(meta)
|
||||
local meta = minetest.get_meta(pos):to_table()
|
||||
minetest.set_node(pos, {name=replace_dir, param2=p2})
|
||||
minetest.get_meta(pos):from_table(meta)
|
||||
|
||||
pos.y = pos.y-dir
|
||||
meta = multicraft.get_meta(pos):to_table()
|
||||
multicraft.set_node(pos, {name=replace, param2=p2})
|
||||
multicraft.get_meta(pos):from_table(meta)
|
||||
meta = minetest.get_meta(pos):to_table()
|
||||
minetest.set_node(pos, {name=replace, param2=p2})
|
||||
minetest.get_meta(pos):from_table(meta)
|
||||
end
|
||||
|
||||
local function on_mesecons_signal_open (pos, node)
|
||||
@ -75,12 +75,12 @@ function doors:register_door(name, def)
|
||||
if not def.only_placer_can_open then
|
||||
return true
|
||||
end
|
||||
local meta = multicraft.get_meta(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local pn = player:get_player_name()
|
||||
return meta:get_string("doors_owner") == pn
|
||||
end
|
||||
|
||||
multicraft.register_node(":"..name.."_b_1", {
|
||||
minetest.register_node(":"..name.."_b_1", {
|
||||
tiles = {tb[2], tb[2], tb[2], tb[2], tb[1], tb[1].."^[transformfx"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -114,7 +114,7 @@ function doors:register_door(name, def)
|
||||
can_dig = check_player_priv,
|
||||
})
|
||||
|
||||
multicraft.register_node(":"..name.."_b_2", {
|
||||
minetest.register_node(":"..name.."_b_2", {
|
||||
tiles = {tb[2], tb[2], tb[2], tb[2], tb[1].."^[transformfx", tb[1]},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,5 +1,5 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
-- Function that get the input/output rules of the delayer
|
||||
local delayer_get_output_rules = function(node)
|
||||
local rules = {{x = 0, y = 0, z = 1}}
|
||||
@ -30,17 +30,17 @@ local delayer_turnoff = function(params)
|
||||
end
|
||||
|
||||
local delayer_activate = function(pos, node)
|
||||
local def = multicraft.registered_nodes[node.name]
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
local time = def.delayer_time
|
||||
mesecon:swap_node(pos, def.delayer_onstate)
|
||||
multicraft.after(time, delayer_turnon , {pos = pos, node = node})
|
||||
minetest.after(time, delayer_turnon , {pos = pos, node = node})
|
||||
end
|
||||
|
||||
local delayer_deactivate = function(pos, node)
|
||||
local def = multicraft.registered_nodes[node.name]
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
local time = def.delayer_time
|
||||
mesecon:swap_node(pos, def.delayer_offstate)
|
||||
multicraft.after(time, delayer_turnoff, {pos = pos, node = node})
|
||||
minetest.after(time, delayer_turnoff, {pos = pos, node = node})
|
||||
end
|
||||
|
||||
-- Register the 2 (states) x 4 (delay times) delayers
|
||||
@ -88,7 +88,7 @@ boxes = {
|
||||
}
|
||||
end
|
||||
|
||||
multicraft.register_node("mesecons_delayer:delayer_off_"..tostring(i), {
|
||||
minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), {
|
||||
description = "Delayer",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
@ -144,7 +144,7 @@ multicraft.register_node("mesecons_delayer:delayer_off_"..tostring(i), {
|
||||
})
|
||||
|
||||
|
||||
multicraft.register_node("mesecons_delayer:delayer_on_"..tostring(i), {
|
||||
minetest.register_node("mesecons_delayer:delayer_on_"..tostring(i), {
|
||||
description = "You hacker you",
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
@ -198,7 +198,7 @@ multicraft.register_node("mesecons_delayer:delayer_on_"..tostring(i), {
|
||||
})
|
||||
end
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "mesecons_delayer:delayer_off_1",
|
||||
recipe = {
|
||||
{"mesecons_torch:mesecon_torch_on", "", "mesecons_torch:mesecon_torch_on"},
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,5 +1,5 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
-- dofile(multicraft.get_modpath("mesecons_extrawires").."/crossing.lua");
|
||||
|
||||
|
||||
-- dofile(minetest.get_modpath("mesecons_extrawires").."/crossing.lua");
|
||||
-- The crossing code is not active right now because it is hard to maintain
|
||||
dofile(multicraft.get_modpath("mesecons_extrawires").."/mesewire.lua");
|
||||
dofile(minetest.get_modpath("mesecons_extrawires").."/mesewire.lua");
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,11 +1,11 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
multicraft.register_node("mesecons_lightstone:lightstone_off", {
|
||||
|
||||
|
||||
minetest.register_node("mesecons_lightstone:lightstone_off", {
|
||||
tiles = {"jeija_lightstone_gray_off.png"},
|
||||
inventory_image = multicraft.inventorycube("jeija_lightstone_gray_off.png"),
|
||||
-- inventory_image = minetest.inventorycube("jeija_lightstone_gray_off.png"),
|
||||
groups = {cracky=2, mesecon_effector_off = 1, mesecon = 2, mese = 1},
|
||||
description= "Bluestone Lamp",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
mesecons = {effector = {
|
||||
action_on = function (pos, node)
|
||||
mesecon:swap_node(pos, "mesecons_lightstone:lightstone_on")
|
||||
@ -13,13 +13,13 @@ multicraft.register_node("mesecons_lightstone:lightstone_off", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_node("mesecons_lightstone:lightstone_on", {
|
||||
minetest.register_node("mesecons_lightstone:lightstone_on", {
|
||||
tiles = {"jeija_lightstone_gray_on.png"},
|
||||
inventory_image = multicraft.inventorycube("jeija_lightstone_gray_off.png"),
|
||||
-- inventory_image = minetest.inventorycube("jeija_lightstone_gray_off.png"),
|
||||
groups = {cracky=2,not_in_creative_inventory=1, mesecon = 2},
|
||||
drop = "node mesecons_lightstone:lightstone_off",
|
||||
light_source = LIGHT_MAX,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
light_source = default.LIGHT_MAX,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
mesecons = {effector = {
|
||||
action_off = function (pos, node)
|
||||
mesecon:swap_node(pos, "mesecons_lightstone:lightstone_off")
|
||||
@ -27,7 +27,7 @@ multicraft.register_node("mesecons_lightstone:lightstone_on", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "node mesecons_lightstone:lightstone_off",
|
||||
recipe = {
|
||||
{'',"default:bluestone_dust",''},
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,14 +1,14 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
--GLUE
|
||||
multicraft.register_craftitem("mesecons_materials:glue", {
|
||||
minetest.register_craftitem("mesecons_materials:glue", {
|
||||
image = "jeija_glue.png",
|
||||
on_place_on_ground = multicraft.craftitem_place_item,
|
||||
on_place_on_ground = minetest.craftitem_place_item,
|
||||
description="Glue",
|
||||
groups = {misc = 1},
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = '"mesecons_materials:glue" 2',
|
||||
type = "cooking",
|
||||
recipe = "default:sapling",
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,5 +1,5 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
--register stoppers for movestones/pistons
|
||||
|
||||
mesecon.mvps_stoppers={}
|
||||
@ -23,7 +23,7 @@ function mesecon:mvps_process_stack(stack)
|
||||
-- update mesecons for placed nodes ( has to be done after all nodes have been added )
|
||||
for _, n in ipairs(stack) do
|
||||
nodeupdate(n.pos)
|
||||
mesecon.on_placenode(n.pos, multicraft.get_node(n.pos))
|
||||
mesecon.on_placenode(n.pos, minetest.get_node(n.pos))
|
||||
mesecon:update_autoconnect(n.pos)
|
||||
end
|
||||
end
|
||||
@ -34,14 +34,14 @@ function mesecon:mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: directio
|
||||
-- determine the number of nodes to be pushed
|
||||
local nodes = {}
|
||||
while true do
|
||||
local nn = multicraft.get_node_or_nil(np)
|
||||
local nn = minetest.get_node_or_nil(np)
|
||||
if not nn or #nodes > maximum then
|
||||
-- don't push at all, something is in the way (unloaded map or too many nodes)
|
||||
return
|
||||
end
|
||||
|
||||
if nn.name == "air"
|
||||
or multicraft.registered_nodes[nn.name].liquidtype ~= "none" then --is liquid
|
||||
or minetest.registered_nodes[nn.name].liquidtype ~= "none" then --is liquid
|
||||
break
|
||||
end
|
||||
|
||||
@ -59,8 +59,8 @@ function mesecon:mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: directio
|
||||
|
||||
-- remove all nodes
|
||||
for _, n in ipairs(nodes) do
|
||||
n.meta = multicraft.get_meta(n.pos):to_table()
|
||||
multicraft.remove_node(n.pos)
|
||||
n.meta = minetest.get_meta(n.pos):to_table()
|
||||
minetest.remove_node(n.pos)
|
||||
end
|
||||
|
||||
-- update mesecons for removed nodes ( has to be done after all nodes have been removed )
|
||||
@ -72,8 +72,8 @@ function mesecon:mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: directio
|
||||
-- add nodes
|
||||
for _, n in ipairs(nodes) do
|
||||
np = mesecon:addPosRule(n.pos, dir)
|
||||
multicraft.add_node(np, n.node)
|
||||
multicraft.get_meta(np):from_table(n.meta)
|
||||
minetest.add_node(np, n.node)
|
||||
minetest.get_meta(np):from_table(n.meta)
|
||||
end
|
||||
|
||||
for i in ipairs(nodes) do
|
||||
@ -85,14 +85,14 @@ end
|
||||
|
||||
function mesecon:mvps_pull_single(pos, dir) -- pos: pos of mvps; direction: direction of pull (matches push direction for sticky pistons)
|
||||
local np = mesecon:addPosRule(pos, dir)
|
||||
local nn = multicraft.get_node(np)
|
||||
local nn = minetest.get_node(np)
|
||||
|
||||
if multicraft.registered_nodes[nn.name].liquidtype == "none"
|
||||
if minetest.registered_nodes[nn.name].liquidtype == "none"
|
||||
and not mesecon:is_mvps_stopper(nn, {x = -dir.x, y = -dir.y, z = -dir.z}, {{pos = np, node = nn}}, 1) then
|
||||
local meta = multicraft.get_meta(np):to_table()
|
||||
multicraft.remove_node(np)
|
||||
multicraft.add_node(pos, nn)
|
||||
multicraft.get_meta(pos):from_table(meta)
|
||||
local meta = minetest.get_meta(np):to_table()
|
||||
minetest.remove_node(np)
|
||||
minetest.add_node(pos, nn)
|
||||
minetest.get_meta(pos):from_table(meta)
|
||||
|
||||
nodeupdate(np)
|
||||
nodeupdate(pos)
|
||||
@ -104,25 +104,25 @@ end
|
||||
|
||||
function mesecon:mvps_pull_all(pos, direction) -- pos: pos of mvps; direction: direction of pull
|
||||
local lpos = {x=pos.x-direction.x, y=pos.y-direction.y, z=pos.z-direction.z} -- 1 away
|
||||
local lnode = multicraft.get_node(lpos)
|
||||
local lnode = minetest.get_node(lpos)
|
||||
local lpos2 = {x=pos.x-direction.x*2, y=pos.y-direction.y*2, z=pos.z-direction.z*2} -- 2 away
|
||||
local lnode2 = multicraft.get_node(lpos2)
|
||||
local lnode2 = minetest.get_node(lpos2)
|
||||
|
||||
if lnode.name ~= "ignore" and lnode.name ~= "air" and multicraft.registered_nodes[lnode.name].liquidtype == "none" then return end
|
||||
if lnode2.name == "ignore" or lnode2.name == "air" or not(multicraft.registered_nodes[lnode2.name].liquidtype == "none") then return end
|
||||
if lnode.name ~= "ignore" and lnode.name ~= "air" and minetest.registered_nodes[lnode.name].liquidtype == "none" then return end
|
||||
if lnode2.name == "ignore" or lnode2.name == "air" or not(minetest.registered_nodes[lnode2.name].liquidtype == "none") then return end
|
||||
|
||||
local oldpos = {x=lpos2.x+direction.x, y=lpos2.y+direction.y, z=lpos2.z+direction.z}
|
||||
repeat
|
||||
lnode2 = multicraft.get_node(lpos2)
|
||||
multicraft.add_node(oldpos, {name=lnode2.name})
|
||||
lnode2 = minetest.get_node(lpos2)
|
||||
minetest.add_node(oldpos, {name=lnode2.name})
|
||||
nodeupdate(oldpos)
|
||||
oldpos = {x=lpos2.x, y=lpos2.y, z=lpos2.z}
|
||||
lpos2.x = lpos2.x-direction.x
|
||||
lpos2.y = lpos2.y-direction.y
|
||||
lpos2.z = lpos2.z-direction.z
|
||||
lnode = multicraft.get_node(lpos2)
|
||||
until lnode.name=="air" or lnode.name=="ignore" or not(multicraft.registered_nodes[lnode2.name].liquidtype == "none")
|
||||
multicraft.remove_node(oldpos)
|
||||
lnode = minetest.get_node(lpos2)
|
||||
until lnode.name=="air" or lnode.name=="ignore" or not(minetest.registered_nodes[lnode2.name].liquidtype == "none")
|
||||
minetest.remove_node(oldpos)
|
||||
end
|
||||
|
||||
mesecon:register_mvps_stopper("default:chest_locked")
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,6 +1,6 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
multicraft.register_node("mesecons_noteblock:noteblock", {
|
||||
|
||||
|
||||
minetest.register_node("mesecons_noteblock:noteblock", {
|
||||
description = "Noteblock",
|
||||
tiles = {"mesecons_noteblock.png"},
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mese = 1},
|
||||
@ -8,12 +8,12 @@ multicraft.register_node("mesecons_noteblock:noteblock", {
|
||||
visual_scale = 1.3,
|
||||
paramtype="light",
|
||||
after_place_node = function(pos)
|
||||
multicraft.add_node(pos, {name="mesecons_noteblock:noteblock", param2=0})
|
||||
minetest.add_node(pos, {name="mesecons_noteblock:noteblock", param2=0})
|
||||
end,
|
||||
on_punch = function (pos, node) -- change sound when punched
|
||||
local param2 = node.param2+1
|
||||
if param2==12 then param2=0 end
|
||||
multicraft.add_node(pos, {name = node.name, param2 = param2})
|
||||
minetest.add_node(pos, {name = node.name, param2 = param2})
|
||||
mesecon.noteblock_play(pos, param2)
|
||||
end,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
@ -24,7 +24,7 @@ multicraft.register_node("mesecons_noteblock:noteblock", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = '"mesecons_noteblock:noteblock" 1',
|
||||
recipe = {
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
@ -60,7 +60,7 @@ mesecon.noteblock_play = function (pos, param2)
|
||||
elseif param2==7 then
|
||||
soundname="mesecons_noteblock_gsharp"
|
||||
end
|
||||
local block_below_name = multicraft.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
|
||||
local block_below_name = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
|
||||
if block_below_name == "default:glass" then
|
||||
soundname="mesecons_noteblock_hihat"
|
||||
end
|
||||
@ -76,6 +76,6 @@ mesecon.noteblock_play = function (pos, param2)
|
||||
if block_below_name == "default:wood" then
|
||||
soundname="mesecons_noteblock_litecrash"
|
||||
end
|
||||
multicraft.sound_play(soundname,
|
||||
minetest.sound_play(soundname,
|
||||
{pos = pos, gain = 1.0, max_hear_distance = 32,})
|
||||
end
|
||||
|
@ -1,4 +1,4 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
mesecons_mvps
|
||||
default
|
||||
|
@ -1,5 +1,5 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
-- Get mesecon rules of pistons
|
||||
piston_rules =
|
||||
{{x=0, y=0, z=1}, --everything apart from z- (pusher side)
|
||||
@ -57,34 +57,34 @@ piston_get_direction = function (dir, node)
|
||||
end
|
||||
|
||||
local piston_remove_pusher = function (pos, node)
|
||||
local pistonspec = multicraft.registered_nodes[node.name].mesecons_piston
|
||||
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston
|
||||
|
||||
local dir = piston_get_direction(pistonspec.dir, node)
|
||||
local pusherpos = mesecon:addPosRule(pos, dir)
|
||||
local pushername = multicraft.get_node(pusherpos).name
|
||||
local pushername = minetest.get_node(pusherpos).name
|
||||
|
||||
if pushername == pistonspec.pusher then --make sure there actually is a pusher (for compatibility reasons mainly)
|
||||
multicraft.remove_node(pusherpos)
|
||||
minetest.remove_node(pusherpos)
|
||||
nodeupdate(pusherpos)
|
||||
end
|
||||
end
|
||||
|
||||
local piston_on = function (pos, node)
|
||||
local pistonspec = multicraft.registered_nodes[node.name].mesecons_piston
|
||||
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston
|
||||
|
||||
local dir = piston_get_direction(pistonspec.dir, node)
|
||||
local np = mesecon:addPosRule(pos, dir)
|
||||
local success, stack = mesecon:mvps_push(np, dir, PISTON_MAXIMUM_PUSH)
|
||||
if success then
|
||||
multicraft.add_node(pos, {param2 = node.param2, name = pistonspec.onname})
|
||||
multicraft.add_node(np, {param2 = node.param2, name = pistonspec.pusher})
|
||||
minetest.add_node(pos, {param2 = node.param2, name = pistonspec.onname})
|
||||
minetest.add_node(np, {param2 = node.param2, name = pistonspec.pusher})
|
||||
mesecon:mvps_process_stack(stack)
|
||||
end
|
||||
end
|
||||
|
||||
local piston_off = function (pos, node)
|
||||
local pistonspec = multicraft.registered_nodes[node.name].mesecons_piston
|
||||
multicraft.add_node(pos, {param2 = node.param2, name = pistonspec.offname})
|
||||
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston
|
||||
minetest.add_node(pos, {param2 = node.param2, name = pistonspec.offname})
|
||||
piston_remove_pusher (pos, node)
|
||||
|
||||
if pistonspec.sticky then
|
||||
@ -102,12 +102,12 @@ local piston_orientate = function (pos, placer)
|
||||
-- placer pitch in degrees
|
||||
local pitch = placer:get_look_pitch() * (180 / math.pi)
|
||||
|
||||
local node = multicraft.get_node(pos)
|
||||
local pistonspec = multicraft.registered_nodes[node.name].mesecons_piston
|
||||
local node = minetest.get_node(pos)
|
||||
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston
|
||||
if pitch > 55 then --looking upwards
|
||||
multicraft.add_node(pos, {name=pistonspec.piston_down})
|
||||
minetest.add_node(pos, {name=pistonspec.piston_down})
|
||||
elseif pitch < -55 then --looking downwards
|
||||
multicraft.add_node(pos, {name=pistonspec.piston_up})
|
||||
minetest.add_node(pos, {name=pistonspec.piston_up})
|
||||
end
|
||||
end
|
||||
|
||||
@ -144,7 +144,7 @@ local pistonspec_normal = {
|
||||
}
|
||||
|
||||
-- offstate
|
||||
multicraft.register_node("mesecons_pistons:piston_normal_off", {
|
||||
minetest.register_node("mesecons_pistons:piston_normal_off", {
|
||||
description = "Piston",
|
||||
tiles = {
|
||||
"mesecons_piston_top.png",
|
||||
@ -166,7 +166,7 @@ multicraft.register_node("mesecons_pistons:piston_normal_off", {
|
||||
})
|
||||
|
||||
-- onstate
|
||||
multicraft.register_node("mesecons_pistons:piston_normal_on", {
|
||||
minetest.register_node("mesecons_pistons:piston_normal_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_top.png",
|
||||
@ -194,7 +194,7 @@ multicraft.register_node("mesecons_pistons:piston_normal_on", {
|
||||
})
|
||||
|
||||
-- pusher
|
||||
multicraft.register_node("mesecons_pistons:piston_pusher_normal", {
|
||||
minetest.register_node("mesecons_pistons:piston_pusher_normal", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_pusher_top.png",
|
||||
@ -225,7 +225,7 @@ local pistonspec_sticky = {
|
||||
}
|
||||
|
||||
-- offstate
|
||||
multicraft.register_node("mesecons_pistons:piston_sticky_off", {
|
||||
minetest.register_node("mesecons_pistons:piston_sticky_off", {
|
||||
description = "Sticky Piston",
|
||||
tiles = {
|
||||
"mesecons_piston_top.png",
|
||||
@ -247,7 +247,7 @@ multicraft.register_node("mesecons_pistons:piston_sticky_off", {
|
||||
})
|
||||
|
||||
-- onstate
|
||||
multicraft.register_node("mesecons_pistons:piston_sticky_on", {
|
||||
minetest.register_node("mesecons_pistons:piston_sticky_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_top.png",
|
||||
@ -275,7 +275,7 @@ multicraft.register_node("mesecons_pistons:piston_sticky_on", {
|
||||
})
|
||||
|
||||
-- pusher
|
||||
multicraft.register_node("mesecons_pistons:piston_pusher_sticky", {
|
||||
minetest.register_node("mesecons_pistons:piston_pusher_sticky", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_pusher_top.png",
|
||||
@ -324,7 +324,7 @@ local pistonspec_normal_up = {
|
||||
}
|
||||
|
||||
-- offstate
|
||||
multicraft.register_node("mesecons_pistons:piston_up_normal_off", {
|
||||
minetest.register_node("mesecons_pistons:piston_up_normal_off", {
|
||||
tiles = {
|
||||
"mesecons_piston_pusher_front.png",
|
||||
"mesecons_piston_back.png",
|
||||
@ -346,7 +346,7 @@ multicraft.register_node("mesecons_pistons:piston_up_normal_off", {
|
||||
})
|
||||
|
||||
-- onstate
|
||||
multicraft.register_node("mesecons_pistons:piston_up_normal_on", {
|
||||
minetest.register_node("mesecons_pistons:piston_up_normal_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_on_front.png",
|
||||
@ -374,7 +374,7 @@ multicraft.register_node("mesecons_pistons:piston_up_normal_on", {
|
||||
})
|
||||
|
||||
-- pusher
|
||||
multicraft.register_node("mesecons_pistons:piston_up_pusher_normal", {
|
||||
minetest.register_node("mesecons_pistons:piston_up_pusher_normal", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_pusher_front.png",
|
||||
@ -406,7 +406,7 @@ local pistonspec_sticky_up = {
|
||||
}
|
||||
|
||||
-- offstate
|
||||
multicraft.register_node("mesecons_pistons:piston_up_sticky_off", {
|
||||
minetest.register_node("mesecons_pistons:piston_up_sticky_off", {
|
||||
tiles = {
|
||||
"mesecons_piston_pusher_front_sticky.png",
|
||||
"mesecons_piston_back.png",
|
||||
@ -430,7 +430,7 @@ multicraft.register_node("mesecons_pistons:piston_up_sticky_off", {
|
||||
})
|
||||
|
||||
-- onstate
|
||||
multicraft.register_node("mesecons_pistons:piston_up_sticky_on", {
|
||||
minetest.register_node("mesecons_pistons:piston_up_sticky_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_on_front.png",
|
||||
@ -458,7 +458,7 @@ multicraft.register_node("mesecons_pistons:piston_up_sticky_on", {
|
||||
})
|
||||
|
||||
-- pusher
|
||||
multicraft.register_node("mesecons_pistons:piston_up_pusher_sticky", {
|
||||
minetest.register_node("mesecons_pistons:piston_up_pusher_sticky", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_pusher_front_sticky.png",
|
||||
@ -509,7 +509,7 @@ local pistonspec_normal_down = {
|
||||
}
|
||||
|
||||
-- offstate
|
||||
multicraft.register_node("mesecons_pistons:piston_down_normal_off", {
|
||||
minetest.register_node("mesecons_pistons:piston_down_normal_off", {
|
||||
tiles = {
|
||||
"mesecons_piston_back.png",
|
||||
"mesecons_piston_pusher_front.png",
|
||||
@ -532,7 +532,7 @@ multicraft.register_node("mesecons_pistons:piston_down_normal_off", {
|
||||
})
|
||||
|
||||
-- onstate
|
||||
multicraft.register_node("mesecons_pistons:piston_down_normal_on", {
|
||||
minetest.register_node("mesecons_pistons:piston_down_normal_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_back.png",
|
||||
@ -560,7 +560,7 @@ multicraft.register_node("mesecons_pistons:piston_down_normal_on", {
|
||||
})
|
||||
|
||||
-- pusher
|
||||
multicraft.register_node("mesecons_pistons:piston_down_pusher_normal", {
|
||||
minetest.register_node("mesecons_pistons:piston_down_pusher_normal", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_pusher_back.png",
|
||||
@ -589,7 +589,7 @@ local pistonspec_sticky_down = {
|
||||
}
|
||||
|
||||
-- offstate
|
||||
multicraft.register_node("mesecons_pistons:piston_down_sticky_off", {
|
||||
minetest.register_node("mesecons_pistons:piston_down_sticky_off", {
|
||||
tiles = {
|
||||
"mesecons_piston_back.png",
|
||||
"mesecons_piston_pusher_front_sticky.png",
|
||||
@ -612,7 +612,7 @@ multicraft.register_node("mesecons_pistons:piston_down_sticky_off", {
|
||||
})
|
||||
|
||||
-- onstate
|
||||
multicraft.register_node("mesecons_pistons:piston_down_sticky_on", {
|
||||
minetest.register_node("mesecons_pistons:piston_down_sticky_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_back.png",
|
||||
@ -640,7 +640,7 @@ multicraft.register_node("mesecons_pistons:piston_down_sticky_on", {
|
||||
})
|
||||
|
||||
-- pusher
|
||||
multicraft.register_node("mesecons_pistons:piston_down_pusher_sticky", {
|
||||
minetest.register_node("mesecons_pistons:piston_down_pusher_sticky", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"mesecons_piston_pusher_back.png",
|
||||
@ -662,10 +662,10 @@ multicraft.register_node("mesecons_pistons:piston_down_pusher_sticky", {
|
||||
-- Register pushers as stoppers if they would be seperated from the piston
|
||||
local piston_pusher_get_stopper = function (node, dir, stack, stackid)
|
||||
if (stack[stackid + 1]
|
||||
and stack[stackid + 1].node.name == multicraft.registered_nodes[node.name].corresponding_piston
|
||||
and stack[stackid + 1].node.name == minetest.registered_nodes[node.name].corresponding_piston
|
||||
and stack[stackid + 1].node.param2 == node.param2)
|
||||
or (stack[stackid - 1]
|
||||
and stack[stackid - 1].node.name == multicraft.registered_nodes[node.name].corresponding_piston
|
||||
and stack[stackid - 1].node.name == minetest.registered_nodes[node.name].corresponding_piston
|
||||
and stack[stackid - 1].node.param2 == node.param2) then
|
||||
return false
|
||||
end
|
||||
@ -674,9 +674,9 @@ end
|
||||
|
||||
local piston_pusher_up_down_get_stopper = function (node, dir, stack, stackid)
|
||||
if (stack[stackid + 1]
|
||||
and stack[stackid + 1].node.name == multicraft.registered_nodes[node.name].corresponding_piston)
|
||||
and stack[stackid + 1].node.name == minetest.registered_nodes[node.name].corresponding_piston)
|
||||
or (stack[stackid - 1]
|
||||
and stack[stackid - 1].node.name == multicraft.registered_nodes[node.name].corresponding_piston) then
|
||||
and stack[stackid - 1].node.name == minetest.registered_nodes[node.name].corresponding_piston) then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
@ -695,21 +695,21 @@ mesecon:register_mvps_stopper("mesecons_pistons:piston_down_pusher_sticky", pist
|
||||
-- Register pistons as stoppers if they would be seperated from the stopper
|
||||
local piston_up_down_get_stopper = function (node, dir, stack, stackid)
|
||||
if (stack[stackid + 1]
|
||||
and stack[stackid + 1].node.name == multicraft.registered_nodes[node.name].mesecons_piston.pusher)
|
||||
and stack[stackid + 1].node.name == minetest.registered_nodes[node.name].mesecons_piston.pusher)
|
||||
or (stack[stackid - 1]
|
||||
and stack[stackid - 1].node.name == multicraft.registered_nodes[node.name].mesecons_piston.pusher) then
|
||||
and stack[stackid - 1].node.name == minetest.registered_nodes[node.name].mesecons_piston.pusher) then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
local piston_get_stopper = function (node, dir, stack, stackid)
|
||||
pistonspec = multicraft.registered_nodes[node.name].mesecons_piston
|
||||
pistonspec = minetest.registered_nodes[node.name].mesecons_piston
|
||||
dir = piston_get_direction(pistonspec.dir, node)
|
||||
local pusherpos = mesecon:addPosRule(stack[stackid].pos, dir)
|
||||
local pushernode = multicraft.get_node(pusherpos)
|
||||
local pushernode = minetest.get_node(pusherpos)
|
||||
|
||||
if multicraft.registered_nodes[node.name].mesecons_piston.pusher == pushernode.name then
|
||||
if minetest.registered_nodes[node.name].mesecons_piston.pusher == pushernode.name then
|
||||
for _, s in ipairs(stack) do
|
||||
if mesecon:cmpPos(s.pos, pusherpos) -- pusher is also to be pushed
|
||||
and s.node.param2 == node.param2 then
|
||||
@ -730,7 +730,7 @@ mesecon:register_mvps_stopper("mesecons_pistons:piston_down_normal_on", piston_u
|
||||
mesecon:register_mvps_stopper("mesecons_pistons:piston_down_sticky_on", piston_up_down_get_stopper)
|
||||
|
||||
--craft recipes
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'mesecons_pistons:piston_normal_off',
|
||||
recipe = {
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
@ -739,7 +739,7 @@ multicraft.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "mesecons_pistons:piston_sticky_off",
|
||||
recipe = {
|
||||
{"mesecons_materials:glue"},
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,5 +1,5 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
local pp_box_off = {
|
||||
type = "fixed",
|
||||
fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 },
|
||||
@ -11,18 +11,18 @@ local pp_box_on = {
|
||||
}
|
||||
|
||||
pp_on_timer = function (pos, elapsed)
|
||||
local node = multicraft.get_node(pos)
|
||||
local ppspec = multicraft.registered_nodes[node.name].pressureplate
|
||||
local node = minetest.get_node(pos)
|
||||
local ppspec = minetest.registered_nodes[node.name].pressureplate
|
||||
|
||||
-- This is a workaround for a strange bug that occurs when the server is started
|
||||
-- For some reason the first time on_timer is called, the pos is wrong
|
||||
if not ppspec then return end
|
||||
|
||||
local objs = multicraft.get_objects_inside_radius(pos, 1)
|
||||
local objs = minetest.get_objects_inside_radius(pos, 1)
|
||||
local two_below = mesecon:addPosRule(pos, {x = 0, y = -2, z = 0})
|
||||
|
||||
if objs[1] == nil and node.name == ppspec.onstate then
|
||||
multicraft.add_node(pos, {name = ppspec.offstate})
|
||||
minetest.add_node(pos, {name = ppspec.offstate})
|
||||
mesecon:receptor_off(pos)
|
||||
-- force deactivation of mesecon two blocks below (hacky)
|
||||
if not mesecon:connected_to_receptor(two_below) then
|
||||
@ -32,7 +32,7 @@ pp_on_timer = function (pos, elapsed)
|
||||
for k, obj in pairs(objs) do
|
||||
local objpos = obj:getpos()
|
||||
if objpos.y > pos.y-1 and objpos.y < pos.y then
|
||||
multicraft.add_node(pos, {name=ppspec.onstate})
|
||||
minetest.add_node(pos, {name=ppspec.onstate})
|
||||
mesecon:receptor_on(pos)
|
||||
-- force activation of mesecon two blocks below (hacky)
|
||||
mesecon:turnon(two_below)
|
||||
@ -57,7 +57,7 @@ function mesecon:register_pressure_plate(offstate, onstate, description, texture
|
||||
onstate = onstate
|
||||
}
|
||||
|
||||
multicraft.register_node(offstate, {
|
||||
minetest.register_node(offstate, {
|
||||
drawtype = "nodebox",
|
||||
tiles = {texture_off},
|
||||
wield_image = texture_off,
|
||||
@ -72,11 +72,11 @@ function mesecon:register_pressure_plate(offstate, onstate, description, texture
|
||||
state = mesecon.state.off
|
||||
}},
|
||||
on_construct = function(pos)
|
||||
multicraft.get_node_timer(pos):start(PRESSURE_PLATE_INTERVAL)
|
||||
minetest.get_node_timer(pos):start(PRESSURE_PLATE_INTERVAL)
|
||||
end,
|
||||
})
|
||||
|
||||
multicraft.register_node(onstate, {
|
||||
minetest.register_node(onstate, {
|
||||
drawtype = "nodebox",
|
||||
tiles = {texture_on},
|
||||
paramtype = "light",
|
||||
@ -91,7 +91,7 @@ function mesecon:register_pressure_plate(offstate, onstate, description, texture
|
||||
state = mesecon.state.on
|
||||
}},
|
||||
on_construct = function(pos)
|
||||
multicraft.get_node_timer(pos):start(PRESSURE_PLATE_INTERVAL)
|
||||
minetest.get_node_timer(pos):start(PRESSURE_PLATE_INTERVAL)
|
||||
end,
|
||||
after_dig_node = function(pos)
|
||||
local two_below = mesecon:addPosRule(pos, {x = 0, y = -2, z = 0})
|
||||
@ -101,7 +101,7 @@ function mesecon:register_pressure_plate(offstate, onstate, description, texture
|
||||
end
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = offstate,
|
||||
recipe = recipe,
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
check
|
||||
|
||||
default
|
||||
mesecons
|
||||
mesecons_materials
|
||||
|
@ -1,9 +1,9 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
local boxes = { -8/16, -8/16, -8/16, 8/16, -2/16, 8/16 } -- Solar Pannel
|
||||
|
||||
-- Solar Panel
|
||||
multicraft.register_node("mesecons_solarpanel:solar_panel_on", {
|
||||
minetest.register_node("mesecons_solarpanel:solar_panel_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = { "jeija_solar_panel.png","jeija_solar_panel.png","jeija_solar_panel_side.png",
|
||||
"jeija_solar_panel_side.png","jeija_solar_panel_side.png","jeija_solar_panel_side.png", },
|
||||
@ -28,7 +28,7 @@ multicraft.register_node("mesecons_solarpanel:solar_panel_on", {
|
||||
})
|
||||
|
||||
-- Solar Panel
|
||||
multicraft.register_node("mesecons_solarpanel:solar_panel_off", {
|
||||
minetest.register_node("mesecons_solarpanel:solar_panel_off", {
|
||||
drawtype = "nodebox",
|
||||
tiles = { "jeija_solar_panel.png","jeija_solar_panel.png","jeija_solar_panel_side.png",
|
||||
"jeija_solar_panel_side.png","jeija_solar_panel_side.png","jeija_solar_panel_side.png", },
|
||||
@ -52,7 +52,7 @@ multicraft.register_node("mesecons_solarpanel:solar_panel_off", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = '"mesecons_solarpanel:solar_panel_off" 1',
|
||||
recipe = {
|
||||
{'default:glass', 'default:glass', 'default:glass'},
|
||||
@ -61,29 +61,29 @@ multicraft.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
multicraft.register_abm(
|
||||
minetest.register_abm(
|
||||
{nodenames = {"mesecons_solarpanel:solar_panel_off"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local light = multicraft.get_node_light(pos, nil)
|
||||
local light = minetest.get_node_light(pos, nil)
|
||||
|
||||
if light >= 12 and multicraft.get_timeofday() > 0.2 and multicraft.get_timeofday() < 0.8 then
|
||||
multicraft.set_node(pos, {name="mesecons_solarpanel:solar_panel_on", param2=node.param2})
|
||||
if light >= 12 and minetest.get_timeofday() > 0.2 and minetest.get_timeofday() < 0.8 then
|
||||
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_on", param2=node.param2})
|
||||
mesecon:receptor_on(pos)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
multicraft.register_abm(
|
||||
minetest.register_abm(
|
||||
{nodenames = {"mesecons_solarpanel:solar_panel_on"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local light = multicraft.get_node_light(pos, nil)
|
||||
local light = minetest.get_node_light(pos, nil)
|
||||
|
||||
if light < 12 then
|
||||
multicraft.set_node(pos, {name="mesecons_solarpanel:solar_panel_off", param2=node.param2})
|
||||
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_off", param2=node.param2})
|
||||
mesecon:receptor_off(pos)
|
||||
end
|
||||
end,
|
||||
@ -92,7 +92,7 @@ multicraft.register_abm(
|
||||
--- Solar panel inversed
|
||||
|
||||
-- Solar Panel
|
||||
multicraft.register_node("mesecons_solarpanel:solar_panel_inverted_on", {
|
||||
minetest.register_node("mesecons_solarpanel:solar_panel_inverted_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = { "jeija_solar_panel_inverted.png","jeija_solar_panel_inverted.png","jeija_solar_panel_side.png",
|
||||
"jeija_solar_panel_side.png","jeija_solar_panel_side.png","jeija_solar_panel_side.png", },
|
||||
@ -117,7 +117,7 @@ multicraft.register_node("mesecons_solarpanel:solar_panel_inverted_on", {
|
||||
})
|
||||
|
||||
-- Solar Panel
|
||||
multicraft.register_node("mesecons_solarpanel:solar_panel_inverted_off", {
|
||||
minetest.register_node("mesecons_solarpanel:solar_panel_inverted_off", {
|
||||
drawtype = "nodebox",
|
||||
tiles = { "jeija_solar_panel_inverted.png","jeija_solar_panel_inverted.png","jeija_solar_panel_side.png",
|
||||
"jeija_solar_panel_side.png","jeija_solar_panel_side.png","jeija_solar_panel_side.png", },
|
||||
@ -141,7 +141,7 @@ multicraft.register_node("mesecons_solarpanel:solar_panel_inverted_off", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = '"mesecons_solarpanel:solar_panel_inverted_off" 1',
|
||||
recipe = {
|
||||
{'default:restone_dust', 'default:restone_dust', 'default:restone_dust'},
|
||||
@ -150,29 +150,29 @@ multicraft.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
multicraft.register_abm(
|
||||
minetest.register_abm(
|
||||
{nodenames = {"mesecons_solarpanel:solar_panel_inverted_off"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local light = multicraft.get_node_light(pos, nil)
|
||||
local light = minetest.get_node_light(pos, nil)
|
||||
|
||||
if light < 12 then
|
||||
multicraft.set_node(pos, {name="mesecons_solarpanel:solar_panel_inverted_on", param2=node.param2})
|
||||
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_inverted_on", param2=node.param2})
|
||||
mesecon:receptor_on(pos)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
multicraft.register_abm(
|
||||
minetest.register_abm(
|
||||
{nodenames = {"mesecons_solarpanel:solar_panel_inverted_on"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local light = multicraft.get_node_light(pos, nil)
|
||||
local light = minetest.get_node_light(pos, nil)
|
||||
|
||||
if light >= 12 and multicraft.get_timeofday() > 0.8 and multicraft.get_timeofday() < 0.2 then
|
||||
multicraft.set_node(pos, {name="mesecons_solarpanel:solar_panel_inverted_off", param2=node.param2})
|
||||
if light >= 12 and minetest.get_timeofday() > 0.8 and minetest.get_timeofday() < 0.2 then
|
||||
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_inverted_off", param2=node.param2})
|
||||
mesecon:receptor_off(pos)
|
||||
end
|
||||
end,
|
||||
|
@ -1,3 +1,3 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
-- place texture packs for mesecons into the textures folder here
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,5 +1,5 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
--MESECON TORCHES
|
||||
|
||||
local rotate_torch_rules = function (rules, param2)
|
||||
@ -36,7 +36,7 @@ local torch_get_input_rules = function(node)
|
||||
return rotate_torch_rules(rules, node.param2)
|
||||
end
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = '"mesecons_torch:mesecon_torch_on" 4',
|
||||
recipe = {
|
||||
{"default:bluestone_dust"},
|
||||
@ -51,7 +51,7 @@ local torch_selectionbox =
|
||||
wall_side = {-0.5, -0.1, -0.1, -0.5+0.6, 0.1, 0.1},
|
||||
}
|
||||
|
||||
multicraft.register_node("mesecons_torch:mesecon_torch_off", {
|
||||
minetest.register_node("mesecons_torch:mesecon_torch_off", {
|
||||
drawtype = "torchlike",
|
||||
tiles = {"jeija_torches_off.png", "jeija_torches_off_ceiling.png", "jeija_torches_off_side.png"},
|
||||
inventory_image = "jeija_torches_off.png",
|
||||
@ -67,7 +67,7 @@ multicraft.register_node("mesecons_torch:mesecon_torch_off", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_node("mesecons_torch:mesecon_torch_on", {
|
||||
minetest.register_node("mesecons_torch:mesecon_torch_on", {
|
||||
drawtype = "torchlike",
|
||||
tiles = {"jeija_torches_on.png", "jeija_torches_on_ceiling.png", "jeija_torches_on_side.png"},
|
||||
inventory_image = "jeija_torches_on.png",
|
||||
@ -79,7 +79,7 @@ multicraft.register_node("mesecons_torch:mesecon_torch_on", {
|
||||
paramtype2 = "wallmounted",
|
||||
selection_box = torch_selectionbox,
|
||||
groups = {dig_immediate=3, mese = 1},
|
||||
light_source = LIGHT_MAX-10,
|
||||
light_source = default.LIGHT_MAX-10,
|
||||
description="Bluestone Torch",
|
||||
mesecons = {receptor = {
|
||||
state = mesecon.state.on,
|
||||
@ -87,7 +87,7 @@ multicraft.register_node("mesecons_torch:mesecon_torch_on", {
|
||||
}},
|
||||
})
|
||||
|
||||
multicraft.register_node("mesecons_torch:bluestoneblock", {
|
||||
minetest.register_node("mesecons_torch:bluestoneblock", {
|
||||
description = "Bluestone Block",
|
||||
tiles = {"default_bluestone_block.png"},
|
||||
stack_max = 64,
|
||||
@ -99,7 +99,7 @@ multicraft.register_node("mesecons_torch:bluestoneblock", {
|
||||
}},
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "mesecons_torch:bluestoneblock",
|
||||
recipe = {
|
||||
{'mesecons:wire_00000000_off','mesecons:wire_00000000_off','mesecons:wire_00000000_off'},
|
||||
@ -108,14 +108,14 @@ multicraft.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'mesecons:wire_00000000_off 9',
|
||||
recipe = {
|
||||
{'mesecons_torch:bluestoneblock'},
|
||||
}
|
||||
})
|
||||
|
||||
multicraft.register_abm({
|
||||
minetest.register_abm({
|
||||
nodenames = {"mesecons_torch:mesecon_torch_off","mesecons_torch:mesecon_torch_on"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
|
@ -1,3 +1,3 @@
|
||||
check
|
||||
|
||||
mesecons
|
||||
default
|
||||
|
@ -1,9 +1,9 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
|
||||
|
||||
-- WALL LEVER
|
||||
-- Basically a switch that can be attached to a wall
|
||||
-- Powers the block 2 nodes behind (using a receiver)
|
||||
multicraft.register_node("mesecons_walllever:wall_lever_off", {
|
||||
minetest.register_node("mesecons_walllever:wall_lever_off", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"jeija_wall_lever_tb.png",
|
||||
@ -34,7 +34,7 @@ multicraft.register_node("mesecons_walllever:wall_lever_off", {
|
||||
on_punch = function (pos, node)
|
||||
mesecon:swap_node(pos, "mesecons_walllever:wall_lever_on")
|
||||
mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
||||
multicraft.sound_play("mesecons_lever", {pos=pos})
|
||||
minetest.sound_play("mesecons_lever", {pos=pos})
|
||||
end,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
mesecons = {receptor = {
|
||||
@ -42,7 +42,7 @@ multicraft.register_node("mesecons_walllever:wall_lever_off", {
|
||||
state = mesecon.state.off
|
||||
}}
|
||||
})
|
||||
multicraft.register_node("mesecons_walllever:wall_lever_on", {
|
||||
minetest.register_node("mesecons_walllever:wall_lever_on", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"jeija_wall_lever_top.png",
|
||||
@ -73,7 +73,7 @@ multicraft.register_node("mesecons_walllever:wall_lever_on", {
|
||||
on_punch = function (pos, node)
|
||||
mesecon:swap_node(pos, "mesecons_walllever:wall_lever_off")
|
||||
mesecon:receptor_off(pos, mesecon.rules.buttonlike_get(node))
|
||||
multicraft.sound_play("mesecons_lever", {pos=pos})
|
||||
minetest.sound_play("mesecons_lever", {pos=pos})
|
||||
end,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
mesecons = {receptor = {
|
||||
@ -82,7 +82,7 @@ multicraft.register_node("mesecons_walllever:wall_lever_on", {
|
||||
}}
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'mesecons_walllever:wall_lever_off',
|
||||
recipe = {
|
||||
{'default:stick'},
|
||||
|
@ -1,2 +0,0 @@
|
||||
check
|
||||
default
|
@ -1,179 +0,0 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
local f = io.open(multicraft.get_modpath("boat")..'/init.lua', "r")
|
||||
local content = f:read("*all")
|
||||
f:close()
|
||||
if content:find("mine".."test") then os.exit() end--
|
||||
-- Helper functions
|
||||
--
|
||||
|
||||
local function is_water(pos)
|
||||
local nn = multicraft.get_node(pos).name
|
||||
return multicraft.get_item_group(nn, "water") ~= 0
|
||||
end
|
||||
|
||||
local function get_velocity(v, yaw, y)
|
||||
local x = -math.sin(yaw)*v
|
||||
local z = math.cos(yaw)*v
|
||||
return {x=x, y=y, z=z}
|
||||
end
|
||||
|
||||
--
|
||||
-- boat entity
|
||||
--
|
||||
local boat = {
|
||||
physical = true,
|
||||
collisionbox = {-1,-0.5,-1, 1,0.5,1},
|
||||
visual = "mesh",
|
||||
mesh = "boat_base.x",
|
||||
textures = {"boat_texture.png","boat_texture.png","boat_texture.png","boat_texture.png"},
|
||||
driver = nil,
|
||||
v = 0,
|
||||
stepcount = 0,
|
||||
unattended = 0
|
||||
}
|
||||
|
||||
function boat.on_rightclick(self, clicker)
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
if self.driver and clicker == self.driver then
|
||||
self.driver = nil
|
||||
clicker:set_detach()
|
||||
elseif not self.driver then
|
||||
self.driver = clicker
|
||||
clicker:set_attach(self.object, "", {x=0,y=5,z=0}, {x=0,y=0,z=0})
|
||||
self.object:setyaw(clicker:get_look_yaw())
|
||||
end
|
||||
end
|
||||
|
||||
function boat.on_activate(self, staticdata, dtime_s)
|
||||
self.object:set_armor_groups({immortal=1})
|
||||
if staticdata then
|
||||
self.v = tonumber(staticdata)
|
||||
end
|
||||
end
|
||||
|
||||
function boat.get_staticdata()
|
||||
return tostring(v)
|
||||
end
|
||||
|
||||
function boat.on_punch(self, puncher, time_from_last_punch, tool_capabilities, direction)
|
||||
|
||||
if self.driver then
|
||||
self.driver:set_detach()
|
||||
self.driver = nil
|
||||
boat.schedule_removal(self)
|
||||
if not multicraft.setting_getbool("creative_mode") then
|
||||
puncher:get_inventory():add_item("main", "boat:boat")
|
||||
end
|
||||
else
|
||||
|
||||
boat.schedule_removal(self)
|
||||
if not multicraft.setting_getbool("creative_mode") then
|
||||
puncher:get_inventory():add_item("main", "boat:boat")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
function boat.on_step(self, dtime)
|
||||
|
||||
self.stepcount=self.stepcount+1
|
||||
if self.stepcount>9 then
|
||||
|
||||
self.stepcount=0
|
||||
|
||||
if self.driver then
|
||||
local ctrl = self.driver:get_player_control()
|
||||
|
||||
self.unattended=0
|
||||
|
||||
local yaw = self.object:getyaw()
|
||||
|
||||
if ctrl.up and self.v<3 then
|
||||
self.v = self.v + 1
|
||||
end
|
||||
|
||||
if ctrl.down and self.v>=-1 then
|
||||
self.v = self.v - 1
|
||||
end
|
||||
|
||||
if ctrl.left then
|
||||
if ctrl.down then
|
||||
self.object:setyaw(yaw-math.pi/12-dtime*math.pi/12)
|
||||
else
|
||||
self.object:setyaw(yaw+math.pi/12+dtime*math.pi/12)
|
||||
end
|
||||
end
|
||||
if ctrl.right then
|
||||
if ctrl.down then
|
||||
self.object:setyaw(yaw+math.pi/12+dtime*math.pi/12)
|
||||
else
|
||||
self.object:setyaw(yaw-math.pi/12-dtime*math.pi/12)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local tmp_velocity = get_velocity(self.v, self.object:getyaw(), 0)
|
||||
|
||||
local tmp_pos = self.object:getpos()
|
||||
|
||||
tmp_velocity.y=0
|
||||
|
||||
if is_water(tmp_pos) then
|
||||
tmp_velocity.y=2
|
||||
end
|
||||
|
||||
tmp_pos.y=tmp_pos.y-0.5
|
||||
|
||||
if multicraft.get_node(tmp_pos).name=="air" then
|
||||
tmp_velocity.y=-2
|
||||
end
|
||||
|
||||
self.object:setvelocity(tmp_velocity)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function boat.schedule_removal(self)
|
||||
|
||||
multicraft.after(0.25,function()
|
||||
self.object:remove()
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
|
||||
multicraft.register_entity("boat:boat", boat)
|
||||
|
||||
multicraft.register_craftitem("boat:boat", {
|
||||
description = "Boat",
|
||||
inventory_image = "boat_inventory.png",
|
||||
liquids_pointable = true,
|
||||
groups = {rail = 1},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
if not is_water(pointed_thing.under) then
|
||||
return
|
||||
end
|
||||
pointed_thing.under.y = pointed_thing.under.y+0.5
|
||||
multicraft.add_entity(pointed_thing.under, "boat:boat")
|
||||
if not multicraft.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
multicraft.register_craft({
|
||||
output = "boat:boat",
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"default:wood", "", "default:wood"},
|
||||
{"default:wood", "default:wood", "default:wood"},
|
||||
},
|
||||
})
|
20
games/MultiCraft_game/files/boats/README.txt
Normal file
@ -0,0 +1,20 @@
|
||||
Minetest 0.4 mod: boats
|
||||
=======================
|
||||
by PilzAdam, slightly modified for NeXt
|
||||
changed by TenPlus1 to add some new features
|
||||
- boat is destroyed when crashing (drops 3 wood)
|
||||
- boat turns faster
|
||||
- used model from ds_rowboat mod
|
||||
|
||||
License of source code:
|
||||
-----------------------
|
||||
WTFPL
|
||||
|
||||
License of media (textures and sounds):
|
||||
---------------------------------------
|
||||
WTFPL
|
||||
|
||||
Authors of media files:
|
||||
-----------------------
|
||||
textures: Zeg9
|
||||
model: thetoon and Zeg9, modified by PavelS(SokolovPavel)
|
@ -1,2 +1,2 @@
|
||||
check
|
||||
default
|
||||
mobs?
|
276
games/MultiCraft_game/files/boats/init.lua
Normal file
@ -0,0 +1,276 @@
|
||||
handlers = {}
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
handlers[player:get_player_name()] = nil
|
||||
end)
|
||||
|
||||
--
|
||||
-- Helper functions
|
||||
--
|
||||
|
||||
local function is_water(pos)
|
||||
return minetest.get_item_group(minetest.get_node(pos).name, "water") ~= 0
|
||||
end
|
||||
|
||||
local function get_sign(i)
|
||||
if i == 0 then
|
||||
return 0
|
||||
else
|
||||
return i / math.abs(i)
|
||||
end
|
||||
end
|
||||
|
||||
local function get_velocity(v, yaw, y)
|
||||
local x = -math.sin(yaw) * v
|
||||
local z = math.cos(yaw) * v
|
||||
return {x = x, y = y, z = z}
|
||||
end
|
||||
|
||||
local function get_v(v)
|
||||
return math.sqrt(v.x ^ 2 + v.z ^ 2)
|
||||
end
|
||||
|
||||
--
|
||||
-- Boat entity
|
||||
--
|
||||
|
||||
local boat = {
|
||||
physical = true,
|
||||
collisionbox = {-0.5, -0.4, -0.5, 0.5, 0.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "rowboat.x",
|
||||
textures = {"default_wood.png"},
|
||||
driver = nil,
|
||||
v = 0,
|
||||
last_v = 0,
|
||||
removed = false
|
||||
}
|
||||
|
||||
function boat.on_rightclick(self, clicker)
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
local name = clicker:get_player_name()
|
||||
if self.driver and clicker == self.driver then
|
||||
handlers[name] = nil
|
||||
self.driver = nil
|
||||
clicker:set_detach()
|
||||
default.player_attached[name] = false
|
||||
default.player_set_animation(clicker, "stand" , 30)
|
||||
local pos = clicker:getpos()
|
||||
minetest.after(0.1, function()
|
||||
clicker:setpos({x=pos.x, y=pos.y+0.2, z=pos.z})
|
||||
end)
|
||||
elseif not self.driver then
|
||||
if handlers[name] and handlers[name].driver then
|
||||
handlers[name].driver = nil
|
||||
end
|
||||
handlers[name] = self.object:get_luaentity()
|
||||
self.driver = clicker
|
||||
clicker:set_attach(self.object, "",
|
||||
{x = 0, y = 11, z = -3}, {x = 0, y = 0, z = 0})
|
||||
default.player_attached[name] = true
|
||||
minetest.after(0.2, function()
|
||||
default.player_set_animation(clicker, "sit" , 30)
|
||||
end)
|
||||
self.object:setyaw(clicker:get_look_yaw() - math.pi / 2)
|
||||
end
|
||||
end
|
||||
|
||||
function boat.on_activate(self, staticdata, dtime_s)
|
||||
|
||||
if mobs and mobs.entity and mobs.entity == false then
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
|
||||
self.object:set_armor_groups({immortal = 1})
|
||||
self.v = 0
|
||||
self.v2 = self.v
|
||||
self.last_v = self.v
|
||||
self.count = 0
|
||||
end
|
||||
|
||||
function boat.on_punch(self, puncher)
|
||||
|
||||
if not puncher or not puncher:is_player() or self.removed then
|
||||
return
|
||||
end
|
||||
|
||||
if self.driver and puncher == self.driver then
|
||||
local name = puncher:get_player_name()
|
||||
puncher:set_detach()
|
||||
self.driver = nil
|
||||
handlers[name] = nil
|
||||
default.player_attached[name] = false
|
||||
end
|
||||
|
||||
if not self.driver then
|
||||
self.removed = true
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
local inv = puncher:get_inventory()
|
||||
if inv:room_for_item("main", "boats:boat") then
|
||||
inv:add_item("main", "boats:boat")
|
||||
else
|
||||
minetest.add_item(self.object:getpos(), "boats:boat")
|
||||
end
|
||||
end
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
|
||||
function boat.on_step(self, dtime)
|
||||
|
||||
-- after 10 seconds remove boat and drop as item if not boarded
|
||||
self.count = self.count + dtime
|
||||
if self.count > 10 then
|
||||
minetest.add_item(self.object:getpos(), "boats:boat")
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
|
||||
self.v = get_v(self.object:getvelocity()) * get_sign(self.v)
|
||||
|
||||
if self.driver then
|
||||
self.count = 0
|
||||
local ctrl = self.driver:get_player_control()
|
||||
local yaw = self.object:getyaw()
|
||||
|
||||
if ctrl.up then
|
||||
self.v = self.v + 0.1
|
||||
elseif ctrl.down then
|
||||
self.v = self.v - 0.1
|
||||
end
|
||||
|
||||
if ctrl.left then
|
||||
if self.v < 0 then
|
||||
self.object:setyaw(yaw - (1 + dtime) * 0.08) -- 0.03 changed to speed up turning
|
||||
else
|
||||
self.object:setyaw(yaw + (1 + dtime) * 0.08) -- 0.03
|
||||
end
|
||||
elseif ctrl.right then
|
||||
if self.v < 0 then
|
||||
self.object:setyaw(yaw + (1 + dtime) * 0.08) -- 0.03
|
||||
else
|
||||
self.object:setyaw(yaw - (1 + dtime) * 0.08) -- 0.03
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local velo = self.object:getvelocity()
|
||||
if self.v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then
|
||||
--self.object:setpos(self.object:getpos())
|
||||
return
|
||||
end
|
||||
|
||||
local s = get_sign(self.v)
|
||||
self.v = self.v - 0.02 * s
|
||||
|
||||
if s ~= get_sign(self.v) then
|
||||
self.object:setvelocity({x = 0, y = 0, z = 0})
|
||||
self.v = 0
|
||||
return
|
||||
end
|
||||
|
||||
if math.abs(self.v) > 4.5 then
|
||||
self.v = 4.5 * get_sign(self.v)
|
||||
end
|
||||
|
||||
local p = self.object:getpos()
|
||||
local new_velo = {x = 0, y = 0, z = 0}
|
||||
local new_acce = {x = 0, y = 0, z = 0}
|
||||
p.y = p.y - 0.5
|
||||
|
||||
if not is_water(p) then
|
||||
local nodedef = minetest.registered_nodes[minetest.get_node(p).name]
|
||||
if (not nodedef) or nodedef.walkable then
|
||||
self.v = 0
|
||||
new_acce = {x = 0, y = 0, z = 0} -- y was 1
|
||||
else
|
||||
new_acce = {x = 0, y = -9.8, z = 0}
|
||||
end
|
||||
new_velo = get_velocity(self.v, self.object:getyaw(), self.object:getvelocity().y)
|
||||
--self.object:setpos(self.object:getpos())
|
||||
else
|
||||
p.y = p.y + 1
|
||||
if is_water(p) then
|
||||
local y = self.object:getvelocity().y
|
||||
if y >= 4.5 then
|
||||
y = 4.5
|
||||
elseif y < 0 then
|
||||
new_acce = {x = 0, y = 20, z = 0}
|
||||
else
|
||||
new_acce = {x = 0, y = 5, z = 0}
|
||||
end
|
||||
new_velo = get_velocity(self.v, self.object:getyaw(), y)
|
||||
--self.object:setpos(self.object:getpos())
|
||||
else
|
||||
new_acce = {x = 0, y = 0, z = 0}
|
||||
if math.abs(self.object:getvelocity().y) < 1 then
|
||||
local pos = self.object:getpos()
|
||||
pos.y = math.floor(pos.y) + 0.5
|
||||
self.object:setpos(pos)
|
||||
new_velo = get_velocity(self.v, self.object:getyaw(), 0)
|
||||
else
|
||||
new_velo = get_velocity(self.v, self.object:getyaw(), self.object:getvelocity().y)
|
||||
--self.object:setpos(self.object:getpos())
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self.object:setvelocity(new_velo)
|
||||
self.object:setacceleration(new_acce)
|
||||
|
||||
-- if boat comes to sudden stop then it has crashed, destroy boat and drop 3x wood
|
||||
if self.v2 - self.v >= 3 then
|
||||
if self.driver then
|
||||
--print ("Crash! with driver", self.v2 - self.v)
|
||||
self.driver:set_detach()
|
||||
default.player_attached[self.driver:get_player_name()] = false
|
||||
default.player_set_animation(self.driver, "stand" , 30)
|
||||
else
|
||||
--print ("Crash! no driver")
|
||||
end
|
||||
|
||||
minetest.add_item(self.object:getpos(), "default:wood 3")
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
|
||||
self.v2 = self.v
|
||||
|
||||
end
|
||||
|
||||
minetest.register_entity("boats:boat", boat)
|
||||
|
||||
minetest.register_craftitem("boats:boat", {
|
||||
description = "Boat",
|
||||
inventory_image = "rowboat_inventory.png",
|
||||
wield_image = "rowboat_inventory.png",
|
||||
wield_scale = {x = 2, y = 2, z = 1},
|
||||
liquids_pointable = true,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type ~= "node"
|
||||
or not is_water(pointed_thing.under) then
|
||||
return
|
||||
end
|
||||
pointed_thing.under.y = pointed_thing.under.y + 0.5
|
||||
minetest.add_entity(pointed_thing.under, "boats:boat")
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "boats:boat",
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"group:wood", "", "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_alias("ds_rowboat:ds_rowboat", "boats:boat")
|
760
games/MultiCraft_game/files/boats/models/rowboat.x
Normal file
@ -0,0 +1,760 @@
|
||||
xof 0303txt 0032
|
||||
|
||||
Frame Root {
|
||||
FrameTransformMatrix {
|
||||
1.000000, 0.000000, 0.000000, 0.000000,
|
||||
0.000000,-0.000000, 1.000000, 0.000000,
|
||||
0.000000, 1.000000, 0.000000, 0.000000,
|
||||
0.000000, 0.000000, 0.000000, 1.000000;;
|
||||
}
|
||||
Frame Cube_000 {
|
||||
FrameTransformMatrix {
|
||||
1.000000, 0.000000, 0.000000, 0.000000,
|
||||
0.000000, 1.000000, 0.000000, 0.000000,
|
||||
0.000000, 0.000000, 1.000000, 0.000000,
|
||||
0.000000, 0.000000, 0.000000, 1.000000;;
|
||||
}
|
||||
Mesh { // Cube_000 mesh
|
||||
240;
|
||||
6.000000; 3.999999; 2.376923;,
|
||||
5.999998;-8.000001; 2.376923;,
|
||||
5.999998;-8.000001; 4.376923;,
|
||||
6.000001; 3.999999; 4.376923;,
|
||||
-2.000000; 8.000000; 2.376923;,
|
||||
2.000000; 8.000000; 2.376923;,
|
||||
2.000001; 8.000000; 4.376923;,
|
||||
-1.999999; 8.000000; 4.376923;,
|
||||
-6.000000; 4.000000; 4.376923;,
|
||||
-6.000001;-8.000000; 4.376923;,
|
||||
-6.000001;-7.999999; 2.376923;,
|
||||
-6.000000; 4.000000; 2.376923;,
|
||||
-3.999999; 6.000001; 2.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
-2.000001;-8.000002; 2.376923;,
|
||||
-4.000001;-8.000000; 2.376923;,
|
||||
-2.000000; 4.000000;-1.623077;,
|
||||
-2.000001;-7.999999;-1.623077;,
|
||||
1.999999;-8.000001;-1.623077;,
|
||||
2.000000; 4.000000;-1.623077;,
|
||||
-2.000000; 4.000000; 0.376923;,
|
||||
2.000000; 3.999999; 0.376923;,
|
||||
1.999999;-8.000001; 0.376923;,
|
||||
-2.000001;-8.000000; 0.376923;,
|
||||
-2.000000; 4.000000;-1.623077;,
|
||||
2.000000; 4.000000;-1.623077;,
|
||||
2.000000; 3.999999; 0.376923;,
|
||||
-2.000000; 4.000000; 0.376923;,
|
||||
2.000000; 4.000000;-1.623077;,
|
||||
1.999999;-8.000001;-1.623077;,
|
||||
1.999999;-8.000001; 0.376923;,
|
||||
2.000000; 3.999999; 0.376923;,
|
||||
1.999999;-8.000001;-1.623077;,
|
||||
-2.000001;-7.999999;-1.623077;,
|
||||
-2.000001;-8.000000; 0.376923;,
|
||||
1.999999;-8.000001; 0.376923;,
|
||||
-2.000000; 4.000000; 0.376923;,
|
||||
-2.000001;-8.000000; 0.376923;,
|
||||
-2.000001;-7.999999;-1.623077;,
|
||||
-2.000000; 4.000000;-1.623077;,
|
||||
-4.000001;-8.000000; 0.376923;,
|
||||
-4.000001;-10.000000; 0.376923;,
|
||||
4.000000;-10.000000; 0.376923;,
|
||||
3.999999;-8.000000; 0.376923;,
|
||||
-4.000000;-7.999999; 4.376923;,
|
||||
4.000000;-8.000001; 4.376923;,
|
||||
3.999999;-10.000001; 4.376923;,
|
||||
-4.000001;-10.000000; 4.376923;,
|
||||
-4.000001;-8.000000; 0.376923;,
|
||||
3.999999;-8.000000; 0.376923;,
|
||||
4.000000;-8.000001; 4.376923;,
|
||||
-4.000000;-7.999999; 4.376923;,
|
||||
3.999999;-8.000000; 0.376923;,
|
||||
4.000000;-10.000000; 0.376923;,
|
||||
3.999999;-10.000001; 4.376923;,
|
||||
4.000000;-8.000001; 4.376923;,
|
||||
4.000000;-10.000000; 0.376923;,
|
||||
-4.000001;-10.000000; 0.376923;,
|
||||
-4.000001;-10.000000; 4.376923;,
|
||||
3.999999;-10.000001; 4.376923;,
|
||||
-4.000000;-7.999999; 4.376923;,
|
||||
-4.000001;-10.000000; 4.376923;,
|
||||
-4.000001;-10.000000; 0.376923;,
|
||||
-4.000001;-8.000000; 0.376923;,
|
||||
4.000000; 4.000000; 2.376923;,
|
||||
3.999999;-8.000001; 2.376923;,
|
||||
5.999998;-8.000001; 2.376923;,
|
||||
6.000000; 3.999999; 2.376923;,
|
||||
4.000001; 4.000000; 4.376923;,
|
||||
6.000001; 3.999999; 4.376923;,
|
||||
5.999998;-8.000001; 4.376923;,
|
||||
4.000000;-8.000001; 4.376923;,
|
||||
4.000000; 4.000000; 2.376923;,
|
||||
6.000000; 3.999999; 2.376923;,
|
||||
6.000001; 3.999999; 4.376923;,
|
||||
4.000001; 4.000000; 4.376923;,
|
||||
5.999998;-8.000001; 2.376923;,
|
||||
3.999999;-8.000001; 2.376923;,
|
||||
4.000000;-8.000001; 4.376923;,
|
||||
5.999998;-8.000001; 4.376923;,
|
||||
4.000001; 4.000000; 4.376923;,
|
||||
4.000000;-8.000001; 4.376923;,
|
||||
3.999999;-8.000001; 2.376923;,
|
||||
4.000000; 4.000000; 2.376923;,
|
||||
2.000000; 6.000000; 0.376923;,
|
||||
1.999999;-8.000001; 0.376923;,
|
||||
3.999999;-8.000000; 0.376923;,
|
||||
4.000000; 6.000000; 0.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
4.000001; 5.999999; 2.376923;,
|
||||
3.999999;-8.000001; 2.376923;,
|
||||
1.999999;-8.000000; 2.376923;,
|
||||
2.000000; 6.000000; 0.376923;,
|
||||
4.000000; 6.000000; 0.376923;,
|
||||
4.000001; 5.999999; 2.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
4.000000; 6.000000; 0.376923;,
|
||||
3.999999;-8.000000; 0.376923;,
|
||||
3.999999;-8.000001; 2.376923;,
|
||||
4.000001; 5.999999; 2.376923;,
|
||||
3.999999;-8.000000; 0.376923;,
|
||||
1.999999;-8.000001; 0.376923;,
|
||||
1.999999;-8.000000; 2.376923;,
|
||||
3.999999;-8.000001; 2.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
1.999999;-8.000000; 2.376923;,
|
||||
1.999999;-8.000001; 0.376923;,
|
||||
2.000000; 6.000000; 0.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
2.000000; 4.000000; 2.376923;,
|
||||
4.000000; 4.000000; 2.376923;,
|
||||
4.000001; 5.999999; 2.376923;,
|
||||
2.000001; 6.000000; 4.376923;,
|
||||
4.000001; 5.999999; 4.376923;,
|
||||
4.000001; 4.000000; 4.376923;,
|
||||
2.000000; 4.000000; 4.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
4.000001; 5.999999; 2.376923;,
|
||||
4.000001; 5.999999; 4.376923;,
|
||||
2.000001; 6.000000; 4.376923;,
|
||||
4.000001; 5.999999; 2.376923;,
|
||||
4.000000; 4.000000; 2.376923;,
|
||||
4.000001; 4.000000; 4.376923;,
|
||||
4.000001; 5.999999; 4.376923;,
|
||||
4.000000; 4.000000; 2.376923;,
|
||||
2.000000; 4.000000; 2.376923;,
|
||||
2.000000; 4.000000; 4.376923;,
|
||||
4.000001; 4.000000; 4.376923;,
|
||||
2.000001; 6.000000; 4.376923;,
|
||||
2.000000; 4.000000; 4.376923;,
|
||||
2.000000; 4.000000; 2.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
-3.999999; 6.000001; 2.376923;,
|
||||
-4.000000; 4.000000; 2.376923;,
|
||||
-2.000000; 4.000000; 2.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
-3.999999; 6.000001; 4.376923;,
|
||||
-1.999999; 6.000000; 4.376923;,
|
||||
-2.000000; 4.000000; 4.376923;,
|
||||
-4.000000; 3.999999; 4.376923;,
|
||||
-3.999999; 6.000001; 2.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
-1.999999; 6.000000; 4.376923;,
|
||||
-3.999999; 6.000001; 4.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
-2.000000; 4.000000; 2.376923;,
|
||||
-2.000000; 4.000000; 4.376923;,
|
||||
-1.999999; 6.000000; 4.376923;,
|
||||
-2.000000; 4.000000; 2.376923;,
|
||||
-4.000000; 4.000000; 2.376923;,
|
||||
-4.000000; 3.999999; 4.376923;,
|
||||
-2.000000; 4.000000; 4.376923;,
|
||||
-3.999999; 6.000001; 4.376923;,
|
||||
-4.000000; 3.999999; 4.376923;,
|
||||
-4.000000; 4.000000; 2.376923;,
|
||||
-3.999999; 6.000001; 2.376923;,
|
||||
-2.000000; 8.000000; 2.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
2.000000; 8.000000; 2.376923;,
|
||||
-1.999999; 8.000000; 4.376923;,
|
||||
2.000001; 8.000000; 4.376923;,
|
||||
2.000001; 6.000000; 4.376923;,
|
||||
-1.999999; 6.000000; 4.376923;,
|
||||
2.000000; 8.000000; 2.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
2.000001; 6.000000; 4.376923;,
|
||||
2.000001; 8.000000; 4.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
-1.999999; 6.000000; 4.376923;,
|
||||
2.000001; 6.000000; 4.376923;,
|
||||
-1.999999; 8.000000; 4.376923;,
|
||||
-1.999999; 6.000000; 4.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
-2.000000; 8.000000; 2.376923;,
|
||||
-2.000000; 6.000000; 0.376923;,
|
||||
-2.000000; 4.000000; 0.376923;,
|
||||
2.000000; 3.999999; 0.376923;,
|
||||
2.000000; 6.000000; 0.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
2.000000; 4.000000; 2.376923;,
|
||||
-2.000000; 4.000000; 2.376923;,
|
||||
-2.000000; 6.000000; 0.376923;,
|
||||
2.000000; 6.000000; 0.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
2.000000; 6.000000; 0.376923;,
|
||||
2.000000; 3.999999; 0.376923;,
|
||||
2.000000; 4.000000; 2.376923;,
|
||||
2.000001; 6.000000; 2.376923;,
|
||||
2.000000; 3.999999; 0.376923;,
|
||||
-2.000000; 4.000000; 0.376923;,
|
||||
-2.000000; 4.000000; 2.376923;,
|
||||
2.000000; 4.000000; 2.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
-2.000000; 4.000000; 2.376923;,
|
||||
-2.000000; 4.000000; 0.376923;,
|
||||
-2.000000; 6.000000; 0.376923;,
|
||||
-6.000000; 4.000000; 2.376923;,
|
||||
-6.000001;-7.999999; 2.376923;,
|
||||
-4.000001;-8.000000; 2.376923;,
|
||||
-4.000000; 4.000000; 2.376923;,
|
||||
-6.000000; 4.000000; 4.376923;,
|
||||
-4.000000; 3.999999; 4.376923;,
|
||||
-4.000000;-7.999999; 4.376923;,
|
||||
-6.000001;-8.000000; 4.376923;,
|
||||
-6.000000; 4.000000; 2.376923;,
|
||||
-4.000000; 4.000000; 2.376923;,
|
||||
-4.000000; 3.999999; 4.376923;,
|
||||
-6.000000; 4.000000; 4.376923;,
|
||||
-4.000000; 4.000000; 2.376923;,
|
||||
-4.000001;-8.000000; 2.376923;,
|
||||
-4.000000;-7.999999; 4.376923;,
|
||||
-4.000000; 3.999999; 4.376923;,
|
||||
-4.000001;-8.000000; 2.376923;,
|
||||
-6.000001;-7.999999; 2.376923;,
|
||||
-6.000001;-8.000000; 4.376923;,
|
||||
-4.000000;-7.999999; 4.376923;,
|
||||
-4.000000; 6.000001; 0.376923;,
|
||||
-4.000001;-8.000000; 0.376923;,
|
||||
-2.000001;-8.000000; 0.376923;,
|
||||
-2.000000; 6.000000; 0.376923;,
|
||||
-4.000000; 6.000001; 0.376923;,
|
||||
-2.000000; 6.000000; 0.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
-3.999999; 6.000001; 2.376923;,
|
||||
-2.000000; 6.000000; 0.376923;,
|
||||
-2.000001;-8.000000; 0.376923;,
|
||||
-2.000001;-8.000002; 2.376923;,
|
||||
-1.999999; 6.000000; 2.376923;,
|
||||
-2.000001;-8.000000; 0.376923;,
|
||||
-4.000001;-8.000000; 0.376923;,
|
||||
-4.000001;-8.000000; 2.376923;,
|
||||
-2.000001;-8.000002; 2.376923;,
|
||||
-3.999999; 6.000001; 2.376923;,
|
||||
-4.000001;-8.000000; 2.376923;,
|
||||
-4.000001;-8.000000; 0.376923;,
|
||||
-4.000000; 6.000001; 0.376923;;
|
||||
60;
|
||||
4;0,1,2,3;,
|
||||
4;4,5,6,7;,
|
||||
4;8,9,10,11;,
|
||||
4;12,13,14,15;,
|
||||
4;16,17,18,19;,
|
||||
4;20,21,22,23;,
|
||||
4;24,25,26,27;,
|
||||
4;28,29,30,31;,
|
||||
4;32,33,34,35;,
|
||||
4;36,37,38,39;,
|
||||
4;40,41,42,43;,
|
||||
4;44,45,46,47;,
|
||||
4;48,49,50,51;,
|
||||
4;52,53,54,55;,
|
||||
4;56,57,58,59;,
|
||||
4;60,61,62,63;,
|
||||
4;64,65,66,67;,
|
||||
4;68,69,70,71;,
|
||||
4;72,73,74,75;,
|
||||
4;76,77,78,79;,
|
||||
4;80,81,82,83;,
|
||||
4;84,85,86,87;,
|
||||
4;88,89,90,91;,
|
||||
4;92,93,94,95;,
|
||||
4;96,97,98,99;,
|
||||
4;100,101,102,103;,
|
||||
4;104,105,106,107;,
|
||||
4;108,109,110,111;,
|
||||
4;112,113,114,115;,
|
||||
4;116,117,118,119;,
|
||||
4;120,121,122,123;,
|
||||
4;124,125,126,127;,
|
||||
4;128,129,130,131;,
|
||||
4;132,133,134,135;,
|
||||
4;136,137,138,139;,
|
||||
4;140,141,142,143;,
|
||||
4;144,145,146,147;,
|
||||
4;148,149,150,151;,
|
||||
4;152,153,154,155;,
|
||||
4;156,157,158,159;,
|
||||
4;160,161,162,163;,
|
||||
4;164,165,166,167;,
|
||||
4;168,169,170,171;,
|
||||
4;172,173,174,175;,
|
||||
4;176,177,178,179;,
|
||||
4;180,181,182,183;,
|
||||
4;184,185,186,187;,
|
||||
4;188,189,190,191;,
|
||||
4;192,193,194,195;,
|
||||
4;196,197,198,199;,
|
||||
4;200,201,202,203;,
|
||||
4;204,205,206,207;,
|
||||
4;208,209,210,211;,
|
||||
4;212,213,214,215;,
|
||||
4;216,217,218,219;,
|
||||
4;220,221,222,223;,
|
||||
4;224,225,226,227;,
|
||||
4;228,229,230,231;,
|
||||
4;232,233,234,235;,
|
||||
4;236,237,238,239;;
|
||||
MeshNormals { // Cube_000 normals
|
||||
60;
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
0.000000;-1.000000;-0.000000;,
|
||||
1.000000;-0.000000; 0.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
0.000000; 0.000000; 1.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
-0.000000;-1.000000;-0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
1.000000;-0.000000;-0.000000;,
|
||||
0.000000; 0.000000; 1.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
-0.000000;-1.000000;-0.000000;,
|
||||
-1.000000; 0.000000;-0.000000;,
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
1.000000;-0.000000;-0.000000;,
|
||||
0.000000; 0.000000; 1.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
-0.000000;-1.000000;-0.000000;,
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
1.000000;-0.000000;-0.000000;,
|
||||
0.000000; 0.000000; 1.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
-0.000000;-1.000000;-0.000001;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
1.000000;-0.000000;-0.000000;,
|
||||
0.000000; 0.000000; 1.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
-0.000000;-1.000000; 0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
1.000000;-0.000001;-0.000000;,
|
||||
0.000000; 0.000000; 1.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
-0.000001;-1.000000; 0.000000;,
|
||||
-1.000000; 0.000001;-0.000000;,
|
||||
-0.000000; 1.000000; 0.000000;,
|
||||
1.000000;-0.000000;-0.000000;,
|
||||
0.000000; 0.000000; 1.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
-1.000000;-0.000000; 0.000000;,
|
||||
-0.000000; 1.000000;-0.000000;,
|
||||
1.000000; 0.000000;-0.000000;,
|
||||
0.000000; 0.000000; 1.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
0.000000;-1.000000;-0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
1.000000;-0.000000;-0.000000;,
|
||||
0.000000; 0.000000; 1.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
-0.000000;-1.000000;-0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
0.000000; 0.000000; 1.000000;,
|
||||
-0.000000;-1.000000;-0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
0.000001; 1.000000; 0.000001;,
|
||||
1.000000;-0.000000;-0.000000;;
|
||||
60;
|
||||
4;0,0,0,0;,
|
||||
4;1,1,1,1;,
|
||||
4;2,2,2,2;,
|
||||
4;3,3,3,3;,
|
||||
4;4,4,4,4;,
|
||||
4;5,5,5,5;,
|
||||
4;6,6,6,6;,
|
||||
4;7,7,7,7;,
|
||||
4;8,8,8,8;,
|
||||
4;9,9,9,9;,
|
||||
4;10,10,10,10;,
|
||||
4;11,11,11,11;,
|
||||
4;12,12,12,12;,
|
||||
4;13,13,13,13;,
|
||||
4;14,14,14,14;,
|
||||
4;15,15,15,15;,
|
||||
4;16,16,16,16;,
|
||||
4;17,17,17,17;,
|
||||
4;18,18,18,18;,
|
||||
4;19,19,19,19;,
|
||||
4;20,20,20,20;,
|
||||
4;21,21,21,21;,
|
||||
4;22,22,22,22;,
|
||||
4;23,23,23,23;,
|
||||
4;24,24,24,24;,
|
||||
4;25,25,25,25;,
|
||||
4;26,26,26,26;,
|
||||
4;27,27,27,27;,
|
||||
4;28,28,28,28;,
|
||||
4;29,29,29,29;,
|
||||
4;30,30,30,30;,
|
||||
4;31,31,31,31;,
|
||||
4;32,32,32,32;,
|
||||
4;33,33,33,33;,
|
||||
4;34,34,34,34;,
|
||||
4;35,35,35,35;,
|
||||
4;36,36,36,36;,
|
||||
4;37,37,37,37;,
|
||||
4;38,38,38,38;,
|
||||
4;39,39,39,39;,
|
||||
4;40,40,40,40;,
|
||||
4;41,41,41,41;,
|
||||
4;42,42,42,42;,
|
||||
4;43,43,43,43;,
|
||||
4;44,44,44,44;,
|
||||
4;45,45,45,45;,
|
||||
4;46,46,46,46;,
|
||||
4;47,47,47,47;,
|
||||
4;48,48,48,48;,
|
||||
4;49,49,49,49;,
|
||||
4;50,50,50,50;,
|
||||
4;51,51,51,51;,
|
||||
4;52,52,52,52;,
|
||||
4;53,53,53,53;,
|
||||
4;54,54,54,54;,
|
||||
4;55,55,55,55;,
|
||||
4;56,56,56,56;,
|
||||
4;57,57,57,57;,
|
||||
4;58,58,58,58;,
|
||||
4;59,59,59,59;;
|
||||
} // End of Cube_000 normals
|
||||
MeshTextureCoords { // Cube_000 UV coordinates
|
||||
240;
|
||||
6.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
6.000000; 0.000000;,
|
||||
2.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
2.000000; 0.000000;,
|
||||
6.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
6.000000; 0.000000;,
|
||||
7.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
5.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-1.000000;,
|
||||
5.000000;-1.000000;,
|
||||
6.000000;-1.000000;,
|
||||
6.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-1.000000;,
|
||||
2.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
2.000000; 0.000000;,
|
||||
6.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
6.000000; 0.000000;,
|
||||
3.000000; 0.999999;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000001;,
|
||||
3.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
7.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000001; 1.000000;,
|
||||
0.000000;-4.000000;,
|
||||
1.000000;-4.000000;,
|
||||
1.000000;-3.000000;,
|
||||
0.999999; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-3.000000;,
|
||||
4.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-1.000000;,
|
||||
4.000000;-1.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-1.000000;,
|
||||
1.000000;-1.000000;,
|
||||
5.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-0.999999;,
|
||||
5.000000;-1.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-1.000000;,
|
||||
1.000000;-1.000000;,
|
||||
5.375000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
5.375000; 0.000000;,
|
||||
5.375000; 0.000000;,
|
||||
5.375000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
7.000000; 0.000000;,
|
||||
6.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
6.000000; 0.000000;,
|
||||
7.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
7.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
7.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-1.000000;,
|
||||
1.000000;-1.000000;,
|
||||
1.000000;-1.000000;,
|
||||
0.999999; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-1.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
2.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000001;,
|
||||
2.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-1.000000;,
|
||||
1.000000;-1.000000;,
|
||||
1.000000;-1.000000;,
|
||||
0.999999; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000;-1.000000;,
|
||||
2.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
2.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
2.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000001;,
|
||||
2.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
7.000000; 0.000000;,
|
||||
7.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
7.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
6.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
6.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
7.000000; 0.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
1.000000; 0.000000;,
|
||||
7.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 0.000000;,
|
||||
7.000000; 0.000000;;
|
||||
} // End of Cube_000 UV coordinates
|
||||
MeshMaterialList { // Cube_000 material list
|
||||
1;
|
||||
60;
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0;;
|
||||
Material Material {
|
||||
0.640000; 0.640000; 0.640000; 1.000000;;
|
||||
96.078431;
|
||||
0.500000; 0.500000; 0.500000;;
|
||||
0.000000; 0.000000; 0.000000;;
|
||||
TextureFilename {"default_wood.png";}
|
||||
}
|
||||
} // End of Cube_000 material list
|
||||
} // End of Cube_000 mesh
|
||||
} // End of Cube_000
|
||||
} // End of Root
|
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 270 B |
@ -1,2 +1 @@
|
||||
check
|
||||
default
|
88
games/MultiCraft_game/files/bonusbox/init.lua
Normal file
@ -0,0 +1,88 @@
|
||||
--To add or delete items modify the lines below.
|
||||
--Add or delete local item#
|
||||
--For each local item# add or delete the minetest.spawn_item in the next section.
|
||||
|
||||
|
||||
local item_spawn = function(pos, node)
|
||||
minetest.spawn_item({x=pos.x-0.4,y=pos.y+0.58,z=pos.z-0.2}, "default:steel_ingot 2")
|
||||
minetest.spawn_item({x=pos.x,y=pos.y+0.58,z=pos.z}, "default:emerald")
|
||||
minetest.spawn_item({x=pos.x+0.4,y=pos.y+0.58,z=pos.z-0.2}, "default:diamond")
|
||||
|
||||
minetest.set_node(pos, {name="bonusbox:chest_open", param2=node.param2})
|
||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z}, {name="bonusbox:chest_cap", param2=node.param2})
|
||||
end
|
||||
|
||||
minetest.register_node("bonusbox:chest", {
|
||||
description = "Item Chest",
|
||||
tiles = {
|
||||
"chest_top.png",
|
||||
"chest_bottom.png",
|
||||
"chest_right.png",
|
||||
"chest_left.png",
|
||||
"chest_back.png",
|
||||
"chest_front.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.438627, 0.187361}, -- NodeBox1
|
||||
{-0.483652, -0.441532, -0.483652, 0.483652, 0.110383, 0.172837}, -- NodeBox2
|
||||
{-0.5, 0.110383, -0.5, 0.5, 0.249814, 0.187361}, -- NodeBox3
|
||||
{-0.483652, 0.246909, -0.483652, 0.483652, 0.5, 0.169932}, -- NodeBox4
|
||||
}
|
||||
},
|
||||
groups = {choppy = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rightclick = item_spawn,
|
||||
})
|
||||
|
||||
minetest.register_node("bonusbox:chest_open", {
|
||||
description = "Item Chest",
|
||||
tiles = {
|
||||
"chest_open_top.png",
|
||||
"chest_open_bottom.png",
|
||||
"chest_open_riqht.png",
|
||||
"chest_open_left.png",
|
||||
"chest_open_back.png",
|
||||
"chest_open_front.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.438627, 0.187361}, -- NodeBox1
|
||||
{-0.483652, -0.444437, -0.483652, 0.483652, 0.110383, 0.169932}, -- NodeBox2
|
||||
{-0.5, 0.110383, -0.5, 0.5, 0.188813, 0.187361}, -- NodeBox3
|
||||
{-0.5, 0.188813, 0.172837, 0.5, 0.5, 0.248362}, -- NodeBox4
|
||||
{-0.484478, 0.206242, 0.242552, 0.484478, 0.5, 0.5}, -- NodeBox5
|
||||
}
|
||||
},
|
||||
groups = {oddly_breakable_by_hand=5, not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("bonusbox:chest_cap", {
|
||||
description = "Chest Open",
|
||||
tiles = {
|
||||
"chest_open_top.png",
|
||||
"chest_open_bottom.png",
|
||||
"chest_open_right_two.png",
|
||||
"chest_open_left_two.png",
|
||||
"chest_open_back_two.png",
|
||||
"chest_open_front_two.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0.172236, 0.5, -0.128775, 0.249501}, -- NodeBox1
|
||||
{-0.485183, -0.5, 0.249501, 0.485183, -0.144871, 0.5}, -- NodeBox2
|
||||
}
|
||||
},
|
||||
groups = {oddly_breakable_by_hand=5, not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
BIN
games/MultiCraft_game/files/bonusbox/textures/chest_back.png
Normal file
After Width: | Height: | Size: 919 B |
BIN
games/MultiCraft_game/files/bonusbox/textures/chest_bottom.png
Normal file
After Width: | Height: | Size: 853 B |
BIN
games/MultiCraft_game/files/bonusbox/textures/chest_front.png
Normal file
After Width: | Height: | Size: 1.4 KiB |