|
| 1 | +--CODE |
| 2 | +BI = {} |
| 3 | +BI.modName = "BetterInserters" |
| 4 | + |
| 5 | + |
| 6 | +function BetterInserters_addTechnology(thisName,thisIcon,thisPrerequisites,thisCount,thisIngredients,thisTime,thisOrder,thisType1,thisEffect1,thisType2,thisEffect2) |
| 7 | + local obj = util.table.deepcopy(data.raw["technology"]["steel-processing"]) |
| 8 | + obj.name = thisName |
| 9 | + obj.icon = thisIcon |
| 10 | + |
| 11 | + obj.effects = {} |
| 12 | + obj.effects[1] = {type = thisType1, modifier = thisEffect1} |
| 13 | + obj.effects[2] = {type = thisType2, modifier = thisEffect2} |
| 14 | + |
| 15 | + obj.prerequisites = thisPrerequisites |
| 16 | + |
| 17 | + obj.unit.count = thisCount |
| 18 | + if thisIngredients == 1 then |
| 19 | + obj.unit.ingredients = {{"science-pack-1", 1}} |
| 20 | + elseif thisIngredients == 2 then |
| 21 | + obj.unit.ingredients = {{"science-pack-1", 1},{"science-pack-2", 1}} |
| 22 | + elseif thisIngredients == 3 then |
| 23 | + obj.unit.ingredients = {{"science-pack-1", 1},{"science-pack-2", 1},{"science-pack-3", 1}} |
| 24 | + elseif thisIngredients == 4 then |
| 25 | + obj.unit.ingredients = {{"science-pack-1", 1},{"science-pack-2", 1},{"science-pack-3", 1},{"production-science-pack", 1}} |
| 26 | + elseif thisIngredients == 5 then |
| 27 | + obj.unit.ingredients = {{"science-pack-1", 1},{"science-pack-2", 1},{"science-pack-3", 1},{"production-science-pack", 1},{"high-tech-science-pack", 1}} |
| 28 | + end |
| 29 | + obj.unit.time = thisTime |
| 30 | + obj.order = thisOrder |
| 31 | + obj.upgrade = true |
| 32 | + data.raw[obj.type][obj.name] = obj |
| 33 | +end |
| 34 | + |
| 35 | + |
| 36 | +BetterInserters_addTechnology("inserter-capacity-bonus-8","__base__/graphics/technology/inserter-capacity.png",{"inserter-capacity-bonus-7"},2000,5,45,"c-o-i","stack-inserter-capacity-bonus",50,"inserter-stack-size-bonus",25) |
| 37 | +BetterInserters_addTechnology("inserter-capacity-bonus-9","__base__/graphics/technology/inserter-capacity.png",{"inserter-capacity-bonus-8"},2000,5,45,"c-o-j","stack-inserter-capacity-bonus",50,"inserter-stack-size-bonus",25) |
| 38 | +BetterInserters_addTechnology("inserter-capacity-bonus-10","__base__/graphics/technology/inserter-capacity.png",{"inserter-capacity-bonus-9"},2000,5,45,"c-o-k","stack-inserter-capacity-bonus",50,"inserter-stack-size-bonus",25) |
| 39 | +BetterInserters_addTechnology("inserter-capacity-bonus-11","__base__/graphics/technology/inserter-capacity.png",{"inserter-capacity-bonus-10"},2000,5,45,"c-o-l","stack-inserter-capacity-bonus",50,"inserter-stack-size-bonus",25) |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
0 commit comments