game registry internal refactor
This commit is contained in:
parent
be2ebf1223
commit
d5573db251
11 changed files with 68 additions and 188 deletions
|
|
@ -72,7 +72,7 @@ public partial class SaveSerializer : Node
|
|||
|
||||
foreach (var plantId in parsed.PlayerPlants)
|
||||
{
|
||||
playerProgress.PlayerPlants.Add(GameRegistry.GetPlantByName(plantId));
|
||||
playerProgress.PlayerPlants.Add((PlantResource)GameRegistry.GetEntityByName(plantId));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ public partial class SaveSerializer : Node
|
|||
}
|
||||
private static void InitiateCleanSave()
|
||||
{
|
||||
PlayerProgress.Instance.PlayerPlants = new List<PlantResource>([GameRegistry.GetPlantByName("peashooter")]);
|
||||
PlayerProgress.Instance.PlayerPlants = new List<PlantResource>([(PlantResource)GameRegistry.GetEntityByName("peashooter")]);
|
||||
PlayerProgress.Instance.Money = 0;
|
||||
|
||||
SaveGame();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue