Layering fixes: mine floater layer checked in the wiring verify; contact fixture orbitals carry Station/Turret hull types; grab point rides the floater layer
Unity compile is verified before push; not yet built when committed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d15052afaf
commit
cbdecfd578
4 changed files with 30 additions and 7 deletions
|
|
@ -100,6 +100,7 @@ namespace Aetheria.EditorTools
|
|||
{
|
||||
var settings = AssetDatabase.LoadAssetAtPath<GameSettings>("Assets/Resources/Settings.asset")?.GameplaySettings
|
||||
?? throw new InvalidOperationException("No Settings.asset.");
|
||||
settings.FloaterLayerHeight = -1.5f; // nonzero, so a presenter that drops the floater layer fails
|
||||
|
||||
var wired = SessionState.GetString(Wiring, "").Split('|').Select(entry => entry.Split('=')).ToDictionary(pair => pair[0], pair => pair[1]);
|
||||
var pickupPrefab = AssetDatabase.LoadAssetAtPath<GameObject>(wired["SimpleCommodityPickup"])?.GetComponent<ItemPickup>();
|
||||
|
|
@ -178,6 +179,8 @@ namespace Aetheria.EditorTools
|
|||
want = mine.Body.Position + mineVelocity * lead;
|
||||
Require(Mathf.Abs(seen.x - want.x) < Tolerance && Mathf.Abs(seen.z - want.y) < Tolerance,
|
||||
$"MineInstance at lead {lead}: drawn x/z {seen.x},{seen.z}, the step plus velocity times lead {want.x},{want.y}.");
|
||||
Require(Mathf.Abs(seen.y - DrawAhead.FloaterHeight(zone, settings, new float2(want.x, want.y), lead)) < Tolerance,
|
||||
$"MineInstance y {seen.y} is not on the floater layer.");
|
||||
|
||||
// The round's line is a function of the drawn time: it moves RoundSpeed * lead along its direction between leads.
|
||||
seen = projectile.transform.position;
|
||||
|
|
|
|||
|
|
@ -167,5 +167,5 @@ public class Pickup : Behavior, IAlwaysUpdatedBehavior
|
|||
}
|
||||
|
||||
private void Publish(GrabPhase phase, FloatingItem item, float duration) =>
|
||||
Entity.Capabilities.PublishGrab(new GrabEvent(item.Id, phase, float3(item.Body.Position.x, Entity.Position.y, item.Body.Position.y), duration));
|
||||
Entity.Capabilities.PublishGrab(new GrabEvent(item.Id, phase, float3(item.Body.Position.x, DrawAhead.FloaterHeight(Entity.Zone, Entity.ItemManager.GameplaySettings, item.Body.Position, 0), item.Body.Position.y), duration));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue