This commit is contained in:
33333-33333 2026-07-18 13:06:02 +09:00
commit f657b6a4a4
94 changed files with 3970 additions and 1241 deletions

View file

@ -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;
}