mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	Implemented racegroups as list
Added variable racegroups, which allows multiple racegroups to be selected (usefull for rjw race support). Racegroup is still present for backward compatibility.
This commit is contained in:
		
							parent
							
								
									209c149a5a
								
							
						
					
					
						commit
						46436a9e04
					
				
					 5 changed files with 61 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -11,11 +11,11 @@ namespace RJW_BGS
 | 
			
		|||
    public class RaceGeneDef : Def
 | 
			
		||||
    {
 | 
			
		||||
        public int priority;
 | 
			
		||||
        public String raceGroup;
 | 
			
		||||
        public string raceGroup; //keeping this for backwards compatibility
 | 
			
		||||
        public List<string> raceGroups; //racegroup, but in list form so multiple can be entered, preference to use this over racegroup 
 | 
			
		||||
        public List<string> raceNames;
 | 
			
		||||
        public List<string> pawnKindNames;
 | 
			
		||||
        public List<BestialityGeneInheritanceDef> genes;
 | 
			
		||||
        //public List<float> genechances;
 | 
			
		||||
        public String hybridName;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -56,8 +56,10 @@ namespace RJW_BGS
 | 
			
		|||
			{
 | 
			
		||||
				raceGroupDefs = allDefs.Where(delegate (RaceGeneDef group)
 | 
			
		||||
				{
 | 
			
		||||
					String raceGroupDefName = group.raceGroup;
 | 
			
		||||
					return raceGroupDefName != null && raceGroupDefName == raceGroupDef.defName;
 | 
			
		||||
					string raceGroupDefName = group.raceGroup;
 | 
			
		||||
					List<string> list_raceGroupDefName = group.raceGroups;
 | 
			
		||||
					return (raceGroupDefName != null && raceGroupDefName == raceGroupDef.defName) 
 | 
			
		||||
							|| (list_raceGroupDefName != null && list_raceGroupDefName.Contains(raceGroupDef.defName));
 | 
			
		||||
				}).ToList<RaceGeneDef>();
 | 
			
		||||
			}
 | 
			
		||||
			if (raceGroupDefs.Count() > 0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue