fix: sow target
This commit is contained in:
parent
47fc6694b5
commit
cf53b23291
|
@ -95,12 +95,14 @@ export default (Room) => class FarmableRoom extends Room {
|
||||||
return DIRT === tiles.tileAt(target);
|
return DIRT === tiles.tileAt(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
maySowAt(target) {
|
maySowAt(center) {
|
||||||
const [tiles] = this.tiles;
|
const [tiles] = this.tiles;
|
||||||
|
const {tileSize} = tiles;
|
||||||
|
const target = Vector.floor(Vector.div(center, tileSize));
|
||||||
return (
|
return (
|
||||||
'client' !== process.env.SIDE
|
'client' !== process.env.SIDE
|
||||||
&& TILLED === tiles.tileAt(target)
|
&& TILLED === tiles.tileAt(target)
|
||||||
&& !this.isPlantAt(target)
|
&& !this.isPlantAt(center)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user