Beacons are now disable by default

This commit is contained in:
Carlos Chon 2024-11-10 05:01:28 -08:00
parent 566f5191c0
commit 9bffa6d5d0
2 changed files with 9 additions and 3 deletions

View File

@ -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
placeBeacon(round_pos)
-- 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
View File

@ -0,0 +1,2 @@
# Enable or disable beacons in the mod
beacons.enable (Enable Beacons) bool false