Add building check
This commit is contained in:
parent
c05199c7d8
commit
fe7fdb7858
@ -20,6 +20,10 @@ module Game
|
||||
if !world.resources.has(construction.cost)
|
||||
raise NotEnoughtResources.new
|
||||
end
|
||||
tile = world.map.get @point
|
||||
if !tile.as?(PlateauTile)
|
||||
raise InvalidPlaceForBuilding.new
|
||||
end
|
||||
# @todo check requirements
|
||||
world.map.set(ConstructionSiteTile.new(@point))
|
||||
construction.ts
|
||||
|
Loading…
Reference in New Issue
Block a user