Factorio Blueprint Librarian

Timeline
Login

Timeline

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

50 most recent check-ins

2021-09-08
12:20
Fixed JSON serialisation of blueprint books, if empty slots got accessed. The access causes the insertion of EmptyPlaceholder instances, which can not and should not be serialised. Leaf check-in: 5166863b6b user: thomas tags: trunk
12:08
abstract_item.py: Improved docstring of _dump_json_to_string(). Leaf check-in: 9876bcb9f7 user: thomas tags: launch_game_in_background
12:07
Argument parser: Fixed --revisions flag definition that caused creationg of double nested list of passed revision files. check-in: 47139aad2c user: thomas tags: launch_game_in_background
2021-09-01
11:03
Better handling of quitting the application while Factorio runs in the background. Actually suppress the quit, if the user closes the main window, while the game runs in the background. If the uses choses to quit anyways, the application still crashes, because the background thread does not quit in this case. check-in: e8b411678e user: thomas tags: launch_game_in_background
2021-08-31
13:48
Implemented running Factorio in the background, if the path to the executable is given as a command line argument. This allows the usage as a wrapper around the game, so that it can be started alongside the game by Steam using the command line arguments option and setting it to “<path to FactorioLibrarian executable> %command%”. The current implementation lets the application to continue running when the game quits and causes a Segmentation Fault if the application is closed while the game still runs. check-in: d011c25c1e user: thomas tags: launch_game_in_background
2021-08-30
15:27
Properly discover sub-packages in setup.cfg section [options.packages.find]. Add __init__.py to factorio_librarian.model.tree, to convert it into a proper Python package. This causes setuptools find_packages() to include the model tree in built wheels. Both fixes make it possible to install the application via pip in a working state. check-in: 4857a9992b user: thomas tags: trunk
14:51
Fix build environment dependencies. According to https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html#options, the used option [options.entry_points] in setup.cfg requires setuptools >= 51, so specify that as the minimum version required. check-in: ccc641f152 user: thomas tags: trunk
2021-08-29
21:43
Fixed some inaccuracies in docstrings. check-in: 38b82e29c0 user: thomas tags: trunk
21:04
Added test cases for empty descriptions. check-in: 5060460fd2 user: thomas tags: trunk
20:58
Implemented a means of defining Qt model columns for tree items. AbstractLibraryItem now has a data() method that takes the column and Qt ItemRole and returns the appropriate data. This keeps the getter implementation close to the data source and the data() implementation in BlueprintLibrary slim. check-in: f59d117d19 user: thomas tags: trunk
20:05
Fixed row number not stored in LibraryContainer instances. This fixes an inconsistent parent() index when going up to the top level library container. check-in: b0f60f4374 user: thomas tags: trunk
18:41
Implemented a baseline model, which can handle a list of blueprint library trees. Currently implements fetching the item labels in data() for display purposes. The library can be loaded from an encoded exchange string or JSON and serialized to both JSON and encoded exchange strings. The serialization code produces bit-exact the same result as the Factorio game implementation, with the exception of speaker volumes, due to a technical reason: Factorio outputs floating point numbers with way too many decimal places, which are non-portable and can not be re-created faithfully. check-in: 79419625cd user: thomas tags: trunk
2021-08-28
15:31
BlueprintLibrary.data() now returns a grey background color for EmptyPlaceholder instances via the Qt.BackgroundColorRole. Closed-Leaf check-in: 48f7687134 user: thomas tags: implement_model
15:11
Fixed BlueprintLibrary.hasChildren() implementation. It should return True for top-level items, so that the tree view actually displays the tree content. check-in: c7856ce693 user: thomas tags: implement_model
15:10
AbstractContainerItem: Store the EmptyPlaceholder instances that are used in place of free slots in blueprint books. This prevents a segmentation fault caused by the Python garbage collector deleting them while they travel through a Qt model API method. check-in: d8ee0c1181 user: thomas tags: implement_model
14:33
BlueprintLibrary: Fixed flags() implementation. It should only add the Qt.ItemNeverHasChildren flag to actually valid leaf indices. check-in: 8509fa1921 user: thomas tags: implement_model
13:46
Moved recursive_strip_dict_none_values to abstract_item.py. Refactored DeconstructionPlanner and Upgradeplanner .to_json() methods to use dict literal statements instead of a chain of if statements. This is analog to the Blueprint class implementation. Removed EntitySpeakerSettings.to_json(), because it can also be handled by dataclasses.asdict(). check-in: 65d78be7a5 user: thomas tags: implement_model
12:41
Refactored Blueprint.to_json() to use a dict literal statement, instead of a chain of if statements. check-in: 9a70c3dde3 user: thomas tags: implement_model
12:16
Implemented loading of blueprint libraries via positional command line arguments. These are interpreted as a series of revisions of the same blueprint library. Corrected some bugs in class Blueprintlibrary, most notably the broken parent() implementation. This includes tests for the flags() and parent() methods. check-in: e38be37e7d user: thomas tags: implement_model
09:27
Tree items: Store the item row in the items, for easier navigation to the tree root. tree item factory: Properly set the parent relation. The parent relation was never set when a blueprint book or library container created it’s child nodes. Added test that verifies the parent relationship. check-in: abdb226044 user: thomas tags: implement_model
2021-08-26
22:19
Completed loading/storing of Blueprint instances. It should be able to handle all vanilla Factorio entities and entity settings. check-in: 17f6241af2 user: thomas tags: implement_model
22:10
Refactored the wire connection handling. It now handles copper wire ports, as used by power switches. Closed-Leaf check-in: 8aa1d4ff2f user: thomas tags: complete_blueprint
21:29
Fixed invalid GridAlignment implementation. check-in: 80030d4da6 user: thomas tags: complete_blueprint
21:02
Implemented circuit behavior for gates. check-in: 4f3f600579 user: thomas tags: complete_blueprint
20:53
Fixed InfinitySettingsEnergyExtension: Key power_production is actually an Optional. check-in: 03b3764c5c user: thomas tags: complete_blueprint
20:31
Implemented missing circuit signals for roboports in class ControlBehaviorRoboPortExtension. check-in: 3adc030a21 user: thomas tags: complete_blueprint
20:22
Fixed missing key send_to_train in ControlBehaviorRailStationExtension. Key logistic_condition in LogisticCondition is actually an Optional value, so handle the missing key case. Moved the Entity construction from Blueprint to a classmethod in Entity. Streamlined some methods in the Blueprint class. check-in: 1f7b99f0bf user: thomas tags: complete_blueprint
17:06
Implemented logistic network connections. Implemented handling of cargo wagons with null inventories. To prevent the JSON serialisation from removing the inventory key, even if it has a None value, the code now uses a surrogate key that replaces None values that should stay in the serialized output. check-in: 0265c61213 user: thomas tags: complete_blueprint
14:46
Implemented circuit control signals for robot ports in the new ControlBehaviorRoboPortExtension class. check-in: 82234a8899 user: thomas tags: complete_blueprint
14:45
IsJSONDictEqual: Dict matcher class gained ability to output the mismatch region of the expected input JSON, if matching failed. check-in: 4b67a0783c user: thomas tags: complete_blueprint
14:01
Implemented rocket silo entity settings. check-in: 45e34685e3 user: thomas tags: complete_blueprint
13:58
Implemented control behavior for circuit-controlled belts. check-in: 6beb5585f1 user: thomas tags: complete_blueprint
13:37
ControlBehavior: Implemented stand-alone output signal, used by entities to output their content to a connected circuit network. check-in: 6297cbb0f6 user: thomas tags: complete_blueprint
13:30
Refactored ControlBehavior to explicitly list the supported behavior classes, like ArithmeticCondition. Converted the circuit condition classes to subclasses of ExtensionBase and removed the union type definitions in those. This allowed the removal of many to_json() methods. check-in: a9256b11d1 user: thomas tags: complete_blueprint
11:17
Fixed entity serialisation order for filtered loaders. check-in: edcf3b8404 user: thomas tags: complete_blueprint
11:02
Implemented power switch related settings. check-in: 995a558ecc user: thomas tags: complete_blueprint
10:57
Entity: Moved chest-related settings into their own class EntityChestSettings. Implemented the link_id key used by editor-only linked chests. check-in: 9130150abd user: thomas tags: complete_blueprint
10:35
Added explicit test cases for colored trains and train stations. check-in: 9584ebbbc3 user: thomas tags: complete_blueprint
09:48
Entity: Moved inserter-related settings into their own class EntityInserterSettings. check-in: 80db0288f5 user: thomas tags: complete_blueprint
09:20
Entity: Moved splitter-related items into their own class EntitySplitterSettings. check-in: b7a62848e2 user: thomas tags: complete_blueprint
2021-08-25
16:37
Implemented programmable speaker settings and control behavior. The speaker volume float can contain unreasonable floating point literals (up to 48 digits), so added the ability for tests to expectedly fail, if the decoded JSON string contains such literals. check-in: cc5ed52c16 user: thomas tags: complete_blueprint
10:27
Implemented infinity settings. These are used by editor-only items that provide infinite sources or sinks. check-in: 7f7f0746c0 user: thomas tags: complete_blueprint
10:21
Tests: Removed test_no_unknown_keys_present from test_blueprint.py. The test function did not provide much additional value, as it is covered by the other tests. It enforced an invariant on the Entity class (all possible Entity JSON keys must be defined attributes in the Entity class), which is no longer an invariant, so the test is now inherently broken, thus removed. check-in: d91aaee8a9 user: thomas tags: complete_blueprint
2021-08-24
19:27
Refactored ControlBehavior: Use composition with several extension classes to compose the items, instead of dumping all optionals into the base class. This groups related options together and reduces the number of actual "Optionals". The detection is using the dataclass-provided __annotations__ dict to detect non-empty key intersections and create an extension, if one of the belonging keys is found in the exchange string JSON. check-in: ea4497db61 user: thomas tags: complete_blueprint
17:35
Implemented circuit control behavior for electric miners. check-in: c1ae905311 user: thomas tags: complete_blueprint
2021-08-23
22:46
Added test case for the spawn point entity. check-in: e089bcd972 user: thomas tags: complete_blueprint
18:25
Implemented control behavior and circuit connections for filter inserters. check-in: 771e3f34f0 user: thomas tags: complete_blueprint
14:46
Implemented storing/loading train schedules and train colors. The ARGB color values returned by Factorio can have up to 25 decimal digits, using the capabilities added in [8a7a9800f61d18da]. check-in: 551e8c5980 user: thomas tags: complete_blueprint
14:43
Monkey-patch the json.encoder module to provide the required 25 digit floating point decimal precision when encoding JSON data. The json module provides no means to specify the precision, so this approach has to be used. check-in: 8a7a9800f6 user: thomas tags: complete_blueprint
2021-08-22
19:28
Implemented train station circuit connections. Re-implemented Entity.to_json() to use the same method as ControlBehavior, making it easier to change the key order. check-in: 4c480c0e5a user: thomas tags: complete_blueprint