private static void QueueActionsForPrefab(Entity targetEntity, string prefab) { switch (prefab) { case Prefabs.Counter: case Prefabs.DrinkSurface: case Prefabs.BeerStack: case Prefabs.GlassStack: case Prefabs.IngredientDispenser: case Prefabs.MixologyBook: case Prefabs.DispensingBottle: ActionManagerSystem.Instance.QueueAction(player, new TeleportAction(Locations.BehindBarLocation())); ActionManagerSystem.Instance.QueueAction(player, CommonActions.PlayerUseBar()); break; case Prefabs.Person: var playerChild = player.GetState <InventoryState>().Child; var targetChild = targetEntity.GetState <InventoryState>().Child; if (playerChild != null && targetChild == null) { EventSystem.ParentingRequestEvent.Invoke(new ParentingRequest { EntityFrom = player, EntityTo = targetEntity, Mover = playerChild }); } else { ActionManagerSystem.Instance.QueueAction(player, TalkToNPC(targetEntity)); } break; case Prefabs.Drink: ActionManagerSystem.Instance.QueueAction(player, new SetTargetEntityAction(targetEntity)); ActionManagerSystem.Instance.QueueAction(player, new PickUpItem()); break; case Prefabs.Washup: ActionManagerSystem.Instance.QueueAction(player, new DestoryEntityInInventoryAction()); break; case Prefabs.Console: ActionManagerSystem.Instance.QueueAction(player, new ChangeDayPhaseAction()); break; case Prefabs.BarConsole: ActionManagerSystem.Instance.QueueAction(player, new CloseBarIfOpenAction()); break; default: //Do nothing. break; } }