public void SetEntity(CharacterEntity entity) { this.entity = entity; GetNode <CharacterIcon>("Body/Left/CharacterIcon").SetCharacter(entity); actions = entity.AllowedActions(); if (actions.Contains(VillageAction.QUEST)) { actions.Remove(VillageAction.QUEST); } popup.Clear(); foreach (VillageAction action in actions) { popup.AddItem(VillageActionExtensions.ActionText(action, entity.ageGroup).Item1.ToString(), id: (int)action); } }
public static bool Idle(this CharacterEntity entity) { return(entity.Action() == VillageAction.REST && entity.AllowedActions().Count > 1); }