Table of Contents

Method PlaceItemOnGroundWhenReady

Namespace
GrindFest
Assembly
GrindFest.dll

PlaceItemOnGroundWhenReady(ItemBehaviour, Vector3, string, float)

PlaceItemOnGround(ItemBehaviour, Vector3, string) that first waits for terrain AT THE TARGET, then checks the item is still there a moment later.

protected IEnumerator PlaceItemOnGroundWhenReady(ItemBehaviour item, Vector3 target, string what = null, float settleSeconds = 0.8)

Parameters

item ItemBehaviour
target Vector3
what string
settleSeconds float

Returns

IEnumerator

Remarks

Use this from a test. WaitForTerrain(float, bool) gates the HERO's position, and the spot a test places things on is usually 1-2 m in front of him - a different point of the same MapMagic tile in practice, but nobody verified that, and the failure it hides is silent: with no terrain collider under the target, the ground lookup comes back empty (or, before 2026-09-20, came back as the Darkness backdrop plane 2.6 m below), the prop lands inside the world, and the test fails much later with something that names neither the prop nor the fall - "Expected container.IsPlanted but got state 'Empty'".

This is the intermittent half of that bug: the same build passed Farming 14/14 in a filtered run and failed three of the same tests in a full one, because the full run reaches them at a different moment of the tile pipeline.

The stay-put check closes the other half, which the terrain gate cannot see: a prop can be placed on real ground and STILL leave. Measured 2026-09-20 in a WebGL player: a planter pot placed at (-191.81, 11.42, 570.79) on ground y=11.37 was at (-190.30, -15.47, 571.68) 0.8 s later, i.e. 27 m below the world - and the test failed two steps after that with "Action returned Failed: Water pot", because CropContainerBehaviour.FindNearest(..., FarmState.Planted, maxDistance: 10f) could no longer see it. That message named the watering can, not the fall.