Add AE2 Cell Workbench API - #219
Open
Armisael5 wants to merge 1 commit into
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an API for the AE2 Cell Workbench which is compatible with Item, Fluid, and Essentia storage cells. Allows reading and editing of partition filters, type/amount restrictions, and oredict filter strings.
Includes the following methods
hasCell():boolean -- Returns whether a storage cell is currently inserted.
getCellType():string -- Returns the inserted cell's type ("item", "fluid", "essentia", ...). Returns nil if no cell is inserted.
getPartition():table -- Returns every partition slot as a table keyed by slot number (1-based). Empty slots are omitted.
setPartition(slot:number[, item:string OR table]):boolean -- Sets the partition in the given slot (1-based). Accepts a name, or a table for more detail (e.g. item damage). Omit the item to clear the slot.
clearPartitions():boolean -- Clears every partition slot on the inserted cell.
getRestriction():number, number -- Returns the cell's restriction as (types, amount). (0, 0) means unrestricted.
setRestriction(types:number, amount:number):boolean -- Sets the cell's restriction. (0, 0) means unrestricted.
getOreFilter():string -- Returns the inserted cell's ore filter string. Returns empty string (not nil) if unset.
setOreFilter(filter:string):boolean -- Sets the inserted cell's ore filter string.
Checklist