mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-16 00:02:33 +00:00
Moved 'building' entity definitions into 'structures', renamed building component to structure, moved svgs the same.
This commit is contained in:
@@ -5,7 +5,7 @@ class IMICRTS
|
||||
|
||||
return unless item
|
||||
|
||||
item.progress += 1 if @parent.component(:building).construction_complete?
|
||||
item.progress += 1 if @parent.component(:structure).construction_complete?
|
||||
|
||||
return unless item.progress >= item.entity.build_steps && !item.completed
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class IMICRTS
|
||||
class Building < Component
|
||||
class Structure < Component
|
||||
def setup
|
||||
data.construction_progress ||= 0
|
||||
data.construction_goal ||= Entity.get(@parent.name).build_steps
|
||||
@@ -18,7 +18,7 @@ class IMICRTS
|
||||
@text.x = @parent.position.x - @text.width / 2
|
||||
@text.draw
|
||||
when :deconstruct
|
||||
when :building
|
||||
when :structure
|
||||
when :idle
|
||||
else
|
||||
raise "Unknown state!"
|
||||
Reference in New Issue
Block a user