@siredvin/typed-peripheral-craftospc 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chest.lua +11 -0
- package/chest.ts +17 -0
- package/lualib_bundle.lua +9 -0
- package/package.json +55 -0
package/chest.lua
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__New = ____lualib.__TS__New
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local ____typed_2Dperipheral_2Dbase = require("@siredvin/typed-peripheral-base")
|
|
5
|
+
local IPeripheralProvider = ____typed_2Dperipheral_2Dbase.IPeripheralProvider
|
|
6
|
+
____exports.chestPeripheralProvider = __TS__New(
|
|
7
|
+
IPeripheralProvider,
|
|
8
|
+
"chest",
|
|
9
|
+
function() return nil end
|
|
10
|
+
)
|
|
11
|
+
return ____exports
|
package/chest.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InventoryAPI } from "@siredvin/typed-peripheral-api/inventory";
|
|
2
|
+
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
3
|
+
|
|
4
|
+
export declare interface ChestItem {
|
|
5
|
+
name: string;
|
|
6
|
+
count: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** @noSelf **/
|
|
10
|
+
export declare interface CraftOSPCChest extends InventoryAPI {
|
|
11
|
+
setItem(slot: number, item: ChestItem);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const chestPeripheralProvider = new IPeripheralProvider<CraftOSPCChest>(
|
|
15
|
+
"chest",
|
|
16
|
+
() => null
|
|
17
|
+
);
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@siredvin/typed-peripheral-craftospc",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Typed peripheral library for CraftOS PC peripherals",
|
|
5
|
+
"files": [
|
|
6
|
+
"./*.ts",
|
|
7
|
+
"./*.lua"
|
|
8
|
+
],
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"author": "SirEdvin",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
16
|
+
"build": "tstl",
|
|
17
|
+
"clean": "rm -f *.lua",
|
|
18
|
+
"lint": "eslint . --ext .ts,.js",
|
|
19
|
+
"depcheck": "depcheck"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@siredvin/cc-types": "1.1.0",
|
|
23
|
+
"@siredvin/craftos-types": "1.2.0",
|
|
24
|
+
"@siredvin/api-types": "1.1.0",
|
|
25
|
+
"@jackmacwindows/lua-types": "^2.13.1",
|
|
26
|
+
"@siredvin/typed-peripheral-base": "0.4.0",
|
|
27
|
+
"@siredvin/typed-peripheral-api": "0.1.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"typescript-to-lua": "*",
|
|
31
|
+
"typescript": "*"
|
|
32
|
+
},
|
|
33
|
+
"nx": {
|
|
34
|
+
"targets": {
|
|
35
|
+
"lint": {
|
|
36
|
+
"executor": "@nx/linter:eslint",
|
|
37
|
+
"outputs": [
|
|
38
|
+
"{options.outputFile}"
|
|
39
|
+
],
|
|
40
|
+
"options": {
|
|
41
|
+
"lintFilePatterns": [
|
|
42
|
+
"packages/typed-peripheral/**/*.{ts,tsx,js,jsx}"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"depcheck": {
|
|
47
|
+
"executor": "nx:run-commands",
|
|
48
|
+
"options": {
|
|
49
|
+
"command": "depcheck",
|
|
50
|
+
"cwd": "packages/typed-peripheral"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|