forked from mtcontrib/arrow_signs
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
850ae561a0 | |||
1660d80668 | |||
9c385319cb |
@ -1,3 +0,0 @@
|
|||||||
default
|
|
||||||
signs_lib?
|
|
||||||
locks?
|
|
@ -1,2 +0,0 @@
|
|||||||
This mods adds arrowsigns into Minetest.
|
|
||||||
Rotatable in all directions.
|
|
2
init.lua
2
init.lua
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
arrow_signs={}
|
arrow_signs={}
|
||||||
|
|
||||||
arrow_signs.formspec = "field[text;Sign text: (Hint: Use / or | to create a new line);${text}]";
|
arrow_signs.formspec = "size[6,2]real_coordinates[true]field[0.375,0.5;5.25,0.8;text;Sign text: (Hit 'Enter' key to validate);${text}]label[0.375,1.5;(Hint: Use / or | to create a new line)]";
|
||||||
|
|
||||||
arrow_signs.on_place = function(itemstack, placer, pointed_thing)
|
arrow_signs.on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
|
||||||
|
5
mod.conf
Normal file
5
mod.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
name = arrow_signs
|
||||||
|
title = Arrow Signs
|
||||||
|
description = This mods adds arrowsigns into Minetest. Rotatable in all directions.
|
||||||
|
depends = default
|
||||||
|
optional_depends = signs_lib,locks,basic_materials
|
@ -5,7 +5,7 @@
|
|||||||
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
|
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
|
||||||
]]
|
]]
|
||||||
minetest.register_node("arrow_signs:shared_locked", {
|
minetest.register_node("arrow_signs:shared_locked", {
|
||||||
description = "Shared locked sign",
|
description = "Shared locked arrow sign",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box = arrow_signs.nodebox,
|
node_box = arrow_signs.nodebox,
|
||||||
selection_box = arrow_signs.selection_box,
|
selection_box = arrow_signs.selection_box,
|
||||||
@ -40,7 +40,7 @@ minetest.register_node("arrow_signs:shared_locked", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
|
if not locks:lock_handle_input(pos, formname, fields, sender) then
|
||||||
-- if the user already has the right to use this and did input text
|
-- if the user already has the right to use this and did input text
|
||||||
if( fields.text
|
if( fields.text
|
||||||
and ( not(fields.locks_sent_lock_command)
|
and ( not(fields.locks_sent_lock_command)
|
||||||
@ -62,14 +62,14 @@ minetest.register_node("arrow_signs:shared_locked", {
|
|||||||
--a warning message is also printed by the locks mod
|
--a warning message is also printed by the locks mod
|
||||||
--arrow_signs.savetext( pos, formname, fields, sender );
|
--arrow_signs.savetext( pos, formname, fields, sender );
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
});
|
});
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = 'shapeless',
|
type = 'shapeless',
|
||||||
output = 'arrow_signs:shared_locked',
|
output = 'arrow_signs:shared_locked',
|
||||||
recipe = {'arrow_signs:wall', 'locks:lock'},
|
recipe = {'arrow_signs:wall', 'locks:lock', minetest.get_modpath("basic_materials") and "basic_materials:ic" or ""},
|
||||||
})
|
})
|
||||||
|
|
||||||
--Redefinition
|
--Redefinition
|
||||||
|
Reference in New Issue
Block a user