mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-16 08:02:36 +00:00
Added construction complete order, added jeep overlay image to show windscreen, added rotors component for helicopter; more work needed, replaced all build and vehicle assets with ones that are 6x larger to prevent pixelization when zoomed in, misc.
This commit is contained in:
@@ -48,7 +48,7 @@ IMICRTS::Entity.define_entity(:construction_yard, :building, 2_000, 310, "Provid
|
||||
|
||||
entity.on_tick do
|
||||
|
||||
if entity.component(:building).data.state == :idle
|
||||
if entity.component(:building).construction_complete?
|
||||
item = entity.component(:build_queue).queue.first
|
||||
|
||||
entity.particle_emitters.each_with_index do |emitter, i|
|
||||
|
||||
@@ -37,10 +37,12 @@ IMICRTS::Entity.define_entity(:war_factory, :building, 2_000, 310, "Builds and r
|
||||
entity.particle_emitters << IMICRTS::SmokeEmitter.new(position: p2, emitting: false)
|
||||
|
||||
entity.on_tick do
|
||||
item = entity.component(:build_queue).queue.first
|
||||
if entity.component(:building).construction_complete?
|
||||
item = entity.component(:build_queue).queue.first
|
||||
|
||||
entity.particle_emitters.each do |pe|
|
||||
pe.emitting = !!item
|
||||
entity.particle_emitters.each do |pe|
|
||||
pe.emitting = !!item
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user