Elin Modding Docs Doc
Loading...
Searching...
No Matches
InspectGroupBlock.cs
1using System;
2
3// Token: 0x020005DC RID: 1500
4public class InspectGroupBlock : InspectGroup<BlockInfo>
5{
6 // Token: 0x17000BF8 RID: 3064
7 // (get) Token: 0x06002951 RID: 10577 RVA: 0x000E8F38 File Offset: 0x000E7138
8 public override string MultiName
9 {
10 get
11 {
12 return "Block";
13 }
14 }
15
16 // Token: 0x06002952 RID: 10578 RVA: 0x000E8F40 File Offset: 0x000E7140
17 public override void OnSetActions()
18 {
19 BlockInfo firstTarget = base.FirstTarget;
20 CellDetail detail = firstTarget.pos.detail;
21 TaskDesignation taskDesignation = (detail != null) ? detail.designation : null;
22 if (taskDesignation is TaskMine)
23 {
24 base.Add("cancel".lang() + "\n(" + taskDesignation.Name + ")", "", delegate(BlockInfo t)
25 {
26 CellDetail detail2 = t.pos.detail;
27 TaskDesignation taskDesignation2 = (detail2 != null) ? detail2.designation : null;
28 if (taskDesignation2 is TaskMine)
29 {
30 taskDesignation2.Destroy();
31 }
32 }, true, 0, false);
33 }
34 else
35 {
36 base.Add("Mine", "", delegate(BlockInfo t)
37 {
38 Point pos = t.pos.Copy();
39 if (!EClass._map.tasks.designations.mine.TryAdd(new TaskMine
40 {
41 pos = pos
42 }) && this.Solo)
43 {
44 SE.Beep();
45 }
46 }, true, 0, false);
47 }
48 AM_Picker.Result r = ActionMode.Picker.TestBlock(firstTarget.pos);
49 if (r.IsValid)
50 {
51 base.Add("Copy", "", delegate()
52 {
53 ActionMode.Picker.Select(r);
54 }, false, 0, false);
55 }
56 }
57}
Definition Point.cs:11