Elin Modding Docs Doc
Loading...
Searching...
No Matches
Zone_SnowGrave.cs
1using System;
2using System.Collections.Generic;
3
4// Token: 0x020006FC RID: 1788
5public class Zone_SnowGrave : Zone
6{
7 // Token: 0x17000F9A RID: 3994
8 // (get) Token: 0x060033FB RID: 13307 RVA: 0x0011B989 File Offset: 0x00119B89
9 public override float PrespawnRate
10 {
11 get
12 {
13 return 1f;
14 }
15 }
16
17 // Token: 0x060033FC RID: 13308 RVA: 0x0011B990 File Offset: 0x00119B90
18 public override void OnGenerateMap()
19 {
20 base.OnGenerateMap();
21 Zone_SnowGrave.GenerateGrave();
22 }
23
24 // Token: 0x060033FD RID: 13309 RVA: 0x0011B9A0 File Offset: 0x00119BA0
25 public static void GenerateGrave()
26 {
27 List<Dictionary<string, string>> list = new ExcelData("Data/Raw/monument", 1).BuildList("_default");
28 list.RemoveAt(0);
29 list.Shuffle<Dictionary<string, string>>();
30 int num = 200;
31 string[] source = new string[]
32 {
33 "1035",
34 "1036",
35 "1046",
36 "1047",
37 "1048",
38 "1049",
39 "1050"
40 };
41 MapBounds mapBounds = new MapBounds
42 {
43 x = 50,
44 z = 50,
45 maxX = num - 1,
46 maxZ = num - 1,
47 Size = num
48 };
49 Point point = null;
50 Point point2 = new Point();
51 Point p = new Point(125, 125);
52 for (int i = 0; i < list.Count; i++)
53 {
54 Dictionary<string, string> dictionary = list[i];
55 Thing thing = ThingGen.Create(source.RandomItem<string>(), -1, -1);
56 for (int j = 0; j < 1000; j++)
57 {
58 bool flag = true;
59 point = mapBounds.GetRandomSurface(false, true, false);
60 if (!point.HasBlock && !point.HasObj && point.Distance(p) >= 5)
61 {
62 for (int k = point.z - 1; k < point.z + 2; k++)
63 {
64 for (int l = point.x - 1; l < point.x + 2; l++)
65 {
66 point2.Set(l, k);
67 if (point2.Installed != null)
68 {
69 flag = false;
70 break;
71 }
72 }
73 if (!flag)
74 {
75 break;
76 }
77 }
78 if (flag)
79 {
80 break;
81 }
82 }
83 }
84 EClass._zone.AddCard(thing, point).Install();
85 thing.c_note = BackerContent.ConvertName(dictionary["Name"]);
86 thing.c_idBacker = dictionary["id"].ToInt();
87 thing.isModified = true;
88 }
89 string[] source2 = new string[]
90 {
91 "1058",
92 "1059",
93 "1064"
94 };
95 for (int m = 0; m < 500; m++)
96 {
97 Card card = EClass._zone.AddThing(source2.RandomItem<string>(), EClass._zone.bounds.GetRandomSurface(false, true, false));
98 card.dir = EClass.rnd(2);
99 card.Install();
100 }
101 }
102}
Definition Card.cs:13
Definition Point.cs:11
Definition Thing.cs:10
Definition Zone.cs:14