Пример #1
0
 public Strain JsonModel2Strain_Player(StrainJsonModel s)
 {
     return(new Strain {
         Name = s.Name,
         Owner = s.Owner,
         BasicRace = Local.FindRaceByName(s.BasicRaceName),
         Population = s.Population,
         PlayerSelectedGenes = SemanticObjectController.GenerateText2RegGeneObjects(s.PlayerSelectedGenesName),
         PrivateChemicals = new List <Chemical>()
     });
 }
Пример #2
0
 public Strain JsonModel2Strain_Npc(StrainJsonModel s)
 {
     return(new Strain {
         Name = s.Name,
         Owner = s.Owner,
         BasicRace = Local.FindRaceByName(s.BasicRaceName),
         Population = s.Population,
         PlayerSelectedGenes = SemanticObjectController.GenerateText2RegGeneObjects(s.PlayerSelectedGenesName),
         PrivateChemicals = string.IsNullOrEmpty(s.PrivateChemicalInfos) ? new List <Chemical>() : SemanticObjectController.GenerateText2ChemicalsWithCountInfo(s.PrivateChemicalInfos)
     });
 }