1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-13 10:11:50 +00:00

Fixed checkCanPlace defaulting wrong

This commit is contained in:
DJ1TJOO 2022-01-20 15:09:57 +01:00
parent 66f085250a
commit caba6db751

View File

@ -58,7 +58,7 @@ export class GameLogic {
* @param {Vector=} param0.offset Optional, move the entity by the given offset first * @param {Vector=} param0.offset Optional, move the entity by the given offset first
* @returns {boolean} true if the entity could be placed there * @returns {boolean} true if the entity could be placed there
*/ */
checkCanPlaceEntity(entity, { allowReplaceBuildings = false, offset = null }) { checkCanPlaceEntity(entity, { allowReplaceBuildings = true, offset = null } = {}) {
// Compute area of the building // Compute area of the building
const rect = entity.components.StaticMapEntity.getTileSpaceBounds(); const rect = entity.components.StaticMapEntity.getTileSpaceBounds();
if (offset) { if (offset) {