mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-16 16:12:35 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user