Beacons are now disable by default
This commit is contained in:
parent
566f5191c0
commit
9bffa6d5d0
10
init.lua
10
init.lua
@ -126,6 +126,9 @@ end
|
|||||||
|
|
||||||
--------------- CHAT COMMANDS -------------------
|
--------------- CHAT COMMANDS -------------------
|
||||||
|
|
||||||
|
-- Load beacon setting from settings.conf
|
||||||
|
local beacons_enabled = minetest.settings:get_bool("beacons.enable", false)
|
||||||
|
|
||||||
-- CREATE WAYPOINT
|
-- CREATE WAYPOINT
|
||||||
minetest.register_chatcommand("wc", {
|
minetest.register_chatcommand("wc", {
|
||||||
params = "<waypoint_name>",
|
params = "<waypoint_name>",
|
||||||
@ -150,8 +153,10 @@ minetest.register_chatcommand("wc", {
|
|||||||
-- Add the waypoint to the player's HUD
|
-- Add the waypoint to the player's HUD
|
||||||
addWaypointHud(waypoints, player)
|
addWaypointHud(waypoints, player)
|
||||||
|
|
||||||
-- Place a beacon at the waypoint location
|
-- Check if beacons are enabled before placing a beacon
|
||||||
placeBeacon(round_pos)
|
if beacons_enabled then
|
||||||
|
placeBeacon(round_pos)
|
||||||
|
end
|
||||||
|
|
||||||
-- Save the waypoints to modstorage
|
-- Save the waypoints to modstorage
|
||||||
save()
|
save()
|
||||||
@ -165,7 +170,6 @@ minetest.register_chatcommand("wc", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- DELETE WAYPOINT
|
-- DELETE WAYPOINT
|
||||||
minetest.register_chatcommand("wd", {
|
minetest.register_chatcommand("wd", {
|
||||||
params = "<waypoint_name>",
|
params = "<waypoint_name>",
|
||||||
|
2
settingtypes.txt
Normal file
2
settingtypes.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Enable or disable beacons in the mod
|
||||||
|
beacons.enable (Enable Beacons) bool false
|
Loading…
x
Reference in New Issue
Block a user