19 lines
636 B
TypeScript
19 lines
636 B
TypeScript
import {SimpleState} from "../../gamesystems/states/SimpleState";
|
|
import {TemplateElement} from "../TemplateElement";
|
|
import {ScriptAccountCondition} from "../../gamesystems/conditions/ScriptAccountCondition";
|
|
|
|
export class SimpleTemplateState extends SimpleState {
|
|
|
|
conditionMap: Map<TemplateElement, ScriptAccountCondition[]> = new Map();
|
|
|
|
addTemplateElement(templateElement: TemplateElement) {
|
|
if(!this.conditionMap.has(templateElement)) {
|
|
this.conditionMap.set(templateElement, this.conditions)
|
|
}
|
|
}
|
|
|
|
removeTemplateElement(templateElement: TemplateElement) {
|
|
this.conditionMap.delete(templateElement)
|
|
}
|
|
}
|