Delete the minimap asteroids setting; minimap belts always draw
Ruling minimap-asteroids-setting-deleted. PlayerGraphicsSettings key 1 stays retired so old saves load; OldPlayerSettingsLoad now writes the old 3-element array by hand. MapPresenterSmoke asserts a belt draws with the map screen closed. Not built or tested yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4e620671dd
commit
b70372963a
8 changed files with 13 additions and 22 deletions
|
|
@ -64,7 +64,6 @@ public static class MapBeltPerf
|
|||
|
||||
var transforms = new float4[count];
|
||||
var presenter = new MapPresenter(new Material[0], AssetDatabase.LoadAssetAtPath<Material>("Assets/Materials/UI/MapAsteroid.mat"), 4, 4, 3f);
|
||||
presenter.BeltsOnMinimap = true;
|
||||
presenter.RegisterBelt(beltKey, transforms);
|
||||
var baseBelt = new MapBeltPerfBase(zone, zone.AsteroidBelts[beltKey], 4, 4, 3f);
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,6 @@ public static class MapPresenterSmoke
|
|||
var belt = new float4[Asteroids];
|
||||
map.RegisterBelt(beltKey, belt);
|
||||
zone.EvaluateBelt(beltKey, belt, DrawAhead.Time(zone, 0));
|
||||
map.BeltsOnMinimap = true;
|
||||
map.SetFade(ship, 1f);
|
||||
map.SetFade(other, 1f);
|
||||
map.SetMinimapScale(2f);
|
||||
|
|
@ -218,15 +217,10 @@ public static class MapPresenterSmoke
|
|||
for (var i = 0; i < belt.Length; i++)
|
||||
Require(read[i].x == belt[i].x && read[i].y == belt[i].y && read[i].z == belt[i].z && read[i].w == belt[i].w, $"Belt buffer differs from the frame's floats at {i}.");
|
||||
|
||||
// The setting still gates belts on the minimap, and the map screen always shows them.
|
||||
map.BeltsOnMinimap = false;
|
||||
map.Draw(zone, 0);
|
||||
Require(map.BeltDraws == 0, "A belt drew on the minimap with the setting off.");
|
||||
map.OpenMapScreen(true);
|
||||
map.Draw(zone, 0);
|
||||
Require(map.BeltDraws == 1, "The map screen did not draw the belt with the setting off.");
|
||||
// Belts draw on the minimap with the map screen closed.
|
||||
map.OpenMapScreen(false);
|
||||
map.BeltsOnMinimap = true;
|
||||
map.Draw(zone, 0);
|
||||
Require(map.BeltDraws == 1, "A belt did not draw on the minimap with the map screen closed.");
|
||||
|
||||
// Fade: half faded reaches the icon's colour alpha on the next draw; faded out draws nothing.
|
||||
map.SetFade(ship, .5f);
|
||||
|
|
|
|||
|
|
@ -297,7 +297,6 @@ public class ActionGameManager : MonoBehaviour
|
|||
ItemManager = new ItemManager(CultCache, PendingScenario != null ? new ProvenanceLedger() : RunSave.Lots(CultCache),
|
||||
Settings.GameplaySettings, Debug.Log);
|
||||
ZoneRenderer.ItemManager = ItemManager;
|
||||
ZoneRenderer.Map.BeltsOnMinimap = PlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap;
|
||||
|
||||
// TODO: Process Stories
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class PlayerGameplaySettings
|
|||
public class PlayerGraphicsSettings
|
||||
{
|
||||
[Key(0)] public Quality NebulaQuality = Quality.Normal;
|
||||
[Key(1)] public bool ShowAsteroidsInMinimap;
|
||||
// Key 1, retired: ShowAsteroidsInMinimap (minimap belts always draw)
|
||||
// How hard the camera shakes when the player's ship takes an impact: 0 off, 1 full (Feedback.Cue).
|
||||
[Key(2)] public float ScreenShake = 1f;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -333,9 +333,6 @@ public class MainMenu : MonoBehaviour
|
|||
CloudRenderer.quality = ActionGameManager.PlayerSettings.GraphicsSettings.NebulaQuality;
|
||||
},
|
||||
Enum.GetNames(typeof(Quality)));
|
||||
_nextMenu.panel.AddField("Show Asteroids in Minimap",
|
||||
() => ActionGameManager.PlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap,
|
||||
b => ActionGameManager.PlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap = b);
|
||||
_nextMenu.panel.AddField("Screen Shake",
|
||||
() => ActionGameManager.PlayerSettings.GraphicsSettings.ScreenShake,
|
||||
f => ActionGameManager.PlayerSettings.GraphicsSettings.ScreenShake = f,
|
||||
|
|
|
|||
|
|
@ -68,8 +68,6 @@ public class MapPresenter
|
|||
public void SetMinimapScale(float scale) => _minimapScale = scale;
|
||||
public void OpenMapScreen(bool open) => _mapScreenOpen = open;
|
||||
|
||||
// PlayerGraphicsSettings.ShowAsteroidsInMinimap: belt sprites on the minimap; the map screen always shows them.
|
||||
public bool BeltsOnMinimap { get; set; }
|
||||
public void SetMapScreenScale(float scale) => _mapScreenScale = scale;
|
||||
|
||||
// Destroy in play mode, DestroyImmediate where the editor smokes run without one.
|
||||
|
|
@ -231,8 +229,7 @@ public class MapPresenter
|
|||
material.SetFloat("_DepthRange", depthRange);
|
||||
}
|
||||
|
||||
if (BeltsOnMinimap || _mapScreenOpen)
|
||||
foreach (var belt in _belts.Values) DrawBelt(belt);
|
||||
foreach (var belt in _belts.Values) DrawBelt(belt);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
|
|
|
|||
|
|
@ -10350,7 +10350,9 @@ no Unity probe was run.
|
|||
`PlayerGraphicsSettings.ShowAsteroidsInMinimap` (key 1, menu field
|
||||
MainMenu.cs:299) and is forced on in the map screen. This is the cost the
|
||||
operator added the setting for. The 3D belt already fills `_beltTransforms`
|
||||
(float4 per asteroid) every frame.
|
||||
(float4 per asteroid) every frame. The setting is deleted (ruling
|
||||
minimap-asteroids-setting-deleted); the map presenter draws minimap belts
|
||||
every frame.
|
||||
- Already 2D: GravityField.shader writes `-gravityHeight` as a colour into an
|
||||
RFloat texture from a flat quad. The tint, influence and patch passes are
|
||||
flat quads at the root height. None of them clips on depth. The contour's
|
||||
|
|
|
|||
|
|
@ -569,7 +569,10 @@ public sealed partial class RunStartTests
|
|||
MessagePackSerializer.Serialize(ref writer, new Dictionary<string, string> { ["story"] = "hash" }, options);
|
||||
MessagePackSerializer.Serialize(ref writer, new PlayerGameplaySettings { TemperatureUnit = TemperatureUnit.Kelvin, SignificantDigits = 5 }, options);
|
||||
MessagePackSerializer.Serialize(ref writer, new PlayerInputSettings { ActionBarInputs = { "<Keyboard>/1" } }, options);
|
||||
MessagePackSerializer.Serialize(ref writer, new PlayerGraphicsSettings { NebulaQuality = Quality.High, ShowAsteroidsInMinimap = true }, options);
|
||||
writer.WriteArrayHeader(3); // the old PlayerGraphicsSettings: Key 1 the retired minimap bool
|
||||
MessagePackSerializer.Serialize(ref writer, Quality.High, options);
|
||||
writer.Write(true);
|
||||
writer.Write(1f);
|
||||
writer.Flush();
|
||||
|
||||
var settings = MessagePackSerializer.Deserialize<PlayerSettings>(buffer.WrittenMemory, options);
|
||||
|
|
@ -578,7 +581,7 @@ public sealed partial class RunStartTests
|
|||
Assert.Equal("hash", settings.HashedStoryFiles["story"]);
|
||||
Assert.Equal((TemperatureUnit.Kelvin, 5), (settings.GameplaySettings.TemperatureUnit, settings.GameplaySettings.SignificantDigits));
|
||||
Assert.Equal("<Keyboard>/1", Assert.Single(settings.InputSettings.ActionBarInputs));
|
||||
Assert.Equal((Quality.High, true), (settings.GraphicsSettings.NebulaQuality, settings.GraphicsSettings.ShowAsteroidsInMinimap));
|
||||
Assert.Equal((Quality.High, 1f), (settings.GraphicsSettings.NebulaQuality, settings.GraphicsSettings.ScreenShake));
|
||||
}
|
||||
|
||||
// A scenario's Brief is player text (the menu shows it): it names gear by what the catalog sells today. A name a rename retired,
|
||||
|
|
|
|||
Loading…
Reference in a new issue