Add follow button to ui, improved flow

This commit is contained in:
Lurkars 2021-12-19 12:51:19 +01:00 committed by PizZaKatZe
parent 2cd088c049
commit 3916d9c58e
5 changed files with 51 additions and 2 deletions

View file

@ -114,6 +114,13 @@ export class Player extends Character {
const state = get(followStateStore);
const role = get(followRoleStore);
if (state === followStates.off && this.scene.groups.size > 0) {
followRoleStore.set(followRoles.open);
} else if (this.scene.groups.size == 0) {
followStateStore.set(followStates.off);
followRoleStore.set(followRoles.leader);
}
if (activeEvents.get(UserInputEvent.Follow)) {
if (state === followStates.off && this.scene.groups.size > 0) {
followStateStore.set(followStates.requesting);