update castle, colormachine, moreblocks, pipeworks, tpr, and digilines
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 205 KiB |
@ -9,25 +9,42 @@ Licence Models: Stuart Jones - CC-BY-SA 3.0
|
|||||||
-castle_crossbow_bolt.b3d
|
-castle_crossbow_bolt.b3d
|
||||||
-castle_crossbow_bolt.blend
|
-castle_crossbow_bolt.blend
|
||||||
|
|
||||||
--------------------------------------------
|
|
||||||
|
|
||||||
textures based on Castle mod
|
|
||||||
original textures by Philipner ???
|
|
||||||
|
|
||||||
License Textures: CC-BY-SA 3.0 ???
|
|
||||||
|
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
|
|
||||||
License Textures: Napiophelios - CC-BY-SA 3.0
|
License Textures: Kilbith - WTFPL
|
||||||
|
|
||||||
-castle_battleaxe.png
|
-castle_tapestry_overlay.png
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------
|
||||||
|
|
||||||
|
License Textures: Philipner - CC-BY-SA 3.0
|
||||||
|
|
||||||
|
-castle_chandelier.png
|
||||||
|
-castle_chandelier_chain.png
|
||||||
|
-castle_chandelier_wield.png
|
||||||
|
-castle_corner_stonewall_tb.png
|
||||||
-castle_corner_stonewall1.png
|
-castle_corner_stonewall1.png
|
||||||
-castle_corner_stonewall2.png
|
-castle_corner_stonewall2.png
|
||||||
-castle_crate.png
|
-castle_orb_day.png
|
||||||
-castle_crate_top.png
|
-castle_orb_night.png
|
||||||
|
-castle_workbench_back.png
|
||||||
|
-castle_workbench_front.png
|
||||||
|
-castle_workbench_side.png
|
||||||
|
-castle_workbench_top.png
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------
|
||||||
|
|
||||||
|
16 px textures based on Castle mod
|
||||||
|
original textures by Philipner
|
||||||
|
|
||||||
|
License Textures: Napiophelios - CC-BY-SA 3.0
|
||||||
|
|
||||||
|
-castle_battleaxe.png
|
||||||
-castle_crossbow_bolt_inv.png
|
-castle_crossbow_bolt_inv.png
|
||||||
-castle_crossbow_hit.png
|
-castle_crossbow_hit.png
|
||||||
-castle_crossbow_inv.png
|
|
||||||
-castle_crossbow_loaded.png
|
-castle_crossbow_loaded.png
|
||||||
-castle_door_jail.png
|
-castle_door_jail.png
|
||||||
-castle_door_oak.png
|
-castle_door_oak.png
|
||||||
@ -62,10 +79,6 @@ License Textures: Napiophelios - CC-BY-SA 3.0
|
|||||||
-castle_stonewall.png
|
-castle_stonewall.png
|
||||||
-castle_straw_bale.png
|
-castle_straw_bale.png
|
||||||
-castle_street_light.png
|
-castle_street_light.png
|
||||||
-castle_workbench_1.png
|
|
||||||
-castle_workbench_2.png
|
|
||||||
-castle_workbench_bottom.png
|
-castle_workbench_bottom.png
|
||||||
-castle_workbench_top.png
|
|
||||||
|
|
||||||
|
--------------------------------------------
|
||||||
--------------------------------------------
|
|
||||||
|
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 511 B After Width: | Height: | Size: 316 B |
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 682 B |
Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 691 B |
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 454 B After Width: | Height: | Size: 342 B |
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 614 B After Width: | Height: | Size: 383 B |
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 391 B |
Before Width: | Height: | Size: 548 B After Width: | Height: | Size: 342 B |
Before Width: | Height: | Size: 698 B After Width: | Height: | Size: 336 B |
@ -1139,6 +1139,9 @@ colormachine.blocktype_menu = function( meta, new_color, page )
|
|||||||
local per_line = 13;
|
local per_line = 13;
|
||||||
local anz_lines = 3;
|
local anz_lines = 3;
|
||||||
local per_page = anz_lines * per_line;
|
local per_page = anz_lines * per_line;
|
||||||
|
if( not( page )) then
|
||||||
|
page = 1;
|
||||||
|
end
|
||||||
local start_at_offset = per_page * page;
|
local start_at_offset = per_page * page;
|
||||||
|
|
||||||
new_color = colormachine.decode_color_name( meta, new_color );
|
new_color = colormachine.decode_color_name( meta, new_color );
|
||||||
|
188
digilines/LICENSE.txt
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
The LGPLv3 applies to all code in this project.
|
||||||
|
The WTFPL applies to textures and any other content in this project which is not source code.
|
||||||
|
|
||||||
|
=============================================================
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
|
License, supplemented by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
|
General Public License.
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
|
other than an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided
|
||||||
|
by the Library, but which is not otherwise based on the Library.
|
||||||
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
|
Application with the Library. The particular version of the Library
|
||||||
|
with which the Combined Work was made is also called the "Linked
|
||||||
|
Version".
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
|
based on the Application, and not on the Linked Version.
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
|
object code and/or source code for the Application, including any data
|
||||||
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
|
without being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
|
facility refers to a function or data to be supplied by an Application
|
||||||
|
that uses the facility (other than as an argument passed when the
|
||||||
|
facility is invoked), then you may convey a copy of the modified
|
||||||
|
version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
|
ensure that, in the event an Application does not supply the
|
||||||
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
|
this License applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from
|
||||||
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
|
material is not limited to numerical parameters, data structure
|
||||||
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the
|
||||||
|
Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that,
|
||||||
|
taken together, effectively do not restrict modification of the
|
||||||
|
portions of the Library contained in the Combined Work and reverse
|
||||||
|
engineering for debugging such modifications, if you also do each of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
|
the Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during
|
||||||
|
execution, include the copyright notice for the Library among
|
||||||
|
these notices, as well as a reference directing the user to the
|
||||||
|
copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
|
License, and the Corresponding Application Code in a form
|
||||||
|
suitable for, and under terms that permit, the user to
|
||||||
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
|
a copy of the Library already present on the user's computer
|
||||||
|
system, and (b) will operate properly with a modified version
|
||||||
|
of the Library that is interface-compatible with the Linked
|
||||||
|
Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
|
be required to provide such information under section 6 of the
|
||||||
|
GNU GPL, and only to the extent that such information is
|
||||||
|
necessary to install and execute a modified version of the
|
||||||
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
|
you use option 4d0, the Installation Information must accompany
|
||||||
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
You may place library facilities that are a work based on the
|
||||||
|
Library side by side in a single library together with other library
|
||||||
|
facilities that are not Applications and are not covered by this
|
||||||
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based
|
||||||
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Lesser General Public License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Library as you received it specifies that a certain numbered version
|
||||||
|
of the GNU Lesser General Public License "or any later version"
|
||||||
|
applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that published version or of any later version
|
||||||
|
published by the Free Software Foundation. If the Library as you
|
||||||
|
received it does not specify a version number of the GNU Lesser
|
||||||
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
|
General Public License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
|
permanent authorization for you to choose that version for the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
|
||||||
|
=============================================================
|
||||||
|
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified
|
||||||
|
copies of this license document, and changing it is allowed as long
|
||||||
|
as the name is changed.
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
14
digilines/README.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Digilines
|
||||||
|
==========
|
||||||
|
- The minetest counterpart for bus systems like i2c, SPI, RS232, USB -
|
||||||
|
|
||||||
|
|
||||||
|
This mod adds digiline wires, an RTC (Real Time Clock), a light sensor as well as an LCD Screen.
|
||||||
|
Can be used together with the luacontroller from mesecons. See the luacontroller manual for more information.
|
||||||
|
|
||||||
|
Send "GET" to RTC or light sensor to retrieve Data, send any text to LCD to display it.
|
||||||
|
Select channel by right-clicking items.
|
||||||
|
|
||||||
|
License:
|
||||||
|
Code: LGPL
|
||||||
|
Textures: WTFPL
|
1
digilines/description.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
This mod adds digiline wires, an RTC (Real Time Clock), a light sensor as well as an LCD Screen. Can be used together with the luacontroller from mesecons.
|
@ -1,9 +1,11 @@
|
|||||||
digiline = {}
|
digiline = {}
|
||||||
dofile(minetest.get_modpath("digilines").."/presetrules.lua")
|
|
||||||
dofile(minetest.get_modpath("digilines").."/util.lua")
|
local modpath = minetest.get_modpath("digilines")
|
||||||
dofile(minetest.get_modpath("digilines").."/internal.lua")
|
dofile(modpath .. "/presetrules.lua")
|
||||||
dofile(minetest.get_modpath("digilines").."/wires_common.lua")
|
dofile(modpath .. "/util.lua")
|
||||||
dofile(minetest.get_modpath("digilines").."/wire_std.lua")
|
dofile(modpath .. "/internal.lua")
|
||||||
|
dofile(modpath .. "/wires_common.lua")
|
||||||
|
dofile(modpath .. "/wire_std.lua")
|
||||||
|
|
||||||
function digiline:receptor_send(pos, rules, channel, msg)
|
function digiline:receptor_send(pos, rules, channel, msg)
|
||||||
local checked = {}
|
local checked = {}
|
||||||
@ -22,4 +24,21 @@ minetest.register_craft({
|
|||||||
{'mesecons_insulated:insulated_off', 'mesecons_insulated:insulated_off', 'default:gold_ingot'},
|
{'mesecons_insulated:insulated_off', 'mesecons_insulated:insulated_off', 'default:gold_ingot'},
|
||||||
{'mesecons_materials:fiber', 'mesecons_materials:fiber', 'mesecons_materials:fiber'},
|
{'mesecons_materials:fiber', 'mesecons_materials:fiber', 'mesecons_materials:fiber'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- former submods
|
||||||
|
if minetest.is_yes(minetest.setting_get("digilines_enable_inventory") or true) then
|
||||||
|
dofile(modpath .. "/inventory.lua")
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.is_yes(minetest.setting_get("digilines_enable_lcd") or true) then
|
||||||
|
dofile(modpath .. "/lcd.lua")
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.is_yes(minetest.setting_get("digilines_enable_lightsensor") or true) then
|
||||||
|
dofile(modpath .. "/lightsensor.lua")
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.is_yes(minetest.setting_get("digilines_enable_rtc") or true) then
|
||||||
|
dofile(modpath .. "/rtc.lua")
|
||||||
|
end
|
||||||
|
@ -26,7 +26,8 @@ end
|
|||||||
local tubeconn = minetest.get_modpath("pipeworks") and "^pipeworks_tube_connection_wooden.png" or ""
|
local tubeconn = minetest.get_modpath("pipeworks") and "^pipeworks_tube_connection_wooden.png" or ""
|
||||||
local tubescan = minetest.get_modpath("pipeworks") and function(pos) pipeworks.scan_for_tube_objects(pos) end or nil
|
local tubescan = minetest.get_modpath("pipeworks") and function(pos) pipeworks.scan_for_tube_objects(pos) end or nil
|
||||||
|
|
||||||
minetest.register_node("digilines_inventory:chest", {
|
minetest.register_alias("digilines_inventory:chest", "digilines:chest")
|
||||||
|
minetest.register_node("digilines:chest", {
|
||||||
description = "Digiline Chest",
|
description = "Digiline Chest",
|
||||||
tiles = {
|
tiles = {
|
||||||
"default_chest_top.png"..tubeconn,
|
"default_chest_top.png"..tubeconn,
|
||||||
@ -61,6 +62,11 @@ minetest.register_node("digilines_inventory:chest", {
|
|||||||
return minetest.get_meta(pos):get_inventory():is_empty("main")
|
return minetest.get_meta(pos):get_inventory():is_empty("main")
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
|
local name = sender:get_player_name()
|
||||||
|
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
||||||
|
minetest.record_protection_violation(pos, name)
|
||||||
|
return
|
||||||
|
end
|
||||||
if fields.channel ~= nil then
|
if fields.channel ~= nil then
|
||||||
minetest.get_meta(pos):set_string("channel",fields.channel)
|
minetest.get_meta(pos):set_string("channel",fields.channel)
|
||||||
end
|
end
|
||||||
@ -140,6 +146,6 @@ minetest.register_node("digilines_inventory:chest", {
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "digilines_inventory:chest",
|
output = "digilines:chest",
|
||||||
recipe = {"default:chest", "digilines:wire_std_00000000"}
|
recipe = {"default:chest", "digilines:wire_std_00000000"}
|
||||||
})
|
})
|
@ -3,11 +3,11 @@
|
|||||||
-- Font: 04.jp.org
|
-- Font: 04.jp.org
|
||||||
|
|
||||||
-- load characters map
|
-- load characters map
|
||||||
local chars_file = io.open(minetest.get_modpath("digilines_lcd").."/characters", "r")
|
local chars_file = io.open(minetest.get_modpath("digilines").."/characters", "r")
|
||||||
local charmap = {}
|
local charmap = {}
|
||||||
local max_chars = 12
|
local max_chars = 12
|
||||||
if not chars_file then
|
if not chars_file then
|
||||||
print("[digilines_lcd] E: character map file not found")
|
print("[digilines] E: LCD: character map file not found")
|
||||||
else
|
else
|
||||||
while true do
|
while true do
|
||||||
local char = chars_file:read("*l")
|
local char = chars_file:read("*l")
|
||||||
@ -76,7 +76,8 @@ local lcd_box = {
|
|||||||
wall_top = {-8/16, 7/16, -8/16, 8/16, 8/16, 8/16}
|
wall_top = {-8/16, 7/16, -8/16, 8/16, 8/16, 8/16}
|
||||||
}
|
}
|
||||||
|
|
||||||
minetest.register_node("digilines_lcd:lcd", {
|
minetest.register_alias("digilines_lcd:lcd", "digilines:lcd")
|
||||||
|
minetest.register_node("digilines:lcd", {
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
description = "Digiline LCD",
|
description = "Digiline LCD",
|
||||||
inventory_image = "lcd_lcd.png",
|
inventory_image = "lcd_lcd.png",
|
||||||
@ -93,7 +94,7 @@ minetest.register_node("digilines_lcd:lcd", {
|
|||||||
after_place_node = function (pos, placer, itemstack)
|
after_place_node = function (pos, placer, itemstack)
|
||||||
local param2 = minetest.get_node(pos).param2
|
local param2 = minetest.get_node(pos).param2
|
||||||
if param2 == 0 or param2 == 1 then
|
if param2 == 0 or param2 == 1 then
|
||||||
minetest.add_node(pos, {name = "digilines_lcd:lcd", param2 = 3})
|
minetest.add_node(pos, {name = "digilines:lcd", param2 = 3})
|
||||||
end
|
end
|
||||||
prepare_writing (pos)
|
prepare_writing (pos)
|
||||||
end,
|
end,
|
||||||
@ -107,6 +108,11 @@ minetest.register_node("digilines_lcd:lcd", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
|
local name = sender:get_player_name()
|
||||||
|
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
||||||
|
minetest.record_protection_violation(pos, name)
|
||||||
|
return
|
||||||
|
end
|
||||||
if (fields.channel) then
|
if (fields.channel) then
|
||||||
minetest.get_meta(pos):set_string("channel", fields.channel)
|
minetest.get_meta(pos):set_string("channel", fields.channel)
|
||||||
end
|
end
|
||||||
@ -123,7 +129,7 @@ minetest.register_node("digilines_lcd:lcd", {
|
|||||||
light_source = 6,
|
light_source = 6,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_entity("digilines_lcd:text", {
|
minetest.register_entity(":digilines_lcd:text", {
|
||||||
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
||||||
visual = "upright_sprite",
|
visual = "upright_sprite",
|
||||||
textures = {},
|
textures = {},
|
||||||
@ -197,7 +203,7 @@ generate_line = function(s, ypos)
|
|||||||
file = charmap[s:sub(i, i + 1)]
|
file = charmap[s:sub(i, i + 1)]
|
||||||
i = i + 2
|
i = i + 2
|
||||||
else
|
else
|
||||||
print("[digilines_lcd] W: unknown symbol in '"..s.."' at "..i)
|
print("[digilines] W: LCD: unknown symbol in '"..s.."' at "..i)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
if file ~= nil then
|
if file ~= nil then
|
||||||
@ -218,7 +224,7 @@ generate_line = function(s, ypos)
|
|||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "digilines_lcd:lcd 2",
|
output = "digilines:lcd 2",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"default:steel_ingot", "digilines:wire_std_00000000", "default:steel_ingot"},
|
{"default:steel_ingot", "digilines:wire_std_00000000", "default:steel_ingot"},
|
||||||
{"mesecons_lightstone:lightstone_green_off","mesecons_lightstone:lightstone_green_off","mesecons_lightstone:lightstone_green_off"},
|
{"mesecons_lightstone:lightstone_green_off","mesecons_lightstone:lightstone_green_off","mesecons_lightstone:lightstone_green_off"},
|
@ -29,7 +29,8 @@ local on_digiline_receive = function (pos, node, channel, msg)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("digilines_lightsensor:lightsensor", {
|
minetest.register_alias("digilines_lightsensor:lightsensor", "digilines:lightsensor")
|
||||||
|
minetest.register_node("digilines:lightsensor", {
|
||||||
description = "Digiline Lightsensor",
|
description = "Digiline Lightsensor",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"digilines_lightsensor.png"},
|
tiles = {"digilines_lightsensor.png"},
|
||||||
@ -50,6 +51,11 @@ minetest.register_node("digilines_lightsensor:lightsensor", {
|
|||||||
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
|
local name = sender:get_player_name()
|
||||||
|
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
||||||
|
minetest.record_protection_violation(pos, name)
|
||||||
|
return
|
||||||
|
end
|
||||||
if (fields.channel) then
|
if (fields.channel) then
|
||||||
minetest.get_meta(pos):set_string("channel", fields.channel)
|
minetest.get_meta(pos):set_string("channel", fields.channel)
|
||||||
end
|
end
|
1
digilines/mod.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
name = digilines
|
@ -24,7 +24,8 @@ local on_digiline_receive = function (pos, node, channel, msg)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("digilines_rtc:rtc", {
|
minetest.register_alias("digilines_rtc:rtc", "digilines:rtc")
|
||||||
|
minetest.register_node("digilines:rtc", {
|
||||||
description = "Digiline Real Time Clock (RTC)",
|
description = "Digiline Real Time Clock (RTC)",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"digilines_rtc.png"},
|
tiles = {"digilines_rtc.png"},
|
||||||
@ -46,6 +47,11 @@ minetest.register_node("digilines_rtc:rtc", {
|
|||||||
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
|
local name = sender:get_player_name()
|
||||||
|
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
|
||||||
|
minetest.record_protection_violation(pos, name)
|
||||||
|
return
|
||||||
|
end
|
||||||
if (fields.channel) then
|
if (fields.channel) then
|
||||||
minetest.get_meta(pos):set_string("channel", fields.channel)
|
minetest.get_meta(pos):set_string("channel", fields.channel)
|
||||||
end
|
end
|
BIN
digilines/screenshot.png
Normal file
After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 156 B After Width: | Height: | Size: 156 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 236 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 226 B |
Before Width: | Height: | Size: 135 B After Width: | Height: | Size: 135 B |
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 232 B |