Skip to content

Add AE2 Cell Workbench API - #219

Open
Armisael5 wants to merge 1 commit into
GTNewHorizons:masterfrom
Armisael5:feature/ae2-cell-workbench-api
Open

Add AE2 Cell Workbench API#219
Armisael5 wants to merge 1 commit into
GTNewHorizons:masterfrom
Armisael5:feature/ae2-cell-workbench-api

Conversation

@Armisael5

Copy link
Copy Markdown

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

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant