Elin Decompiled Documentation EA 23.240 Nightly
Loading...
Searching...
No Matches
SerializedCards.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Linq;
3using Newtonsoft.Json;
4using UnityEngine;
5
6public class SerializedCards : EClass
7{
8 public class Data : EClass
9 {
10 [JsonProperty]
11 public int[] ints = new int[30];
12
13 [JsonProperty]
14 public string[] strs = new string[20];
15
16 [JsonProperty]
17 public Dictionary<int, object> obj;
18
19 [JsonProperty]
20 public Dictionary<int, string> cstr;
21
23
24 public int idDyeMat
25 {
26 get
27 {
28 return ints[2];
29 }
30 set
31 {
32 ints[2] = value;
33 }
34 }
35
36 public int idV
37 {
38 get
39 {
40 return ints[3];
41 }
42 set
43 {
44 ints[3] = value;
45 }
46 }
47
48 public int idMat
49 {
50 get
51 {
52 return ints[4];
53 }
54 set
55 {
56 ints[4] = value;
57 }
58 }
59
60 public int x
61 {
62 get
63 {
64 return ints[5];
65 }
66 set
67 {
68 ints[5] = value;
69 }
70 }
71
72 public int z
73 {
74 get
75 {
76 return ints[6];
77 }
78 set
79 {
80 ints[6] = value;
81 }
82 }
83
84 public int dir
85 {
86 get
87 {
88 return ints[7];
89 }
90 set
91 {
92 ints[7] = value;
93 }
94 }
95
96 public int placeState
97 {
98 get
99 {
100 return ints[8];
101 }
102 set
103 {
104 ints[8] = value;
105 }
106 }
107
108 public int altitude
109 {
110 get
111 {
112 return ints[9];
113 }
114 set
115 {
116 ints[9] = value;
117 }
118 }
119
120 public int fx
121 {
122 get
123 {
124 return ints[10];
125 }
126 set
127 {
128 ints[10] = value;
129 }
130 }
131
132 public int fy
133 {
134 get
135 {
136 return ints[11];
137 }
138 set
139 {
140 ints[11] = value;
141 }
142 }
143
144 public int lightColor
145 {
146 get
147 {
148 return ints[12];
149 }
150 set
151 {
152 ints[12] = value;
153 }
154 }
155
156 public int bits1
157 {
158 get
159 {
160 return ints[13];
161 }
162 set
163 {
164 ints[13] = value;
165 }
166 }
167
168 public int tile
169 {
170 get
171 {
172 return ints[14];
173 }
174 set
175 {
176 ints[14] = value;
177 }
178 }
179
180 public int refVal
181 {
182 get
183 {
184 return ints[15];
185 }
186 set
187 {
188 ints[15] = value;
189 }
190 }
191
192 public int idSkin
193 {
194 get
195 {
196 return ints[16];
197 }
198 set
199 {
200 ints[16] = value;
201 }
202 }
203
204 public int idBacker
205 {
206 get
207 {
208 return ints[17];
209 }
210 set
211 {
212 ints[17] = value;
213 }
214 }
215
216 public int bits2
217 {
218 get
219 {
220 return ints[18];
221 }
222 set
223 {
224 ints[18] = value;
225 }
226 }
227
228 public int uidEditor
229 {
230 get
231 {
232 return ints[19];
233 }
234 set
235 {
236 ints[19] = value;
237 }
238 }
239
240 public int lv
241 {
242 get
243 {
244 return ints[20];
245 }
246 set
247 {
248 ints[20] = value;
249 }
250 }
251
252 public int element
253 {
254 get
255 {
256 return ints[21];
257 }
258 set
259 {
260 ints[21] = value;
261 }
262 }
263
264 public int encLv
265 {
266 get
267 {
268 return ints[22];
269 }
270 set
271 {
272 ints[22] = value;
273 }
274 }
275
276 public int idtState
277 {
278 get
279 {
280 return ints[23];
281 }
282 set
283 {
284 ints[23] = value;
285 }
286 }
287
288 public string id
289 {
290 get
291 {
292 return strs[0];
293 }
294 set
295 {
296 strs[0] = value;
297 }
298 }
299
300 public string idEditor
301 {
302 get
303 {
304 return strs[1];
305 }
306 set
307 {
308 strs[1] = value;
309 }
310 }
311
312 public string idTrait
313 {
314 get
315 {
316 return strs[2];
317 }
318 set
319 {
320 strs[2] = value;
321 }
322 }
323
324 public string tags
325 {
326 get
327 {
328 return strs[3];
329 }
330 set
331 {
332 strs[3] = value;
333 }
334 }
335
336 public string idRender
337 {
338 get
339 {
340 return strs[4];
341 }
342 set
343 {
344 strs[4] = value;
345 }
346 }
347
348 public string traitVals
349 {
350 get
351 {
352 return strs[5];
353 }
354 set
355 {
356 strs[5] = value;
357 }
358 }
359
360 public string idRefCard
361 {
362 get
363 {
364 return strs[6];
365 }
366 set
367 {
368 strs[6] = value;
369 }
370 }
371
372 public string idDeity
373 {
374 get
375 {
376 return strs[7];
377 }
378 set
379 {
380 strs[7] = value;
381 }
382 }
383
384 public string cText
385 {
386 get
387 {
388 return strs[8];
389 }
390 set
391 {
392 strs[8] = value;
393 }
394 }
395
396 public string cNote
397 {
398 get
399 {
400 return strs[9];
401 }
402 set
403 {
404 strs[9] = value;
405 }
406 }
407
408 public string idRefName
409 {
410 get
411 {
412 return strs[10];
413 }
414 set
415 {
416 strs[10] = value;
417 }
418 }
419
420 public string idTeleport
421 {
422 get
423 {
424 return strs[11];
425 }
426 set
427 {
428 strs[11] = value;
429 }
430 }
431
432 public bool isDead
433 {
434 get
435 {
436 return _bits1[0];
437 }
438 set
439 {
440 _bits1[0] = value;
441 }
442 }
443
444 public bool isEmpty
445 {
446 get
447 {
448 return _bits1[1];
449 }
450 set
451 {
452 _bits1[1] = value;
453 }
454 }
455 }
456
457 [JsonProperty]
458 public List<Data> cards = new List<Data>();
459
460 [JsonProperty]
461 public int version = 2;
462
463 public List<Card> importedCards = new List<Card>();
464
465 public void Add(Card c)
466 {
467 Data data = new Data
468 {
469 id = c.id,
470 idEditor = c.c_idEditor,
471 idRefCard = c.c_idRefCard,
472 idTrait = c.c_idTrait,
473 tags = c.c_editorTags,
474 traitVals = c.c_editorTraitVal,
475 obj = c.mapObj,
476 idMat = c.material.id,
477 x = c.pos.x,
478 z = c.pos.z,
479 placeState = (int)c.placeState,
480 dir = c.dir,
481 altitude = c.altitude,
482 fx = (int)(c.fx * 1000f),
483 fy = (int)(c.fy * 1000f),
484 lightColor = c.c_lightColor,
485 bits1 = c._bits1.ToInt(),
486 bits2 = c._bits2.ToInt(),
487 tile = c.sourceCard.tiles[0],
488 idRender = c.sourceCard.idRenderData,
489 refVal = c.refVal,
490 idSkin = c.idSkin,
491 idDeity = c.c_idDeity,
492 isEmpty = (c.things.Count == 0 && c.c_lockLv == 0),
493 encLv = c.encLV,
494 cText = c.c_refText,
495 cNote = c.c_note,
496 idtState = c.c_IDTState,
497 idRefName = c.c_idRefName,
498 idTeleport = c.GetStr(31)
499 };
500 if (c.c_idBacker != 0)
501 {
502 SourceBacker.Row row = EClass.sources.backers.map.TryGetValue(c.c_idBacker);
503 if (row != null && row.isStatic != 0)
504 {
505 data.idBacker = c.c_idBacker;
506 }
507 }
508 if (c.material.id == c.DefaultMaterial.id)
509 {
510 data.idMat = -1;
511 }
512 data.idDyeMat = (c.isDyed ? c.c_dyeMat : (-1));
513 if (c.isChara)
514 {
515 Point orgPos = c.Chara.orgPos;
516 if (orgPos != null)
517 {
518 data.x = orgPos.x;
519 data.z = orgPos.z;
520 }
521 if (c.Chara.isDead)
522 {
523 data.isDead = true;
524 }
525 if (c.Chara.uidEditor == 0)
526 {
527 int num = 1;
528 foreach (Chara item in EClass._map.charas.Concat(EClass._map.deadCharas))
529 {
530 if (item.uidEditor >= num)
531 {
532 num = item.uidEditor + 1;
533 }
534 }
535 c.Chara.uidEditor = num;
536 }
537 data.lv = c.LV;
538 data.element = c.c_idMainElement;
539 data.uidEditor = c.Chara.uidEditor;
540 }
541 TryAddStr(52);
542 cards.Add(data);
543 data.ints[0] = data._bits1.ToInt();
544 void TryAddStr(int key)
545 {
546 string str = c.GetStr(key);
547 if (!str.IsEmpty())
548 {
549 if (data.cstr == null)
550 {
551 data.cstr = new Dictionary<int, string>();
552 }
553 data.cstr[key] = str;
554 }
555 }
556 }
557
558 public void Restore(Map map, Map orgMap, bool addToZone, PartialMap partial = null)
559 {
560 List<Thing> things = map.things;
561 List<Chara> serializedCharas = map.serializedCharas;
562 bool isUserZone = EClass._zone.IsUserZone;
563 Dictionary<int, int> dictionary = new Dictionary<int, int>();
564 Dictionary<int, int> dictionary2 = new Dictionary<int, int>();
565 importedCards.Clear();
566 foreach (Data card4 in cards)
567 {
568 int num = card4.dir;
569 Point point = new Point(card4.x, card4.z);
570 int index = point.index;
571 if (partial != null)
572 {
573 if (partial.result.ruined.Contains(point.index))
574 {
575 continue;
576 }
577 num -= partial.dir;
578 int num2 = point.x - partial.offsetX;
579 int num3 = point.z - partial.offsetZ;
580 switch (partial.dir)
581 {
582 case 1:
583 {
584 int num5 = num2;
585 num2 = num3;
586 num3 = -num5;
587 break;
588 }
589 case 2:
590 num2 = -num2;
591 num3 = -num3;
592 break;
593 case 3:
594 {
595 int num4 = num2;
596 num2 = -num3;
597 num3 = num4;
598 break;
599 }
600 }
601 point.x = num2 + partial.destX;
602 point.z = num3 + partial.destZ;
603 if (!partial.validPoints.Contains(point.index) || !point.IsValid)
604 {
605 continue;
606 }
607 if (!partial.editMode)
608 {
609 Card card = null;
610 string id = card4.id;
611 if (!(id == "sign_spawnThing"))
612 {
613 if (id == "sign_spawnChara")
614 {
616 }
617 }
618 else
619 {
621 }
622 if (card != null)
623 {
624 card.pos = point;
626 if (card.trait.IsDoor)
627 {
628 EClass._map.OnSetBlockOrDoor(card.pos.x, card.pos.z);
629 }
630 continue;
631 }
632 }
633 }
634 card4._bits1.SetInt(card4.ints[0]);
635 string text = card4.id;
636 if (card4.idV != 0)
637 {
638 text = card4.idV.ToString() ?? "";
639 }
640 if (addToZone && partial != null && !partial.editMode)
641 {
642 string id = card4.id;
643 if (!(id == "editor_torch"))
644 {
645 if (id == "editor_torch_wall")
646 {
647 text = EClass._zone.biome.style.GetIdLight(wall: true);
648 }
649 }
650 else
651 {
652 text = EClass._zone.biome.style.GetIdLight(wall: false);
653 }
654 }
655 CardRow source = EClass.sources.cards.map.TryGetValue(text);
656 if (source == null)
657 {
658 continue;
659 }
660 Card card2 = null;
661 if (source.isChara)
662 {
663 if (orgMap != null)
664 {
665 bool flag = false;
666 if (source.quality >= 4)
667 {
668 foreach (Chara value2 in EClass.game.cards.globalCharas.Values)
669 {
670 if (value2.id == text)
671 {
672 flag = true;
673 break;
674 }
675 }
676 }
677 if (!flag)
678 {
679 foreach (Chara item in orgMap.charas.Concat(orgMap.serializedCharas).Concat(orgMap.deadCharas))
680 {
681 if (source.quality >= 4 && item.id == text)
682 {
683 flag = true;
684 break;
685 }
686 if (item.id == text && item.orgPos != null && item.orgPos.Equals(point))
687 {
688 flag = true;
689 break;
690 }
691 }
692 }
693 if (flag)
694 {
695 continue;
696 }
697 }
698 if (isUserZone && ClassExtension.TryGetValue<int, int>((IDictionary<int, int>)dictionary, index, 0) >= 3)
699 {
700 continue;
701 }
702 card2 = CharaGen.Create(text);
703 if (card4.ints.Length > 20)
704 {
705 if (isUserZone)
706 {
707 card2.Chara.SetLv(card4.lv);
708 }
709 if (card4.element != 0)
710 {
711 card2.Chara.SetMainElement(card4.element);
712 }
713 }
714 card2.Chara.orgPos = point.Copy();
715 if (card4.isDead)
716 {
717 card2.hp = -1;
718 card2.Chara.isDead = true;
719 }
720 card2.Chara.hunger.value = EClass.rnd(EClass.rnd(20) + 1);
721 if (!addToZone)
722 {
723 serializedCharas.Add(card2.Chara);
724 }
725 if (isUserZone)
726 {
727 dictionary[index] = ClassExtension.TryGetValue<int, int>((IDictionary<int, int>)dictionary, index, 0) + 1;
728 }
729 }
730 else
731 {
732 PlaceState placeState = card4.placeState.ToEnum<PlaceState>();
733 if (isUserZone && ((ClassExtension.TryGetValue<int, int>((IDictionary<int, int>)dictionary2, index, 0) >= 20 && text != "waystone" && text != "core_zone") || (placeState != PlaceState.installed && !card4.bits1.IsOn(13)) || text == "medal"))
734 {
735 continue;
736 }
737 if (source.isOrigin)
738 {
739 text = SpawnListThing.Get("origin_" + text, (SourceThing.Row a) => a.origin == source).GetFirst().id;
740 }
741 card2 = ThingGen.Create(text, -1, EClass._zone.DangerLv);
742 card2.ChangeMaterial((card4.idMat == -1) ? card2.DefaultMaterial.id : card4.idMat);
743 if (!addToZone)
744 {
745 things.Add(card2.Thing);
746 }
747 card2.altitude = card4.altitude;
748 card2.placeState = placeState;
749 card2.c_lightColor = card4.lightColor;
750 if (isUserZone)
751 {
752 dictionary2[index] = ClassExtension.TryGetValue<int, int>((IDictionary<int, int>)dictionary2, index, 0) + 1;
753 }
754 }
755 if (num < 0)
756 {
757 num = Mathf.Abs(card2.sourceCard.tiles.Length + num);
758 }
759 card2.pos = point;
760 card2.dir = num;
761 card2._bits1.SetInt(card4.bits1);
762 card2._bits2.SetInt(card4.bits2);
763 card2.isPlayerCreation = true;
764 card2.autoRefuel = true;
765 card2.c_editorTraitVal = card4.traitVals;
766 card2.c_idRefCard = card4.idRefCard;
767 card2.isImported = true;
768 card2.refVal = card4.refVal;
769 card2.idSkin = card4.idSkin;
770 card2.c_idDeity = card4.idDeity;
771 card2.c_refText = card4.cText;
772 card2.c_note = card4.cNote;
773 if (card4.idBacker != 0)
774 {
775 Debug.Log(card4.idBacker);
776 card2.c_idBacker = card4.idBacker;
777 }
778 if (version >= 2 && card4.idDyeMat != -1)
779 {
780 card2.Dye(EClass.sources.materials.rows.TryGet(card4.idDyeMat, 1));
781 }
782 card2.mapObj = card4.obj;
783 if (card2.mapObj?.TryGetValue(2) != null)
784 {
785 card2.mapObj.Remove(2);
786 }
787 if (card4.cstr != null)
788 {
789 foreach (KeyValuePair<int, string> item2 in card4.cstr)
790 {
791 card2.SetStr(item2.Key, item2.Value);
792 }
793 }
794 if (card2.freePos)
795 {
796 card2.fx = (float)card4.fx * 0.001f;
797 card2.fy = (float)card4.fy * 0.001f;
798 }
799 if (!card4.idEditor.IsEmpty())
800 {
801 card2.c_idEditor = card4.idEditor;
802 }
803 if (!card4.idTrait.IsEmpty())
804 {
805 card2.c_idTrait = card4.idTrait;
806 card2.ApplyTrait();
808 }
809 if (!card4.tags.IsEmpty())
810 {
811 card2.c_editorTags = card4.tags;
812 try
813 {
814 string[] array = card4.tags.Split(',');
815 foreach (string value in array)
816 {
817 card2.ApplyEditorTags(value.ToEnum<EditorTag>());
818 }
819 }
820 catch
821 {
822 Debug.LogWarning("Could not convert editor tag:" + card2.Name + "/" + card4.tags);
823 }
824 }
825 if (isUserZone)
826 {
827 if ((card2.isHidden || card2.isMasked) && ((card2.TileType.IsBlockPass && card2.IsInstalled) || card2.trait is TraitCoreZone || card2.trait is TraitWaystone))
828 {
829 Card card3 = card2;
830 bool isHidden = (card2.isMasked = false);
831 card3.isHidden = isHidden;
832 }
833 if (card2.IsContainer)
834 {
835 if (card4.isEmpty)
836 {
837 card2.things.DestroyAll();
838 card2.c_lockLv = 0;
839 }
840 else
841 {
842 card2.c_lockLv = 1;
843 }
844 }
845 if (card4.ints.Length > 20 && card4.encLv != 0)
846 {
847 card2.SetEncLv(card4.encLv);
848 }
849 if (card4.strs.Length > 10)
850 {
851 if (!card4.idRefName.IsEmpty())
852 {
853 card2.c_idRefName = card4.idRefName;
854 }
855 if (!card4.idTeleport.IsEmpty())
856 {
857 card2.SetStr(31, card4.idTeleport);
858 }
859 }
860 card2.c_IDTState = card4.idtState;
861 }
862 if (card2.isChara)
863 {
864 card2.Chara.homeZone = EClass._zone;
865 card2.Chara.uidEditor = card4.uidEditor;
866 if (card2.isBackerContent)
867 {
868 card2.ApplyBacker(card2.c_idBacker);
869 }
870 card2.SetObj(5, null);
872 {
873 card2.Chara.ScaleByPrincipal();
874 }
875 }
876 if (card2.trait is TraitFakeBlock)
877 {
878 card2._CreateRenderer();
879 }
880 if (addToZone)
881 {
882 EClass._zone.AddCard(card2, card2.pos);
883 if (card2.trait.IsDoor)
884 {
885 EClass._map.OnSetBlockOrDoor(card2.pos.x, card2.pos.z);
886 }
887 if (partial != null && !card2.sourceCard.lightData.IsEmpty())
888 {
889 partial.result.hasLight = true;
890 }
891 }
892 importedCards.Add(card2);
893 }
894 foreach (Card importedCard in importedCards)
895 {
896 if (importedCard.trait is TraitShackle)
897 {
898 foreach (Card importedCard2 in importedCards)
899 {
900 if (importedCard2.isRestrained && importedCard2.pos.Equals(importedCard.pos))
901 {
902 importedCard.c_uidRefCard = importedCard2.uid;
903 }
904 }
905 }
906 importedCard.trait.OnImportMap();
907 }
908 }
909}
EditorTag
Definition: EditorTag.cs:2
PlaceState
Definition: PlaceState.cs:2
void SetStr(int id, string value=null)
Definition: BaseCard.cs:63
void SetObj(int id, object o)
Definition: BaseCard.cs:91
string GetStr(int id, string defaultStr=null)
Definition: BaseCard.cs:54
Dictionary< int, object > mapObj
Definition: BaseCard.cs:7
string GetRandomThingId()
string GetRandomCharaId()
string GetIdLight(bool wall)
GlobalCharaList globalCharas
Definition: CardManager.cs:46
override string idRenderData
Definition: CardRow.cs:62
int quality
Definition: CardRow.cs:19
bool isChara
Definition: CardRow.cs:55
bool isOrigin
Definition: CardRow.cs:52
string lightData
Definition: CardRow.cs:13
Definition: Card.cs:11
BitArray32 _bits1
Definition: Card.cs:79
string c_note
Definition: Card.cs:1761
virtual Chara Chara
Definition: Card.cs:2070
bool isMasked
Definition: Card.cs:590
int c_idMainElement
Definition: Card.cs:1413
string id
Definition: Card.cs:35
bool isRestrained
Definition: Card.cs:566
float fy
Definition: Card.cs:266
SourceMaterial.Row material
Definition: Card.cs:2051
string c_idDeity
Definition: Card.cs:1581
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:3038
string c_idTrait
Definition: Card.cs:1725
virtual SourceMaterial.Row DefaultMaterial
Definition: Card.cs:2421
BitArray32 _bits2
Definition: Card.cs:81
string c_refText
Definition: Card.cs:1629
virtual CardRenderer _CreateRenderer()
Definition: Card.cs:5937
Card SetLv(int a)
Definition: Card.cs:2901
string Name
Definition: Card.cs:2137
PlaceState placeState
Definition: Card.cs:83
int c_IDTState
Definition: Card.cs:1257
string c_idEditor
Definition: Card.cs:1689
Point pos
Definition: Card.cs:59
string c_editorTags
Definition: Card.cs:1701
int c_lightColor
Definition: Card.cs:1096
int uid
Definition: Card.cs:122
void Dye(string idMat)
Definition: Card.cs:5975
int refVal
Definition: Card.cs:206
void ApplyTrait()
Definition: Card.cs:2880
Trait trait
Definition: Card.cs:53
virtual void ApplyEditorTags(EditorTag tag)
Definition: Card.cs:2855
int encLV
Definition: Card.cs:326
int altitude
Definition: Card.cs:230
void SetEncLv(int a)
Definition: Card.cs:3861
int c_idBacker
Definition: Card.cs:1437
ThingContainer things
Definition: Card.cs:38
bool IsInstalled
Definition: Card.cs:2381
virtual bool isChara
Definition: Card.cs:2083
virtual Thing Thing
Definition: Card.cs:2058
bool isHidden
Definition: Card.cs:530
int idSkin
Definition: Card.cs:362
int dir
Definition: Card.cs:146
void ApplyBacker(int bid)
Definition: Card.cs:6957
virtual CardRow sourceCard
Definition: Card.cs:2131
string c_idRefName
Definition: Card.cs:1641
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3078
bool IsContainer
Definition: Card.cs:2089
bool freePos
Definition: Card.cs:518
string c_editorTraitVal
Definition: Card.cs:1713
int LV
Definition: Card.cs:386
bool isBackerContent
Definition: Card.cs:925
string c_idRefCard
Definition: Card.cs:1737
static Chara CreateFromFilter(string id, int lv=-1, int levelRange=-1)
Definition: CharaGen.cs:22
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
Definition: Chara.cs:10
void SetMainElement(string id, int v=0, bool elemental=false)
Definition: Chara.cs:2067
int uidEditor
Definition: Chara.cs:353
Point orgPos
Definition: Chara.cs:21
Chara ScaleByPrincipal()
Definition: Chara.cs:1694
bool isDead
Definition: Chara.cs:389
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
static Zone _zone
Definition: EClass.cs:21
static Map _map
Definition: EClass.cs:19
static int rnd(long a)
Definition: EClass.cs:59
static SourceManager sources
Definition: EClass.cs:43
CardManager cards
Definition: Game.cs:155
Definition: Map.cs:13
List< Thing > things
Definition: Map.cs:49
List< Chara > deadCharas
Definition: Map.cs:46
List< Chara > serializedCharas
Definition: Map.cs:43
void OnSetBlockOrDoor(int x, int z)
Definition: Map.cs:1024
List< Chara > charas
Definition: Map.cs:81
Definition: Point.cs:9
int index
Definition: Point.cs:49
Point Copy()
Definition: Point.cs:491
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
bool Equals(int _x, int _z)
Definition: Point.cs:960
bool IsValid
Definition: Point.cs:88
int[] tiles
Definition: RenderRow.cs:10
Dictionary< int, object > obj
Dictionary< int, string > cstr
void Add(Card c)
List< Data > cards
List< Card > importedCards
void Restore(Map map, Map orgMap, bool addToZone, PartialMap partial=null)
Dictionary< string, CardRow > map
Definition: SourceCard.cs:8
SourceMaterial materials
SourceCard cards
SourceBacker backers
int lv
Definition: Spatial.cs:142
static SpawnList Get(string id, Func< SourceThing.Row, bool > func)
string id
Definition: SpawnList.cs:10
void DestroyAll(Func< Thing, bool > funcExclude=null)
static Thing CreateFromFilter(string id, int lv=-1)
Definition: ThingGen.cs:63
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
virtual void OnImportMap()
Definition: Trait.cs:655
virtual bool IsDoor
Definition: Trait.cs:57
virtual void OnCreate(int lv)
Definition: Trait.cs:667
BiomeProfile biome
Definition: Zone.cs:126
virtual bool ShouldScaleImportedChara(Chara c)
Definition: Zone.cs:539
virtual bool IsUserZone
Definition: Zone.cs:268
override int DangerLv
Definition: Zone.cs:107
Card AddCard(Card t, Point point)
Definition: Zone.cs:1959
void SetInt(int i)
Definition: BitArray32.cs:89
int ToInt()
Definition: BitArray32.cs:84