TradeMenu sells and repairs through StationServices; credits seed from the stage or the save
The hardcoded credits initializer and its stale scene serialization go. Buy charges the hull price it checked. Sell is a mode of the trade list over the selected bay; Repair is a foldout option for the docked ship. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9651f62ad4
commit
c204397cb0
3 changed files with 52 additions and 6 deletions
|
|
@ -111,7 +111,8 @@ public class ActionGameManager : MonoBehaviour
|
|||
|
||||
public GameSettings Settings;
|
||||
//public string StarterShipTemplate = "Longinus";
|
||||
public int Credits = 15000000;
|
||||
// The run's credits: seeded from the scenario stage on a new game and from SavedGame on Continue, written by SaveRun.
|
||||
[NonSerialized] public int Credits;
|
||||
public float TargetSpottedBlinkFrequency = 20;
|
||||
public float TargetSpottedBlinkOffset = -.25f;
|
||||
|
||||
|
|
@ -252,7 +253,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
if (CurrentGalaxy != null)
|
||||
{
|
||||
var (game, zones) = RunSave.Capture(CultCache, CurrentGalaxy, Zone, DockedEntity ?? CurrentEntity,
|
||||
_actionBarSlots.Select(s => s.Save()).ToArray());
|
||||
_actionBarSlots.Select(s => s.Save()).ToArray(), Credits);
|
||||
RunSave.Commit(CultCache, game, zones, ItemManager.Lots);
|
||||
}
|
||||
}
|
||||
|
|
@ -774,6 +775,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
else
|
||||
{
|
||||
var saved = CultCache.GetGlobal<SavedGame>();
|
||||
Credits = saved.Credits;
|
||||
foreach(var group in CurrentGalaxy.DiscoveredZones
|
||||
.GroupBy(dz=>dz.Distance[CurrentGalaxy.Entrance]))
|
||||
SectorMap.QueueZoneReveal(group);
|
||||
|
|
@ -829,6 +831,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
MainMenu.Refuse($"{scenario.Name} could not start", string.Join("\n", failures));
|
||||
return;
|
||||
}
|
||||
Credits = staged.Credits;
|
||||
SectorMap.QueueZoneReveal(CurrentGalaxy.Entrance.AdjacentZones.Prepend(CurrentGalaxy.Entrance));
|
||||
BindToEntity(staged.Player);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue