y
This commit is contained in:
parent
61718e2981
commit
f657b6a4a4
94 changed files with 3970 additions and 1241 deletions
|
|
@ -9,7 +9,7 @@
|
|||
Object.defineProperties(World.prototype, Object.getOwnPropertyDescriptors({
|
||||
grassBlockedAt(x, y, self = null, opts = {}) {
|
||||
const ignoreSoft = Boolean(opts?.ignoreSoftPlacement);
|
||||
for (const it of this.nearbyItems(x, y, 96)) {
|
||||
for (const it of (this.nearbyNonGrassItems?.(x, y, 96) || this.nearbyItems(x, y, 96))) {
|
||||
if (it === self || it.dead) continue;
|
||||
if (ignoreSoft && global.TarinaiPhysicsSoftClear.isSoftPlacementType(it.type)) continue;
|
||||
for (const r of this.solidObstacleRects(it)) {
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
return false;
|
||||
},
|
||||
grassCrowdedAt(x, y, minGap = 30, self = null) {
|
||||
for (const it of this.nearbyItems(x, y, Math.max(42, minGap + 16))) {
|
||||
for (const it of (this.nearbyGrass?.(x, y, Math.max(42, minGap + 16)) || this.nearbyItems(x, y, Math.max(42, minGap + 16)))) {
|
||||
if (it === self || it.dead || it.type !== "grass") continue;
|
||||
if (distXY(x, y, it.x, it.y) < minGap) return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue