Description:
Pick images based on organization type.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r273:3f5ef8b74e1f -

1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -45,7 +45,17
45 {
45 {
46
46
47 var organization = CreateEntity();
47 var organization = CreateEntity();
48 var image_index = random_generator.Next(1, 7);
48 // var image_index = random_generator.Next(1, 7);
49 var image_index = message.type switch {
50 OrganizationType.Cooperative => MathUtils.NextSample(random_generator, new[] {1, 9, 10}),
51 OrganizationType.LargeCorporation => MathUtils.NextSample(random_generator, new[] {0, 4, 5, 7, 8}),
52 OrganizationType.Family => MathUtils.NextSample(random_generator, new[] {2, 3, 6, 9, 11}),
53 _ => random_generator.Next(1, 7)
54
55 };
56 Logging.Success("Generated image index.");
57
58
49
59
50 var name = message.name != null ? message.name : "#logging_company.capitalizeAll#";
60 var name = message.name != null ? message.name : "#logging_company.capitalizeAll#";
51 var description = message.description != null ? message.description : "";
61 var description = message.description != null ? message.description : "";
@@ -60,4 +70,4
60 }
70 }
61
71
62 }
72 }
63 } No newline at end of file
73 }
@@ -122,6 +122,13
122
122
123 }
123 }
124
124
125 public static int NextSample(Random random, int[] integers)
126 {
127 int index = random.Next(0, integers.Length);
128
129 return integers[index];
130 }
131
125 }
132 }
126
133
127 }
134 }
@@ -208,6 +208,7
208 <Reference Include="JM.LinqFaster">
208 <Reference Include="JM.LinqFaster">
209 <HintPath>..\packages\JM.LinqFaster.1.1.2\lib\net461\JM.LinqFaster.dll</HintPath>
209 <HintPath>..\packages\JM.LinqFaster.1.1.2\lib\net461\JM.LinqFaster.dll</HintPath>
210 </Reference>
210 </Reference>
211 <Reference Include="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"> </Reference>
211 </ItemGroup>
212 </ItemGroup>
212 <ItemGroup>
213 <ItemGroup>
213 <Folder Include="Utils\" />
214 <Folder Include="Utils\" />
You need to be logged in to leave comments. Login now