Fixed issue where integer playback_volume values on programmable speakers wasn't getting coerced to a float and failing validation (#72)
- Updated
factorio-datato version1.1.80 - Updated
compatibility/defines.luato1.1.80 - Merged louga31's pull request:
- Fix recipes so that they correctly read either internal format
- Fixed an issue where not all entities were being assigned to
entities.flippable(#61) - Fixed mod dependency loading (hopefully) so that it should actually handle recursive requires across an arbitrary number of different mods (#70)
- Fixed an issue where required Lua files with a single prepended dot or slash would break the path resolution (#70)
- Updated
factorio-datato version1.1.76(latest stable) - Updated
compatibility/defines.luato1.1.76(latest stable) - Merged penguincounter's pull request:
- Fixed logistics requester and buffer chest signatures not having the correct
circuit_mode_of_operationkey
- Fixed logistics requester and buffer chest signatures not having the correct
- Added a
dump_format()method to entities that outputs a user friendly description of all of the possible key/value entries in the exported blueprint dict- Still needs to be done for Blueprintable; ideally there would be a
Exportableparent class that would implement the madness - Also need to investigate faster validation options since schema is pretty slow; maybe we can unify and improve speed at the same time
- Still needs to be done for Blueprintable; ideally there would be a
- Added a
get_format()method intended to get a readable formatted string (that can easily be autogenerated at the top of each entity in the documentation! Not yet but soon) - Changed
_exportsdict to be both more user readable and only defined on a per class basis instead of a per instance basis (so memory usage should be down) - Prepped
env.pyfor when Lupa version 2.0 goes live (which will resolve #50) - Fixed
"Mining_Drones_Harder"mod not loading because of stray "__MACOSX" folder defined alongside (#55) - Fixed
"FactorioExtended-Plus-Logistics"not loading due to internal file titled__init__.lua(#56) - Fixed
env.extract_entities().categorize_entities()togetflags instead of assuming they exist ("flags"set is common but optional)
- Added
UpgradePlannerandDeconstructionPlanner(#40) - Created an abstract class
Blueprintablewhich now implementsBlueprint,BlueprintBook,UpgradePlanner, andDeconstructionPlannerto increase code reuse - Added
descriptionattribute toBlueprintandBlueprintBook(#41) - Changed the behavior of
draftsman-updateto normalize all mod names to have no spaces (probably not perfect, but should work for now) (#49) - Added a
--pathargument todraftsman-updateso you can specify exactly where to load mods from instead of only the installation directory (#49) - Draftsman now distributes with a vanilla set of pickle data files, so you no longer need to run
draftsman-updateon first install (suggestion from rpdelaney) - Rolling Stock (Locomotives and Wagons) should now have proper collisions that are based on their
orientationand issue correct warnings (#47) - Updated the documentation around
draftsman-updateto make it more clear and reflect recent changes - Updated all
Blueprintabledocumentation files such that they now include a plaintext representation of their JSON structure
- Updated
factorio-datato version1.1.65 - Fixed #38 and #39
- Updated
factorio-datato version1.1.61 - Added a
Vectorclass to represent 2d positions, and changed most of the code to reflect this change- This is a breaking change, but it should be much more natural to access positions by attribute
xandyinstead of["x"]and["y"] - By specifying a class like this, custom operators are allowed such as vector math, which means that offsetting positions and other operations have become much easier as a result
Vectorhas a static member functionfrom_other()that constructs aVectorobject from all valid formats accepted in the past (tuple,dict,list, etc.) which is used in all standard functions, so you shouldn't have to change any of their signaturesVectoralso has ato_dict()method to turn it back into it's dictionary format for exporting ({"x": ..., "y": ...})- The
Vectorclass is only used on the "outermost" layer due to performance reasons, internally the most common representation is stilllist[float, float]
- This is a breaking change, but it should be much more natural to access positions by attribute
- Added an abstract
Shapeclass, along with two implementations:AABBandRectangleAABBandRectangleare now used for issuingOverlappingObjectWarning
- All functions that used to use
Sequencesorlist[list[float], list[float]]have been changed toVectorandAABBrespectively for user clarity - Added another class:
CollisionSet, which is a list ofShapesused for checking if twoEntitys intersect one another- This was needed because curved rails have 2 collision boxes instead of a single one
- Collision sets also support rotations, which means that rotations are automatically generated or specified manually for edge cases like rails
- In essence,
CollisionSetsprovide more flexibility for entity footprints on a per-entity-type (or even per-entity) level
- Added
find_entity_at_position()so you can simply check for any entity in particular at a position instead of having to use fully-blownfind_entities_filteredor the more-specificfind_entity()function - Abstracted
SpatialHashMapto be an implementation of abstract classSpatialDataStructure, which will allow for different implementations such as quadtrees or other algorithms if they happen to be more performant than hash-mapping (For now allCollectionsstill useSpatialHashMapthough) - Renamed
entity_hashmapandtile_hashmapto more genericentity_mapandtile_mapto reflect the above change - Move almost all entity insert/set/remove logic to
EntityCollection.on_entity_insert,on_entity_set, andon_entity_remove, which gets called fromEntityList.insertand related - Added
on_tile_insert,on_tile_set, andon_tile_removetoTileCollectionto mirror the changes toEntityCollection - Added
copykeyword toTileList.insertandTileList.appendto mirrorEntityList.insertandEntityList.append - Added Entity/Tile merging
- Added
mergekeyword to bothEntityList.insert/appendandTileList.insert/append - Attempting to use
merge=Truekeywords andcopy=Falsewill result in aValueError, as this behavior is loosely defined (for now at least)
- Added
- Rails now properly issue
OverlappingObjectsWarnings; Rails can overlap each other provided they don't have the exact same position + direction + type - Another big documentation pass
- Split the
signatures.CONTROL_BEHAVIORinto many sub implementations, which should improve both safety and (hopefully) performance - Fixed #24, #25, #27, #32, #33, and #34
- Merged louga31's pull request
- Rewrite of the
_shift_key_indicesinEntityListto make it faster using list comprehension
- Rewrite of the
- Merged elswindle's pull request
- Moved conversion of associations from
Blueprint.load_from_stringtoBlueprint.setupso they always take place - Fixed
UndergroundBeltio_typeattribute not reading correctly from keytype - Changed test case to account for this
- Moved conversion of associations from
- Added
DirectionalMixintoAssemblingMachine(as technically it can have it in select circumstances) - Fixed load conflict between
itemsandrecipeinAssemblingMachine(#23) - Fixed
setup.pyso that it properly requirestyping_extensionson versions of Python prior to 3.8 (#30) - Fixed importing
Literalso that it follows the above change (#30) - Fixed an issue where
BlueprintBookicons were not properly set and issued an incorrect warning (#31)
- Merged sposker's pull request
- Fixed an bug where
IndexErrorwould be triggered on setting the final item filter slot - Updated
signatures.CONTROL_BEHAVIORto include thesend_to_trainkey
- Fixed an bug where
- Merged elswindle's pull request
- Dictionary Blueprints and BlueprintBook's are now properly converted to
BlueprintandBlueprintBookobjects when added to aBlueprintableList
- Dictionary Blueprints and BlueprintBook's are now properly converted to
- Fixed documentation for
FilterMixin.set_item_filtersthat labeled"name"key as"signal" - Made docs for
FilterMixin.set_item_filtersandFilterMixin.set_item_filtermore clear - Changed
signals.rawto actually be the extraction fromdata.rawso people can query the order strings and other information (#17) - Sorted
signals.rawaccording to signal-processing order (virtual -> fluid -> item) instead of item sort order (#17) - Added
signals.type_ofas a more specific structure to fulfill the old functionality ofsignals.raw(#17) - Changed the functionality of
ConstantCombinatorso that attempting to set one of it's signals to a pure virtual signal results in aDraftsmanWarning(because for some grotesque reason Factorio actually allows this) - Renamed
InvalidConnectionErrorto more generalInvalidAssociationErrorand updated documentation - Removed requirement for
Groupsto have an ID associated with it (this was required in the past, but is no longer necessary) - Fixed unable to find connectable entities when calling
Blueprint.generate_power_connections()on blueprint that containedGroups(#19) - Added the capability to specify connections based on entity reference as well instead of just ID or index (
[add/remove]_power_connection,[add/remove]_circuit_connection) (#19)- Made these functions issue
InvalidAssociationErrorwhen attempting to connect two entities that lie outside of theEntityCollection - Added recursive
__contains__function toEntityListto facilitate the above
- Made these functions issue
- Fixed copying of entities between
BlueprintsandGroups(#20) - Added capability to deepcopy
Entities,Groups, andBlueprints, with appropriate errors - Added capability to set the
entitiesof aBlueprintorGroupto anotherBlueprintsorGroupsentities(#16) - Added optional
stringkeyword for the constructor ofGroupso you can import a blueprint string directly into a group instead of having to create a "scratch"Blueprint
- Added
keywordstosetup.py - Added
__contains__function toBlueprint(I thought it was inferred from__getitem__, whoops) (#14) - Added
defines.luaas a more comprehensive solution to the Factoriodefinesissue (#15) - Added distinguishing between multiple versions of the same mod; the latest mod is always preferred, with warnings for duplicates issued (#15)
- Started work on
RailPlanner - Other minor documentation changes
- Fixed the old repo link in
setup.py - Fixed #13:
- Implemented the functionality according to the game, preserving Factorio safety
- Added the new list
pure_virtualsignals todraftsman.data.signalsfor ease of access/iteration - Updated documentation to reflect these changes
- Moved initialization of
Blueprint.areaattribute before loading entities inBlueprint.setup()(#14)
- Added the capability to display any logged messages to during
draftsman-updatewith the command line argument-lor--log - Added
prep.pyto prepare releases more automatically so I don't miss steps like a fool (maybe I'll integrate something like poetry in the future) - Updated
env.pyto create thefactorio-modsfolder if it doesn't exist, in case the user accidentally deleted it - Updated
env.pyso that everything is now sorted (mostly) properly - Updated readme to point to related Alt-F4 article
- Updated
requirements.txtto includebuildfor development - Changed the manner in which sort items are searched in
env.py(related to issue #9) - Changed the manner in which the order of items are determined so there's less redundancy
- Changed
normalize_module_namefrom non-digit characters to alphanumeric characters (duh!) (#11) - Changed
normalize_module_nameto distinguish between "slash" paths and "dot" paths and only convert "dot" paths if found (#11) - Added more duct tape to the local file requiring issue machine (#11)
- Removed
temp.pyfrom GitHub distribution, it was only really intended as scrap paper for me - Fixed #10
- Fixed #12
- Fixed #9
- Added
signalsattribute toConstantCombinator, which aliasescontrol_behavior["filters"] - (Re)Added circuit attributes back to
ArithmeticCombinatorandDeciderCombinator - Minor docs fixes
- Bugfix: resolved #6
- Bugfix: resolved #8 (At least for now, current behavior should be more predictable)
- Also cleaned and documented the
updateprocess inenv.pyto make it a little clearer exactly what's going on, and trimmed the fat
- Updated
factorio-datato1.1.58 - Added description of
control_behaviorattribute structure todocs/sourcefolder - Added read-only
global_positionproperty toSpatialLike; allows for efficient querying of an objects root-most position - Added
SpatialHashMap.get_all - Added
utils.flatten_entitiessince it's used in a number of places - Added a
ItemCapacityWarning, issued when*Containerobjects request items that exceed their inventory size - Added
entities.flippableto hold whether or not each entity can be flipped or not (tentative, still WIP) - Integrated
entities.flippableintoEntityclass, as well asTransformable - Updated
tox.inito use--no-modsondraftsman-update - Reworked
SpatialHashMapandget_areato useglobal_positioninstead ofposition - Reworked
RequestItemsMixinand added it to more prototypes - Split
ModuleSlotsMixinfromRequestItemsMixinto compartmentalize more - Adding science pack item requests to a
Labno longer raises a warning (works with any lab) - Made
set_x_filtercode more consistent across different prototype filter types - Added folder loading to
draftsman-update - Documentation format fixes/additions
- Bugfix: Fixed the local paths that now point from
factorio-draftsmaninstead offactorio-draftsman/draftsmanindraftsman-updatefor folders - Bugfix: Changed Lua file requiring so that it makes (somewhat) more sense; Honestly the whole thing is pretty fricking scuffed, and needs a redo
- Bugfix: Fixed
OverlappingObjectsWarningoccurring when placing two groups with the same local coordinates but different global coordinates in anEntityCollection - Bugfix: Fixed Maximum recursion depth errors when running
examples/item_stack_signals.pywith large modpacks with many items; this should no longer occur period - Bugfix: Split
index_dictinenv.extract_itemstogroup_index_dictandsubgroup_index_dict - Bugfix: Encapsulated
orderswapping inenv.get_orderwith atry exceptblock
- Officially added to PyPI (in beta state for the foreseeable future)
- Finished first pass of documentation
- Added
factorio_version_testing.py, which tests against prior versions of Factorio - Draftsman is validated to work with versions of Factorio >= 1.0.0
- Added
Association, which is a loose wrapper aroundweakrefand takes care of the association problem - Added docs for
Association - Added
--no-modsflag todraftsman-updatethat just loads the base mod (why didn't I do this before)
- Added a whole lot of documentation, or a first pass at least
- Updated the quick-start with updated information
- Setup a GitHub workflow to automatically upload code coverage for the badge
- Split the
ModeOfOperationenumeration intoInserterModeOfOperationandLogisticModeOfOperation - Going to attempt to get Docs integration and passing
- Fixed
draftsman-updategreedy module name regex
- First public release!
- Added
Groups(!) - Added the
1KiB_sector_ROM.pyexample to illustrateGroups andrail_planner_usage.pyforRailPlanner(RailPlanneris not implemented yet) - Added
ltn_train_stop.pyexample - Lots of cleaning and formatting, though there's still many cases to analyze
- Added support for command line arguments with
draftsman-update(currently only--verbose) - updated
requirements.txt - Build system appears to be working as desired
- Backported to Python 2.7; tested via
toxthat it works with latest version of Python 2 and 3- (Should work with every version between, but I'm too lazy to test right now)
- Got everything prepared (I think) for building and ultimately distribution
- Fixed
setup.pyso that it should work with all versions greater than 2.7 (as well as requirements.txt) - Added entry-point
draftsman-updatethat must be called after installation to initialize the module - Lots of general folder restructuring (mainly moving everything needed into the module folder)
- Renamed
blueprint.pytoblueprintable.py - Formatted everything using
black - Updated readme
- Updated examples
- Removed some redundant files
- Split all of the mixins into their own files, as well as Entity, EntityLike, Group, etc.
- Added the
SpatialHashMapstructure for Blueprints to speed upfind_entitiesandfind_tiles - Added lots of utility functions related to
SpatialHashMap - Changed Blueprint
entitiesandtilestoKeyListinstead oflist - Added Blueprint warnings
- Changed ALL of the setters to use properties because I didn't know Python properties existed
- Revised test cases to match this revelation
- Unified all of the data into pickles instead of generating source files
- (Still need to figure out module init)
- Updated
.gitignoreto avoid committing previously mentioned pickle files - Added
warning.pyfor warning specification - Added lots of warnings and their messages
- Renamed
errors.pytoerror.pyto match the newwarning.py - Renamed all Errors to have the 'Error' suffix, renamed a few
- Added
DraftsmanErrorandDraftsmanWarningso you can catch any specific error or warning with them - Made the testing suite compatible (or, at least more compatible) with mods
- Added LogisticActiveContainer and LogisticPassiveContainer to complete the logistic suite (I think its clearer this way rather than treating them as containers)
- Hundreds of other small changes
- Finally finished entity testing (for now, reworks are coming)
- Split all of the entity definitions into their own file (much clearer)
- Added
image_converter.pyexample - Updated all other examples
- Changed data loading for items and entities to use pickle instead of writing source files (the rest need to be done like this I think)
- Renamed the package from "factoriotools" to the more succinct and pythonic "draftsman"
- General folder structure rework for both the package itself as well as testing
- Started the behemoth that is going to be Entity and Blueprint testing suites
- Added
.coveragercfor coverage configuration - Added this changelog
- Initial version