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:
parent
66f085250a
commit
caba6db751
@ -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) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user