Compare commits
5 Commits
b013333660
...
3c9a9cbe43
Author | SHA1 | Date |
---|---|---|
Milan Ihl | 3c9a9cbe43 | |
entuland | 383106dbc3 | |
entuland | f035353b1b | |
Milan | f3ce62a3a5 | |
Milan | 55fc42085d |
|
@ -0,0 +1,67 @@
|
|||
-- only alter this file if it's named "custom.recipes.lua"
|
||||
-- alter the recipes as you please and delete / comment out
|
||||
-- the recipes you don't want to be available in the game
|
||||
-- the original versions are in "default/recipes.lua"
|
||||
|
||||
return {
|
||||
{
|
||||
output = "rhotator:screwdriver",
|
||||
recipe = {
|
||||
{"moreores:mithril_ingot"},
|
||||
{"default:mese_crystal_fragment"},
|
||||
{"group:stick"},
|
||||
},
|
||||
},
|
||||
{
|
||||
output = "rhotator:screwdriver_alt",
|
||||
recipe = {
|
||||
{"moreores:mithril_ingot", "group:stick", ""},
|
||||
{"default:mese_crystal_fragment", "", ""},
|
||||
{"group:stick", "", ""},
|
||||
},
|
||||
},
|
||||
{
|
||||
output = "rhotator:screwdriver_multi",
|
||||
recipe = {
|
||||
{"", "group:stick", ""},
|
||||
{"group:stick", "moreores:mithril_ingot", "group:stick"},
|
||||
{"", "group:stick", "default:mese_crystal_fragment"},
|
||||
},
|
||||
},
|
||||
{
|
||||
output = "rhotator:memory",
|
||||
recipe = {
|
||||
{"group:stick", "", ""},
|
||||
{"moreores:mithril_ingot", "default:mese_crystal_fragment", ""},
|
||||
{"group:stick", "", ""},
|
||||
},
|
||||
},
|
||||
{
|
||||
output = "rhotator:cube",
|
||||
recipe = {
|
||||
{"group:wool"},
|
||||
{"rhotator:screwdriver"},
|
||||
},
|
||||
},
|
||||
{
|
||||
output = "rhotator:cube",
|
||||
recipe = {
|
||||
{"group:wool"},
|
||||
{"rhotator:screwdriver_alt"},
|
||||
},
|
||||
},
|
||||
{
|
||||
output = "rhotator:cube",
|
||||
recipe = {
|
||||
{"group:wool"},
|
||||
{"rhotator:memory"},
|
||||
},
|
||||
},
|
||||
{
|
||||
output = "rhotator:cube",
|
||||
recipe = {
|
||||
{"group:wool"},
|
||||
{"rhotator:screwdriver_multi"},
|
||||
},
|
||||
},
|
||||
}
|
2
init.lua
|
@ -559,7 +559,7 @@ rhotator.check_on_rotate_handler = function(pos, node, nodedef, player, click, n
|
|||
return false
|
||||
elseif nodedef.on_rotate then
|
||||
-- Copy pos and node because callback can modify it
|
||||
local pass_node = {name = node.name, param1 = node.param1, param2 = node.param2}
|
||||
local pass_node = table.copy(node)
|
||||
local pass_pos = vector.new(pos)
|
||||
local result = nodedef.on_rotate(pass_pos, pass_node, player, click, new_param2)
|
||||
if result == true then
|
||||
|
|
18
notify.lua
|
@ -20,7 +20,9 @@ local function hud_remove(player, playername)
|
|||
if os.time() < hud_timeout_seconds + hud.time then
|
||||
return
|
||||
end
|
||||
player:hud_remove(hud.id)
|
||||
if player and player.hud_remove then
|
||||
player:hud_remove(hud.id)
|
||||
end
|
||||
huds[playername] = nil
|
||||
end
|
||||
|
||||
|
@ -36,11 +38,13 @@ local function hud_create(player, message, params)
|
|||
def.text = message or def.text
|
||||
def.hud_elem_type = def.hud_elem_type or "text"
|
||||
def.name = mod_name .. "_feedback"
|
||||
local id = player:hud_add(def)
|
||||
huds[playername] = {
|
||||
id = id,
|
||||
time = os.time(),
|
||||
}
|
||||
if player and player.hud_add then
|
||||
local id = player:hud_add(def)
|
||||
huds[playername] = {
|
||||
id = id,
|
||||
time = os.time(),
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
notify.warn = function(player, message)
|
||||
|
@ -67,7 +71,7 @@ notify.__call = function(self, player, message, params)
|
|||
end
|
||||
message = "[" .. mod_name .. "] " .. message
|
||||
local hud = huds[playername]
|
||||
if hud then
|
||||
if hud and player.hud_remove then
|
||||
player:hud_remove(hud.id)
|
||||
end
|
||||
hud_create(player, message, params)
|
||||
|
|
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 2.3 KiB |