Moved 'building' entity definitions into 'structures', renamed building component to structure, moved svgs the same.

This commit is contained in:
2021-01-15 11:05:57 -06:00
parent 36f79c6f57
commit e30d73d4d7
19 changed files with 29 additions and 29 deletions

View File

@@ -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

View File

@@ -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!"