mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 10:51:55 -04:00
Added class with slot names for reference to API.
This commit is contained in:
parent
99f2822888
commit
1c6c4be7f1
@ -8,5 +8,5 @@
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers|Core",
|
||||
provides = "OpenComputersAPI|Component",
|
||||
apiVersion = "3.0.0")
|
||||
apiVersion = "3.0.1")
|
||||
package li.cil.oc.api.component;
|
@ -73,6 +73,7 @@ public interface Item {
|
||||
*
|
||||
* @param stack the item stack to get the slot type for.
|
||||
* @return the slot type of the specified item.
|
||||
* @see li.cil.oc.api.driver.item.Slot
|
||||
*/
|
||||
String slot(ItemStack stack);
|
||||
|
||||
|
@ -22,6 +22,7 @@ public interface Container extends Item {
|
||||
*
|
||||
* @param stack the item stack to get the provided slot type for.
|
||||
* @return the slot type provided by that dynamic slot upgrade.
|
||||
* @see li.cil.oc.api.driver.item.Slot
|
||||
*/
|
||||
String providedSlot(ItemStack stack);
|
||||
|
||||
|
22
src/main/java/li/cil/oc/api/driver/item/Slot.java
Normal file
22
src/main/java/li/cil/oc/api/driver/item/Slot.java
Normal file
@ -0,0 +1,22 @@
|
||||
package li.cil.oc.api.driver.item;
|
||||
|
||||
/**
|
||||
* Reference list of slot types in OpenComputers.
|
||||
*/
|
||||
public final class Slot {
|
||||
public static final String None = "none";
|
||||
public static final String Any = "any";
|
||||
|
||||
public static final String Card = "card";
|
||||
public static final String ComponentBus = "component_bus";
|
||||
public static final String Container = "container";
|
||||
public static final String CPU = "cpu";
|
||||
public static final String Floppy = "floppy";
|
||||
public static final String HDD = "hdd";
|
||||
public static final String Memory = "memory";
|
||||
public static final String Tablet = "tablet";
|
||||
public static final String Upgrade = "upgrade";
|
||||
|
||||
private Slot() {
|
||||
}
|
||||
}
|
@ -7,5 +7,5 @@
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers|Core",
|
||||
provides = "OpenComputersAPI|Driver|Item",
|
||||
apiVersion = "3.0.0")
|
||||
apiVersion = "3.0.1")
|
||||
package li.cil.oc.api.driver.item;
|
@ -7,5 +7,5 @@
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers|Core",
|
||||
provides = "OpenComputersAPI|Driver",
|
||||
apiVersion = "3.0.0")
|
||||
apiVersion = "3.0.1")
|
||||
package li.cil.oc.api.driver;
|
@ -5,5 +5,5 @@
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers|Core",
|
||||
provides = "OpenComputersAPI|Event",
|
||||
apiVersion = "3.0.0")
|
||||
apiVersion = "3.0.1")
|
||||
package li.cil.oc.api.event;
|
@ -16,5 +16,5 @@
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers|Core",
|
||||
provides = "OpenComputersAPI|FileSystem",
|
||||
apiVersion = "3.0.0")
|
||||
apiVersion = "3.0.1")
|
||||
package li.cil.oc.api.fs;
|
@ -16,5 +16,5 @@
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers|Core",
|
||||
provides = "OpenComputersAPI|Internal",
|
||||
apiVersion = "3.0.0")
|
||||
apiVersion = "3.0.1")
|
||||
package li.cil.oc.api.internal;
|
@ -19,5 +19,5 @@
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers|Core",
|
||||
provides = "OpenComputersAPI|Machine",
|
||||
apiVersion = "3.0.0")
|
||||
apiVersion = "3.0.1")
|
||||
package li.cil.oc.api.machine;
|
@ -7,5 +7,5 @@
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers|Core",
|
||||
provides = "OpenComputersAPI|Network",
|
||||
apiVersion = "3.0.0")
|
||||
apiVersion = "3.0.1")
|
||||
package li.cil.oc.api.network;
|
@ -37,5 +37,5 @@
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers|Core",
|
||||
provides = "OpenComputersAPI|Core",
|
||||
apiVersion = "3.0.0")
|
||||
apiVersion = "3.0.1")
|
||||
package li.cil.oc.api;
|
@ -10,5 +10,5 @@
|
||||
@cpw.mods.fml.common.API(
|
||||
owner = "OpenComputers|Core",
|
||||
provides = "OpenComputersAPI|Prefab",
|
||||
apiVersion = "3.0.0")
|
||||
apiVersion = "3.0.1")
|
||||
package li.cil.oc.api.prefab;
|
@ -1,19 +1,21 @@
|
||||
package li.cil.oc.common
|
||||
|
||||
object Slot {
|
||||
val None = "none"
|
||||
val Any = "any"
|
||||
import li.cil.oc.api.driver
|
||||
|
||||
val Card = "card"
|
||||
val ComponentBus = "component_bus"
|
||||
val Container = "container"
|
||||
val CPU = "cpu"
|
||||
val Floppy = "floppy"
|
||||
val HDD = "hdd"
|
||||
val Memory = "memory"
|
||||
val Tablet = "tablet"
|
||||
object Slot {
|
||||
val None = driver.item.Slot.None
|
||||
val Any = driver.item.Slot.Any
|
||||
|
||||
val Card = driver.item.Slot.Card
|
||||
val ComponentBus = driver.item.Slot.ComponentBus
|
||||
val Container = driver.item.Slot.Container
|
||||
val CPU = driver.item.Slot.CPU
|
||||
val Floppy = driver.item.Slot.Floppy
|
||||
val HDD = driver.item.Slot.HDD
|
||||
val Memory = driver.item.Slot.Memory
|
||||
val Tablet = driver.item.Slot.Tablet
|
||||
val Tool = "tool"
|
||||
val Upgrade = "upgrade"
|
||||
val Upgrade = driver.item.Slot.Upgrade
|
||||
|
||||
val All = Array(Card, ComponentBus, Container, CPU, Floppy, HDD, Memory, Tablet, Tool, Upgrade)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user