@siredvin/typed-peripheral-turtlematic 0.2.0 → 0.3.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/automata/{end.ts → end.d.ts} +3 -15
- package/automata/{husbandry.ts → husbandry.d.ts} +2 -12
- package/automata/mason.d.ts +7 -0
- package/automata/{protective.ts → protective.d.ts} +4 -15
- package/automata/{regular.ts → regular.d.ts} +3 -11
- package/automata/smithing.d.ts +8 -0
- package/mics/chatter.d.ts +14 -0
- package/mics/lava_bucket.d.ts +10 -0
- package/mics/{mimic.ts → mimic.d.ts} +4 -6
- package/mics/piston.d.ts +14 -0
- package/mics/sticky_piston.d.ts +16 -0
- package/package.json +3 -3
- package/automata/mason.ts +0 -19
- package/automata/smithing.ts +0 -22
- package/mics/chatter.ts +0 -29
- package/mics/lava_bucket.ts +0 -16
- package/mics/piston.ts +0 -28
- package/mics/sticky_piston.ts +0 -32
|
@@ -7,19 +7,7 @@ import { LookApi } from "@siredvin/typed-peripheral-api/look";
|
|
|
7
7
|
import { CaptureAPI } from "@siredvin/typed-peripheral-api/capture";
|
|
8
8
|
import { SuckAPI } from "@siredvin/typed-peripheral-api/suck";
|
|
9
9
|
import { WarpAPI } from "@siredvin/typed-peripheral-api/warp";
|
|
10
|
-
|
|
11
10
|
/** @noSelf **/
|
|
12
|
-
export declare interface EndAutomata
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
ConfigurationAPI<object>,
|
|
16
|
-
OperationApi,
|
|
17
|
-
LookApi,
|
|
18
|
-
CaptureAPI,
|
|
19
|
-
SuckAPI,
|
|
20
|
-
WarpAPI {}
|
|
21
|
-
|
|
22
|
-
export const endAutomataProvider = new IPeripheralProvider<EndAutomata>(
|
|
23
|
-
"endAutomata",
|
|
24
|
-
() => null
|
|
25
|
-
);
|
|
11
|
+
export declare interface EndAutomata extends FuelApi, InteractionApi, ConfigurationAPI<object>, OperationApi, LookApi, CaptureAPI, SuckAPI, WarpAPI {
|
|
12
|
+
}
|
|
13
|
+
export declare const endAutomataProvider: IPeripheralProvider<EndAutomata>;
|
|
@@ -5,24 +5,14 @@ import { ConfigurationAPI } from "@siredvin/typed-peripheral-api/configuration";
|
|
|
5
5
|
import { OperationApi } from "@siredvin/typed-peripheral-api/operations";
|
|
6
6
|
import { LookApi } from "@siredvin/typed-peripheral-api/look";
|
|
7
7
|
import { CaptureAPI } from "@siredvin/typed-peripheral-api/capture";
|
|
8
|
-
|
|
9
8
|
export declare interface HusbandryConfiguration extends FuelAPIConfiguration {
|
|
10
9
|
maxHusbandryPoints: number;
|
|
11
10
|
simulationGrowCost: number;
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
/** @noSelf **/
|
|
15
|
-
export declare interface HusbandryAutomata
|
|
16
|
-
extends FuelApi,
|
|
17
|
-
InteractionApi,
|
|
18
|
-
ConfigurationAPI<HusbandryConfiguration>,
|
|
19
|
-
OperationApi,
|
|
20
|
-
LookApi,
|
|
21
|
-
CaptureAPI {
|
|
13
|
+
export declare interface HusbandryAutomata extends FuelApi, InteractionApi, ConfigurationAPI<HusbandryConfiguration>, OperationApi, LookApi, CaptureAPI {
|
|
22
14
|
harvest(direction?: "up" | "down"): Result;
|
|
23
15
|
getHusbandryPoints(): number;
|
|
24
16
|
simulateGrow(): Result;
|
|
25
17
|
}
|
|
26
|
-
|
|
27
|
-
export const husbandryAutomataProvider =
|
|
28
|
-
new IPeripheralProvider<HusbandryAutomata>("husbandryAutomata", () => null);
|
|
18
|
+
export declare const husbandryAutomataProvider: IPeripheralProvider<HusbandryAutomata>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
+
import { FuelApi } from "@siredvin/typed-peripheral-api/fuel";
|
|
3
|
+
/** @noSelf **/
|
|
4
|
+
export declare interface MasonAutomata extends FuelApi {
|
|
5
|
+
chisel(mode: "block", target: string, direction?: Direction): Result;
|
|
6
|
+
}
|
|
7
|
+
export declare const masonProvider: IPeripheralProvider<MasonAutomata>;
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
-
import {
|
|
2
|
+
import { FuelApi } from "@siredvin/typed-peripheral-api/fuel";
|
|
3
3
|
import { InteractionApi } from "@siredvin/typed-peripheral-api/interaction";
|
|
4
4
|
import { ConfigurationAPI } from "@siredvin/typed-peripheral-api/configuration";
|
|
5
5
|
import { CaptureAPI } from "@siredvin/typed-peripheral-api/capture";
|
|
6
6
|
import { OperationApi } from "@siredvin/typed-peripheral-api/operations";
|
|
7
7
|
import { LookApi } from "@siredvin/typed-peripheral-api/look";
|
|
8
8
|
import { SuckAPI } from "@siredvin/typed-peripheral-api/suck";
|
|
9
|
-
|
|
10
9
|
/** @noSelf **/
|
|
11
|
-
export declare interface ProtectiveAutomata
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ConfigurationAPI<object>,
|
|
15
|
-
CaptureAPI,
|
|
16
|
-
OperationApi,
|
|
17
|
-
LookApi,
|
|
18
|
-
SuckAPI {}
|
|
19
|
-
|
|
20
|
-
export const protectiveProvider = new IPeripheralProvider<ProtectiveAutomata>(
|
|
21
|
-
"protectiveAutomata",
|
|
22
|
-
() => null
|
|
23
|
-
);
|
|
10
|
+
export declare interface ProtectiveAutomata extends FuelApi, InteractionApi, ConfigurationAPI<object>, CaptureAPI, OperationApi, LookApi, SuckAPI {
|
|
11
|
+
}
|
|
12
|
+
export declare const protectiveProvider: IPeripheralProvider<ProtectiveAutomata>;
|
|
@@ -3,15 +3,7 @@ import { FuelApi } from "@siredvin/typed-peripheral-api/fuel";
|
|
|
3
3
|
import { InteractionApi } from "@siredvin/typed-peripheral-api/interaction";
|
|
4
4
|
import { ConfigurationAPI } from "@siredvin/typed-peripheral-api/configuration";
|
|
5
5
|
import { OperationApi } from "@siredvin/typed-peripheral-api/operations";
|
|
6
|
-
|
|
7
6
|
/** @noSelf **/
|
|
8
|
-
export declare interface Automata
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
ConfigurationAPI<object>,
|
|
12
|
-
OperationApi {}
|
|
13
|
-
|
|
14
|
-
export const automataProvider = new IPeripheralProvider<Automata>(
|
|
15
|
-
"automata",
|
|
16
|
-
() => null
|
|
17
|
-
);
|
|
7
|
+
export declare interface Automata extends FuelApi, InteractionApi, ConfigurationAPI<object>, OperationApi {
|
|
8
|
+
}
|
|
9
|
+
export declare const automataProvider: IPeripheralProvider<Automata>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
+
import { FuelApi } from "@siredvin/typed-peripheral-api/fuel";
|
|
3
|
+
/** @noSelf **/
|
|
4
|
+
export declare interface SmithingAutomata extends FuelApi {
|
|
5
|
+
smelt(mode: "block", direction?: Direction): Result;
|
|
6
|
+
smelt(mode: "inventory", limit: number): Result;
|
|
7
|
+
}
|
|
8
|
+
export declare const smithingProvider: IPeripheralProvider<SmithingAutomata>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
+
/** @noSelf **/
|
|
3
|
+
export interface Chatter extends IPeripheral {
|
|
4
|
+
getMessage(): string | null;
|
|
5
|
+
setMessage(text: string): void;
|
|
6
|
+
clearMessage(): void;
|
|
7
|
+
}
|
|
8
|
+
/** @noSelf **/
|
|
9
|
+
export declare class DummyChatter implements Chatter {
|
|
10
|
+
getMessage(): string | null;
|
|
11
|
+
setMessage(text: string): void;
|
|
12
|
+
clearMessage(): void;
|
|
13
|
+
}
|
|
14
|
+
export declare const chatterProvider: IPeripheralProvider<Chatter>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
+
/** @noSelf **/
|
|
3
|
+
export interface LavaBucket extends IPeripheral {
|
|
4
|
+
void(): void;
|
|
5
|
+
}
|
|
6
|
+
/** @noSelf **/
|
|
7
|
+
export declare class DummyLavaBucket implements LavaBucket {
|
|
8
|
+
void(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare const lavaBucketProvider: IPeripheralProvider<LavaBucket>;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
-
|
|
3
2
|
/** @noSelf **/
|
|
4
3
|
export interface Mimic extends IPeripheral {
|
|
5
|
-
reset();
|
|
6
|
-
setTransformation(rlm: string);
|
|
4
|
+
reset(): any;
|
|
5
|
+
setTransformation(rlm: string): any;
|
|
7
6
|
getTransformation(): string;
|
|
8
|
-
setMimic(block: LuaTable, nbtData?: string);
|
|
7
|
+
setMimic(block: LuaTable, nbtData?: string): any;
|
|
9
8
|
getMimic(): LuaMultiReturn<[LuaTable | null, string | null]>;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
export const mimicProvider = new IPeripheralProvider<Mimic>("mimic");
|
|
10
|
+
export declare const mimicProvider: IPeripheralProvider<Mimic>;
|
package/mics/piston.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
+
/** @noSelf **/
|
|
3
|
+
export interface Piston extends IPeripheral {
|
|
4
|
+
push(direction?: Direction): Result;
|
|
5
|
+
isSilent(): boolean;
|
|
6
|
+
setSilent(value: boolean): void;
|
|
7
|
+
}
|
|
8
|
+
/** @noSelf **/
|
|
9
|
+
export declare class DummyPiston implements Piston {
|
|
10
|
+
isSilent(): boolean;
|
|
11
|
+
setSilent(value: boolean): void;
|
|
12
|
+
push(direction?: Direction): Result;
|
|
13
|
+
}
|
|
14
|
+
export declare const pistonProvider: IPeripheralProvider<Piston>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
+
/** @noSelf **/
|
|
3
|
+
export interface StickyPiston extends IPeripheral {
|
|
4
|
+
pull(direction?: Direction): Result;
|
|
5
|
+
push(direction?: Direction): Result;
|
|
6
|
+
isSilent(): boolean;
|
|
7
|
+
setSilent(value: boolean): void;
|
|
8
|
+
}
|
|
9
|
+
/** @noSelf **/
|
|
10
|
+
export declare class DummyStickyPiston implements StickyPiston {
|
|
11
|
+
isSilent(): boolean;
|
|
12
|
+
setSilent(value: boolean): void;
|
|
13
|
+
push(direction?: Direction): Result;
|
|
14
|
+
pull(direction?: Direction): Result;
|
|
15
|
+
}
|
|
16
|
+
export declare const stickyPistonProvider: IPeripheralProvider<StickyPiston>;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siredvin/typed-peripheral-turtlematic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Typed peripheral library for Turtlematic peripherals",
|
|
5
5
|
"files": [
|
|
6
|
-
"./*.ts",
|
|
6
|
+
"./*.d.ts",
|
|
7
7
|
"./*.lua",
|
|
8
|
-
"./**/*.ts",
|
|
8
|
+
"./**/*.d.ts",
|
|
9
9
|
"./**/*.lua"
|
|
10
10
|
],
|
|
11
11
|
"publishConfig": {
|
package/automata/mason.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
-
import { DummyFuelApi, FuelApi } from "@siredvin/typed-peripheral-api/fuel";
|
|
3
|
-
|
|
4
|
-
/** @noSelf **/
|
|
5
|
-
export declare interface MasonAutomata extends FuelApi {
|
|
6
|
-
chisel(mode: "block", target: string, direction?: Direction): Result;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/** @noSelf **/
|
|
10
|
-
class DummyMasonAutomata extends DummyFuelApi implements MasonAutomata {
|
|
11
|
-
chisel(mode: "block", target: string, direction?: Direction): Result {
|
|
12
|
-
return $multi(true, null);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const masonProvider = new IPeripheralProvider<MasonAutomata>(
|
|
17
|
-
"masonAutomata",
|
|
18
|
-
() => new DummyMasonAutomata()
|
|
19
|
-
);
|
package/automata/smithing.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
-
import { DummyFuelApi, FuelApi } from "@siredvin/typed-peripheral-api/fuel";
|
|
3
|
-
|
|
4
|
-
/** @noSelf **/
|
|
5
|
-
export declare interface SmithingAutomata extends FuelApi {
|
|
6
|
-
smelt(mode: "block", direction?: Direction): Result;
|
|
7
|
-
smelt(mode: "inventory", limit: number): Result;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** @noSelf **/
|
|
11
|
-
class DummySmithingAutomata extends DummyFuelApi implements SmithingAutomata {
|
|
12
|
-
smelt(mode: "block", direction?: Direction): Result;
|
|
13
|
-
smelt(mode: "inventory", limit: number): Result;
|
|
14
|
-
smelt(mode: unknown, limit?: unknown): Result {
|
|
15
|
-
return $multi(true, null);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const smithingProvider = new IPeripheralProvider<SmithingAutomata>(
|
|
20
|
-
"smithingAutomata",
|
|
21
|
-
() => new DummySmithingAutomata()
|
|
22
|
-
);
|
package/mics/chatter.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
-
|
|
3
|
-
let DUMMY_MESSAGE: string | null = null;
|
|
4
|
-
|
|
5
|
-
/** @noSelf **/
|
|
6
|
-
export interface Chatter extends IPeripheral {
|
|
7
|
-
getMessage(): string | null;
|
|
8
|
-
setMessage(text: string): void;
|
|
9
|
-
clearMessage(): void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** @noSelf **/
|
|
13
|
-
export class DummyChatter implements Chatter {
|
|
14
|
-
getMessage(): string | null {
|
|
15
|
-
return DUMMY_MESSAGE;
|
|
16
|
-
}
|
|
17
|
-
setMessage(text: string): void {
|
|
18
|
-
DUMMY_MESSAGE = text;
|
|
19
|
-
print("Setting message to chatter", DUMMY_MESSAGE);
|
|
20
|
-
}
|
|
21
|
-
clearMessage(): void {
|
|
22
|
-
DUMMY_MESSAGE = null;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const chatterProvider = new IPeripheralProvider<Chatter>(
|
|
27
|
-
"chatter",
|
|
28
|
-
() => new DummyChatter()
|
|
29
|
-
);
|
package/mics/lava_bucket.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
-
|
|
3
|
-
/** @noSelf **/
|
|
4
|
-
export interface LavaBucket extends IPeripheral {
|
|
5
|
-
void(): void;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/** @noSelf **/
|
|
9
|
-
export class DummyLavaBucket implements LavaBucket {
|
|
10
|
-
void(): void {}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const lavaBucketProvider = new IPeripheralProvider<LavaBucket>(
|
|
14
|
-
"lava_bucket",
|
|
15
|
-
() => new DummyLavaBucket()
|
|
16
|
-
);
|
package/mics/piston.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
-
|
|
3
|
-
let IS_SILENT_GLOBAL = false;
|
|
4
|
-
|
|
5
|
-
/** @noSelf **/
|
|
6
|
-
export interface Piston extends IPeripheral {
|
|
7
|
-
push(direction?: Direction): Result;
|
|
8
|
-
isSilent(): boolean;
|
|
9
|
-
setSilent(value: boolean): void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** @noSelf **/
|
|
13
|
-
export class DummyPiston implements Piston {
|
|
14
|
-
isSilent(): boolean {
|
|
15
|
-
return IS_SILENT_GLOBAL;
|
|
16
|
-
}
|
|
17
|
-
setSilent(value: boolean): void {
|
|
18
|
-
IS_SILENT_GLOBAL = value;
|
|
19
|
-
}
|
|
20
|
-
push(direction?: Direction): Result {
|
|
21
|
-
return $multi(true, null);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const pistonProvider = new IPeripheralProvider<Piston>(
|
|
26
|
-
"piston",
|
|
27
|
-
() => new DummyPiston()
|
|
28
|
-
);
|
package/mics/sticky_piston.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { IPeripheralProvider } from "@siredvin/typed-peripheral-base";
|
|
2
|
-
|
|
3
|
-
let IS_SILENT_GLOBAL = false;
|
|
4
|
-
|
|
5
|
-
/** @noSelf **/
|
|
6
|
-
export interface StickyPiston extends IPeripheral {
|
|
7
|
-
pull(direction?: Direction): Result;
|
|
8
|
-
push(direction?: Direction): Result;
|
|
9
|
-
isSilent(): boolean;
|
|
10
|
-
setSilent(value: boolean): void;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/** @noSelf **/
|
|
14
|
-
export class DummyStickyPiston implements StickyPiston {
|
|
15
|
-
isSilent(): boolean {
|
|
16
|
-
return IS_SILENT_GLOBAL;
|
|
17
|
-
}
|
|
18
|
-
setSilent(value: boolean): void {
|
|
19
|
-
IS_SILENT_GLOBAL = value;
|
|
20
|
-
}
|
|
21
|
-
push(direction?: Direction): Result {
|
|
22
|
-
return $multi(true, null);
|
|
23
|
-
}
|
|
24
|
-
pull(direction?: Direction): Result {
|
|
25
|
-
return $multi(true, null);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const stickyPistonProvider = new IPeripheralProvider<StickyPiston>(
|
|
30
|
-
"stickyPiston",
|
|
31
|
-
() => new DummyStickyPiston()
|
|
32
|
-
);
|