Added replaced sidebar label buttons with images, added 'radar' (currently static map image)

This commit is contained in:
2021-01-06 10:31:57 -06:00
parent 18641ece15
commit 0d449b9375
12 changed files with 85 additions and 50 deletions

View File

@@ -7,7 +7,9 @@ tiles = [
]
IMICRTS::Entity.define_entity(:power_plant, :building, 800, 45, "Generates power", tiles) do |entity|
entity.has(:building)
unless entity.proto_entity
entity.has(:building)
end
entity.radius = 24
entity.max_health = 100.0
@@ -29,14 +31,13 @@ IMICRTS::Entity.define_entity(:power_plant, :building, 800, 45, "Generates power
emitters.each do |pos|
entity.particle_emitters << IMICRTS::SmokeEmitter.new(position: pos)
entity.particle_emitters << IMICRTS::SmokeEmitter.new(position: pos, emitting: false)
end
entity.on_tick do
# entity.produce_power
if entity.component(:building).data.state == :idle
if entity.component(:building).construction_complete?
entity.particle_emitters.each do |emitter|
emitter.emitting = true
end