Add launchable
This commit is contained in:
13
js/instances/BaseService.js
Normal file
13
js/instances/BaseService.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Instance } from "./Instance.js";
|
||||
export class BaseService extends Instance {
|
||||
constructor(name) {
|
||||
super(name);
|
||||
}
|
||||
SetParent(parent) {
|
||||
if (this.Parent === null) {
|
||||
super.SetParent(parent);
|
||||
return;
|
||||
} // Only accept it once
|
||||
throw new Error("Cannot reparent a service instance.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user