MeseCraft 83d1084fcf new mod folder layout inspired by mineclone2. new weather system (not working) | hace 3 años | |
---|---|---|
.. | ||
sounds | hace 3 años | |
textures | hace 3 años | |
LICENSE.txt | hace 3 años | |
README.md | hace 3 años | |
init.lua | hace 3 años | |
mod.conf | hace 3 años | |
settingtypes.txt | hace 3 años |
This minetest mod adds a calibratable compass to the minetest. Original mod here
The mod support the next settings:
static_spawnpoint - use this position instead 0,0,0 as initial target
ccompass_recalibrate (enabled by default): If disabled each compass can be calibrated one time only
ccompass_restrict_target (Disabled by default): If enabled, only specific nodes are allowed for calibration (usable with any type waypoint nodes for example)
ccompass_restrict_target_nodes: List of technical node names allowed for compass calibration, separated by ','
ccompass_aliasses: If enabled the compas:* items will be aliased to the ccompass:* items for compatibility
ccompass_teleport_nodes: List of technical node names that triggers the teleport to destination, separated by ','
ccompass.recalibrate = true
ccompass.restrict_target = true
ccompass.restrict_target_nodes["schnitzeljagd:waypoint"] = true
ccompass.teleport_nodes["default:diamondblock"] = true
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
meta:set_string("waypoint_name", "the unique and wunderfull place")
meta:set_string("waypoint_pos", minetest.pos_to_string(target_pos)) -- if an other position should be the target instead of the node position
meta:set_string("waypoint_skip_namechange", "skip") -- do not ask for the waypoint name
end,
stack:get_meta():set_string("target_pos", minetest.pos_to_string(pos))
Recalibration related to a user should be done by function call
local stack = ItemStack("ccompass:0")
ccompass.set_target(stack, {
target_pos_string = minetest.pos_to_string(pos),
target_name = waypoint_name,
playername = player:get_player_name()
})
function ccompass.usage_hook(compass_stack, player)
--do anything with compass_stack
return modified_compass_stack
end