refactor
This commit is contained in:
parent
54f0009446
commit
f11cf11ae3
9 changed files with 166 additions and 57 deletions
30
me.lua
Normal file
30
me.lua
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
local me = {}
|
||||
|
||||
me.name = "bzlead"
|
||||
me.lead_ore = "lead-ore"
|
||||
me.lead_plate = "lead-plate"
|
||||
|
||||
|
||||
function me.more_entities()
|
||||
return me.get_setting("bzlead-more-entities") == "yes"
|
||||
end
|
||||
|
||||
function me.sulfuric()
|
||||
return me.get_setting("bzlead-sulfuric") == "yes"
|
||||
end
|
||||
|
||||
function me.get_setting(name)
|
||||
if settings.startup[name] == nil then
|
||||
return nil
|
||||
end
|
||||
return settings.startup[name].value
|
||||
end
|
||||
|
||||
me.bypass = {}
|
||||
if me.get_setting(me.name.."-recipe-bypass") then
|
||||
for recipe in string.gmatch(me.get_setting(me.name.."-recipe-bypass"), '[^",%s]+') do
|
||||
me.bypass[recipe] = true
|
||||
end
|
||||
end
|
||||
|
||||
return me
|
||||
Loading…
Add table
Add a link
Reference in a new issue