update periphs to not be static

This commit is contained in:
Ramon Gonzalez Fernandez
2021-04-12 13:38:27 -04:00
parent 3faf729045
commit dcad97c81b
10 changed files with 79 additions and 78 deletions

View File

@@ -9,14 +9,15 @@ interface ReducedItemInfo {
interface DetailedItemInfo extends ReducedItemInfo {
public var displayName:String;
public var tag:Null<String>;
public var maxCount:Int;
public var tags:Table<String, Bool>;
}
extern class ItemStorage {
public static function size():Int; // Get the size of this inventory.
public static function list():Table<Int, ReducedItemInfo>; // List all items in this inventory.
public static function getItemDetail(slot:Int):DetailedItemInfo; // Get detailed information about an item.
public static function pushItems(toName:String, fromSlot:Int, ?limit:Int, ?toSlot:Int):Int; // Push items from one inventory to another connected one.
public static function pullItems(fromName:String, fromSlot:Int, ?limit:Int, ?toSlot:Int):Int; // Pull items from a connected inventory into this one.
public function size():Int; // Get the size of this inventory.
public function list():Table<Int, ReducedItemInfo>; // List all items in this inventory.
public function getItemDetail(slot:Int):DetailedItemInfo; // Get detailed information about an item.
public function pushItems(toName:String, fromSlot:Int, ?limit:Int, ?toSlot:Int):Int; // Push items from one inventory to another connected one.
public function pullItems(fromName:String, fromSlot:Int, ?limit:Int, ?toSlot:Int):Int; // Pull items from a connected inventory into this one.
}