Applied ComputerCraft 0.3.0 (26.1.2)
Curse Maven Snippet
What's new
What's new
- Scripts can now look inside your storage: list every ME Drive and ME Chest (add-on drives too), the cells in them, and how many bytes and types each cell uses.
- Item, fluid and other storage totals (total, used and available bytes) are now available, so you can build storage-capacity monitors.
- You can check channel usage, controller state and whether the network is still booting, even while it is starting up or has two controllers.
- Scripts can list the devices on the network with their idle power draw, read every crafting pattern, and see what the network is waiting on for running crafting jobs.
- Server admins get two new config options: one switches all of this network inspection off, the other hides drive and chest coordinates. Both are on by default, so public servers should review them.
Added
- Read-only network info methods on
me_bridge(#7) (f4eaf36), closes #3. Like the other methods, they need a powered, active network.getDrives()returns one entry per ME Drive and ME Chest, including add-on drives.- Fields:
name,id,displayName,position({x, y, z}),cellCount(slots, not installed cells),powered,totalBytes,usedBytesand acellslist. - Drive byte totals mix all key types and include unpowered drives.
- Fields:
getCells()returns the same cell entries as one flat list. Each entry also has the drive'spositionandpowered.- Every cell entry has
slot(1-based),itemandstate(EMPTY,NOT_EMPTY,TYPES_FULLorFULL). It may also haveidleDrain. - Basic cells add
type,keyType,bytes,totalBytes,bytesPerTypeandtotalTypes. They may also haveusedBytesandusedTypes. - A cell that fails to read returns
slot,item,stateanderror, and is left out of the storage totals.
- Every cell entry has
getStorageInfo()returnsitems,fluidsandother(keyed by key type id). Each is a{total, used, available}table in bytes, all from one scan.- Storage getters with Advanced Peripherals' names:
getTotalItemStorage(),getUsedItemStorage(),getAvailableItemStorage(),getTotalFluidStorage(),getUsedFluidStorage()andgetAvailableFluidStorage().- They return bytes, summed over basic cells in powered drives and chests.
- Storage buses are not counted.
- Scan results are reused within one game tick.
getChannelInfo()returnschannelMode,usedChannels,isBootingandcontrollerState(NO_CONTROLLER,CONTROLLER_ONLINEorCONTROLLER_CONFLICT).- It also answers while the node is not active.
- There is no
maxChannels.
getDevices()returnstotalNodes,totalIdlePowerand adeviceslist grouped by kind, sorted by idle power with the highest first.- Each device entry has
name,displayName,count,idlePowerandchannelsCarried. channelsCarriedcounts channels routed through the devices, not channels they use.
- Each device entry has
getPatterns([filter])lists patterns whose primary output matches the filter.keyTypeandtypework on their own here.- Add
alternatives = falseto the filter to omitpossibleInputs. - An Advanced Peripherals style
{input = ..., output = ...}filter raises an error. - Each pattern has
patternItem,patternType,primaryOutput,outputsandinputs. Each input hasprimaryInput,possibleInputs(up to 16, withalternativesTruncated),multiplierand, when crafting leaves something behind,remaining. - Results are ordered by primary output id and capped at 2000 patterns or 20000 stack entries. When the list is cut,
"TRUNCATED"is returned as a second value.
getPendingRequests()lists resources the network is waiting on providers to produce, byproducts included.countis the amount still expected back.- New server config options:
allowNetworkInfo(defaulttrue) gates all of the methods above.exposeDrivePositions(defaulttrue) controls whetherpositionis included ingetDrivesandgetCells. Drive coordinates can be read from any block of the network, so consider setting it tofalseon public servers.
Full changelog: https://github.com/danielbowne/applied-computercraft/compare/v0.2.0...v0.3.0
This mod has no additional files

