mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 18:59:03 -06:00
Grid piece placement conditions
This commit is contained in:
parent
ba576dfc77
commit
083693496e
@ -194,7 +194,7 @@ function Grid:applyPiece(piece)
|
|||||||
for index, offset in pairs(offsets) do
|
for index, offset in pairs(offsets) do
|
||||||
x = piece.position.x + offset.x
|
x = piece.position.x + offset.x
|
||||||
y = piece.position.y + offset.y
|
y = piece.position.y + offset.y
|
||||||
if y + 1 > 0 then
|
if y + 1 > 0 and y < 24 then
|
||||||
self.grid[y+1][x+1] = {
|
self.grid[y+1][x+1] = {
|
||||||
skin = piece.skin,
|
skin = piece.skin,
|
||||||
colour = piece.colour
|
colour = piece.colour
|
||||||
|
Loading…
Reference in New Issue
Block a user