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