1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-19 00:04:53 +00:00
CC-Tweaked/doc
Jonathan Coates 53811f8169
Allow peripherals to have multiple types (#963)
Peripherals can now have multiple types:
 - A single primary type. This is the same as the current idea of a
   type - some identifier which (mostly) uniquely identifies this kind
   of peripheral. For instance, "speaker" or "minecraft:chest".

 - 0 or more "additional" types. These are more like traits, and
   describe what other behaviour the peripheral has - is it an
   inventory? Does it supply additional peripherals (like a wired
   modem)?.

This is mostly intended for the generic peripheral system, but it might
prove useful elsewhere too - we'll have to see!

 - peripheral.getType (and modem.getTypeRemote) now returns 1 or more
   values, rather than exactly one.
 - Add a new peripheral.hasType (and modem.hasTypeRemote) function which
   determines if a peripheral has the given type (primary or
   additional).
 - Change peripheral.find and all internal peripheral methods to use
   peripheral.hasType instead.
 - Update the peripherals program to show all types

This effectively allows you to do things like
`peripheral.find("inventory")` to find all inventories.

This also rewrites the introduction to the peripheral API, hopefully
making it a little more useful.
2021-11-29 17:37:30 +00:00
..
events Allow peripherals to have multiple types (#963) 2021-11-29 17:37:30 +00:00
images Some doc updates 2021-08-13 22:35:08 +01:00
stub Add the rest of the feature introduction versions to the docs (#908) 2021-08-26 08:02:58 +01:00
head.html Update illuaminate again 2020-12-28 18:20:13 +00:00
index.md Move repo to cc-tweaked org 2021-10-17 18:14:32 +01:00
logo.png Optimise CC:T logo 2021-09-26 10:26:42 +01:00