Create setting to disallow crafting ATMs...
Only admins can add ATMs to game.
This commit is contained in:
parent
14b773a5d7
commit
ebc7e33ee7
@ -1617,6 +1617,11 @@ log_mods = true
|
||||
# default: sfinv
|
||||
inventory = sfinv
|
||||
|
||||
## Allow players to craft ATM machines.
|
||||
# type: bool
|
||||
# default: true
|
||||
#allow_atm_craft = false
|
||||
|
||||
|
||||
|
||||
###########
|
||||
|
@ -1,19 +1,19 @@
|
||||
--[[ LICENSE HEADER
|
||||
|
||||
|
||||
MIT License
|
||||
|
||||
|
||||
Copyright © 2017 Jordan Irwin
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -21,11 +21,12 @@
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
local modoverrides = {
|
||||
'atm',
|
||||
'bags',
|
||||
'biofuel',
|
||||
'carts',
|
||||
@ -43,9 +44,9 @@ local modoverrides = {
|
||||
for index, modname in ipairs(modoverrides) do
|
||||
if core.get_modpath(modname) then
|
||||
if antum.verbose then
|
||||
antum.logAction('DEBUG: found mod \"' .. modname .. '\"')
|
||||
antum.logAction('Executing craft overrides for "' .. modname .. '" mod')
|
||||
end
|
||||
|
||||
|
||||
antum.loadScript('crafting/' .. modname)
|
||||
end
|
||||
end
|
||||
|
31
mods/antum/overrides/crafting/atm.lua
Normal file
31
mods/antum/overrides/crafting/atm.lua
Normal file
@ -0,0 +1,31 @@
|
||||
--[[ LICENSE HEADER
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright © 2017 Jordan Irwin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
if not core.settings:get_bool("allow_atm_craft", true) then
|
||||
core.clear_craft({output="atm:atm"})
|
||||
core.clear_craft({output="atm:wtt"})
|
||||
end
|
@ -2,6 +2,7 @@ antum
|
||||
default
|
||||
override
|
||||
animalmaterials?
|
||||
atm?
|
||||
bags?
|
||||
carts?
|
||||
castle_weapons?
|
||||
|
@ -22,6 +22,9 @@ liquid_finite (Finite liquid) bool false
|
||||
# Inventory interface to use.
|
||||
inventory (Inventory interface) enum sfinv sfinv,inventory_plus
|
||||
|
||||
# Allow players to craft ATM machines.
|
||||
allow_atm_craft (Allow ATM crafting) bool true
|
||||
|
||||
|
||||
[*Mobiles (Mobs)]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user