Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
CellDetail.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2
3public class CellDetail
4{
5 public static int count;
6
7 public static Map map;
8
9 public static Stack<CellDetail> cache = new Stack<CellDetail>();
10
11 public List<Thing> things = new List<Thing>(1);
12
13 public List<Chara> charas = new List<Chara>(1);
14
15 public Area area;
16
18
20
22
23 public static CellDetail Empty => new CellDetail();
24
25 public static CellDetail Spawn()
26 {
27 if (cache.Count > 0)
28 {
29 return cache.Pop();
30 }
31 count++;
32 return new CellDetail();
33 }
34
35 public bool TryDespawn()
36 {
37 if (things.Count > 0 || charas.Count > 0 || area != null || footmark != null || designation != null || anime != null)
38 {
39 return false;
40 }
41 cache.Push(this);
42 return true;
43 }
44
45 public void MoveThingToBottom(Thing t)
46 {
47 if (things.Count != 1)
48 {
49 things.Remove(t);
50 things.Insert(0, t);
51 for (int i = 0; i < things.Count && things[i].IsInstalled; i++)
52 {
53 things[i].stackOrder = i;
54 }
55 }
56 }
57
58 public void MoveThingToTop(Thing t)
59 {
60 if (things.Count != 1)
61 {
62 int num = 0;
63 for (int i = 0; i < things.Count && things[i].IsInstalled; i++)
64 {
65 num = i + 1;
66 }
67 if (num >= things.Count)
68 {
69 num--;
70 }
71 things.Remove(t);
72 things.Insert(num, t);
73 t.stackOrder = num;
74 }
75 }
76}
Definition: Area.cs:4
static int count
Definition: CellDetail.cs:5
void MoveThingToBottom(Thing t)
Definition: CellDetail.cs:45
static Map map
Definition: CellDetail.cs:7
void MoveThingToTop(Thing t)
Definition: CellDetail.cs:58
TaskDesignation designation
Definition: CellDetail.cs:19
bool TryDespawn()
Definition: CellDetail.cs:35
static CellDetail Empty
Definition: CellDetail.cs:23
List< Thing > things
Definition: CellDetail.cs:11
static CellDetail Spawn()
Definition: CellDetail.cs:25
TransAnime anime
Definition: CellDetail.cs:21
static Stack< CellDetail > cache
Definition: CellDetail.cs:9
List< Chara > charas
Definition: CellDetail.cs:13
Area area
Definition: CellDetail.cs:15
Footmark footmark
Definition: CellDetail.cs:17
Definition: Map.cs:13
Definition: Thing.cs:8