13 lines
358 B
JavaScript
13 lines
358 B
JavaScript
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.");
|
|
}
|
|
} |