forked from brevven/lead
-
Notifications
You must be signed in to change notification settings - Fork 0
/
me.lua
41 lines (32 loc) · 981 Bytes
/
me.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
local me = {}
me.name = "bzlead"
me.lead_ore = "lead-ore"
me.lead_plate = "lead-plate"
me.recipes = {me.lead_plate, "enriched-lead-plate", "enriched-lead", "lead-smelting-vulcanite", "molten-lead", "enriched-lead-smelting-vulcanite"}
function me.byproduct()
return me.get_setting("bzlead-byproduct") and not me.get_setting("bz-no-byproduct")
end
function me.more_entities()
return me.get_setting("bzlead-more-entities") == "yes"
end
function me.more_ammo()
return me.get_setting("bzlead-more-ammo") == "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
function me.add_modified(name)
if me.get_setting(me.name.."-list") then
table.insert(me.list, name)
end
end
return me