ConceptCreator/src/app/project/game-model/templates/simpleGamesystem/SimpleTemplateState.ts
Sebastian Böckelmann c1070ed1ff
All checks were successful
E2E Testing / test (push) Successful in 1m33s
Don't override default conditions/actions when loading character specific gamesystem
2024-04-14 09:32:19 +02:00

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)
}
}