Skip to content

Commit

Permalink
Global settings are handled differently
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed May 29, 2021
1 parent 5de5510 commit deab6dd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ local settings = {
custom_plates = true,
-- Bike is be placed directly in inventory when punched
punch_inv = true,
-- "owner" attribute is set when bike is placed
ownable = minetest.settings:get_bool("mount_ownable", true),
}
for setting, default in pairs(settings) do
local value = minetest.settings:get("motorbike." .. setting)
if value == nil then value = default else assert(type(value) == type(default)) end
biker[setting] = value
end

-- global settings
-- "owner" attribute is set when bike is placed
settings.ownable = minetest.settings:get_bool("mount_ownable", true)

biker.path = minetest.get_modpath"motorbike"
dofile(biker.path .. "/functions.lua")
local bikelist = {
Expand Down

0 comments on commit deab6dd

Please sign in to comment.