added on_order handler to entities and components, added visibility map

This commit is contained in:
2021-01-15 17:41:06 -06:00
parent e30d73d4d7
commit 19c5fc8d73
22 changed files with 164 additions and 51 deletions

View File

@@ -33,6 +33,13 @@ class IMICRTS
end
end
def on_order(type, order)
case type
when IMICRTS::Order::CONSTRUCTION_COMPLETE
data.construction_complete = true
end
end
def construction_complete?
data.construction_progress >= data.construction_goal && data.construction_complete
end