Merge pull request #16 from Droog71/refactor

Refactor
master
Droog71 2022-02-01 23:04:55 -05:00 committed by GitHub
commit 53372054a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
434 changed files with 3532 additions and 1157 deletions

View File

@ -1,2 +0,0 @@
name = initial_message
description = Show message to joining players explaining what the game is about.

View File

@ -1,242 +0,0 @@
local utils = ...
local encode_cmd =
{
["lwscratch:cmd_act_move_front"] = "AA",
["lwscratch:cmd_act_move_back"] = "AB",
["lwscratch:cmd_act_move_down"] = "AC",
["lwscratch:cmd_act_move_up"] = "AD",
["lwscratch:cmd_act_turn_left"] = "AE",
["lwscratch:cmd_act_turn_right"] = "AF",
["lwscratch:cmd_act_dig_front"] = "AG",
["lwscratch:cmd_act_dig_front_down"] = "AH",
["lwscratch:cmd_act_dig_front_up"] = "AI",
["lwscratch:cmd_act_dig_back"] = "AJ",
["lwscratch:cmd_act_dig_back_down"] = "AK",
["lwscratch:cmd_act_dig_back_up"] = "AL",
["lwscratch:cmd_act_dig_down"] = "AM",
["lwscratch:cmd_act_dig_up"] = "AN",
["lwscratch:cmd_act_place_front"] = "AO",
["lwscratch:cmd_act_place_front_down"] = "AP",
["lwscratch:cmd_act_place_front_up"] = "AQ",
["lwscratch:cmd_act_place_back"] = "AR",
["lwscratch:cmd_act_place_back_down"] = "AS",
["lwscratch:cmd_act_place_back_up"] = "AT",
["lwscratch:cmd_act_place_down"] = "AU",
["lwscratch:cmd_act_place_up"] = "AV",
["lwscratch:cmd_act_pull"] = "AW",
["lwscratch:cmd_act_put"] = "AX",
["lwscratch:cmd_act_pull_stack"] = "AY",
["lwscratch:cmd_act_put_stack"] = "AZ",
["lwscratch:cmd_act_craft"] = "BA",
["lwscratch:cmd_act_drop"] = "BB",
["lwscratch:cmd_act_trash"] = "BC",
["lwscratch:cmd_act_drop_stack"] = "BD",
["lwscratch:cmd_act_trash_stack"] = "BE",
["lwscratch:cmd_act_value_assign"] = "BF",
["lwscratch:cmd_act_value_plus"] = "BG",
["lwscratch:cmd_act_value_minus"] = "BH",
["lwscratch:cmd_act_value_multiply"] = "BI",
["lwscratch:cmd_act_value_divide"] = "BJ",
["lwscratch:cmd_act_stop"] = "BK",
["lwscratch:cmd_act_wait"] = "BL",
["lwscratch:cmd_act_chat"] = "BM",
["lwscratch:cmd_value_number"] = "BN",
["lwscratch:cmd_value_text"] = "BO",
["lwscratch:cmd_value_value"] = "BP",
["lwscratch:cmd_name_front"] = "BQ",
["lwscratch:cmd_name_front_down"] = "BR",
["lwscratch:cmd_name_front_up"] = "BS",
["lwscratch:cmd_name_back"] = "BT",
["lwscratch:cmd_name_back_down"] = "BU",
["lwscratch:cmd_name_back_up"] = "BV",
["lwscratch:cmd_name_down"] = "BW",
["lwscratch:cmd_name_up"] = "BX",
["lwscratch:cmd_stat_if"] = "BY",
["lwscratch:cmd_stat_loop"] = "BZ",
["lwscratch:cmd_op_not"] = "CA",
["lwscratch:cmd_op_and"] = "CB",
["lwscratch:cmd_op_or"] = "CC",
["lwscratch:cmd_cond_counter_equal"] = "CD",
["lwscratch:cmd_cond_counter_greater"] = "CE",
["lwscratch:cmd_cond_counter_less"] = "CF",
["lwscratch:cmd_cond_counter_even"] = "CG",
["lwscratch:cmd_cond_counter_odd"] = "CH",
["lwscratch:cmd_cond_value_equal"] = "CI",
["lwscratch:cmd_cond_value_greater"] = "CJ",
["lwscratch:cmd_cond_value_less"] = "CK",
["lwscratch:cmd_cond_value_even"] = "CL",
["lwscratch:cmd_cond_value_odd"] = "CM",
["lwscratch:cmd_cond_contains"] = "CN",
["lwscratch:cmd_cond_fits"] = "CO",
["lwscratch:cmd_cond_detect_front"] = "CP",
["lwscratch:cmd_cond_detect_front_down"] = "CQ",
["lwscratch:cmd_cond_detect_front_up"] = "CR",
["lwscratch:cmd_cond_detect_back"] = "CS",
["lwscratch:cmd_cond_detect_back_down"] = "CT",
["lwscratch:cmd_cond_detect_back_up"] = "CU",
["lwscratch:cmd_cond_detect_down"] = "CV",
["lwscratch:cmd_cond_detect_up"] = "CW",
[""] = "ZZ",
}
local dencode_cmd =
{
["AA"] = "lwscratch:cmd_act_move_front",
["AB"] = "lwscratch:cmd_act_move_back",
["AC"] = "lwscratch:cmd_act_move_down",
["AD"] = "lwscratch:cmd_act_move_up",
["AE"] = "lwscratch:cmd_act_turn_left",
["AF"] = "lwscratch:cmd_act_turn_right",
["AG"] = "lwscratch:cmd_act_dig_front",
["AH"] = "lwscratch:cmd_act_dig_front_down",
["AI"] = "lwscratch:cmd_act_dig_front_up",
["AJ"] = "lwscratch:cmd_act_dig_back",
["AK"] = "lwscratch:cmd_act_dig_back_down",
["AL"] = "lwscratch:cmd_act_dig_back_up",
["AM"] = "lwscratch:cmd_act_dig_down",
["AN"] = "lwscratch:cmd_act_dig_up",
["AO"] = "lwscratch:cmd_act_place_front",
["AP"] = "lwscratch:cmd_act_place_front_down",
["AQ"] = "lwscratch:cmd_act_place_front_up",
["AR"] = "lwscratch:cmd_act_place_back",
["AS"] = "lwscratch:cmd_act_place_back_down",
["AT"] = "lwscratch:cmd_act_place_back_up",
["AU"] = "lwscratch:cmd_act_place_down",
["AV"] = "lwscratch:cmd_act_place_up",
["AW"] = "lwscratch:cmd_act_pull",
["AX"] = "lwscratch:cmd_act_put",
["AY"] = "lwscratch:cmd_act_pull_stack",
["AZ"] = "lwscratch:cmd_act_put_stack",
["BA"] = "lwscratch:cmd_act_craft",
["BB"] = "lwscratch:cmd_act_drop",
["BC"] = "lwscratch:cmd_act_trash",
["BD"] = "lwscratch:cmd_act_drop_stack",
["BE"] = "lwscratch:cmd_act_trash_stack",
["BF"] = "lwscratch:cmd_act_value_assign",
["BG"] = "lwscratch:cmd_act_value_plus",
["BH"] = "lwscratch:cmd_act_value_minus",
["BI"] = "lwscratch:cmd_act_value_multiply",
["BJ"] = "lwscratch:cmd_act_value_divide",
["BK"] = "lwscratch:cmd_act_stop",
["BL"] = "lwscratch:cmd_act_wait",
["BM"] = "lwscratch:cmd_act_chat",
["BN"] = "lwscratch:cmd_value_number",
["BO"] = "lwscratch:cmd_value_text",
["BP"] = "lwscratch:cmd_value_value",
["BQ"] = "lwscratch:cmd_name_front",
["BR"] = "lwscratch:cmd_name_front_down",
["BS"] = "lwscratch:cmd_name_front_up",
["BT"] = "lwscratch:cmd_name_back",
["BU"] = "lwscratch:cmd_name_back_down",
["BV"] = "lwscratch:cmd_name_back_up",
["BW"] = "lwscratch:cmd_name_down",
["BX"] = "lwscratch:cmd_name_up",
["BY"] = "lwscratch:cmd_stat_if",
["BZ"] = "lwscratch:cmd_stat_loop",
["CA"] = "lwscratch:cmd_op_not",
["CB"] = "lwscratch:cmd_op_and",
["CC"] = "lwscratch:cmd_op_or",
["CD"] = "lwscratch:cmd_cond_counter_equal",
["CE"] = "lwscratch:cmd_cond_counter_greater",
["CF"] = "lwscratch:cmd_cond_counter_less",
["CG"] = "lwscratch:cmd_cond_counter_even",
["CH"] = "lwscratch:cmd_cond_counter_odd",
["CI"] = "lwscratch:cmd_cond_value_equal",
["CJ"] = "lwscratch:cmd_cond_value_greater",
["CK"] = "lwscratch:cmd_cond_value_less",
["CL"] = "lwscratch:cmd_cond_value_even",
["CM"] = "lwscratch:cmd_cond_value_odd",
["CN"] = "lwscratch:cmd_cond_contains",
["CO"] = "lwscratch:cmd_cond_fits",
["CP"] = "lwscratch:cmd_cond_detect_front",
["CQ"] = "lwscratch:cmd_cond_detect_front_down",
["CR"] = "lwscratch:cmd_cond_detect_front_up",
["CS"] = "lwscratch:cmd_cond_detect_back",
["CT"] = "lwscratch:cmd_cond_detect_back_down",
["CU"] = "lwscratch:cmd_cond_detect_back_up",
["CV"] = "lwscratch:cmd_cond_detect_down",
["CW"] = "lwscratch:cmd_cond_detect_up",
["ZX"] = "itemstack",
["ZZ"] = "",
}
function utils.encode_program (inv)
local code = ""
local rdata = { }
for i = 1, utils.program_inv_size do
local stack = inv:get_stack ("program", i)
if stack and not stack:is_empty () then
local c = encode_cmd[stack:get_name ()]
if not c then
-- itemstack
c = "ZX"
end
if utils.is_value_item (stack:get_name ()) or
utils.is_action_value_item (stack:get_name ()) or
utils.is_condition_value_item (stack:get_name ()) then
rdata[#rdata + 1] = stack:get_meta ():get_string ("value")
elseif utils.is_inventory_item (stack:get_name ()) then
rdata[#rdata + 1] = stack:to_string ()
end
code = code..c
else
code = code.."ZZ"
end
end
return { code = code, rdata = rdata }
end
function utils.dencode_program (inv, encoded)
if encoded then
local code = encoded.code
local rdata = encoded.rdata
local rdata_idx = 1
for i = 1, utils.program_inv_size do
local c = code:sub (((i - 1) * 2) + 1, ((i - 1) * 2) + 2)
local name = dencode_cmd[c]
local stack = nil
if name == "itemstack" then
stack = ItemStack (rdata[rdata_idx])
rdata_idx = rdata_idx + 1
else
stack = ItemStack (name)
if utils.is_value_item (stack:get_name ()) or
utils.is_action_value_item (stack:get_name ()) or
utils.is_condition_value_item (stack:get_name ()) then
stack:get_meta ():set_string ("value", rdata[rdata_idx])
stack:get_meta ():set_string ("description", rdata[rdata_idx])
rdata_idx = rdata_idx + 1
end
end
inv:set_stack ("program", i, stack)
end
end
end
--

View File

@ -1,3 +0,0 @@
*~
*.patch
*.diff

View File

@ -1 +0,0 @@
name = mesecons

View File

@ -1,2 +0,0 @@
name = mesecons_button
depends = mesecons, mesecons_receiver

View File

@ -1,2 +0,0 @@
name = mesecons_delayer
depends = mesecons

View File

@ -1,2 +0,0 @@
name = mesecons_gates
depends = mesecons, mesecons_microcontroller, mesecons_delayer, mesecons_torch, mesecons_materials

View File

@ -1,2 +0,0 @@
name = mesecons_materials
depends = mesecons

View File

@ -1,2 +0,0 @@
name = mesecons_microcontroller
depends = mesecons

View File

@ -1,2 +0,0 @@
name = mesecons_noteblock
depends = mesecons

View File

@ -1,2 +0,0 @@
name = mesecons_receiver
depends = mesecons

View File

@ -1,2 +0,0 @@
name = mesecons_switch
depends = mesecons

View File

@ -1,2 +0,0 @@
name = mesecons_torch
depends = mesecons

View File

@ -1,2 +0,0 @@
name = mesecons_wires
depends = mesecons

View File

@ -1 +0,0 @@
name = mesecons

View File

@ -29,3 +29,4 @@ do_file("computer_formspec")
do_file("shop_formspec")
do_file("sleep_formspec")
do_file("tutorial")
do_file("welcome_message")

View File

@ -205,7 +205,7 @@ function build_teleporter()
minetest.set_node(vector.new(20,y,-5), {name = "moontest:wall"})
minetest.set_node(vector.new(21,y,-4), {name = "moontest:wall"})
end
minetest.set_node(vector.new(20,0,-4), {name = "mt_teleporter:teleporter"})
minetest.set_node(vector.new(20,7,-4), {name = "mt_teleporter:teleporter"})
minetest.set_node(vector.new(20,0,-4), {name = "moontest_teleporter:teleporter"})
minetest.set_node(vector.new(20,7,-4), {name = "moontest_teleporter:teleporter"})
minetest.set_node(vector.new(20,11,-4), {name = "moontest:wall"})
end

View File

@ -10,10 +10,9 @@ function inventory_formspec(player)
"size[8,7.5]",
"bgcolor[#2d2d2d;false]",
"list[current_player;main;0,3.5;8,4;]",
"button[1.5,0.75;2,0.5;Tutorial;Tutorial]",
"button[1.5,2;2,0.5;Manual;Manual]",
"button[4.5,0.75;2,0.5;Shop;Shop]",
"button[4.5,2;2,0.5;Power;Power]"
"button[1,1.5;2,0.5;Tutorial;Tutorial]",
"button[3,1.5;2,0.5;Manual;Manual]",
"button[5,1.5;2,0.5;Shop;Shop]",
}
return formspec
end
@ -39,9 +38,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
player:set_inventory_formspec(table.concat(formspec, ""))
elseif key == "Tutorial" then
start_tutorial(player)
elseif key == "Power" then
local formspec = power_formspec(player)
player:set_inventory_formspec(table.concat(formspec, ""))
end
end
end

View File

@ -185,10 +185,11 @@ minetest.register_abm({
interval = 10,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local active = is_consumer(pos)
if active == false then
local power = minetest.get_meta(pos):get_int("power")
if is_consumer(pos) == false then
table.insert(power_consumers, pos)
elseif power_stable(pos) then
elseif power_stable(pos) or power == 1 then
minetest.get_meta(pos):set_int("power", 0)
local chance = math.random(1,100)
if chance >= 50 then
local habitat_range = vector.distance(vector.new(0, 0, 0), pos)
@ -233,5 +234,7 @@ minetest.register_abm({
end
end
end
local power_disp = (power_stable(pos) or power == 1) and "on" or "off"
minetest.get_meta(pos):set_string("infotext", "Research Probe\n" .. "Power: " .. power_disp)
end
})

View File

@ -12,32 +12,34 @@ local loaded = false
local items_for_sale = {
{
["Wire"] = "mesecons:wire_00000000_off",
["Switch"] = "mesecons_switch:mesecon_switch_off",
["Button"] = "mesecons_button:button_off",
["Note Block"] = "mesecons_noteblock:noteblock",
["Screw Driver"] = "screwdriver2:screwdriver",
["Flashlight"] = "work_lights:flashlight",
["Crate"] = "moontest:crate"
["Wire"] = "moontest_mesecons:wire_00000000_off",
["Switch"] = "moontest_mesecons_switch:mesecon_switch_off",
["Button"] = "moontest_mesecons_button:button_off",
["Note Block"] = "moontest_mesecons_noteblock:noteblock",
["Screw Driver"] = "moontest_screwdriver:screwdriver",
["Flashlight"] = "moontest_lights:flashlight",
["Crate"] = "moontest:crate",
["Conveyor"] = "moontest_conveyors:conveyor"
},
{
["Fuel"] = "portable_power:fuel",
["Work Light"] = "work_lights:work_light_off",
["Generator"] = "portable_power:generator",
["Solar Panel"] = "portable_power:solar_panel",
["Fuel"] = "moontest_power:fuel",
["Work Light"] = "moontest_lights:work_light_off",
["Generator"] = "moontest_power:generator",
["Power Transmitter"] = "moontest_power:power_transmitter",
["Solar Panel"] = "moontest_power:solar_panel",
["Research Probe"] = "moontest:research_probe",
["Robot"] = "lwscratch:robot",
["Robot Disk"] = "lwscratch:cassette"
["Robot"] = "moontest_robots:robot",
["Robot Disk"] = "moontest_robots:cassette"
},
{
["Delayer"] = "mesecons_delayer:delayer_off_1",
["Microcontroller"] = "mesecons_microcontroller:microcontroller0000",
["Delayer"] = "moontest_mesecons_delayer:delayer_off_1",
["Microcontroller"] = "moontest_mesecons_microcontroller:microcontroller0000",
["Sensor"] = "moontest:sensor",
["Relay"] = "moontest:relay_off",
["Reactor Booster"] = "moontest:reactor_booster",
["REM Extractor"] = "rem:extractor",
["REM Rocket"] = "rem:rocket",
["Terraformer"] = "terraformer:terraformer_off"
["REM Extractor"] = "moontest_rem:extractor",
["REM Rocket"] = "moontest_rem:rocket",
["Terraformer"] = "moontest_terraformer:terraformer_off"
}
}
@ -49,12 +51,14 @@ local item_prices = {
["Note Block"] = 16,
["Screw Driver"] = 32,
["Flashlight"] = 64,
["Crate"] = 64
["Crate"] = 64,
["Conveyor"] = 16
},
{
["Fuel"] = 8,
["Work Light"] = 128,
["Generator"] = 2048,
["Power Transmitter"] = 1024,
["Solar Panel"] = 2048,
["Research Probe"] = 4096,
["Robot"] = 1024,
@ -80,12 +84,14 @@ local research_levels = {
["Note Block"] = 1,
["Screw Driver"] = 1,
["Flashlight"] = 1,
["Crate"] = 1
["Crate"] = 1,
["Conveyor"] = 1
},
{
["Fuel"] = 1,
["Work Light"] = 1,
["Generator"] = 1,
["Power Transmitter"] = 1,
["Solar Panel"] = 1,
["Research Probe"] = 1,
["Robot"] = 2,

View File

@ -329,19 +329,19 @@ local function check_tutorial_conditions(player)
stack1:set_count(1)
player:get_inventory():add_item("main", stack1)
local stack2 = ItemStack("portable_power:generator")
local stack2 = ItemStack("moontest_power:generator")
stack2:set_count(1)
player:get_inventory():add_item("main", stack2)
local stack3 = ItemStack("work_lights:work_light_off")
local stack3 = ItemStack("moontest_lights:work_light_off")
stack3:set_count(1)
player:get_inventory():add_item("main", stack3)
local stack4 = ItemStack("work_lights:flashlight")
local stack4 = ItemStack("moontest_lights:flashlight")
stack4:set_count(1)
player:get_inventory():add_item("main", stack4)
local stack5 = ItemStack("portable_power:fuel")
local stack5 = ItemStack("moontest_power:fuel")
stack5:set_count(10)
player:get_inventory():add_item("main", stack5)
@ -369,15 +369,15 @@ local function check_tutorial_conditions(player)
stack2:set_count(10)
player:get_inventory():add_item("main", stack2)
local stack3 = ItemStack("mesecons_delayer:delayer_off_1")
local stack3 = ItemStack("moontest_mesecons_delayer:delayer_off_1")
stack3:set_count(10)
player:get_inventory():add_item("main", stack3)
local stack4 = ItemStack("mesecons_microcontroller:microcontroller0000")
local stack4 = ItemStack("moontest_mesecons_microcontroller:microcontroller0000")
stack4:set_count(10)
player:get_inventory():add_item("main", stack4)
local stack5 = ItemStack("mesecons:wire_00000000_off")
local stack5 = ItemStack("moontest_mesecons:wire_00000000_off")
stack5:set_count(50)
player:get_inventory():add_item("main", stack5)
@ -402,7 +402,7 @@ local function check_tutorial_conditions(player)
stack1:set_count(10)
player:get_inventory():add_item("main", stack1)
local stack2 = ItemStack("mesecons_button:button_off")
local stack2 = ItemStack("moontest_mese_button:button_off")
stack2:set_count(10)
player:get_inventory():add_item("main", stack2)

View File

@ -0,0 +1,165 @@
--[[
Conveyors
Author: Droog71
License: AGPLv3
]]--
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_x"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_y"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_z"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_north_up"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_south_up"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_east_up"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_west_up"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_north_down"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_south_down"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_east_down"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_west_down"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_south_east"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_south_west"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_north_east"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})
minetest.register_abm({
nodenames = {"moontest_conveyors:conveyor_north_west"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
move_items(pos, node, active_object_count, active_object_count_wider)
set_conveyor_mesh(pos)
end
})

View File

@ -0,0 +1,179 @@
--[[
Conveyors
Author: Droog71
License: AGPLv3
]]--
dofile(minetest.get_modpath("moontest_conveyors") .. DIR_DELIM .. "nodes.lua")
dofile(minetest.get_modpath("moontest_conveyors") .. DIR_DELIM .. "abm.lua")
dofile(minetest.get_modpath("moontest_conveyors") .. DIR_DELIM .. "mesh.lua")
--returns true if the vectors are equal
local function vector_equal(v1, v2)
return v1.x == v2.x and v1.y == v2.y and v1.z == v2.z
end
--returns true if the node is a conveyor
function is_conveyor(name)
return name == "moontest_conveyors:conveyor" or
name == "moontest_conveyors:conveyor_x" or
name == "moontest_conveyors:conveyor_y" or
name == "moontest_conveyors:conveyor_z" or
name == "moontest_conveyors:conveyor_north_up" or
name == "moontest_conveyors:conveyor_south_up" or
name == "moontest_conveyors:conveyor_east_up" or
name == "moontest_conveyors:conveyor_west_up" or
name == "moontest_conveyors:conveyor_north_down" or
name == "moontest_conveyors:conveyor_south_down" or
name == "moontest_conveyors:conveyor_east_down" or
name == "moontest_conveyors:conveyor_west_down" or
name == "moontest_conveyors:conveyor_south_east" or
name == "moontest_conveyors:conveyor_south_west" or
name == "moontest_conveyors:conveyor_north_east" or
name == "moontest_conveyors:conveyor_north_west"
end
--gets the location of the inventory the conveyor is pulling from
local function get_pull_dir(pos)
local x = minetest.get_meta(pos):get_int("pull_dir_x")
local y = minetest.get_meta(pos):get_int("pull_dir_y")
local z = minetest.get_meta(pos):get_int("pull_dir_z")
return vector.new(x, y, z)
end
--sets the location of the inventory the conveyor is pulling from
local function set_pull_dir(pos, dir)
minetest.get_meta(pos):set_int("pull_dir_x", dir.x)
minetest.get_meta(pos):set_int("pull_dir_y", dir.y)
minetest.get_meta(pos):set_int("pull_dir_z", dir.z)
end
--gets the location of the inventory the conveyor is supplying items to
local function get_put_dir(pos)
local x = minetest.get_meta(pos):get_int("put_dir_x")
local y = minetest.get_meta(pos):get_int("put_dir_y")
local z = minetest.get_meta(pos):get_int("put_dir_z")
return vector.new(x, y, z)
end
--sets the location of the inventory the conveyor is supplying items to
local function set_put_dir(pos, dir)
minetest.get_meta(pos):set_int("put_dir_x", dir.x)
minetest.get_meta(pos):set_int("put_dir_y", dir.y)
minetest.get_meta(pos):set_int("put_dir_z", dir.z)
end
--moves items along the conveyor path
function move_items(pos, node, active_object_count, active_object_count_wider)
local north = vector.new(pos.x + 1, pos.y, pos.z)
local south = vector.new(pos.x - 1, pos.y, pos.z)
local east = vector.new(pos.x, pos.y, pos.z + 1)
local west = vector.new(pos.x, pos.y, pos.z - 1)
local up = vector.new(pos.x, pos.y + 1, pos.z)
local down = vector.new(pos.x, pos.y - 1, pos.z)
local directions = {north, south, east, west, up, down}
local pull_dir = get_pull_dir(pos)
local put_dir = get_put_dir(pos)
local stack_to_send = nil
local self_inv = minetest.get_meta(pos):get_inventory()
local filter_stack = self_inv:get_stack("filter", 1)
local filter = ""
if filter_stack then
filter = filter_stack:get_name()
end
for _,dir in pairs(directions) do
local conveyor = is_conveyor(minetest.get_node(dir).name)
local puller = minetest.get_meta(pos):get_int("puller")
if conveyor or puller == 1 then
if not vector_equal(dir, get_put_dir(pos)) then
local inv = minetest.get_meta(dir):get_inventory()
local main = inv:get_list("main")
local dst = inv:get_list("dst")
if main then
for k,v in pairs(main) do
local stack = inv:get_stack("main", k)
if stack then
if stack:get_name() ~= "" then
if filter == "" or filter == stack:get_name() then
stack_to_send = stack:get_name()
local to_remove = ItemStack(stack_to_send)
inv:remove_item("main", to_remove)
set_pull_dir(pos, dir)
break
end
end
end
end
elseif dst then
for k,v in pairs(dst) do
local stack = inv:get_stack("dst", k)
if stack then
if stack:get_name() ~= "" then
if filter == "" or filter == stack:get_name() then
stack_to_send = stack:get_name()
local to_remove = ItemStack(stack_to_send)
inv:remove_item("dst", to_remove)
set_pull_dir(pos, dir)
break
end
end
end
end
end
end
end
end
if stack_to_send then
for _,dir in pairs(directions) do
if not vector_equal(dir, get_pull_dir(pos)) then
local inv = minetest.get_meta(dir):get_inventory()
local sending = ItemStack(stack_to_send)
local main = inv:get_list("main")
local src = inv:get_list("src")
if main then
inv:add_item("main", sending)
set_put_dir(pos, dir)
elseif src then
inv:add_item("src", sending)
set_put_dir(pos, dir)
end
end
end
else
local self_inv = minetest.get_meta(pos):get_inventory()
local main = self_inv:get_list("main")
if main then
for k,v in pairs(main) do
local stack = self_inv:get_stack("main", k)
if stack then
if stack:get_name() ~= "" then
stack_to_send = stack:get_name()
for _,dir in pairs(directions) do
if not is_conveyor(minetest.get_node(dir).name) then
local put_inv = minetest.get_meta(dir):get_inventory()
local main = put_inv:get_list("main")
local src = put_inv:get_list("src")
if main then
local sending = ItemStack(stack_to_send)
self_inv:remove_item("main", sending)
put_inv:add_item("main", sending)
set_put_dir(pos, dir)
break
elseif src then
local sending = ItemStack(stack_to_send)
self_inv:remove_item("main", sending)
put_inv:add_item("src", sending)
set_put_dir(pos, dir)
break
end
end
end
end
end
end
end
end
end

View File

@ -0,0 +1,140 @@
--[[
Conveyors
Author: Droog71
License: AGPLv3
]]--
function set_conveyor_mesh(pos)
local north = minetest.get_node(vector.new(pos.x + 1, pos.y, pos.z)).name
local south = minetest.get_node(vector.new(pos.x - 1, pos.y, pos.z)).name
local east = minetest.get_node(vector.new(pos.x, pos.y, pos.z + 1)).name
local west = minetest.get_node(vector.new(pos.x, pos.y, pos.z - 1)).name
local up = minetest.get_node(vector.new(pos.x, pos.y + 1, pos.z)).name
local down = minetest.get_node(vector.new(pos.x, pos.y - 1, pos.z)).name
local dirs = {north, south, east, west, up, down}
if is_conveyor(north) and is_conveyor(south) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_x" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_x"})
end
end
if is_conveyor(up) and is_conveyor(down) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_y" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_y"})
end
end
if is_conveyor(east) and is_conveyor(west) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_z" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_z"})
end
end
if is_conveyor(north) == true and is_conveyor(south) == false then
if is_conveyor(up) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_north_up" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_north_up"})
end
end
end
if is_conveyor(south) == true and is_conveyor(north) == false then
if is_conveyor(up) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_south_up" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_south_up"})
end
end
end
if is_conveyor(east) == true and is_conveyor(west) == false then
if is_conveyor(up) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_east_up" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_east_up"})
end
end
end
if is_conveyor(west) == true and is_conveyor(east) == false then
if is_conveyor(up) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_west_up" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_west_up"})
end
end
end
if is_conveyor(north) == true and is_conveyor(south) == false then
if is_conveyor(down) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_north_down" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_north_down"})
end
end
end
if is_conveyor(south) == true and is_conveyor(north) == false then
if is_conveyor(down) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_south_down" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_south_down"})
end
end
end
if is_conveyor(east) == true and is_conveyor(west) == false then
if is_conveyor(down) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_east_down" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_east_down"})
end
end
end
if is_conveyor(west) == true and is_conveyor(east) == false then
if is_conveyor(down) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_west_down" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_west_down"})
end
end
end
if is_conveyor(south) == true and is_conveyor(north) == false then
if is_conveyor(east) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_south_east" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_south_east"})
end
end
end
if is_conveyor(south) == true and is_conveyor(north) == false then
if is_conveyor(west) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_south_west" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_south_west"})
end
end
end
if is_conveyor(north) == true and is_conveyor(south) == false then
if is_conveyor(east) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_north_east" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_north_east"})
end
end
end
if is_conveyor(north) == true and is_conveyor(south) == false then
if is_conveyor(west) then
if minetest.get_node(pos).name ~= "moontest_conveyors:conveyor_north_west" then
minetest.swap_node(pos, {name = "moontest_conveyors:conveyor_north_west"})
end
end
end
local count = 0
for _,dir in pairs(dirs) do
if is_conveyor(dir) then
count = count + 1
end
end
if count > 2 then
minetest.remove_node(pos)
end
end

View File

@ -0,0 +1,4 @@
name = moontest_conveyors
description = Conveyor nodes for item transport.
title = Conveyors
author = Droog71

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_east_down.mtl
o Grinder_Cube_Cube.004
v -0.100000 -0.500000 -0.100000
v 0.100000 -0.500000 -0.100000
v 0.100000 -0.500000 0.100000
v -0.100000 -0.500000 0.100000
v 0.100000 0.100000 0.100000
v -0.100000 0.100000 0.100000
v 0.100000 0.100000 -0.100000
v -0.100000 0.100000 -0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn -0.0000 -1.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 1.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn -1.0000 0.0000 -0.0000
vn 1.0000 -0.0000 0.0000
usemtl None.004
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.005
v -0.100000 -0.100000 0.100000
v -0.100000 0.100000 0.100000
v 0.100000 0.100000 0.100000
v 0.100000 -0.100000 0.100000
v 0.100000 0.100000 0.500000
v 0.100000 -0.100000 0.500000
v -0.100000 0.100000 0.500000
v -0.100000 -0.100000 0.500000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn -1.0000 0.0000 -0.0000
vn -0.0000 -1.0000 0.0000
vn 0.0000 1.0000 -0.0000
usemtl None.005
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_east_up.mtl
o Grinder_Cube_Cube.005
v 0.100000 0.100000 0.100000
v 0.100000 -0.100000 0.100000
v -0.100000 -0.100000 0.100000
v -0.100000 0.100000 0.100000
v -0.100000 -0.100000 0.500000
v -0.100000 0.100000 0.500000
v 0.100000 -0.100000 0.500000
v 0.100000 0.100000 0.500000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 1.0000 -0.0000 0.0000
vn 0.0000 1.0000 0.0000
vn -0.0000 -1.0000 0.0000
usemtl None.005
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.004
v 0.100000 0.500000 -0.100000
v -0.100000 0.500000 -0.100000
v -0.100000 0.500000 0.100000
v 0.100000 0.500000 0.100000
v -0.100000 -0.100000 0.100000
v 0.100000 -0.100000 0.100000
v -0.100000 -0.100000 -0.100000
v 0.100000 -0.100000 -0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 1.0000 0.0000
vn -0.0000 0.0000 1.0000
vn -0.0000 -1.0000 0.0000
vn -0.0000 0.0000 -1.0000
vn 1.0000 -0.0000 0.0000
vn -1.0000 0.0000 -0.0000
usemtl None.004
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_north_down.mtl
o Grinder_Cube_Cube.001
v 0.100000 -0.500000 -0.100000
v 0.100000 -0.500000 0.100000
v -0.100000 -0.500000 0.100000
v -0.100000 -0.500000 -0.100000
v -0.100000 0.100000 0.100000
v -0.100000 0.100000 -0.100000
v 0.100000 0.100000 0.100000
v 0.100000 0.100000 -0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 -1.0000 0.0000
vn -1.0000 0.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -0.0000 -1.0000
vn -0.0000 0.0000 1.0000
usemtl None.000
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.000
v -0.100000 -0.100000 -0.100000
v -0.100000 0.100000 -0.100000
v -0.100000 0.100000 0.100000
v -0.100000 -0.100000 0.100000
v -0.500000 0.100000 0.100000
v -0.500000 -0.100000 0.100000
v -0.500000 0.100000 -0.100000
v -0.500000 -0.100000 -0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 1.0000 -0.0000 0.0000
vn -0.0000 0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn 0.0000 -0.0000 -1.0000
vn -0.0000 -1.0000 0.0000
vn 0.0000 1.0000 -0.0000
usemtl None.001
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_north_east.mtl
o Grinder_Cube_Cube.001
v 0.100000 -0.100000 0.500000
v 0.100000 0.100000 0.500000
v -0.100000 0.100000 0.500000
v -0.100000 -0.100000 0.500000
v -0.100000 0.100000 -0.100000
v -0.100000 -0.100000 -0.100000
v 0.100000 0.100000 -0.100000
v 0.100000 -0.100000 -0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 0.0000 1.0000
vn -1.0000 -0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 -0.0000
vn 0.0000 -1.0000 0.0000
vn -0.0000 1.0000 -0.0000
usemtl None.000
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.000
v -0.099999 -0.100000 0.100000
v -0.099999 -0.100000 -0.100000
v -0.099999 0.100000 -0.100000
v -0.099999 0.100000 0.100000
v -0.500000 0.100000 -0.100000
v -0.500000 0.100000 0.100000
v -0.500000 -0.100000 -0.100000
v -0.500000 -0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 1.0000 0.0000 0.0000
vn -0.0000 1.0000 0.0000
vn -1.0000 -0.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn -0.0000 0.0000 1.0000
vn -0.0000 0.0000 -1.0000
usemtl None.001
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_north_up.mtl
o Grinder_Cube_Cube.005
v -0.100000 0.100000 0.100000
v -0.100000 -0.100000 0.100000
v -0.100000 -0.100000 -0.100000
v -0.100000 0.100000 -0.100000
v -0.500000 -0.100000 -0.100000
v -0.500000 0.100000 -0.100000
v -0.500000 -0.100000 0.100000
v -0.500000 0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 -1.0000 -0.0000
usemtl None.005
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.004
v 0.100000 0.500000 0.100000
v 0.100000 0.500000 -0.100000
v -0.100000 0.500000 -0.100000
v -0.100000 0.500000 0.100000
v -0.100000 -0.100000 -0.100000
v -0.100000 -0.100000 0.100000
v 0.100000 -0.100000 -0.100000
v 0.100000 -0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 1.0000 0.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 -1.0000 -0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 0.0000 0.0000 -1.0000
usemtl None.004
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_north_west.mtl
o Grinder_Cube_Cube.001
v 0.100000 0.100000 -0.500000
v 0.100000 -0.100000 -0.500000
v -0.100000 -0.100000 -0.500000
v -0.100000 0.100000 -0.500000
v -0.100000 -0.100000 0.100000
v -0.100000 0.100000 0.100000
v 0.100000 -0.100000 0.100000
v 0.100000 0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 1.0000 -0.0000 -0.0000
vn 0.0000 1.0000 0.0000
vn -0.0000 -1.0000 -0.0000
usemtl None.000
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.000
v -0.099999 0.100000 -0.100000
v -0.099999 0.100000 0.100000
v -0.099999 -0.100000 0.100000
v -0.099999 -0.100000 -0.100000
v -0.500000 -0.100000 0.100000
v -0.500000 -0.100000 -0.100000
v -0.500000 0.100000 0.100000
v -0.500000 0.100000 -0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 1.0000 -0.0000 -0.0000
vn -0.0000 -1.0000 -0.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 1.0000 0.0000
vn -0.0000 0.0000 -1.0000
vn -0.0000 -0.0000 1.0000
usemtl None.001
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_south_down.mtl
o Grinder_Cube_Cube.001
v -0.100000 -0.500000 0.100000
v -0.100000 -0.500000 -0.100000
v 0.100000 -0.500000 -0.100000
v 0.100000 -0.500000 0.100000
v 0.100000 0.100000 -0.100000
v 0.100000 0.100000 0.100000
v -0.100000 0.100000 -0.100000
v -0.100000 0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 1.0000 0.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 0.0000 0.0000 -1.0000
usemtl None.000
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.000
v 0.099999 -0.100000 0.100000
v 0.099999 0.100000 0.100000
v 0.099999 0.100000 -0.100000
v 0.099999 -0.100000 -0.100000
v 0.500000 0.100000 -0.100000
v 0.500000 -0.100000 -0.100000
v 0.500000 0.100000 0.100000
v 0.500000 -0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn -1.0000 -0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 1.0000 0.0000
usemtl None.001
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_south_east.mtl
o Grinder_Cube_Cube.001
v -0.100000 0.100000 0.500000
v -0.100000 -0.100000 0.500000
v 0.100000 -0.100000 0.500000
v 0.100000 0.100000 0.500000
v 0.100000 -0.100000 -0.100000
v 0.100000 0.100000 -0.100000
v -0.100000 -0.100000 -0.100000
v -0.100000 0.100000 -0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 0.0000 1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 -1.0000 -0.0000
usemtl None.000
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.000
v 0.099999 0.100000 0.100000
v 0.099999 0.100000 -0.100000
v 0.099999 -0.100000 -0.100000
v 0.099999 -0.100000 0.100000
v 0.500000 -0.100000 -0.100000
v 0.500000 -0.100000 0.100000
v 0.500000 0.100000 -0.100000
v 0.500000 0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn -1.0000 0.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 -1.0000
usemtl None.001
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_south_up.mtl
o Grinder_Cube_Cube.003
v 0.099999 0.100000 -0.100000
v 0.099999 -0.100000 -0.100000
v 0.099999 -0.100000 0.100000
v 0.099999 0.100000 0.100000
v 0.500000 -0.100000 0.100000
v 0.500000 0.100000 0.100000
v 0.500000 -0.100000 -0.100000
v 0.500000 0.100000 -0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn -1.0000 -0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 -1.0000 -0.0000
usemtl None.003
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.002
v -0.100000 0.500000 -0.100000
v -0.100000 0.500000 0.100000
v 0.100000 0.500000 0.100000
v 0.100000 0.500000 -0.100000
v 0.100000 -0.100000 0.100000
v 0.100000 -0.100000 -0.100000
v -0.100000 -0.100000 0.100000
v -0.100000 -0.100000 -0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -1.0000 -0.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -0.0000 1.0000
usemtl None.002
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_south_west.mtl
o Grinder_Cube_Cube.001
v -0.100000 -0.100000 -0.500000
v -0.100000 0.100000 -0.500000
v 0.100000 0.100000 -0.500000
v 0.100000 -0.100000 -0.500000
v 0.100000 0.100000 0.100000
v 0.100000 -0.100000 0.100000
v -0.100000 0.100000 0.100000
v -0.100000 -0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 -0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn -1.0000 -0.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 -0.0000
usemtl None.000
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.000
v 0.099999 -0.100000 -0.100000
v 0.099999 -0.100000 0.100000
v 0.099999 0.100000 0.100000
v 0.099999 0.100000 -0.100000
v 0.500000 0.100000 0.100000
v 0.500000 0.100000 -0.100000
v 0.500000 -0.100000 0.100000
v 0.500000 -0.100000 -0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn -1.0000 0.0000 0.0000
vn 0.0000 1.0000 -0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 -0.0000 -1.0000
vn 0.0000 0.0000 1.0000
usemtl None.001
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_west_down.mtl
o Grinder_Cube_Cube.001
v 0.100000 -0.500000 0.100000
v -0.100000 -0.500000 0.100000
v -0.100000 -0.500000 -0.100000
v 0.100000 -0.500000 -0.100000
v -0.100000 0.100000 -0.100000
v 0.100000 0.100000 -0.100000
v -0.100000 0.100000 0.100000
v 0.100000 0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn -0.0000 -1.0000 0.0000
vn 0.0000 -0.0000 -1.0000
vn 0.0000 1.0000 -0.0000
vn -0.0000 0.0000 1.0000
vn 1.0000 -0.0000 0.0000
vn -1.0000 0.0000 -0.0000
usemtl None.001
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.000
v 0.100000 -0.100000 -0.100000
v 0.100000 0.100000 -0.100000
v -0.100000 0.100000 -0.100000
v -0.100000 -0.100000 -0.100000
v -0.100000 0.100000 -0.500000
v -0.100000 -0.100000 -0.500000
v 0.100000 0.100000 -0.500000
v 0.100000 -0.100000 -0.500000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 0.0000 1.0000
vn -1.0000 0.0000 -0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 -0.0000 0.0000
vn -0.0000 -1.0000 0.0000
vn 0.0000 1.0000 -0.0000
usemtl None.000
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,93 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_west_up.mtl
o Grinder_Cube_Cube.005
v -0.100000 0.100000 -0.100000
v -0.100000 -0.100000 -0.100000
v 0.100000 -0.100000 -0.100000
v 0.100000 0.100000 -0.100000
v 0.100000 -0.100000 -0.500000
v 0.100000 0.100000 -0.500000
v -0.100000 -0.100000 -0.500000
v -0.100000 0.100000 -0.500000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 0.0000 1.0000
vn 1.0000 0.0000 -0.0000
vn 0.0000 0.0000 -1.0000
vn -1.0000 -0.0000 0.0000
vn -0.0000 1.0000 0.0000
vn 0.0000 -1.0000 0.0000
usemtl None.005
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6
o Grinder_Cube_Cube.004
v -0.100000 0.500000 0.100000
v 0.100000 0.500000 0.100000
v 0.100000 0.500000 -0.100000
v -0.100000 0.500000 -0.100000
v 0.100000 -0.100000 -0.100000
v -0.100000 -0.100000 -0.100000
v 0.100000 -0.100000 0.100000
v -0.100000 -0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn -0.0000 1.0000 0.0000
vn -0.0000 -0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 0.0000 1.0000
vn -1.0000 -0.0000 0.0000
vn 1.0000 0.0000 -0.0000
usemtl None.004
s 1
f 9/23/7 10/24/7 11/25/7 12/26/7
f 12/27/8 11/28/8 13/29/8 14/30/8
f 14/31/9 13/32/9 15/33/9 16/34/9
f 16/35/10 15/36/10 10/37/10 9/38/10
f 12/26/11 14/31/11 16/39/11 9/40/11
f 13/41/12 11/42/12 10/43/12 15/44/12

View File

@ -0,0 +1,48 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_x.mtl
o Grinder_Cube_Cube.000
v -0.500000 -0.100000 0.100000
v -0.500000 0.100000 0.100000
v -0.500000 0.100000 -0.100000
v -0.500000 -0.100000 -0.100000
v 0.500000 0.100000 -0.100000
v 0.500000 -0.100000 -0.100000
v 0.500000 0.100000 0.100000
v 0.500000 -0.100000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 1.0000 0.0000
usemtl None.001
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6

View File

@ -0,0 +1,48 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_y.mtl
o Grinder_Cube_Cube.000
v -0.100000 -0.500000 0.100000
v -0.100000 -0.500000 -0.100000
v 0.100000 -0.500000 -0.100000
v 0.100000 -0.500000 0.100000
v 0.100000 0.500000 -0.100000
v 0.100000 0.500000 0.100000
v -0.100000 0.500000 -0.100000
v -0.100000 0.500000 0.100000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 -1.0000 0.0000
vn 1.0000 -0.0000 -0.0000
vn 0.0000 1.0000 0.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn -0.0000 0.0000 -1.0000
usemtl None.001
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6

View File

@ -0,0 +1,48 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib conveyor_z.mtl
o Grinder_Cube_Cube.000
v -0.100000 -0.100000 -0.500000
v -0.100000 0.100000 -0.500000
v 0.100000 0.100000 -0.500000
v 0.100000 -0.100000 -0.500000
v 0.100000 0.100000 0.500000
v 0.100000 -0.100000 0.500000
v -0.100000 0.100000 0.500000
v -0.100000 -0.100000 0.500000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187500
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.187499
vt 0.000000 0.187500
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 -0.0000
vn 0.0000 0.0000 1.0000
vn -1.0000 -0.0000 0.0000
vn 0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 0.0000
usemtl None.001
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/4/5 6/9/5 8/17/5 1/18/5
f 5/19/6 3/20/6 2/21/6 7/22/6

View File

@ -0,0 +1,242 @@
--[[
Conveyors
Author: Droog71
License: AGPLv3
]]--
local function construct_conveyor(pos)
local meta = minetest.get_meta(pos)
local puller = meta:get_int("puller")
local puller_disp = puller == 1 and "ON" or "OFF"
meta:set_string("formspec",
"size[8,9]"..
"list[current_name;main;3,0.75;8,4;]"..
"label[3.41,0;Conveyor]" ..
"list[current_name;filter;1,2.3;8,4;]"..
"label[2,2.5;Filter (Conveyor will move this item only.)]" ..
"list[current_player;main;0,5;8,4;]" ..
"button[0.5,3.5;2,1;Puller;Puller]" ..
"label[2.5,3.7;(Pull items from non-conveyor nodes): " ..
puller_disp .. "]" ..
"listring[]"
)
meta:set_string("infotext", "Conveyor")
local inv = meta:get_inventory()
inv:set_size("main", 2*1)
inv:set_size("filter", 1*1)
end
local function receive_conveyor_fields(pos, formname, fields, sender)
for k,v in pairs(fields) do
if k == "Puller" then
local meta = minetest.get_meta(pos)
local puller = meta:get_int("puller")
local i = puller == 1 and 0 or 1
local puller_disp = i == 1 and "ON" or "OFF"
meta:set_int("puller", i)
meta:set_string("formspec",
"size[8,9]"..
"list[current_name;main;3,0.75;8,4;]"..
"label[3.41,0;Conveyor]" ..
"list[current_name;filter;1,2.3;8,4;]"..
"label[2,2.5;Filter (Conveyor will move this item only.)]" ..
"list[current_player;main;0,5;8,4;]" ..
"button[0.5,3.5;2,1;Puller;Puller]" ..
"label[2.5,3.7;(Pull items from non-conveyor nodes): " ..
puller_disp .. "]" ..
"listring[]")
end
end
end
minetest.register_node("moontest_conveyors:conveyor", {
description = ("Conveyor\nUsed to move items from one location to another."),
tiles = {"conveyor.png"},
groups = {dig_immediate=2},
on_construct = function(pos)
construct_conveyor(pos)
end,
on_receive_fields = function(pos, formname, fields, sender)
receive_conveyor_fields(pos, formname, fields, sender)
end
})
minetest.register_node("moontest_conveyors:conveyor_x", {
drawtype = "mesh",
mesh = "conveyor_x.obj",
description = ("Conveyor"),
tiles = {"conveyor.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_y", {
drawtype = "mesh",
mesh = "conveyor_y.obj",
description = ("Conveyor"),
tiles = {"conveyor.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_z", {
drawtype = "mesh",
mesh = "conveyor_z.obj",
description = ("Conveyor"),
tiles = {"conveyor.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_north_up", {
drawtype = "mesh",
mesh = "conveyor_north_up.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_south_up", {
drawtype = "mesh",
mesh = "conveyor_south_up.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_east_up", {
drawtype = "mesh",
mesh = "conveyor_east_up.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_west_up", {
drawtype = "mesh",
mesh = "conveyor_west_up.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end,
})
minetest.register_node("moontest_conveyors:conveyor_north_down", {
drawtype = "mesh",
mesh = "conveyor_north_down.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_south_down", {
drawtype = "mesh",
mesh = "conveyor_south_down.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_east_down", {
drawtype = "mesh",
mesh = "conveyor_east_down.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_west_down", {
drawtype = "mesh",
mesh = "conveyor_west_down.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_south_east", {
drawtype = "mesh",
mesh = "conveyor_south_east.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_south_west", {
drawtype = "mesh",
mesh = "conveyor_south_west.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_north_east", {
drawtype = "mesh",
mesh = "conveyor_north_east.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})
minetest.register_node("moontest_conveyors:conveyor_north_west", {
drawtype = "mesh",
mesh = "conveyor_north_west.obj",
description = ("Conveyor"),
tiles = {"conveyor_corner.png"},
groups = {dig_immediate=2, not_in_creative_inventory = 1},
drop = "moontest_conveyors:conveyor",
on_construct = function(pos)
construct_conveyor(pos)
end
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

View File

@ -6,14 +6,14 @@
]]--
--flashlight
minetest.register_craftitem("work_lights:flashlight", {
minetest.register_craftitem("moontest_lights:flashlight", {
description = "Flashlight.",
inventory_image = "flashlight.png",
light_source = 14
})
--work light on
minetest.register_node("work_lights:work_light_on", {
minetest.register_node("moontest_lights:work_light_on", {
name = "work_light_on",
description = "Work Light\nMust be placed within 10 meters of a generator.",
tiles = {"work_light_tex.png"},
@ -22,7 +22,7 @@ minetest.register_node("work_lights:work_light_on", {
inventory_image = "work_light_inv.png",
paramtype2="facedir",
groups = {dig_immediate=2},
drop = "work_lights:work_light_off",
drop = "moontest_lights:work_light_off",
light_source = 14,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
for i,p in pairs(power_consumers) do
@ -35,7 +35,7 @@ minetest.register_node("work_lights:work_light_on", {
})
--work light off
minetest.register_node("work_lights:work_light_off", {
minetest.register_node("moontest_lights:work_light_off", {
name = "work_light_off",
description = "Work Light\nRequires a solar panel and a logical switch to operate.",
tiles = {"work_light_tex.png"},
@ -48,28 +48,28 @@ minetest.register_node("work_lights:work_light_off", {
--work_light_on abm
minetest.register_abm({
nodenames = {"work_lights:work_light_on"},
nodenames = {"moontest_lights:work_light_on"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
if is_consumer(pos) == false then
table.insert(power_consumers, pos)
elseif power_stable(pos) == false then
minetest.set_node(pos, { name = "work_lights:work_light_off" })
minetest.set_node(pos, { name = "moontest_lights:work_light_off" })
end
end
})
--work_light_off abm
minetest.register_abm({
nodenames = {"work_lights:work_light_off"},
nodenames = {"moontest_lights:work_light_off"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
if is_consumer(pos) == false then
table.insert(power_consumers, pos)
elseif power_stable(pos) == true then
minetest.set_node(pos, { name = "work_lights:work_light_on" })
minetest.set_node(pos, { name = "moontest_lights:work_light_on" })
end
end
})

View File

@ -0,0 +1,2 @@
name = moontest_lights
depends = moontest_power

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 173 B

After

Width:  |  Height:  |  Size: 173 B

View File

@ -45,26 +45,26 @@ mesecon.queue={} -- contains the ActionQueue
mesecon.queue.funcs={} -- contains all ActionQueue functions
-- Settings
dofile(minetest.get_modpath("mesecons").."/settings.lua")
dofile(minetest.get_modpath("moontest_mesecons").."/settings.lua")
-- Utilities like comparing positions,
-- adding positions and rules,
-- mostly things that make the source look cleaner
dofile(minetest.get_modpath("mesecons").."/util.lua");
dofile(minetest.get_modpath("moontest_mesecons").."/util.lua");
-- Presets (eg default rules)
dofile(minetest.get_modpath("mesecons").."/presets.lua");
dofile(minetest.get_modpath("moontest_mesecons").."/presets.lua");
-- The ActionQueue
-- Saves all the actions that have to be execute in the future
dofile(minetest.get_modpath("mesecons").."/actionqueue.lua");
dofile(minetest.get_modpath("moontest_mesecons").."/actionqueue.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(minetest.get_modpath("mesecons").."/internal.lua");
dofile(minetest.get_modpath("moontest_mesecons").."/internal.lua");
-- API
-- these are the only functions you need to remember
@ -122,7 +122,7 @@ print("[OK] Mesecons")
-- Deprecated stuff
-- To be removed in future releases
dofile(minetest.get_modpath("mesecons").."/legacy.lua");
dofile(minetest.get_modpath("moontest_mesecons").."/legacy.lua");
--Services like turnoff receptor on dignode and so on
dofile(minetest.get_modpath("mesecons").."/services.lua");
dofile(minetest.get_modpath("moontest_mesecons").."/services.lua");

View File

@ -46,7 +46,7 @@
-- mesecon.rotate_rules_down(rules)
-- These functions return rules that have been rotated in the specific direction
local fifo_queue = dofile(minetest.get_modpath("mesecons").."/fifo_queue.lua")
local fifo_queue = dofile(minetest.get_modpath("moontest_mesecons").."/fifo_queue.lua")
-- General
function mesecon.get_effector(nodename)

View File

@ -0,0 +1 @@
name = moontest_mesecons

View File

Before

Width:  |  Height:  |  Size: 191 B

After

Width:  |  Height:  |  Size: 191 B

View File

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 144 B

View File

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 377 B

View File

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 362 B

View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -4,18 +4,18 @@
mesecon.button_turnoff = function (pos)
local node = minetest.get_node(pos)
if node.name ~= "mesecons_button:button_on" then -- has been dug
if node.name ~= "moontest_mesecons_button:button_on" then -- has been dug
return
end
minetest.swap_node(pos, {name = "mesecons_button:button_off", param2 = node.param2})
minetest.sound_play("mesecons_button_pop", { pos = pos }, true)
minetest.swap_node(pos, {name = "moontest_mesecons_button:button_off", param2 = node.param2})
minetest.sound_play("moontest_mesecons_button_pop", { pos = pos }, true)
local rules = mesecon.rules.buttonlike_get(node)
mesecon.receptor_off(pos, rules)
end
local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or nil
minetest.register_node("mesecons_button:button_off", {
minetest.register_node("moontest_mesecons_button:button_off", {
drawtype = "nodebox",
tiles = {
"jeija_wall_button_sides.png",
@ -47,7 +47,7 @@ minetest.register_node("mesecons_button:button_off", {
groups = {dig_immediate=2, mesecon_needs_receiver = 1},
description = "Button\n" .. "Momentarily energizes a logic circuit.",
on_rightclick = function (pos, node)
minetest.swap_node(pos, {name = "mesecons_button:button_on", param2=node.param2})
minetest.swap_node(pos, {name = "moontest_mesecons_button:button_on", param2=node.param2})
mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node))
minetest.sound_play("mesecons_button_push", { pos = pos }, true)
minetest.get_node_timer(pos):start(1)
@ -60,7 +60,7 @@ minetest.register_node("mesecons_button:button_off", {
on_blast = mesecon.on_blastnode,
})
minetest.register_node("mesecons_button:button_on", {
minetest.register_node("moontest_mesecons_button:button_on", {
drawtype = "nodebox",
tiles = {
"jeija_wall_button_sides.png",
@ -91,7 +91,7 @@ minetest.register_node("mesecons_button:button_on", {
}
},
groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
drop = 'mesecons_button:button_off',
drop = 'moontest_mesecons_button:button_off',
description = "Button",
sounds = nil,
mesecons = {receptor = {
@ -103,7 +103,7 @@ minetest.register_node("mesecons_button:button_on", {
})
minetest.register_craft({
output = "mesecons_button:button_off 2",
output = "moontest_mesecons_button:button_off 2",
recipe = {
{"group:mesecon_conductor_craftable","default:stone"},
}

View File

@ -0,0 +1,2 @@
name = moontest_mesecons_button
depends = moontest_mesecons, moontest_mesecons_receiver

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -71,7 +71,7 @@ local def = {
delayer_time = delaytime[i],
sounds = nil,
on_blast = mesecon.on_blastnode,
drop = "mesecons_delayer:delayer_off_1",
drop = "moontest_mesecons_delayer:delayer_off_1",
}
-- Deactivated delayer definition defaults
@ -100,11 +100,11 @@ local off_state = {
end
minetest.swap_node(pos, {
name = "mesecons_delayer:delayer_off_"..tostring(i % 4 + 1),
name = "moontest_mesecons_delayer:delayer_off_"..tostring(i % 4 + 1),
param2 = node.param2
})
end,
delayer_onstate = "mesecons_delayer:delayer_on_"..tostring(i),
delayer_onstate = "moontest_mesecons_delayer:delayer_on_"..tostring(i),
mesecons = {
receptor =
{
@ -121,7 +121,7 @@ local off_state = {
for k, v in pairs(def) do
off_state[k] = off_state[k] or v
end
minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), off_state)
minetest.register_node("moontest_mesecons_delayer:delayer_off_"..tostring(i), off_state)
-- Activated delayer definition defaults
local on_state = {
@ -141,11 +141,11 @@ local on_state = {
end
minetest.swap_node(pos, {
name = "mesecons_delayer:delayer_on_"..tostring(i % 4 + 1),
name = "moontest_mesecons_delayer:delayer_on_"..tostring(i % 4 + 1),
param2 = node.param2
})
end,
delayer_offstate = "mesecons_delayer:delayer_off_"..tostring(i),
delayer_offstate = "moontest_mesecons_delayer:delayer_off_"..tostring(i),
mesecons = {
receptor =
{
@ -162,14 +162,14 @@ local on_state = {
for k, v in pairs(def) do
on_state[k] = on_state[k] or v
end
minetest.register_node("mesecons_delayer:delayer_on_"..tostring(i), on_state)
minetest.register_node("moontest_mesecons_delayer:delayer_on_"..tostring(i), on_state)
end
minetest.register_craft({
output = "mesecons_delayer:delayer_off_1",
output = "moontest_mesecons_delayer:delayer_off_1",
recipe = {
{"mesecons_torch:mesecon_torch_on", "group:mesecon_conductor_craftable", "mesecons_torch:mesecon_torch_on"},
{"moontest_mesecons_torch:mesecon_torch_on", "group:mesecon_conductor_craftable", "moontest_mesecons_torch:mesecon_torch_on"},
{"default:cobble","default:cobble", "default:cobble"},
}
})

View File

@ -0,0 +1,2 @@
name = moontest_mesecons_delayer
depends = moontest_mesecons

Some files were not shown because too many files have changed in this diff Show More