Beacons are now disable by default
This commit is contained in:
parent
566f5191c0
commit
9bffa6d5d0
8
init.lua
8
init.lua
@ -126,6 +126,9 @@ end
|
||||
|
||||
--------------- CHAT COMMANDS -------------------
|
||||
|
||||
-- Load beacon setting from settings.conf
|
||||
local beacons_enabled = minetest.settings:get_bool("beacons.enable", false)
|
||||
|
||||
-- CREATE WAYPOINT
|
||||
minetest.register_chatcommand("wc", {
|
||||
params = "<waypoint_name>",
|
||||
@ -150,8 +153,10 @@ minetest.register_chatcommand("wc", {
|
||||
-- Add the waypoint to the player's HUD
|
||||
addWaypointHud(waypoints, player)
|
||||
|
||||
-- Place a beacon at the waypoint location
|
||||
-- Check if beacons are enabled before placing a beacon
|
||||
if beacons_enabled then
|
||||
placeBeacon(round_pos)
|
||||
end
|
||||
|
||||
-- Save the waypoints to modstorage
|
||||
save()
|
||||
@ -165,7 +170,6 @@ minetest.register_chatcommand("wc", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- DELETE WAYPOINT
|
||||
minetest.register_chatcommand("wd", {
|
||||
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