Added last 2 units, added sidebar actions and build queue components, entities can now have their build actions put on the sidebar

This commit is contained in:
2019-11-21 14:04:33 -06:00
parent 902e48d53a
commit cec0c45932
12 changed files with 107 additions and 8 deletions

View File

@@ -69,6 +69,17 @@ class IMICRTS
@director.schedule_order(Order::SELECTED_UNITS, @player.id, @selected_entities)
else
pick_entity
if ent = @selected_entities.first
return unless ent.component(:sidebar_actions)
@game.sidebar_actions.clear do |stack|
ent.component(:sidebar_actions).actions.each do |action|
stack.button action.label, tip: action.description do
action.block.call if action.block
end
end
end
end
end
end
end