Added spawner and waypoint components, added building_set_waypoint order, particle emitters can now toggle their emission, buildings can now build and spawn units, buildings now dynamically emit smoke when working and no longer when building, added player2 to default game for testing.

This commit is contained in:
2021-01-01 10:18:16 -06:00
parent 0b3897451e
commit 74458dbfd0
22 changed files with 200 additions and 36 deletions

View File

@@ -73,21 +73,14 @@ class IMICRTS
def can_use?(vector)
return false if @game.sidebar.hit?(@game.window.mouse_x, @game.window.mouse_y)
useable = true
done = false
if tile = @director.map.tile_at(vector.x, vector.y)
ent = Entity.get(@entity)
origin = (tile.grid_position - 2)
@director.each_tile(vector, @entity) do |tile, _data, x, y|
if tile.entity || tile.reserved || tile.type != :ground || @director.map.ore_at(x, y)
useable = false
break
end
return false if tile.entity || tile.reserved || tile.type != :ground || @director.map.ore_at(x, y)
end
return useable
else
return false
end