protected List<SButton> getAllOrderButtons(List<? extends Humanoid> selectedHumanoids) { Game kc = Rpg.getGame(); allOrderButtons.clear(); orders.clear(); orderTypes.clear(); if (selectedHumanoids == null) return allOrderButtons; for (LivingThing lt : selectedHumanoids) if (lt.getPossibleOrders() != null) orders.addAll(lt.getPossibleOrders()); List<? extends Humanoid> unitsOrdering = selectedHumanoids; OrderButton abButton; for (Order o : orders) { if (orderTypes.contains(o.getOrderType())) continue; abButton = OrderButton.getInstance(kc.getActivity(), o, null, unitsOrdering, ui.getSoldierOrders()); allOrderButtons.add(abButton); orderTypes.add(o.getOrderType()); } return allOrderButtons; }
protected List<SButton> getAllOrderButtons(Humanoid selectedHumanoid) { Game kc = Rpg.getGame(); allOrderButtons.clear(); orders.clear(); orderTypes.clear(); if (selectedHumanoid != null) if (selectedHumanoid.getPossibleOrders() != null) orders.addAll(selectedHumanoid.getPossibleOrders()); ArrayList<Humanoid> unitsOrdering = null; for (Order o : orders) { if (orderTypes.contains(o.getOrderType())) continue; OrderButton abButton = OrderButton.getInstance( kc.getActivity(), o, selectedHumanoid, unitsOrdering, ui.getSoldierOrders()); allOrderButtons.add(abButton); orderTypes.add(o.getOrderType()); } return allOrderButtons; }