Skip to content

Commit 61fab0e

Browse files
committed
Hello ~~world~~ mod portal!
1 parent 76e5242 commit 61fab0e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

mods/factoryplanner-is-exportable-to-fake-factorissimo/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ I am not yet fully satisfied, the code is still a bit of a mess but i've been wo
5151

5252
Note that this mod is currently unrestricted in terms of which recipes/steps are allowed, as well as no block for "surface specific" recipes like waterless/space.
5353

54+
Factories currently have 40 slots, this is shared between buildings, modules, inputs & outputs, factories that "do too much" quickly can become impractical to wield.
55+
5456
# potato
5557

5658
Oh nice you've read it all? Then here is some useful information: the circuit network of the factory tells you what it is missing with negative signals.

mods/factoryplanner-is-exportable-to-fake-factorissimo/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "factoryplanner-is-exportable-to-fake-factorissimo",
33
"title": "Factory Planner - exportable to fake factorissimo",
44
"description": "Skips the building stage, just feed items into the magic box.",
5-
"version": "0.0.17",
5+
"version": "1.0.0",
66
"author": "Quezler",
77
"factorio_version": "1.1",
88
"dependencies": [

mods/factoryplanner-is-exportable-to-fake-factorissimo/scripts/factory.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function Factory.on_created_entity(event)
9494
input_buffer = {},
9595
output_buffer = {},
9696

97-
output_slots_required = table_size(clipboard.products) + table_size(clipboard.byproducts),
97+
output_slots_required = table_size(clipboard.products) + table_size(clipboard.byproducts), -- todo: check stack sizes in case a lot is made per minute :o
9898
rendered = {},
9999
}
100100

@@ -209,6 +209,12 @@ function Factory.tick_struct(struct)
209209
-- is there room for the next craft cycle?
210210
if struct.output_slots_required > inventory.count_empty_stacks() then return rendering.set_text(struct.rendered.factory_message, "not enough output space") end
211211

212+
for _, product in ipairs(struct.clipboard.products) do
213+
if inventory_contents[product.name] then
214+
return rendering.set_text(struct.rendered.factory_message, "products still present") -- since output_slots_required isn't that accurate due to stack size atm
215+
end
216+
end
217+
212218
local item_statistics = struct.container.force.item_production_statistics
213219

214220
for _, ingredient in ipairs(struct.clipboard.ingredients) do

0 commit comments

Comments
 (0)