Add lots of craft items; update textures, names, roadmap
@ -7,9 +7,10 @@ High Priority:
|
||||
- Mesecons compat
|
||||
|
||||
Medium Priority
|
||||
- inv_plus compatibility
|
||||
- Lava Furnace inv_plus recpies
|
||||
- Autocrafter
|
||||
- Network Crafter
|
||||
- Enable translation for all strings
|
||||
- Add crafting grid to Access Point
|
||||
|
||||
Low Priority:
|
||||
|
@ -62,7 +62,7 @@ minetest.register_on_player_receive_fields(logistica.on_receive_access_point_for
|
||||
-- `simpleName` is used for the description and for the name (can contain spaces)
|
||||
function logistica.register_access_point(desc, name, tiles)
|
||||
local lname = string.lower(name:gsub(" ", "_"))
|
||||
local access_point_name = "logistica:access_point_"..lname
|
||||
local access_point_name = "logistica:"..lname
|
||||
logistica.misc_machines[access_point_name] = true
|
||||
local grps = {oddly_breakable_by_hand = 3, cracky = 3 }
|
||||
grps[logistica.TIER_ALL] = 1
|
||||
|
@ -1,31 +1,32 @@
|
||||
|
||||
|
||||
-- todo: rework this to make tiers not tied to cable name and to be optional
|
||||
|
||||
-- Main function to register a new cable of certain tier
|
||||
function logistica.register_cable(tier, size)
|
||||
local ltier = string.lower(tier)
|
||||
local cable_name = "logistica:" .. ltier .. "_cable"
|
||||
local cable_group = logistica.get_cable_group(ltier)
|
||||
logistica.cables[cable_name] = tier
|
||||
logistica.tiers[ltier] = true
|
||||
-- customNodeBox can specify any of the fixed/connect_DIR - values will be overwritten per-item basis
|
||||
function logistica.register_cable(desc, name, size, customNodeBox)
|
||||
local lname = string.lower(name)
|
||||
local cable_name = "logistica:" .. lname
|
||||
local cable_group = logistica.get_cable_group(lname)
|
||||
logistica.cables[cable_name] = name
|
||||
logistica.tiers[lname] = true
|
||||
local cnb = customNodeBox or {}
|
||||
|
||||
local node_box = {
|
||||
type = "connected",
|
||||
fixed = { -size, -size, -size, size, size, size },
|
||||
connect_top = { -size, -size, -size, size, 0.5, size }, -- y+
|
||||
connect_bottom = { -size, -0.5, -size, size, size, size }, -- y-
|
||||
connect_front = { -size, -size, -0.5, size, size, size }, -- z-
|
||||
connect_back = { -size, -size, size, size, size, 0.5 }, -- z+
|
||||
connect_left = { -0.5, -size, -size, size, size, size }, -- x-
|
||||
connect_right = { -size, -size, -size, 0.5, size, size }, -- x+
|
||||
fixed = cnb.fixed or { -size, -size, -size, size, size, size },
|
||||
connect_top = cnb.connect_top or { -size, -size, -size, size, 0.5, size }, -- y+
|
||||
connect_bottom = cnb.connect_bottom or { -size, -0.5, -size, size, size, size }, -- y-
|
||||
connect_front = cnb.connect_front or { -size, -size, -0.5, size, size, size }, -- z-
|
||||
connect_back = cnb.connect_back or { -size, -size, size, size, size, 0.5 }, -- z+
|
||||
connect_left = cnb.connect_left or { -0.5, -size, -size, size, size, size }, -- x-
|
||||
connect_right = cnb.connect_right or { -size, -size, -size, 0.5, size, size }, -- x+
|
||||
}
|
||||
|
||||
local def = {
|
||||
description = tier .. " Cable",
|
||||
tiles = { "logistica_" .. ltier .. "_cable.png" },
|
||||
inventory_image = "logistica_" .. ltier .. "_cable_inv.png",
|
||||
wield_image = "logistica_" .. ltier .. "_cable_inv.png",
|
||||
description = desc,
|
||||
tiles = { "logistica_" .. lname .. "_cable.png" },
|
||||
inventory_image = "logistica_" .. lname .. "_cable_inv.png",
|
||||
wield_image = "logistica_" .. lname .. "_cable_inv.png",
|
||||
groups = {
|
||||
cracky = 3,
|
||||
choppy = 3,
|
||||
@ -35,10 +36,11 @@ function logistica.register_cable(tier, size)
|
||||
sounds = logistica.node_sound_metallic(),
|
||||
drop = cable_name,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "nodebox",
|
||||
node_box = node_box,
|
||||
connects_to = { "group:" .. cable_group, "group:"..logistica.get_machine_group(ltier), logistica.GROUP_ALL },
|
||||
connects_to = { "group:" .. cable_group, "group:"..logistica.get_machine_group(lname), logistica.GROUP_ALL },
|
||||
on_construct = function(pos) logistica.on_cable_change(pos, nil) end,
|
||||
after_destruct = function(pos, oldnode) logistica.on_cable_change(pos, oldnode) end,
|
||||
}
|
||||
@ -47,10 +49,10 @@ function logistica.register_cable(tier, size)
|
||||
|
||||
local def_broken = {}
|
||||
for k, v in pairs(def) do def_broken[k] = v end
|
||||
def_broken.tiles = { "logistica_" .. ltier .. "_cable.png^logistica_broken.png" }
|
||||
def_broken.inventory_image = "logistica_" .. ltier .. "_cable_inv.png^logistica_broken.png"
|
||||
def_broken.tiles = { "logistica_" .. lname .. "_cable.png^logistica_broken.png" }
|
||||
def_broken.inventory_image = "logistica_" .. lname .. "_cable_inv.png^logistica_broken.png"
|
||||
def_broken.groups = { cracky = 3, choppy = 3, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1 }
|
||||
def_broken.description = "Broken " .. tier .. " Cable"
|
||||
def_broken.description = "Broken " .. desc
|
||||
def_broken.node_box = { type = "fixed", fixed = { -0.5, -size, -size, 0.5, size, size } }
|
||||
def_broken.selection_box = def_broken.node_box
|
||||
def_broken.connects_to = nil
|
||||
|
@ -116,7 +116,7 @@ minetest.register_on_player_receive_fields(on_player_receive_fields)
|
||||
-- transferRate is how many items per tick this injector can transfer, -1 for unlimited
|
||||
function logistica.register_injector(description, name, transferRate, tiles)
|
||||
local lname = string.lower(name:gsub(" ", "_"))
|
||||
local injectorName = "logistica:injector_"..lname
|
||||
local injectorName = "logistica:"..lname
|
||||
logistica.injectors[injectorName] = true
|
||||
local grps = {oddly_breakable_by_hand = 3, cracky = 3 }
|
||||
grps[logistica.TIER_ALL] = 1
|
||||
|
@ -100,7 +100,7 @@ minetest.register_on_player_receive_fields(on_player_receive_fields)
|
||||
-- `simpleName` is used for the description and for the name (can contain spaces)
|
||||
function logistica.register_item_storage(desc, name, tiles)
|
||||
local lname = string.lower(name:gsub(" ", "_"))
|
||||
local item_storage_name = "logistica:item_storage_"..lname
|
||||
local item_storage_name = "logistica:"..lname
|
||||
logistica.item_storage[item_storage_name] = true
|
||||
local grps = {oddly_breakable_by_hand = 3, cracky = 3 }
|
||||
grps[logistica.TIER_ALL] = 1
|
||||
|
@ -331,7 +331,7 @@ minetest.register_on_player_receive_fields(on_receive_storage_formspec)
|
||||
|
||||
function logistica.register_mass_storage(simpleName, description, numSlots, numItemsPerSlot, numUpgradeSlots, tiles)
|
||||
local lname = string.lower(string.gsub(simpleName, " ", "_"))
|
||||
local storageName = "logistica:mass_storage_"..lname
|
||||
local storageName = "logistica:"..lname
|
||||
local grps = {cracky = 1, choppy = 1, oddly_breakable_by_hand = 1}
|
||||
numUpgradeSlots = logistica.clamp(numUpgradeSlots, 0, 4)
|
||||
grps[logistica.TIER_ALL] = 1
|
||||
|
@ -117,7 +117,7 @@ minetest.register_on_player_receive_fields(on_player_receive_fields)
|
||||
-- transferRate is how many items per tick this requester can transfer, -1 for unlimited
|
||||
function logistica.register_requester(description, name, transferRate, tiles)
|
||||
local lname = string.lower(name:gsub(" ", "_"))
|
||||
local requester_name = "logistica:requester_"..lname
|
||||
local requester_name = "logistica:"..lname
|
||||
logistica.requesters[requester_name] = true
|
||||
local grps = {oddly_breakable_by_hand = 3, cracky = 3 }
|
||||
grps[logistica.TIER_ALL] = 1
|
||||
|
@ -95,7 +95,7 @@ minetest.register_on_player_receive_fields(on_player_receive_fields)
|
||||
-- `inventorySize` should be 16 at max
|
||||
function logistica.register_supplier(desc, name, inventorySize, tiles)
|
||||
local lname = string.lower(name:gsub(" ", "_"))
|
||||
local supplier_name = "logistica:passive_supplier_"..lname
|
||||
local supplier_name = "logistica:"..lname
|
||||
logistica.suppliers[supplier_name] = true
|
||||
local grps = {oddly_breakable_by_hand = 3, cracky = 3 }
|
||||
grps[logistica.TIER_ALL] = 1
|
||||
|
@ -1,31 +1,53 @@
|
||||
local S = logistica.TRANSLATOR
|
||||
local L = function(str) return "logistica:"..str end
|
||||
|
||||
logistica.craftitem.general = {}
|
||||
local items = logistica.craftitem.general
|
||||
|
||||
items["logistica:lava_unit"] = {
|
||||
items[L("lava_unit")] = {
|
||||
description = S("A Unit of Lava\nUse in Lava Furnace or with Empty Bucket"),
|
||||
inventory_image = "logistica_lava_unit.png",
|
||||
stack_max = 1,
|
||||
}
|
||||
|
||||
items["logistica:silverin_slice"] = {
|
||||
items[L("silverin_slice")] = {
|
||||
description = S("Silverin Slice"),
|
||||
inventory_image = "logistica_silverin_slice.png",
|
||||
stack_max = 99,
|
||||
}
|
||||
|
||||
-- items["logistica:silverin_photonizer"] = {
|
||||
-- description = S("Silverin Phonizer"),
|
||||
-- inventory_image = "logistica_silverin_slice.png",
|
||||
-- stack_max = 99,
|
||||
-- }
|
||||
|
||||
-- items["logistica:silverin_wavebox"] = {
|
||||
-- description = S("Standing-Wave State Maintainer"),
|
||||
-- inventory_image = "logistica_silverin_slice.png",
|
||||
-- stack_max = 99,
|
||||
-- }
|
||||
|
||||
items[L("silverin_circuit")] = {
|
||||
description = S("A Silverin Circuit"),
|
||||
inventory_image = "logistica_silverin_circuit.png",
|
||||
stack_max = 99,
|
||||
}
|
||||
|
||||
items[L("silverin_mirror_box")] = {
|
||||
description = S("Silverin Mirror Box"),
|
||||
inventory_image = "logistica_silverin_mirror_box.png",
|
||||
stack_max = 99,
|
||||
}
|
||||
|
||||
items[L("photonizer")] = {
|
||||
description = S("Photonizer\nE = M*C^2"),
|
||||
inventory_image = "logistica_photonizer.png",
|
||||
stack_max = 99,
|
||||
}
|
||||
|
||||
items[L("photonizer_reversed")] = {
|
||||
description = S("Photonizer (Inverted Polarity)\nM = E/C^2"),
|
||||
inventory_image = "logistica_photonizer_reversed.png",
|
||||
stack_max = 99,
|
||||
}
|
||||
|
||||
items[L("standing_wave_box")] = {
|
||||
description = S("Wave Function Maintainer"),
|
||||
inventory_image = "logistica_standing_wave_box.png",
|
||||
stack_max = 99,
|
||||
}
|
||||
|
||||
|
||||
for name, info in pairs(items) do
|
||||
minetest.register_craftitem(name, {
|
||||
|
@ -20,6 +20,7 @@ items["logistica:silverin"] = {
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -34,13 +35,30 @@ items["logistica:silverin"] = {
|
||||
stack_max = 99,
|
||||
}
|
||||
|
||||
items["logistica:silverin_plate"] = {
|
||||
tiles = { "logistica_silverin_plate.png" },
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.50, -0.50, -0.50, 0.50, -7/16, 0.50}
|
||||
}
|
||||
},
|
||||
groups = { cracky = 2 },
|
||||
sounds = logistica.node_sound_metallic(),
|
||||
description = S("Silverin Plate"),
|
||||
inventory_image = "logistica_silverin_plate_inv.png",
|
||||
stack_max = 99,
|
||||
}
|
||||
|
||||
-- items["logistica:silverin_block"] = {
|
||||
-- description = S("Silverin Block"),
|
||||
-- inventory_image = "logistica_storage_upgrade_1.png",
|
||||
-- tiles = "logistica_silverin_plate.png",
|
||||
-- stack_max = 99,
|
||||
-- }
|
||||
|
||||
|
||||
for name, def in pairs(items) do
|
||||
minetest.register_node(name, def)
|
||||
end
|
27
registration/item_recipes.lua
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
local function L(s) return "logistica:"..s end
|
||||
local SILV = L("silverin")
|
||||
local SILV_SLICE = L("silverin_slice")
|
||||
|
||||
minetest.register_craft({
|
||||
output = SILV_SLICE.." 8",
|
||||
type = "shapeless",
|
||||
recipe = { SILV },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = SILV,
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
SILV_SLICE, SILV_SLICE, SILV_SLICE, SILV_SLICE,
|
||||
SILV_SLICE, SILV_SLICE, SILV_SLICE, SILV_SLICE
|
||||
},
|
||||
})
|
||||
|
||||
-- minetest.register_craft({
|
||||
-- output = L("network_tool"),
|
||||
-- recipe = {
|
||||
|
||||
-- }
|
||||
-- })
|
||||
|
@ -2,7 +2,7 @@
|
||||
-- Access Point
|
||||
--------------------------------
|
||||
|
||||
logistica.register_access_point("Access Point", "base", {
|
||||
logistica.register_access_point("Access Point", "access_point", {
|
||||
"logistica_access_point_top.png",
|
||||
"logistica_access_point_bottom.png",
|
||||
"logistica_access_point_side.png^[transformFX",
|
||||
@ -16,8 +16,13 @@ logistica.register_access_point("Access Point", "base", {
|
||||
--------------------------------
|
||||
|
||||
local CABLE_SIZE = 1/16
|
||||
logistica.register_cable("Silver", CABLE_SIZE)
|
||||
|
||||
logistica.register_cable("Optic cable", "optic", CABLE_SIZE)
|
||||
-- TODO: plate + cable = masked cable
|
||||
-- logistica.register_cable("Optic cable", "optic_wall", CABLE_SIZE, {
|
||||
-- fixed = {
|
||||
-- { -CABLE_SIZE, -CABLE_SIZE, -CABLE_SIZE, CABLE_SIZE, CABLE_SIZE, CABLE_SIZE }
|
||||
-- }
|
||||
-- })
|
||||
--------------------------------
|
||||
-- Controller
|
||||
--------------------------------
|
||||
@ -73,14 +78,14 @@ local function imp_tiles(name) return {
|
||||
"logistica_"..name.."_injector_front.png",
|
||||
} end
|
||||
|
||||
logistica.register_injector("Slow Network Importer\nImports 10 items at a time", "slow", 10, imp_tiles("item"))
|
||||
logistica.register_injector("Fast Network Importer\nImports 99 items at a time", "fast", 99, imp_tiles("stack"))
|
||||
logistica.register_injector("Slow Network Importer\nImports 10 items at a time", "injector_slow", 10, imp_tiles("item"))
|
||||
logistica.register_injector("Fast Network Importer\nImports 99 items at a time", "injector_fast", 99, imp_tiles("stack"))
|
||||
|
||||
--------------------------------
|
||||
-- Item Storage
|
||||
--------------------------------
|
||||
|
||||
logistica.register_item_storage("Tool Box\nStores Tools Only", "simple", {
|
||||
logistica.register_item_storage("Tool Box\nStores Tools Only", "item_storage", {
|
||||
"logistica_tool_box_top.png",
|
||||
"logistica_tool_box_bottom.png",
|
||||
"logistica_tool_box_side.png^[transformFX",
|
||||
@ -93,7 +98,7 @@ logistica.register_item_storage("Tool Box\nStores Tools Only", "simple", {
|
||||
-- Mass Storage
|
||||
--------------------------------
|
||||
|
||||
logistica.register_mass_storage("basic", "Mass Storage", 8, 1024, 4, {
|
||||
logistica.register_mass_storage("mass_storage_basic", "Mass Storage", 8, 1024, 4, {
|
||||
"logistica_basic_mass_storage_top.png", "logistica_basic_mass_storage_top.png",
|
||||
"logistica_basic_mass_storage.png", "logistica_basic_mass_storage.png",
|
||||
"logistica_basic_mass_storage.png", "logistica_basic_mass_storage_front.png"
|
||||
@ -112,14 +117,14 @@ local function ins_tiles(lname) return {
|
||||
"logistica_"..lname.."_requester_front.png",
|
||||
} end
|
||||
|
||||
logistica.register_requester("Item Request Inserter\nInserts 1 item at a time", "item", 1, ins_tiles("item"))
|
||||
logistica.register_requester("Bulk Request Inserter\nInserts up to 64 items at a time", "stack", 64, ins_tiles("stack"))
|
||||
logistica.register_requester("Item Request Inserter\nInserts 1 item at a time", "requester_item", 1, ins_tiles("item"))
|
||||
logistica.register_requester("Bulk Request Inserter\nInserts up to 64 items at a time", "requester_stack", 64, ins_tiles("stack"))
|
||||
|
||||
--------------------------------
|
||||
-- Passive Supply Chest
|
||||
--------------------------------
|
||||
|
||||
logistica.register_supplier("Passive Supplier Chest", "simple", 16, {
|
||||
logistica.register_supplier("Passive Supplier Chest", "passive_supplier", 16, {
|
||||
"logistica_passive_supplier_top.png",
|
||||
"logistica_passive_supplier_bottom.png",
|
||||
"logistica_passive_supplier_side.png^[transformFX",
|
4
registration/node_recipes.lua
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
local SILV = "logistica:silverin"
|
||||
local SILV_SLICE = "logistica:silverin_slice"
|
||||
|
@ -1,4 +1,6 @@
|
||||
local path = logistica.MODPATH .. "/registration"
|
||||
-- once again, order is important
|
||||
dofile(path.."/nodes.lua")
|
||||
dofile(path.."/node_recipes.lua")
|
||||
dofile(path.."/item_recipes.lua")
|
||||
dofile(path.."/machines_api_reg.lua")
|
||||
dofile(path.."/lava_furnace_recipes.lua")
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
textures/logistica_photonizer.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/logistica_photonizer_reversed.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/logistica_silverin_circuit.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
textures/logistica_silverin_mirror_box.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
textures/logistica_silverin_plate.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
textures/logistica_silverin_plate_inv.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
textures/logistica_standing_wave_box.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
@ -1,21 +1,20 @@
|
||||
local S = logistica.TRANSLATOR
|
||||
|
||||
minetest.register_craftitem("logistica:network_tool",{
|
||||
description = S("Logistica Network Tool\nUse on a node to see network info"),
|
||||
short_description = S("Logistica Network Tool"),
|
||||
inventory_image = "logistica_network_tool.png",
|
||||
wield_image = "logistica_network_tool.png",
|
||||
minetest.register_craftitem("logistica:hyperspanner",{
|
||||
description = S("Hyperspanner\nA multipurpose engineering tool\nUse on nodes for network info.\nCan also reverse poliarity."),
|
||||
short_description = S("Hyperspanner"),
|
||||
inventory_image = "logistica_hyperspanner.png",
|
||||
wield_image = "logistica_hyperspanner.png",
|
||||
stack_max = 1,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.under
|
||||
if not placer or not pos then return end
|
||||
local node = minetest.get_node_or_nil(pos)
|
||||
if not node or node.name:find("logistica:") == nil then return end
|
||||
local network = logistica.get_network_name_or_nil(pos) or "<NONE>"
|
||||
-- minetest.chat_send_player(placer:get_player_name(), "Network: "..network)
|
||||
local network = logistica.get_network_name_or_nil(pos) or S("<NONE>")
|
||||
logistica.show_popup(
|
||||
placer:get_player_name(),
|
||||
"("..pos.x..","..pos.y..","..pos.z..") Network: "..network
|
||||
"("..pos.x..","..pos.y..","..pos.z..") .."..S("Network")..": "..network
|
||||
)
|
||||
end
|
||||
})
|
||||
|