Compare commits
5 Commits
1d2c04601a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2bf8f0a310 | |||
| 57c1726644 | |||
| f961ababa4 | |||
| 56ae31acdf | |||
| b8eb6ca667 |
@@ -1,2 +0,0 @@
|
|||||||
default
|
|
||||||
digilines
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
-- Original Digiboard mod by bas080
|
|
||||||
-- Cracked by jogag
|
|
||||||
-- Added features: settable channel, no more minetest.env, settable field caption (via digiline)
|
|
||||||
|
|
||||||
minetest.register_node("digiboard:keyboard", {
|
|
||||||
description = "Digiboard",
|
|
||||||
tiles = {"keyboard_top.png", "keyboard_bottom.png", "keyboard_side.png", "keyboard_side.png", "keyboard_side.png", "keyboard_side.png"},
|
|
||||||
walkable = true,
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-4/8, -4/8, 0, 4/8, -3/8, 4/8},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-4/8, -4/8, 0, 4/8, -3/8, 4/8},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
digiline = { receptor = {},
|
|
||||||
effector = {
|
|
||||||
action = function(pos, node, channel, msg)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
if channel == meta:get_string("channel") then
|
|
||||||
meta:set_string("formspec", "field[text;"..msg..";]")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
},
|
|
||||||
},
|
|
||||||
groups = {choppy = 3, dig_immediate = 2},
|
|
||||||
on_construct = function(pos)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
meta:set_string("formspec", "field[channel;Channel;]")
|
|
||||||
meta:set_string("infotext", "Keyboard")
|
|
||||||
meta:set_int("lines", 0)
|
|
||||||
end,
|
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
local channel = meta:get_string("channel")
|
|
||||||
if fields.channel then
|
|
||||||
meta:set_string("channel", fields.channel)
|
|
||||||
meta:set_string("formspec", "field[text;Enter text;]")
|
|
||||||
elseif fields.text then
|
|
||||||
digiline:receptor_send(pos, digiline.rules.default, channel, fields.text)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
Before Width: | Height: | Size: 218 B |
|
Before Width: | Height: | Size: 209 B |
|
Before Width: | Height: | Size: 251 B |
@@ -1,64 +0,0 @@
|
|||||||
|
|
||||||
-- Created by jogag
|
|
||||||
-- Part of the Digiline Stuff pack
|
|
||||||
-- Mod: crafting recipes for all devices
|
|
||||||
-- Also adds recipes for RTC and Lightsensor
|
|
||||||
|
|
||||||
------------------------------
|
|
||||||
-- DIGILINE BUILTIN DEVICES --
|
|
||||||
------------------------------
|
|
||||||
|
|
||||||
-- RTC
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "digilines_rtc:rtc 2",
|
|
||||||
recipe = {
|
|
||||||
{ "default:steel_ingot" },
|
|
||||||
{ "mesecons_materials:silicon" },
|
|
||||||
{ "digilines:wire_std_00000000" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Light sensor
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "digilines_lightsensor:lightsensor 2",
|
|
||||||
recipe = {
|
|
||||||
{ "homedecor:plastic", "default:glass" },
|
|
||||||
{ "", "mesecons_materials:silicon" },
|
|
||||||
{ "", "digilines:wire_std_00000000" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-------------------------
|
|
||||||
-- DIGILINE STUFF PACK --
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
-- Memory chip (16 spaces)
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "digilines_memory:memory_1",
|
|
||||||
recipe = {
|
|
||||||
{ "mesecons_materials:silicon", "mesecons_materials:silicon", "mesecons_materials:silicon" },
|
|
||||||
{ "group:mesecon_conductor_craftable", "default:mese_crystal_fragment", "group:mesecon_conductor_craftable" },
|
|
||||||
{ "mesecons_materials:fiber", "digilines:wire_std_00000000", "mesecons_materials:fiber" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Weather sensor
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "digilines_weather_sensor:sensor 2",
|
|
||||||
recipe = {
|
|
||||||
{ "default:stick" },
|
|
||||||
{ "mesecons_materials:silicon" },
|
|
||||||
{ "digilines:wire_std_00000000" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Digiprinter
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "digiprinter:printer",
|
|
||||||
recipe = {
|
|
||||||
{ "homedecor:plastic_sheeting", "", "" },
|
|
||||||
{ "digilines:wire_std_00000000", "default:mese_crystal", "homedecor:plastic_sheeting" },
|
|
||||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
digilines
|
|
||||||
@@ -91,14 +91,4 @@ for i, s in ipairs(MEMORY_CHIPS) do
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
if i ~= 1 then
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = "digilines_memory:memory_"..i,
|
|
||||||
recipe = {
|
|
||||||
"digilines_memory:memory_"..(i - 1),
|
|
||||||
"digilines_memory:memory_"..(i - 1),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
2
digilines_memory/mod.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
name=digilines_memory
|
||||||
|
depends=digilines
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
digilines
|
|
||||||
weather
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
|
|
||||||
-- Created by jogag
|
|
||||||
-- Part of the Digiline Stuff pack
|
|
||||||
-- Mod: digiline rain sensor
|
|
||||||
-- Compatible with Weather mod and my own Weather+ mod
|
|
||||||
-- Send "GET" to obtain the current weather (none, rain, snow, error)
|
|
||||||
-- If you get "error" is because the weather mod is not installed
|
|
||||||
|
|
||||||
local GET_CMD = "GET"
|
|
||||||
|
|
||||||
local ERR_MSG = "none"
|
|
||||||
|
|
||||||
-- all taken from digiline lightsensor mod
|
|
||||||
local wsensor_nodebox =
|
|
||||||
{
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{ -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, -- bottom slab
|
|
||||||
|
|
||||||
{ -7/16, -7/16, -7/16, -4/16, -5/16, 7/16 }, -- bonds
|
|
||||||
{ 4/16, -7/16, -7/16, 7/16, -5/16, 7/16 },
|
|
||||||
{ -7/16, -7/16, -7/16, 7/16, -5/16, -4/16 },
|
|
||||||
{ -7/16, -7/16, 4/16, 7/16, -5/16, 7/16 },
|
|
||||||
|
|
||||||
{ -1/16, -7/16, -1/16, 1/16, -5/16, 1/16 }, -- pin thing in the middle
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local wsensor_selbox =
|
|
||||||
{
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {{ -8/16, -8/16, -8/16, 8/16, -3/16, 8/16 }}
|
|
||||||
}
|
|
||||||
|
|
||||||
local on_digiline_receive = function (pos, node, channel, msg)
|
|
||||||
local setchan = minetest.get_meta(pos):get_string("channel")
|
|
||||||
if channel == setchan and msg == GET_CMD then
|
|
||||||
local value = weather and tostring(weather) or ERR_MSG
|
|
||||||
digiline:receptor_send(pos, digiline.rules.default, channel, value)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_node("digilines_weather_sensor:sensor", {
|
|
||||||
description = "Digiline Rain Sensor",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {"digilines_weather_sensor.png"},
|
|
||||||
|
|
||||||
paramtype = "light",
|
|
||||||
groups = {dig_immediate=2},
|
|
||||||
selection_box = wsensor_selbox,
|
|
||||||
node_box = wsensor_nodebox,
|
|
||||||
digiline = {
|
|
||||||
receptor = {},
|
|
||||||
effector = { action = on_digiline_receive },
|
|
||||||
},
|
|
||||||
on_construct = function(pos)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
|
||||||
end,
|
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
|
||||||
if fields.channel then minetest.get_meta(pos):set_string("channel", fields.channel) end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 158 B |
@@ -1,2 +0,0 @@
|
|||||||
digilines
|
|
||||||
memorandum
|
|
||||||
@@ -81,10 +81,10 @@ minetest.register_node("digiprinter:printer", {
|
|||||||
tiles = {"digiprinter_t.png","digiprinter_bt.png","digiprinter_l.png",
|
tiles = {"digiprinter_t.png","digiprinter_bt.png","digiprinter_l.png",
|
||||||
"digiprinter_r.png","digiprinter_b.png","digiprinter_f.png"},
|
"digiprinter_r.png","digiprinter_b.png","digiprinter_f.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
use_texture_alpha = "clip",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = true,
|
walkable = true,
|
||||||
groups = {snappy=3},
|
groups = {snappy=3},
|
||||||
sound = default.node_sound_wood_defaults(),
|
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@@ -127,7 +127,7 @@ minetest.register_node("digiprinter:printer", {
|
|||||||
end,
|
end,
|
||||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
if minetest.is_protected(pos, player:get_player_name()) then return 0 end
|
if minetest.is_protected(pos, player:get_player_name()) then return 0 end
|
||||||
return (stack:get_name() == "default:paper" and stack:get_count() or 0)
|
return (stack:get_name() == "memorandum:paper" and stack:get_count() or 0)
|
||||||
end,
|
end,
|
||||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
return (minetest.get_meta(pos):get_string("infotext"):find("Busy") and stack:get_count() or 0)
|
return (minetest.get_meta(pos):get_string("infotext"):find("Busy") and stack:get_count() or 0)
|
||||||
@@ -135,20 +135,4 @@ minetest.register_node("digiprinter:printer", {
|
|||||||
can_dig = function(pos, player)
|
can_dig = function(pos, player)
|
||||||
return minetest.get_meta(pos):get_inventory():is_empty("paper")
|
return minetest.get_meta(pos):get_inventory():is_empty("paper")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- printer crafting:
|
|
||||||
-- +-------+
|
|
||||||
-- | ? P ? |
|
|
||||||
-- | ? M ? |
|
|
||||||
-- | ? D ? |
|
|
||||||
-- +-------+
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "digiprinter:printer",
|
|
||||||
recipe = {
|
|
||||||
{ "homedecor", "default:paper", "" },
|
|
||||||
{ "", "default:mese_crystal", "" },
|
|
||||||
{ "", "digilines:wire_std_000000", "" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
2
digiprinter/mod.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
name=digiprinter
|
||||||
|
depends=digilines, memorandum
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
|
|
||||||
-- Created by jogag
|
|
||||||
-- Part of the Digiline Stuff pack
|
|
||||||
-- Mod: Plastic from homedecor, if homedecor is not installed :)
|
|
||||||
-- + Also checks for pipeworks!
|
|
||||||
|
|
||||||
-- Texture license: from VanessaE, WTFPL
|
|
||||||
|
|
||||||
if not minetest.get_modpath("homedecor") and not minetest.get_modpath("pipeworks") then
|
|
||||||
|
|
||||||
minetest.register_craftitem(":homedecor:oil_extract", {
|
|
||||||
description = "Oil extract",
|
|
||||||
inventory_image = "homedecor_oil_extract.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem(":homedecor:paraffin", {
|
|
||||||
description = "Unprocessed paraffin",
|
|
||||||
inventory_image = "homedecor_paraffin.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_alias("homedecor:plastic_base", "homedecor:paraffin")
|
|
||||||
|
|
||||||
minetest.register_craftitem(":homedecor:plastic_sheeting", {
|
|
||||||
description = "Plastic sheet",
|
|
||||||
inventory_image = "homedecor_plastic_sheeting.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = "homedecor:oil_extract 6",
|
|
||||||
recipe = { "default:junglegrass",
|
|
||||||
"default:junglegrass",
|
|
||||||
"default:junglegrass"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = "homedecor:oil_extract 3",
|
|
||||||
recipe = { "default:dry_shrub",
|
|
||||||
"default:dry_shrub",
|
|
||||||
"default:dry_shrub"
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = "homedecor:oil_extract 4",
|
|
||||||
recipe = { "default:leaves",
|
|
||||||
"default:leaves",
|
|
||||||
"default:leaves",
|
|
||||||
"default:leaves",
|
|
||||||
"default:leaves",
|
|
||||||
"default:leaves"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
output = "homedecor:paraffin",
|
|
||||||
recipe = "homedecor:oil_extract",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "homedecor:paraffin",
|
|
||||||
burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "homedecor:plastic_sheeting",
|
|
||||||
burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_alias("pipeworks:oil_extract", "homedecor:oil_extract")
|
|
||||||
minetest.register_alias("pipeworks:paraffin", "homedecor:paraffin")
|
|
||||||
minetest.register_alias("pipeworks:plastic_sheeting", "homedecor:plastic_sheeting")
|
|
||||||
end
|
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 345 B |
|
Before Width: | Height: | Size: 293 B |