Building units now uses orders 😃

This commit is contained in:
2021-01-01 14:25:44 -06:00
parent 74458dbfd0
commit 5f301337b4
35 changed files with 171 additions and 100 deletions

View File

@@ -17,7 +17,9 @@ class IMICRTS
action.label = ent.name.to_s.split("_").map{ |s| s.capitalize }.join(" ")
action.description = "Cost: #{ent.cost}\n#{ent.description}"
action.block = proc { @parent.component(:build_queue).add(data[:entity]) }
action.block = proc do
@parent.director.schedule_order(IMICRTS::Order::BUILD_UNIT, @parent.player.id, @parent.id, data[:entity])
end
when :set_tool
ent = IMICRTS::Entity.get(data[:entity])