Skip to content

Commit

Permalink
update test instance
Browse files Browse the repository at this point in the history
  • Loading branch information
CheatCod committed Jul 1, 2023
1 parent 1053b19 commit 6eb01a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/implementations/generic/js/main/TestInstance.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import * as atom from "https://raw.githubusercontent.com/Lodestone-Team/lodestone_core/dev/src/implementations/generic/js/main/libs/atom_instance.ts";

import { EventStream } from "https://raw.githubusercontent.com/Lodestone-Team/lodestone-macro-lib/main/events.ts";

export default class TestInstance extends atom.AtomInstance {
uuid!: string;
_state : atom.InstanceState = "Stopped";
public async setupManifest(): Promise<atom.SetupManifest> {
return {
setting_sections: {
Expand All @@ -27,17 +29,21 @@ export default class TestInstance extends atom.AtomInstance {
};
}
public async setup(setupValue: atom.SetupValue, dotLodestoneConfig: atom.DotLodestoneConfig, path: string): Promise<void> {
this.uuid = dotLodestoneConfig.uuid;
return;
}
public async restore(dotLodestoneConfig: atom.DotLodestoneConfig, path: string): Promise<void> {
this.uuid = dotLodestoneConfig.uuid;
return;
}
public async start(caused_by: atom.CausedBy, block: boolean): Promise<void> {
console.log("start");
new EventStream(this.uuid, "test_im_in_ts").emitStateChange("Running");
return;
}
public async stop(caused_by: atom.CausedBy, block: boolean): Promise<void> {
console.log("stop");
new EventStream(this.uuid, "test_im_in_ts").emitStateChange("Stopped");
return;
}
public restart(caused_by: atom.CausedBy, block: boolean): Promise<void> {
Expand Down

0 comments on commit 6eb01a0

Please sign in to comment.