Elin Modding Docs Doc
Loading...
Searching...
No Matches
Point.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Runtime.CompilerServices;
5using Newtonsoft.Json;
6using UnityEngine;
7
8// Token: 0x02000694 RID: 1684
9[Serializable]
10public class Point : EClass
11{
12 // Token: 0x06003067 RID: 12391 RVA: 0x0010F24D File Offset: 0x0010D44D
13 public static Point GetShared(int x, int z)
14 {
15 Point.shared.x = x;
16 Point.shared.z = z;
17 return Point.shared;
18 }
19
20 // Token: 0x17000DE9 RID: 3561
21 // (get) Token: 0x06003068 RID: 12392 RVA: 0x0010F26A File Offset: 0x0010D46A
22 public int index
23 {
24 get
25 {
26 return this.x + this.z * Point.map.Size;
27 }
28 }
29
30 // Token: 0x17000DEA RID: 3562
31 // (get) Token: 0x06003069 RID: 12393 RVA: 0x0010F284 File Offset: 0x0010D484
32 public Cell cell
33 {
34 get
35 {
36 return Point.map.cells[this.x, this.z];
37 }
38 }
39
40 // Token: 0x17000DEB RID: 3563
41 // (get) Token: 0x0600306A RID: 12394 RVA: 0x0010F2A1 File Offset: 0x0010D4A1
42 public SourceMaterial.Row matRoofBlock
43 {
44 get
45 {
46 return this.cell.matRoofBlock;
47 }
48 }
49
50 // Token: 0x17000DEC RID: 3564
51 // (get) Token: 0x0600306B RID: 12395 RVA: 0x0010F2AE File Offset: 0x0010D4AE
52 public SourceMaterial.Row matBlock
53 {
54 get
55 {
56 return this.cell.matBlock;
57 }
58 }
59
60 // Token: 0x17000DED RID: 3565
61 // (get) Token: 0x0600306C RID: 12396 RVA: 0x0010F2BB File Offset: 0x0010D4BB
62 public SourceMaterial.Row matFloor
63 {
64 get
65 {
66 return this.cell.matFloor;
67 }
68 }
69
70 // Token: 0x17000DEE RID: 3566
71 // (get) Token: 0x0600306D RID: 12397 RVA: 0x0010F2C8 File Offset: 0x0010D4C8
72 public SourceMaterial.Row matBridge
73 {
74 get
75 {
76 return this.cell.matBridge;
77 }
78 }
79
80 // Token: 0x17000DEF RID: 3567
81 // (get) Token: 0x0600306E RID: 12398 RVA: 0x0010F2D5 File Offset: 0x0010D4D5
82 public SourceBlock.Row sourceRoofBlock
83 {
84 get
85 {
86 return this.cell.sourceRoofBlock;
87 }
88 }
89
90 // Token: 0x17000DF0 RID: 3568
91 // (get) Token: 0x0600306F RID: 12399 RVA: 0x0010F2E2 File Offset: 0x0010D4E2
92 public SourceBlock.Row sourceBlock
93 {
94 get
95 {
96 return this.cell.sourceBlock;
97 }
98 }
99
100 // Token: 0x17000DF1 RID: 3569
101 // (get) Token: 0x06003070 RID: 12400 RVA: 0x0010F2EF File Offset: 0x0010D4EF
102 public SourceFloor.Row sourceFloor
103 {
104 get
105 {
106 return this.cell.sourceFloor;
107 }
108 }
109
110 // Token: 0x17000DF2 RID: 3570
111 // (get) Token: 0x06003071 RID: 12401 RVA: 0x0010F2FC File Offset: 0x0010D4FC
112 public SourceFloor.Row sourceBridge
113 {
114 get
115 {
116 return this.cell.sourceBridge;
117 }
118 }
119
120 // Token: 0x17000DF3 RID: 3571
121 // (get) Token: 0x06003072 RID: 12402 RVA: 0x0010F309 File Offset: 0x0010D509
122 public SourceObj.Row sourceObj
123 {
124 get
125 {
126 return this.cell.sourceObj;
127 }
128 }
129
130 // Token: 0x17000DF4 RID: 3572
131 // (get) Token: 0x06003073 RID: 12403 RVA: 0x0010F316 File Offset: 0x0010D516
132 public CellDetail detail
133 {
134 get
135 {
136 return this.cell.detail;
137 }
138 }
139
140 // Token: 0x17000DF5 RID: 3573
141 // (get) Token: 0x06003074 RID: 12404 RVA: 0x0010F323 File Offset: 0x0010D523
142 public Area area
143 {
144 get
145 {
146 CellDetail detail = this.detail;
147 if (detail == null)
148 {
149 return null;
150 }
151 return detail.area;
152 }
153 }
154
155 // Token: 0x17000DF6 RID: 3574
156 // (get) Token: 0x06003075 RID: 12405 RVA: 0x0010F336 File Offset: 0x0010D536
157 public Point Front
158 {
159 get
160 {
161 return new Point(this.x + 1, this.z - 1);
162 }
163 }
164
165 // Token: 0x17000DF7 RID: 3575
166 // (get) Token: 0x06003076 RID: 12406 RVA: 0x0010F34D File Offset: 0x0010D54D
167 public GrowSystem growth
168 {
169 get
170 {
171 return this.cell.growth;
172 }
173 }
174
175 // Token: 0x17000DF8 RID: 3576
176 // (get) Token: 0x06003077 RID: 12407 RVA: 0x0010F35A File Offset: 0x0010D55A
177 public int eloX
178 {
179 get
180 {
181 return EClass.scene.elomap.minX + this.x;
182 }
183 }
184
185 // Token: 0x17000DF9 RID: 3577
186 // (get) Token: 0x06003078 RID: 12408 RVA: 0x0010F372 File Offset: 0x0010D572
187 public int eloY
188 {
189 get
190 {
191 return EClass.scene.elomap.minY + this.z;
192 }
193 }
194
195 // Token: 0x17000DFA RID: 3578
196 // (get) Token: 0x06003079 RID: 12409 RVA: 0x0010F38A File Offset: 0x0010D58A
197 public bool HasDesignation
198 {
199 get
200 {
201 CellDetail detail = this.cell.detail;
202 return ((detail != null) ? detail.designation : null) != null;
203 }
204 }
205
206 // Token: 0x17000DFB RID: 3579
207 // (get) Token: 0x0600307A RID: 12410 RVA: 0x0010F3A6 File Offset: 0x0010D5A6
208 public bool HasDirt
209 {
210 get
211 {
212 return this.cell.decal > 0;
213 }
214 }
215
216 // Token: 0x17000DFC RID: 3580
217 // (get) Token: 0x0600307B RID: 12411 RVA: 0x0010F3B6 File Offset: 0x0010D5B6
218 // (set) Token: 0x0600307C RID: 12412 RVA: 0x0010F3F0 File Offset: 0x0010D5F0
219 public bool IsValid
220 {
221 get
222 {
223 return this.x >= 0 && this.z >= 0 && this.x < Point.map.Size && this.z < Point.map.Size;
224 }
225 set
226 {
227 this.x = (value ? 0 : -999);
228 }
229 }
230
231 // Token: 0x17000DFD RID: 3581
232 // (get) Token: 0x0600307D RID: 12413 RVA: 0x0010F404 File Offset: 0x0010D604
233 public bool IsInBounds
234 {
235 get
236 {
237 return this.x >= Point.map.bounds.x && this.z >= Point.map.bounds.z && this.x <= Point.map.bounds.maxX && this.z <= Point.map.bounds.maxZ;
238 }
239 }
240
241 // Token: 0x17000DFE RID: 3582
242 // (get) Token: 0x0600307E RID: 12414 RVA: 0x0010F474 File Offset: 0x0010D674
243 public bool IsInBoundsPlus
244 {
245 get
246 {
247 return this.x >= 0 && this.z >= 0 && this.x <= Point.map.Size - 1 && this.z <= Point.map.Size - 1;
248 }
249 }
250
251 // Token: 0x0600307F RID: 12415 RVA: 0x0010F4C0 File Offset: 0x0010D6C0
252 public bool Within(int _x, int _z, int _w, int _h)
253 {
254 return this.x >= _x && this.z >= _z && this.x < _x + _w && this.z < _z + _h;
255 }
256
257 // Token: 0x17000DFF RID: 3583
258 // (get) Token: 0x06003080 RID: 12416 RVA: 0x0010F4ED File Offset: 0x0010D6ED
259 public bool IsFarmField
260 {
261 get
262 {
263 return (this.HasBridge ? this.sourceBridge : this.sourceFloor).alias == "field";
264 }
265 }
266
267 // Token: 0x17000E00 RID: 3584
268 // (get) Token: 0x06003081 RID: 12417 RVA: 0x0010F514 File Offset: 0x0010D714
269 public bool IsWater
270 {
271 get
272 {
273 return this.cell.IsTopWater;
274 }
275 }
276
277 // Token: 0x17000E01 RID: 3585
278 // (get) Token: 0x06003082 RID: 12418 RVA: 0x0010F521 File Offset: 0x0010D721
279 public bool HasRamp
280 {
281 get
282 {
283 return this.cell.HasRamp;
284 }
285 }
286
287 // Token: 0x17000E02 RID: 3586
288 // (get) Token: 0x06003083 RID: 12419 RVA: 0x0010F52E File Offset: 0x0010D72E
289 public bool HasRail
290 {
291 get
292 {
293 return this.sourceObj.tag.Contains("rail");
294 }
295 }
296
297 // Token: 0x17000E03 RID: 3587
298 // (get) Token: 0x06003084 RID: 12420 RVA: 0x0010F545 File Offset: 0x0010D745
299 public bool HasRampOrLadder
300 {
301 get
302 {
303 return this.cell.HasRampOrLadder;
304 }
305 }
306
307 // Token: 0x17000E04 RID: 3588
308 // (get) Token: 0x06003085 RID: 12421 RVA: 0x0010F552 File Offset: 0x0010D752
309 public bool HasObj
310 {
311 get
312 {
313 return this.cell.obj > 0;
314 }
315 }
316
317 // Token: 0x17000E05 RID: 3589
318 // (get) Token: 0x06003086 RID: 12422 RVA: 0x0010F562 File Offset: 0x0010D762
319 public bool HasDecal
320 {
321 get
322 {
323 return this.cell.decal > 0;
324 }
325 }
326
327 // Token: 0x17000E06 RID: 3590
328 // (get) Token: 0x06003087 RID: 12423 RVA: 0x0010F572 File Offset: 0x0010D772
329 public bool HasBlock
330 {
331 get
332 {
333 return this.cell._block > 0;
334 }
335 }
336
337 // Token: 0x17000E07 RID: 3591
338 // (get) Token: 0x06003088 RID: 12424 RVA: 0x0010F582 File Offset: 0x0010D782
339 public bool HasMinableBlock
340 {
341 get
342 {
343 return this.HasObj && this.sourceBlock.tileType.IsFullBlock;
344 }
345 }
346
347 // Token: 0x17000E08 RID: 3592
348 // (get) Token: 0x06003089 RID: 12425 RVA: 0x0010F59E File Offset: 0x0010D79E
349 public bool HasWallOrFence
350 {
351 get
352 {
353 return this.cell.HasWallOrFence;
354 }
355 }
356
357 // Token: 0x17000E09 RID: 3593
358 // (get) Token: 0x0600308A RID: 12426 RVA: 0x0010F5AB File Offset: 0x0010D7AB
359 public bool HasWall
360 {
361 get
362 {
363 return this.cell._block != 0 && this.cell.sourceBlock.tileType.IsWall;
364 }
365 }
366
367 // Token: 0x17000E0A RID: 3594
368 // (get) Token: 0x0600308B RID: 12427 RVA: 0x0010F5D1 File Offset: 0x0010D7D1
369 public bool HasFence
370 {
371 get
372 {
373 return this.cell._block != 0 && this.cell.sourceBlock.tileType.IsFence;
374 }
375 }
376
377 // Token: 0x17000E0B RID: 3595
378 // (get) Token: 0x0600308C RID: 12428 RVA: 0x0010F5F7 File Offset: 0x0010D7F7
379 public bool HasNonWallBlock
380 {
381 get
382 {
383 return this.HasBlock && !this.cell.sourceBlock.tileType.IsWallOrFence;
384 }
385 }
386
387 // Token: 0x17000E0C RID: 3596
388 // (get) Token: 0x0600308D RID: 12429 RVA: 0x0010F61B File Offset: 0x0010D81B
389 public bool HasTaskBuild
390 {
391 get
392 {
393 return this.cell.detail != null && this.cell.detail.designation is TaskBuild;
394 }
395 }
396
397 // Token: 0x17000E0D RID: 3597
398 // (get) Token: 0x0600308E RID: 12430 RVA: 0x0010F644 File Offset: 0x0010D844
399 public bool HasBlockRecipe
400 {
401 get
402 {
403 CellDetail detail = this.cell.detail;
404 TaskBuild taskBuild = ((detail != null) ? detail.designation : null) as TaskBuild;
405 return taskBuild != null && taskBuild.isBlock;
406 }
407 }
408
409 // Token: 0x17000E0E RID: 3598
410 // (get) Token: 0x0600308F RID: 12431 RVA: 0x0010F66D File Offset: 0x0010D86D
411 public bool HasFloor
412 {
413 get
414 {
415 return this.cell._floor > 0;
416 }
417 }
418
419 // Token: 0x17000E0F RID: 3599
420 // (get) Token: 0x06003090 RID: 12432 RVA: 0x0010F67D File Offset: 0x0010D87D
421 public bool HasBridge
422 {
423 get
424 {
425 return this.cell._bridge > 0;
426 }
427 }
428
429 // Token: 0x17000E10 RID: 3600
430 // (get) Token: 0x06003091 RID: 12433 RVA: 0x0010F68D File Offset: 0x0010D88D
431 public bool IsSky
432 {
433 get
434 {
435 return this.sourceFloor.tileType == TileType.Sky && !this.HasBridge;
436 }
437 }
438
439 // Token: 0x17000E11 RID: 3601
440 // (get) Token: 0x06003092 RID: 12434 RVA: 0x0010F6AC File Offset: 0x0010D8AC
441 public bool HasArea
442 {
443 get
444 {
445 CellDetail detail = this.detail;
446 return ((detail != null) ? detail.area : null) != null;
447 }
448 }
449
450 // Token: 0x17000E12 RID: 3602
451 // (get) Token: 0x06003093 RID: 12435 RVA: 0x0010F6C3 File Offset: 0x0010D8C3
452 public bool HasChara
453 {
454 get
455 {
456 CellDetail detail = this.detail;
457 return detail != null && detail.charas.Count > 0;
458 }
459 }
460
461 // Token: 0x17000E13 RID: 3603
462 // (get) Token: 0x06003094 RID: 12436 RVA: 0x0010F6DE File Offset: 0x0010D8DE
463 public bool HasThing
464 {
465 get
466 {
467 CellDetail detail = this.detail;
468 return detail != null && detail.things.Count > 0;
469 }
470 }
471
472 // Token: 0x17000E14 RID: 3604
473 // (get) Token: 0x06003095 RID: 12437 RVA: 0x0010F6F9 File Offset: 0x0010D8F9
474 public bool HasMultipleChara
475 {
476 get
477 {
478 return this.detail != null && this.detail.charas.Count > 1;
479 }
480 }
481
482 // Token: 0x17000E15 RID: 3605
483 // (get) Token: 0x06003096 RID: 12438 RVA: 0x0010F718 File Offset: 0x0010D918
484 public Chara FirstChara
485 {
486 get
487 {
488 CellDetail detail = this.detail;
489 if (detail == null || detail.charas.Count <= 0)
490 {
491 return null;
492 }
493 return this.detail.charas[0];
494 }
495 }
496
497 // Token: 0x06003097 RID: 12439 RVA: 0x0010F74C File Offset: 0x0010D94C
498 public Chara FirstVisibleChara()
499 {
500 if (this.detail != null)
501 {
502 foreach (Chara chara in this.detail.charas)
503 {
504 if (EClass.pc.CanSee(chara))
505 {
506 return chara;
507 }
508 }
509 }
510 return null;
511 }
512
513 // Token: 0x17000E16 RID: 3606
514 // (get) Token: 0x06003098 RID: 12440 RVA: 0x0010F7BC File Offset: 0x0010D9BC
515 public Thing FirstThing
516 {
517 get
518 {
519 CellDetail detail = this.detail;
520 if (detail == null || detail.things.Count <= 0)
521 {
522 return null;
523 }
524 return this.detail.things[0];
525 }
526 }
527
528 // Token: 0x17000E17 RID: 3607
529 // (get) Token: 0x06003099 RID: 12441 RVA: 0x0010F7ED File Offset: 0x0010D9ED
530 public Thing LastThing
531 {
532 get
533 {
534 CellDetail detail = this.detail;
535 if (detail == null || detail.things.Count <= 0)
536 {
537 return null;
538 }
539 return this.detail.things.LastItem<Thing>();
540 }
541 }
542
543 // Token: 0x17000E18 RID: 3608
544 // (get) Token: 0x0600309A RID: 12442 RVA: 0x0010F820 File Offset: 0x0010DA20
545 public Thing Installed
546 {
547 get
548 {
549 if (this.detail == null || this.detail.things.Count <= 0 || !this.detail.things[0].IsInstalled)
550 {
551 return null;
552 }
553 return this.detail.things[0];
554 }
555 }
556
557 // Token: 0x17000E19 RID: 3609
558 // (get) Token: 0x0600309B RID: 12443 RVA: 0x0010F873 File Offset: 0x0010DA73
559 public List<Thing> Things
560 {
561 get
562 {
563 return this.cell.Things;
564 }
565 }
566
567 // Token: 0x17000E1A RID: 3610
568 // (get) Token: 0x0600309C RID: 12444 RVA: 0x0010F880 File Offset: 0x0010DA80
569 public List<Chara> Charas
570 {
571 get
572 {
573 return this.cell.Charas;
574 }
575 }
576
577 // Token: 0x17000E1B RID: 3611
578 // (get) Token: 0x0600309D RID: 12445 RVA: 0x0010F88D File Offset: 0x0010DA8D
579 public bool IsSeen
580 {
581 get
582 {
583 return this.cell.isSeen;
584 }
585 }
586
587 // Token: 0x17000E1C RID: 3612
588 // (get) Token: 0x0600309E RID: 12446 RVA: 0x0010F89A File Offset: 0x0010DA9A
589 public bool IsSync
590 {
591 get
592 {
593 return this.cell.pcSync;
594 }
595 }
596
597 // Token: 0x17000E1D RID: 3613
598 // (get) Token: 0x0600309F RID: 12447 RVA: 0x0010F8A8 File Offset: 0x0010DAA8
599 public bool IsHidden
600 {
601 get
602 {
603 return !this.cell.isSeen || (this.cell.room != null && !EClass.screen.tileMap.hideRoomFog && !this.cell.hasDoor && this.cell.HasRoof);
604 }
605 }
606
607 // Token: 0x17000E1E RID: 3614
608 // (get) Token: 0x060030A0 RID: 12448 RVA: 0x0010F8FC File Offset: 0x0010DAFC
609 public bool IsBlocked
610 {
611 get
612 {
613 return !this.IsValid || this.cell.blocked;
614 }
615 }
616
617 // Token: 0x060030A1 RID: 12449 RVA: 0x0010F913 File Offset: 0x0010DB13
618 public bool HasRoomOrArea(BaseArea a)
619 {
620 return this.area == a || this.cell.room == a;
621 }
622
623 // Token: 0x060030A2 RID: 12450 RVA: 0x0010F930 File Offset: 0x0010DB30
624 public bool IsPublicSpace()
625 {
626 if (this.area != null)
627 {
628 return this.area.type.IsPublicArea;
629 }
630 return this.cell.room == null || this.cell.room.type.IsPublicArea;
631 }
632
633 // Token: 0x060030A3 RID: 12451 RVA: 0x0010F984 File Offset: 0x0010DB84
634 public Point()
635 {
636 }
637
638 // Token: 0x060030A4 RID: 12452 RVA: 0x0010F98C File Offset: 0x0010DB8C
639 public Point(Point p)
640 {
641 this.x = p.x;
642 this.z = p.z;
643 }
644
645 // Token: 0x060030A5 RID: 12453 RVA: 0x0010F9AC File Offset: 0x0010DBAC
646 public Point(int _x, int _z)
647 {
648 this.x = _x;
649 this.z = _z;
650 }
651
652 // Token: 0x060030A6 RID: 12454 RVA: 0x0010F9C2 File Offset: 0x0010DBC2
653 public Point(int _index)
654 {
655 this.Set(_index);
656 }
657
658 // Token: 0x060030A7 RID: 12455 RVA: 0x0010F9D2 File Offset: 0x0010DBD2
659 public Point Copy()
660 {
661 return new Point(this.x, this.z);
662 }
663
664 // Token: 0x060030A8 RID: 12456 RVA: 0x0010F9E5 File Offset: 0x0010DBE5
665 public T Copy<T>() where T : Point
666 {
667 T t = Activator.CreateInstance<T>();
668 t.Set(this);
669 return t;
670 }
671
672 // Token: 0x060030A9 RID: 12457 RVA: 0x0010F9F9 File Offset: 0x0010DBF9
673 public Point Set(int _x, int _z)
674 {
675 this.x = _x;
676 this.z = _z;
677 return this;
678 }
679
680 // Token: 0x060030AA RID: 12458 RVA: 0x0010FA0A File Offset: 0x0010DC0A
681 public Point Set(int index)
682 {
683 this.x = index % Point.map.Size;
684 this.z = index % Point.map.SizeXZ / Point.map.Size;
685 return this;
686 }
687
688 // Token: 0x060030AB RID: 12459 RVA: 0x0010FA3C File Offset: 0x0010DC3C
689 public Point Set(Point point)
690 {
691 this.x = point.x;
692 this.z = point.z;
693 return this;
694 }
695
696 // Token: 0x060030AC RID: 12460 RVA: 0x0010FA58 File Offset: 0x0010DC58
697 public override string ToString()
698 {
699 return string.Concat(new string[]
700 {
701 "(",
702 this.x.ToString(),
703 " / ",
704 this.z.ToString(),
705 ")"
706 });
707 }
708
709 // Token: 0x060030AD RID: 12461 RVA: 0x0010FAA4 File Offset: 0x0010DCA4
710 public void Set(Vector3 v)
711 {
712 v.x -= 0.64f;
713 v.y -= 0.64f;
714 int num = Mathf.RoundToInt(v.x / Point._screen.tileAlign.x);
715 int num2 = Mathf.RoundToInt(v.y / Point._screen.tileAlign.y);
716 this.x = (num2 - num) / 2 * -1;
717 this.z = num - this.x;
718 }
719
720 // Token: 0x060030AE RID: 12462 RVA: 0x0010FB24 File Offset: 0x0010DD24
721 public ref Vector3 PositionAuto()
722 {
723 if (EClass._zone.IsRegion)
724 {
725 return this.PositionTopdown();
726 }
727 return this.Position();
728 }
729
730 // Token: 0x060030AF RID: 12463 RVA: 0x0010FB40 File Offset: 0x0010DD40
731 public ref Vector3 Position(int height)
732 {
733 if (height == -1)
734 {
735 return this.Position();
736 }
737 this.vCache.x = (float)(this.x + this.z) * Point._screen.tileAlign.x;
738 this.vCache.y = (float)(this.z - this.x) * Point._screen.tileAlign.y + (float)height * Point._screen.tileMap._heightMod.y;
739 this.vCache.z = 1000f + this.vCache.x * Point._screen.tileWeight.x + this.vCache.y * Point._screen.tileWeight.z + (float)height * Point._screen.tileMap._heightMod.z;
740 return ref this.vCache;
741 }
742
743 // Token: 0x060030B0 RID: 12464 RVA: 0x0010FC2C File Offset: 0x0010DE2C
744 public ref Vector3 Position()
745 {
746 byte b = (this.cell.bridgeHeight == 0) ? this.cell.height : this.cell.bridgeHeight;
747 this.vCache.x = (float)(this.x + this.z) * Point._screen.tileAlign.x;
748 this.vCache.y = (float)(this.z - this.x) * Point._screen.tileAlign.y + (float)b * Point._screen.tileMap._heightMod.y;
749 this.vCache.z = 1000f + this.vCache.x * Point._screen.tileWeight.x + this.vCache.y * Point._screen.tileWeight.z + (float)b * Point._screen.tileMap._heightMod.z;
750 return ref this.vCache;
751 }
752
753 // Token: 0x060030B1 RID: 12465 RVA: 0x0010FD30 File Offset: 0x0010DF30
754 public ref Vector3 PositionTopdown()
755 {
756 byte b = (this.cell.bridgeHeight == 0) ? this.cell.height : this.cell.bridgeHeight;
757 this.vCache.x = (float)this.x * Point._screen.tileAlign.x;
758 this.vCache.y = (float)this.z * Point._screen.tileAlign.y + (float)b * Point._screen.tileMap._heightMod.y;
759 this.vCache.z = 1000f + this.vCache.x * Point._screen.tileWeight.x + this.vCache.y * Point._screen.tileWeight.z + (float)b * Point._screen.tileMap._heightMod.z;
760 return ref this.vCache;
761 }
762
763 // Token: 0x060030B2 RID: 12466 RVA: 0x0010FE28 File Offset: 0x0010E028
764 public ref Vector3 PositionTopdownTreasure()
765 {
766 GameScreenElona screenElona = EClass.scene.screenElona;
767 this.vCache.x = (float)(this.x - EClass.scene.elomap.minX) * screenElona.tileAlign.x;
768 this.vCache.y = (float)(this.z - EClass.scene.elomap.minY) * screenElona.tileAlign.y;
769 this.vCache.z = 1400f;
770 return ref this.vCache;
771 }
772
773 // Token: 0x060030B3 RID: 12467 RVA: 0x0010FEB4 File Offset: 0x0010E0B4
774 public ref Vector3 PositionCenter()
775 {
776 if (EClass._zone.IsRegion)
777 {
778 this.PositionTopdown();
779 }
780 else
781 {
782 this.Position();
783 }
784 this.vCache.x = this.vCache.x + EClass.screen.tileWorldSize.x * 0.5f;
785 this.vCache.y = this.vCache.y + EClass.screen.tileWorldSize.y * 0.75f;
786 return ref this.vCache;
787 }
788
789 // Token: 0x060030B4 RID: 12468 RVA: 0x0010FF2B File Offset: 0x0010E12B
790 public Quaternion GetRotation(Point to)
791 {
792 return Quaternion.Euler(0f, 0f, this.GetAngle(to));
793 }
794
795 // Token: 0x060030B5 RID: 12469 RVA: 0x0010FF44 File Offset: 0x0010E144
796 public unsafe float GetAngle(Point to)
797 {
798 Vector3 vector = *to.Position() - *this.Position();
799 return Mathf.Atan2(vector.y, vector.x) * 57.29578f;
800 }
801
802 // Token: 0x060030B6 RID: 12470 RVA: 0x0010FF84 File Offset: 0x0010E184
803 public float GetAngle2(Point to)
804 {
805 int num = to.x - this.x;
806 return Mathf.Atan2((float)(to.z - this.z), (float)num) * 57.29578f;
807 }
808
809 // Token: 0x060030B7 RID: 12471 RVA: 0x0010FFBC File Offset: 0x0010E1BC
810 public Point GetNearestPoint(bool allowBlock = false, bool allowChara = true, bool allowInstalled = true, bool ignoreCenter = false)
811 {
812 Point.<>c__DisplayClass146_0 CS$<>8__locals1;
813 CS$<>8__locals1.ignoreCenter = ignoreCenter;
814 CS$<>8__locals1.<>4__this = this;
815 CS$<>8__locals1.allowBlock = allowBlock;
816 CS$<>8__locals1.allowChara = allowChara;
817 CS$<>8__locals1.allowInstalled = allowInstalled;
818 CS$<>8__locals1.p = new Point();
819 int num = 1;
820 int num2 = this.x;
821 int num3 = this.z;
822 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3, ref CS$<>8__locals1))
823 {
824 return CS$<>8__locals1.p;
825 }
826 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3 + 1, ref CS$<>8__locals1))
827 {
828 return CS$<>8__locals1.p;
829 }
830 for (int i = 0; i < 30; i++)
831 {
832 for (int j = 0; j < num; j++)
833 {
834 num2++;
835 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3, ref CS$<>8__locals1))
836 {
837 return CS$<>8__locals1.p;
838 }
839 }
840 num++;
841 for (int k = 0; k < num; k++)
842 {
843 num3++;
844 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3, ref CS$<>8__locals1))
845 {
846 return CS$<>8__locals1.p;
847 }
848 }
849 for (int l = 0; l < num; l++)
850 {
851 num2--;
852 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3, ref CS$<>8__locals1))
853 {
854 return CS$<>8__locals1.p;
855 }
856 }
857 num++;
858 for (int m = 0; m < num; m++)
859 {
860 num3--;
861 if (this.<GetNearestPoint>g__IsValid|146_0(num2, num3, ref CS$<>8__locals1))
862 {
863 return CS$<>8__locals1.p;
864 }
865 }
866 }
867 CS$<>8__locals1.p.Set(this);
868 return CS$<>8__locals1.p;
869 }
870
871 // Token: 0x060030B8 RID: 12472 RVA: 0x00110104 File Offset: 0x0010E304
872 public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = false, bool allowChara = true, bool allowInstalled = true, bool ignoreCenter = false)
873 {
874 Point.<>c__DisplayClass147_0 CS$<>8__locals1;
875 CS$<>8__locals1.ignoreCenter = ignoreCenter;
876 CS$<>8__locals1.<>4__this = this;
877 CS$<>8__locals1.allowBlock = allowBlock;
878 CS$<>8__locals1.allowChara = allowChara;
879 CS$<>8__locals1.allowInstalled = allowInstalled;
880 CS$<>8__locals1.p = new Point();
881 int num = 1;
882 int num2 = this.x;
883 int num3 = this.z;
884 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
885 {
886 return true;
887 }
888 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3 + 1, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
889 {
890 return true;
891 }
892 for (int i = 0; i < 30; i++)
893 {
894 for (int j = 0; j < num; j++)
895 {
896 num2++;
897 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
898 {
899 return true;
900 }
901 }
902 num++;
903 for (int k = 0; k < num; k++)
904 {
905 num3++;
906 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
907 {
908 return true;
909 }
910 }
911 for (int l = 0; l < num; l++)
912 {
913 num2--;
914 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
915 {
916 return true;
917 }
918 }
919 num++;
920 for (int m = 0; m < num; m++)
921 {
922 num3--;
923 if (this.<ForeachNearestPoint>g__IsValid|147_0(num2, num3, ref CS$<>8__locals1) && endFunc(CS$<>8__locals1.p))
924 {
925 return true;
926 }
927 }
928 }
929 Debug.Log("ForeachNearestPoint Fail:" + ((this != null) ? this.ToString() : null));
930 return false;
931 }
932
933 // Token: 0x060030B9 RID: 12473 RVA: 0x00110290 File Offset: 0x0010E490
934 public Point GetRandomNeighbor()
935 {
936 int num = (EClass.rnd(2) == 0) ? 1 : -1;
937 if (EClass.rnd(2) == 0)
938 {
939 return new Point(Mathf.Clamp(this.x + num, 0, Point.map.Size - 1), this.z);
940 }
941 return new Point(this.x, Mathf.Clamp(this.z + num, 0, Point.map.Size - 1));
942 }
943
944 // Token: 0x060030BA RID: 12474 RVA: 0x00110300 File Offset: 0x0010E500
945 public Point GetRandomPoint(int radius, bool requireLos = true, bool allowChara = true, bool allowBlocked = false, int tries = 100)
946 {
947 Point point = new Point();
948 for (int i = 0; i < tries; i++)
949 {
950 point.Set(this.x - radius + EClass.rnd(radius * 2 + 1), this.z - radius + EClass.rnd(radius * 2 + 1));
951 if (point.IsValid && (allowBlocked || !point.IsBlocked) && (!requireLos || Los.IsVisible(this, point, null)) && (allowChara || !point.HasChara))
952 {
953 return point;
954 }
955 }
956 return null;
957 }
958
959 // Token: 0x060030BB RID: 12475 RVA: 0x0011037C File Offset: 0x0010E57C
960 public Point GetPointTowards(Point dest)
961 {
962 Point point = new Point(this);
963 int num = dest.x - point.x;
964 int num2 = dest.z - point.z;
965 if (Mathf.Abs(num) > 1 || Mathf.Abs(num2) > 1)
966 {
967 int num3 = Mathf.Max(Mathf.Abs(num), Mathf.Abs(num2));
968 point.x += num / num3;
969 point.z += num2 / num3;
970 }
971 return point;
972 }
973
974 // Token: 0x060030BC RID: 12476 RVA: 0x001103F4 File Offset: 0x0010E5F4
975 public void TalkWitnesses(Chara criminal, string idTalk, int radius = 4, WitnessType type = WitnessType.everyone, Func<Chara, bool> talkIf = null, int chance = 3)
976 {
977 if (talkIf == null)
978 {
979 talkIf = ((Chara c) => EClass.rnd(chance) == 0);
980 }
981 foreach (Chara chara in this.ListWitnesses(criminal, radius, type, null))
982 {
983 if (talkIf(chara) && !chara.renderer.IsTalking())
984 {
985 chara.Talk(idTalk, null, null, false);
986 }
987 }
988 }
989
990 // Token: 0x060030BD RID: 12477 RVA: 0x00110488 File Offset: 0x0010E688
991 public List<Chara> ListWitnesses(Chara criminal, int radius = 4, WitnessType type = WitnessType.crime, Chara target = null)
992 {
993 List<Chara> list = new List<Chara>();
994 foreach (Point point in Point.map.ListPointsInCircle(this, (float)radius, false, true))
995 {
996 CellDetail detail = point.detail;
997 List<Chara> list2 = (detail != null) ? detail.charas : null;
998 if (list2 != null && list2.Count != 0)
999 {
1000 foreach (Chara chara in list2)
1001 {
1002 if (chara != criminal && !chara.IsPC && (chara == target || chara.CanWitness) && (!chara.HasCondition<ConDim>() || EClass.rnd(2) != 0) && chara.conSuspend == null && !chara.isParalyzed && !chara.IsDisabled)
1003 {
1004 switch (type)
1005 {
1006 case WitnessType.crime:
1007 if (criminal == null || chara.isBlind || chara.isConfused || (criminal.IsPCParty && (chara.IsPCFaction || chara.IsPCFactionMinion)))
1008 {
1009 continue;
1010 }
1011 if (target == null)
1012 {
1013 if (chara.OriginalHostility < Hostility.Neutral)
1014 {
1015 continue;
1016 }
1017 }
1018 else if (!target.IsFriendOrAbove(chara))
1019 {
1020 continue;
1021 }
1022 break;
1023 case WitnessType.music:
1024 if (chara.hostility <= Hostility.Enemy)
1025 {
1026 continue;
1027 }
1028 break;
1029 case WitnessType.ally:
1030 if (!criminal.IsPCFaction)
1031 {
1032 continue;
1033 }
1034 if (chara.hostility <= Hostility.Neutral)
1035 {
1036 continue;
1037 }
1038 break;
1039 }
1040 list.Add(chara);
1041 }
1042 }
1043 }
1044 }
1045 return list;
1046 }
1047
1048 // Token: 0x060030BE RID: 12478 RVA: 0x00110648 File Offset: 0x0010E848
1049 public bool TryWitnessCrime(Chara criminal, Chara target = null, int radius = 4, Func<Chara, bool> funcWitness = null)
1050 {
1051 List<Chara> list = this.ListWitnesses(criminal, radius, WitnessType.crime, target);
1052 bool result = false;
1053 if (funcWitness == null)
1054 {
1055 funcWitness = ((Chara c) => EClass.rnd(10) == 0);
1056 }
1057 foreach (Chara chara in list)
1058 {
1059 if (funcWitness(chara))
1060 {
1061 this.CallGuard(criminal, chara);
1062 result = true;
1063 if (target != null)
1064 {
1065 target.DoHostileAction(criminal, false);
1066 }
1067 if (chara != target)
1068 {
1069 chara.DoHostileAction(criminal, false);
1070 break;
1071 }
1072 break;
1073 }
1074 }
1075 return result;
1076 }
1077
1078 // Token: 0x060030BF RID: 12479 RVA: 0x001106F0 File Offset: 0x0010E8F0
1079 public void CallGuard(Chara criminal, Chara caller)
1080 {
1081 caller.Talk("callGuards", null, null, false);
1082 List<Chara> list = (from c in EClass._map.charas
1083 where c.trait is TraitGuard && !c.IsInCombat
1084 select c).ToList<Chara>();
1085 if (list.Count > 0)
1086 {
1087 Chara chara = list.RandomItem<Chara>();
1088 caller.Say("calledGuard", caller, null, null);
1089 chara.DoHostileAction(criminal, false);
1090 }
1091 }
1092
1093 // Token: 0x060030C0 RID: 12480 RVA: 0x00110763 File Offset: 0x0010E963
1094 public void SetBlock(int idMat = 0, int idBlock = 0)
1095 {
1096 Point.map.SetBlock(this.x, this.z, idMat, idBlock);
1097 }
1098
1099 // Token: 0x060030C1 RID: 12481 RVA: 0x0011077D File Offset: 0x0010E97D
1100 public void SetFloor(int idMat = 0, int idFloor = 0)
1101 {
1102 Point.map.SetFloor(this.x, this.z, idMat, idFloor);
1103 }
1104
1105 // Token: 0x060030C2 RID: 12482 RVA: 0x00110797 File Offset: 0x0010E997
1106 public void SetObj(int id = 0, int value = 1, int dir = 0)
1107 {
1108 Point.map.SetObj(this.x, this.z, id, value, dir);
1109 }
1110
1111 // Token: 0x060030C3 RID: 12483 RVA: 0x001107B2 File Offset: 0x0010E9B2
1112 public void ModFire(int value)
1113 {
1114 Point.map.ModFire(this.x, this.z, value);
1115 }
1116
1117 // Token: 0x060030C4 RID: 12484 RVA: 0x001107CC File Offset: 0x0010E9CC
1118 public void Plow()
1119 {
1120 if (this.IsFarmField)
1121 {
1122 if (this.cell.Right.HasWallOrFence)
1123 {
1124 this.Set(this.cell.Right.GetPoint());
1125 }
1126 else if (this.cell.Front.HasWallOrFence)
1127 {
1128 this.Set(this.cell.Front.GetPoint());
1129 }
1130 }
1131 this.SetFloor(4, 4);
1132 }
1133
1134 // Token: 0x060030C5 RID: 12485 RVA: 0x0011083D File Offset: 0x0010EA3D
1135 public bool Equals(int _x, int _z)
1136 {
1137 return this.x == _x && this.z == _z;
1138 }
1139
1140 // Token: 0x060030C6 RID: 12486 RVA: 0x00110854 File Offset: 0x0010EA54
1141 public override bool Equals(object obj)
1142 {
1143 Point point = obj as Point;
1144 if (point == null)
1145 {
1146 Point point2 = point;
1147 string str = (point2 != null) ? point2.ToString() : null;
1148 string str2 = ":";
1149 Type type = point.GetType();
1150 Debug.Log(str + str2 + ((type != null) ? type.ToString() : null) + "is not Point");
1151 return false;
1152 }
1153 return this.x == point.x && this.z == point.z;
1154 }
1155
1156 // Token: 0x060030C7 RID: 12487 RVA: 0x001108BE File Offset: 0x0010EABE
1157 public override int GetHashCode()
1158 {
1159 return this.x + this.z * Point.map.Size;
1160 }
1161
1162 // Token: 0x060030C8 RID: 12488 RVA: 0x001108D8 File Offset: 0x0010EAD8
1163 public int Distance(Point p)
1164 {
1165 return Fov.Distance(p.x, p.z, this.x, this.z);
1166 }
1167
1168 // Token: 0x060030C9 RID: 12489 RVA: 0x001108F7 File Offset: 0x0010EAF7
1169 public int Distance(int tx, int tz)
1170 {
1171 return Fov.Distance(tx, tz, this.x, this.z);
1172 }
1173
1174 // Token: 0x060030CA RID: 12490 RVA: 0x0011090C File Offset: 0x0010EB0C
1175 public bool IsBlockByHeight(Point p)
1176 {
1177 return Mathf.Abs((int)(p.cell.minHeight - this.cell.topHeight)) > 8 && Mathf.Abs((int)(p.cell.topHeight - this.cell.minHeight)) > 8;
1178 }
1179
1180 // Token: 0x060030CB RID: 12491 RVA: 0x0011095C File Offset: 0x0010EB5C
1181 public Point Clamp(bool useBounds = false)
1182 {
1183 if (useBounds)
1184 {
1185 if (this.x < Point.map.bounds.x)
1186 {
1187 this.x = Point.map.bounds.x;
1188 }
1189 else if (this.x >= Point.map.bounds.maxX)
1190 {
1191 this.x = Point.map.bounds.maxX;
1192 }
1193 if (this.z < Point.map.bounds.z)
1194 {
1195 this.z = Point.map.bounds.z;
1196 }
1197 else if (this.z >= Point.map.bounds.maxZ)
1198 {
1199 this.z = Point.map.bounds.maxZ;
1200 }
1201 }
1202 else
1203 {
1204 if (this.x < 0)
1205 {
1206 this.x = 0;
1207 }
1208 else if (this.x >= Point.map.Size)
1209 {
1210 this.x = Point.map.Size - 1;
1211 }
1212 if (this.z < 0)
1213 {
1214 this.z = 0;
1215 }
1216 else if (this.z >= Point.map.Size)
1217 {
1218 this.z = Point.map.Size - 1;
1219 }
1220 }
1221 return this;
1222 }
1223
1224 // Token: 0x060030CC RID: 12492 RVA: 0x00110A98 File Offset: 0x0010EC98
1225 public List<Card> ListCards(bool includeMasked = false)
1226 {
1227 Point.listCard.Clear();
1228 bool flag = EClass.scene.actionMode != null && EClass.scene.actionMode.IsRoofEditMode(null);
1229 if (this.detail != null)
1230 {
1231 foreach (Thing thing in this.detail.things)
1232 {
1233 if (!thing.isHidden && (includeMasked || !thing.isMasked) && thing.isRoofItem == flag)
1234 {
1235 Point.listCard.Add(thing);
1236 }
1237 }
1238 if (!flag)
1239 {
1240 foreach (Chara item in this.detail.charas)
1241 {
1242 Point.listCard.Add(item);
1243 }
1244 }
1245 }
1246 return Point.listCard;
1247 }
1248
1249 // Token: 0x060030CD RID: 12493 RVA: 0x00110B9C File Offset: 0x0010ED9C
1250 public List<Card> ListVisibleCards()
1251 {
1252 Point.listCard.Clear();
1253 if (this.detail != null)
1254 {
1255 foreach (Thing thing in this.detail.things)
1256 {
1257 if (!thing.isHidden && !thing.isMasked && !thing.isRoofItem)
1258 {
1259 Point.listCard.Add(thing);
1260 }
1261 }
1262 foreach (Chara chara in this.detail.charas)
1263 {
1264 if (EClass.pc.CanSee(chara))
1265 {
1266 Point.listCard.Add(chara);
1267 }
1268 }
1269 }
1270 return Point.listCard;
1271 }
1272
1273 // Token: 0x060030CE RID: 12494 RVA: 0x00110C84 File Offset: 0x0010EE84
1274 public Card FindAttackTarget()
1275 {
1276 foreach (Card card in this.ListCards(false))
1277 {
1278 if (card.isChara || card.trait.CanBeAttacked)
1279 {
1280 return card;
1281 }
1282 }
1283 return null;
1284 }
1285
1286 // Token: 0x060030CF RID: 12495 RVA: 0x00110CF0 File Offset: 0x0010EEF0
1287 public T FindThing<T>() where T : Trait
1288 {
1289 if (this.detail != null)
1290 {
1291 foreach (Thing thing in this.detail.things)
1292 {
1293 if (thing.trait is T)
1294 {
1295 return thing.trait as T;
1296 }
1297 }
1298 }
1299 return default(T);
1300 }
1301
1302 // Token: 0x060030D0 RID: 12496 RVA: 0x00110D74 File Offset: 0x0010EF74
1303 public List<Card> ListThings<T>(bool onlyInstalled = true) where T : Trait
1304 {
1305 Point.listCard.Clear();
1306 if (this.detail != null)
1307 {
1308 foreach (Thing thing in this.detail.things)
1309 {
1310 if (!thing.isHidden && !thing.isRoofItem && !thing.isMasked && (!onlyInstalled || thing.IsInstalled) && thing.trait is T)
1311 {
1312 Point.listCard.Add(thing);
1313 }
1314 }
1315 }
1316 return Point.listCard;
1317 }
1318
1319 // Token: 0x060030D1 RID: 12497 RVA: 0x00110E18 File Offset: 0x0010F018
1320 public List<Chara> ListCharas()
1321 {
1322 Point.listChara.Clear();
1323 if (this.detail != null)
1324 {
1325 foreach (Chara item in this.detail.charas)
1326 {
1327 Point.listChara.Add(item);
1328 }
1329 }
1330 return Point.listChara;
1331 }
1332
1333 // Token: 0x060030D2 RID: 12498 RVA: 0x00110E8C File Offset: 0x0010F08C
1334 public List<Chara> ListVisibleCharas()
1335 {
1336 Point.listChara.Clear();
1337 if (this.detail != null)
1338 {
1339 foreach (Chara chara in this.detail.charas)
1340 {
1341 if (EClass.pc.CanSee(chara))
1342 {
1343 Point.listChara.Add(chara);
1344 }
1345 }
1346 }
1347 return Point.listChara;
1348 }
1349
1350 // Token: 0x060030D3 RID: 12499 RVA: 0x00110F0C File Offset: 0x0010F10C
1351 public List<Chara> ListCharasInNeighbor(Func<Chara, bool> func)
1352 {
1353 Point.listChara.Clear();
1354 this.ForeachNeighbor(delegate(Point p)
1355 {
1356 if (p.detail == null)
1357 {
1358 return;
1359 }
1360 foreach (Chara chara in p.detail.charas)
1361 {
1362 if (func(chara))
1363 {
1364 Point.listChara.Add(chara);
1365 }
1366 }
1367 }, true);
1368 return Point.listChara;
1369 }
1370
1371 // Token: 0x060030D4 RID: 12500 RVA: 0x00110F48 File Offset: 0x0010F148
1372 public List<Chara> ListCharasInRadius(Chara cc, int dist, Func<Chara, bool> func)
1373 {
1374 Point.listChara.Clear();
1375 foreach (Chara chara in EClass._map.charas)
1376 {
1377 if (func(chara) && chara.Dist(cc) < dist && Los.IsVisible(chara, cc))
1378 {
1379 Point.listChara.Add(chara);
1380 }
1381 }
1382 return Point.listChara;
1383 }
1384
1385 // Token: 0x060030D5 RID: 12501 RVA: 0x00110FD0 File Offset: 0x0010F1D0
1386 public T GetInstalled<T>() where T : Trait
1387 {
1388 if (this.detail != null)
1389 {
1390 foreach (Thing thing in this.detail.things)
1391 {
1392 if (thing.IsInstalled && thing.trait is T)
1393 {
1394 return thing.trait as T;
1395 }
1396 }
1397 }
1398 return default(T);
1399 }
1400
1401 // Token: 0x060030D6 RID: 12502 RVA: 0x0011105C File Offset: 0x0010F25C
1402 public Effect PlayEffect(string id)
1403 {
1404 return Effect.Get(id).Play(this, 0f, null, null);
1405 }
1406
1407 // Token: 0x060030D7 RID: 12503 RVA: 0x00111074 File Offset: 0x0010F274
1408 public unsafe SoundSource PlaySound(string id, bool synced = true, float v = 1f, bool spatial = true)
1409 {
1410 Vector3 vector = default(Vector3);
1411 if (spatial)
1412 {
1413 if (!this.IsValid)
1414 {
1415 return null;
1416 }
1417 vector = (EClass._zone.IsRegion ? (*this.PositionTopdown()) : (*this.Position()));
1418 vector.z = 0f;
1419 if (Vector3.Distance(vector, EClass.scene.transAudio.position) > EClass.core.gameSetting.audio.maxRange)
1420 {
1421 return null;
1422 }
1423 if (!synced)
1424 {
1425 v -= 0.4f;
1426 }
1427 }
1428 return EClass.Sound.Play(id, vector, (!spatial) ? 1f : (v * ((EClass.screen.Zoom >= 1f) ? 1f : EClass.screen.Zoom)));
1429 }
1430
1431 // Token: 0x060030D8 RID: 12504 RVA: 0x0011113E File Offset: 0x0010F33E
1432 public void RefreshNeighborTiles()
1433 {
1434 Point.map.RefreshNeighborTiles(this.x, this.z);
1435 }
1436
1437 // Token: 0x060030D9 RID: 12505 RVA: 0x00111156 File Offset: 0x0010F356
1438 public void RefreshTile()
1439 {
1440 Point.map.RefreshSingleTile(this.x, this.z);
1441 }
1442
1443 // Token: 0x060030DA RID: 12506 RVA: 0x00111170 File Offset: 0x0010F370
1444 public bool HasNonHomeProperty(Thing exclude = null)
1445 {
1446 if (this.FirstThing == null)
1447 {
1448 return false;
1449 }
1450 foreach (Thing thing in this.detail.things)
1451 {
1452 if (thing != exclude && thing.isNPCProperty)
1453 {
1454 return true;
1455 }
1456 }
1457 return false;
1458 }
1459
1460 // Token: 0x060030DB RID: 12507 RVA: 0x001111E0 File Offset: 0x0010F3E0
1461 public void Animate(AnimeID id, bool animeBlock = false)
1462 {
1463 if (!this.IsValid)
1464 {
1465 return;
1466 }
1467 CellDetail orCreateDetail = this.cell.GetOrCreateDetail();
1468 if (orCreateDetail.anime != null)
1469 {
1470 return;
1471 }
1472 TransAnime transAnime = new TransAnime
1473 {
1474 data = ResourceCache.Load<TransAnimeData>("Scene/Render/Anime/" + id.ToString()),
1475 point = this,
1476 animeBlock = animeBlock
1477 }.Init();
1478 orCreateDetail.anime = transAnime;
1479 EClass._map.pointAnimes.Add(transAnime);
1480 if (id == AnimeID.Quake)
1481 {
1482 transAnime.drawBlock = true;
1483 }
1484 }
1485
1486 // Token: 0x060030DC RID: 12508 RVA: 0x0011126C File Offset: 0x0010F46C
1487 public RenderParam ApplyAnime(RenderParam p)
1488 {
1489 if (this.detail == null || this.detail.anime == null)
1490 {
1491 return p;
1492 }
1493 p.x += this.detail.anime.v.x;
1494 p.y += this.detail.anime.v.y;
1495 p.z += this.detail.anime.v.z;
1496 p.v.x = p.v.x + this.detail.anime.v.x;
1497 p.v.y = p.v.y + this.detail.anime.v.y;
1498 p.v.z = p.v.z + this.detail.anime.v.z;
1499 return p;
1500 }
1501
1502 // Token: 0x060030DD RID: 12509 RVA: 0x00111364 File Offset: 0x0010F564
1503 public Vector3 ApplyAnime(ref Vector3 p)
1504 {
1505 if (this.detail == null || this.detail.anime == null)
1506 {
1507 return p;
1508 }
1509 p.x += this.detail.anime.v.x;
1510 p.y += this.detail.anime.v.y;
1511 p.z += this.detail.anime.v.z;
1512 return p;
1513 }
1514
1515 // Token: 0x060030DE RID: 12510 RVA: 0x001113F0 File Offset: 0x0010F5F0
1516 public List<IInspect> ListInspectorTargets()
1517 {
1518 List<IInspect> list = new List<IInspect>();
1519 CellDetail detail = this.detail;
1520 if (detail != null)
1521 {
1522 foreach (Chara chara in detail.charas)
1523 {
1524 if (chara.isSynced)
1525 {
1526 list.Add(chara);
1527 }
1528 }
1529 foreach (Thing item in detail.things)
1530 {
1531 list.Add(item);
1532 }
1533 if (detail.designation != null && !(detail.designation is TaskCut) && !(detail.designation is TaskMine))
1534 {
1535 list.Add(detail.designation);
1536 }
1537 }
1538 if (ObjInfo._CanInspect(this))
1539 {
1540 list.Add(ObjInfo.GetTempList(this));
1541 }
1542 if (BlockInfo._CanInspect(this))
1543 {
1544 list.Add(BlockInfo.GetTempList(this));
1545 }
1546 return list;
1547 }
1548
1549 // Token: 0x060030DF RID: 12511 RVA: 0x001114FC File Offset: 0x0010F6FC
1550 public void ForeachMultiSize(int w, int h, Action<Point, bool> action)
1551 {
1552 for (int i = 0; i < h; i++)
1553 {
1554 for (int j = 0; j < w; j++)
1555 {
1556 Point.shared3.Set(this.x - j, this.z + i);
1557 action(Point.shared3, j == 0 && i == 0);
1558 }
1559 }
1560 }
1561
1562 // Token: 0x060030E0 RID: 12512 RVA: 0x00111554 File Offset: 0x0010F754
1563 public void ForeachNeighbor(Action<Point> action, bool diagonal = true)
1564 {
1565 Point point = new Point();
1566 for (int i = this.x - 1; i <= this.x + 1; i++)
1567 {
1568 for (int j = this.z - 1; j <= this.z + 1; j++)
1569 {
1570 if (diagonal || i == this.x || j == this.z)
1571 {
1572 point.Set(i, j);
1573 if (point.IsValid)
1574 {
1575 action(point);
1576 }
1577 }
1578 }
1579 }
1580 }
1581
1582 // Token: 0x060030E1 RID: 12513 RVA: 0x001115C8 File Offset: 0x0010F7C8
1583 public Point ToRegionPos()
1584 {
1585 Point point = new Point(this.x, this.z);
1586 point.x += EClass.scene.elomap.minX;
1587 point.z += EClass.scene.elomap.minY;
1588 return point;
1589 }
1590
1591 // Token: 0x060030E3 RID: 12515 RVA: 0x001116C0 File Offset: 0x0010F8C0
1592 [CompilerGenerated]
1593 private bool <GetNearestPoint>g__IsValid|146_0(int dx, int dz, ref Point.<>c__DisplayClass146_0 A_3)
1594 {
1595 A_3.p.Set(dx, dz);
1596 return A_3.p.IsInBounds && Point.map.Contains(dx, dz) && (!A_3.ignoreCenter || dx != this.x || dz != this.z) && (A_3.allowBlock || (!A_3.p.cell.blocked && !A_3.p.cell.hasDoor && (A_3.p.cell.growth == null || !A_3.p.cell.growth.IsTree))) && (A_3.allowChara || !A_3.p.HasChara) && (A_3.allowInstalled || A_3.p.Installed == null);
1597 }
1598
1599 // Token: 0x060030E4 RID: 12516 RVA: 0x00111794 File Offset: 0x0010F994
1600 [CompilerGenerated]
1601 private bool <ForeachNearestPoint>g__IsValid|147_0(int dx, int dz, ref Point.<>c__DisplayClass147_0 A_3)
1602 {
1603 A_3.p.Set(dx, dz);
1604 return A_3.p.IsInBounds && Point.map.Contains(dx, dz) && (!A_3.ignoreCenter || dx != this.x || dz != this.z) && (A_3.allowBlock || (!A_3.p.cell.blocked && !A_3.p.cell.hasDoor && (A_3.p.cell.growth == null || !A_3.p.cell.growth.IsTree))) && (A_3.allowChara || !A_3.p.HasChara) && (A_3.allowInstalled || A_3.p.Installed == null);
1605 }
1606
1607 // Token: 0x04001B00 RID: 6912
1608 public static readonly XY[] Surrounds = new XY[]
1609 {
1610 new XY(0, -1),
1611 new XY(1, 0),
1612 new XY(0, 1),
1613 new XY(-1, 0)
1614 };
1615
1616 // Token: 0x04001B01 RID: 6913
1617 public static Vector3 fixedPos;
1618
1619 // Token: 0x04001B02 RID: 6914
1620 public static Point shared = new Point();
1621
1622 // Token: 0x04001B03 RID: 6915
1623 public static Point shared2 = new Point();
1624
1625 // Token: 0x04001B04 RID: 6916
1626 public static Point shared3 = new Point();
1627
1628 // Token: 0x04001B05 RID: 6917
1629 public static Map map;
1630
1631 // Token: 0x04001B06 RID: 6918
1632 public static Point Invalid = new Point
1633 {
1634 IsValid = false
1635 };
1636
1637 // Token: 0x04001B07 RID: 6919
1638 public static Point Zero = new Point();
1639
1640 // Token: 0x04001B08 RID: 6920
1641 [JsonProperty]
1642 public int x;
1643
1644 // Token: 0x04001B09 RID: 6921
1645 [JsonProperty]
1646 public int z;
1647
1648 // Token: 0x04001B0A RID: 6922
1649 private Vector3 vCache;
1650
1651 // Token: 0x04001B0B RID: 6923
1652 public static BaseGameScreen _screen;
1653
1654 // Token: 0x04001B0C RID: 6924
1655 private static List<Card> listCard = new List<Card>();
1656
1657 // Token: 0x04001B0D RID: 6925
1658 private static List<Chara> listChara = new List<Chara>();
1659}
Definition Area.cs:6
Definition Card.cs:13
Definition Cell.cs:10
Definition Chara.cs:12
Definition Fov.cs:7
Definition Los.cs:6
Definition Map.cs:15
Definition Point.cs:11
Definition Thing.cs:10
Definition Trait.cs:9
Definition XY.cs:5