fix: sow target

This commit is contained in:
cha0s 2021-05-10 00:25:35 -05:00
parent 47fc6694b5
commit cf53b23291

View File

@ -95,12 +95,14 @@ export default (Room) => class FarmableRoom extends Room {
return DIRT === tiles.tileAt(target);
}
maySowAt(target) {
maySowAt(center) {
const [tiles] = this.tiles;
const {tileSize} = tiles;
const target = Vector.floor(Vector.div(center, tileSize));
return (
'client' !== process.env.SIDE
&& TILLED === tiles.tileAt(target)
&& !this.isPlantAt(target)
&& !this.isPlantAt(center)
);
}