forked from year6b7a/item-network-factorio-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac7aa8a
commit 136d26a
Showing
6 changed files
with
97 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
|
||
local name = "network-sensor" | ||
local override_item_name = "constant-combinator" | ||
local override_prototype = "constant-combinator" | ||
|
||
local entity = table.deepcopy(data.raw[override_prototype][override_item_name]) | ||
entity.name = name | ||
entity.minable.result = name | ||
-- Need enough to hold every item we might build | ||
-- We could scan in data-final-fixes to get a more accurate count, but that is ~1700 items. | ||
entity.item_slot_count = 1000 | ||
local function extend_one(name) | ||
local override_item_name = "constant-combinator" | ||
local override_prototype = "constant-combinator" | ||
|
||
local item = table.deepcopy(data.raw["item"][override_item_name]) | ||
item.name = name | ||
item.place_result = name | ||
item.order = item.order .. "2" | ||
local entity = table.deepcopy(data.raw[override_prototype][override_item_name]) | ||
entity.name = name | ||
entity.minable.result = name | ||
-- Need enough to hold every item we might build | ||
-- We could scan in data-final-fixes to get a more accurate count, but that is ~1700 items. | ||
entity.item_slot_count = 1000 | ||
|
||
local recipe = table.deepcopy(data.raw["recipe"][override_item_name]) | ||
recipe.name = name | ||
recipe.result = name | ||
recipe.enabled = true | ||
local item = table.deepcopy(data.raw["item"][override_item_name]) | ||
item.name = name | ||
item.place_result = name | ||
item.order = item.order .. name | ||
|
||
data:extend({ entity, item, recipe }) | ||
local recipe = table.deepcopy(data.raw["recipe"][override_item_name]) | ||
recipe.name = name | ||
recipe.result = name | ||
recipe.enabled = true | ||
|
||
data:extend({ entity, item, recipe }) | ||
end | ||
|
||
extend_one("network-sensor") | ||
extend_one("network-limit-sensor") |