Elin Decompiled Documentation EA 23.185 Nightly Patch 1
Loading...
Searching...
No Matches
Trait.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using UnityEngine;
5
6public class Trait : EClass
7{
8 public enum TileMode
9 {
10 Default,
11 Door,
16 }
17
18 public enum CopyShopType
19 {
20 None,
21 Item,
23 }
24
26
27 public Card owner;
28
29 protected static List<Point> listRadiusPoints = new List<Point>();
30
31 public string[] Params
32 {
33 get
34 {
35 if (!owner.c_editorTraitVal.IsEmpty())
36 {
37 return ("," + owner.c_editorTraitVal).Split(',');
38 }
39 return owner.sourceCard.trait;
40 }
41 }
42
43 public virtual byte WeightMod => 0;
44
45 public virtual int IdSkin => owner.idSkin;
46
47 public virtual string Name => owner.NameSimple;
48
49 public virtual TileType tileType => owner.TileType;
50
51 public virtual RefCardName RefCardName => RefCardName.Default;
52
53 public virtual bool IsBlockPath => tileType.IsBlockPass;
54
55 public virtual bool IsBlockSight => tileType.IsBlockSight;
56
57 public virtual bool IsDoor => false;
58
59 public virtual bool IsOpenSight => false;
60
61 public virtual bool IsOpenPath => false;
62
63 public virtual bool IsFloating => false;
64
65 public virtual bool IsNoShop => false;
66
67 public virtual bool IsGround => false;
68
69 public virtual bool IsOnlyUsableByPc => false;
70
71 public virtual bool InvertHeldSprite => false;
72
73 public virtual bool IsChangeFloorHeight => owner.Pref.Surface;
74
75 public virtual bool ShouldRefreshTile
76 {
77 get
78 {
79 if (!IsBlockPath && !IsOpenSight)
80 {
81 return IsBlockSight;
82 }
83 return true;
84 }
85 }
86
87 public virtual bool ShouldTryRefreshRoom => IsDoor;
88
89 public virtual int InstallBottomPriority => -1;
90
91 public virtual bool CanHarvest => true;
92
93 public virtual int radius => 0;
94
95 public virtual TraitRadiusType radiusType => TraitRadiusType.Default;
96
97 public virtual bool CanUseRoomRadius => true;
98
99 public virtual int GuidePriotiy => 0;
100
101 public virtual int Electricity
102 {
103 get
104 {
105 if (!owner.isThing)
106 {
107 return 0;
108 }
109 int electricity = owner.Thing.source.electricity;
110 if (electricity > 0 || EClass._zone == null || EClass._zone.branch == null)
111 {
112 return electricity;
113 }
114 return electricity * 100 / (100 + EClass._zone.branch.Evalue(2700) / 2);
115 }
116 }
117
118 public virtual bool IgnoreLastStackHeight => false;
119
120 public virtual int Decay => owner.material.decay;
121
122 public virtual int DecaySpeed => 100;
123
124 public virtual int DecaySpeedChild => 100;
125
126 public virtual bool IsFridge => false;
127
128 public virtual int DefaultStock => 1;
129
130 public virtual bool HoldAsDefaultInteraction => false;
131
132 public virtual int CraftNum => 1;
133
134 public virtual bool ShowOrbit => false;
135
136 public virtual bool HaveUpdate => false;
137
138 public virtual bool IsSpot => radius > 0;
139
140 public virtual bool IsFactory => false;
141
142 public virtual bool CanAutofire => false;
143
144 public virtual bool CanName => false;
145
146 public virtual bool CanPutAway => true;
147
148 public virtual bool CanChangeHeight => true;
149
150 public virtual bool CanStack => owner.category.maxStack > 1;
151
152 public virtual bool CanCopyInBlueprint
153 {
154 get
155 {
156 if (owner.rarity <= Rarity.Superior && owner.sourceCard.value > 0)
157 {
158 return CanBeDestroyed;
159 }
160 return false;
161 }
162 }
163
164 public virtual bool CanBeAttacked => false;
165
166 public virtual bool CanBeTeleported => true;
167
168 public virtual bool CanExtendBuild => false;
169
170 public virtual string langNote => "";
171
172 public virtual string IDInvStyle => "default";
173
174 public virtual string IDActorEx => owner.Thing.source.idActorEx;
175
176 public virtual bool MaskOnBuild => false;
177
178 public virtual bool ShowContextOnPick => false;
179
180 public virtual bool IsThrowMainAction
181 {
182 get
183 {
184 if (!owner.HasTag(CTAG.throwWeapon))
185 {
186 return owner.IsMeleeWeapon;
187 }
188 return true;
189 }
190 }
191
192 public virtual bool LevelAsQuality => false;
193
194 public virtual bool UseDummyTile => true;
195
196 public virtual bool RequireFullStackCheck => false;
197
198 public virtual bool DisableAutoCombat => false;
199
201 {
202 get
203 {
204 if (!owner.IsPC)
205 {
206 return InvGridSize.Default;
207 }
208 return InvGridSize.Backpack;
209 }
210 }
211
212 public virtual bool IsContainer => false;
213
214 public virtual bool CanUseContent => CanSearchContent;
215
216 public virtual bool CanSearchContent
217 {
218 get
219 {
220 if (!owner.isChara)
221 {
222 if (IsContainer)
223 {
224 return owner.c_lockLv == 0;
225 }
226 return false;
227 }
228 return true;
229 }
230 }
231
232 public virtual bool CanOpenContainer
233 {
234 get
235 {
236 if (IsContainer)
237 {
238 return !owner.isNPCProperty;
239 }
240 return false;
241 }
242 }
243
244 public virtual bool IsSpecialContainer => false;
245
246 public virtual ContainerType ContainerType => ContainerType.Default;
247
248 public virtual ThrowType ThrowType => ThrowType.Default;
249
250 public virtual EffectDead EffectDead => EffectDead.Default;
251
252 public virtual bool IsHomeItem => false;
253
254 public virtual bool IsAltar => false;
255
256 public virtual bool IsRestSpot => false;
257
258 public virtual bool CanBeMasked => false;
259
260 public virtual bool IsBlendBase => false;
261
262 public virtual bool CanBeOnlyBuiltInHome => false;
263
264 public virtual bool CanBuildInTown
265 {
266 get
267 {
269 {
271 }
272 return false;
273 }
274 }
275
276 public virtual bool CanBeHeld => ReqHarvest == null;
277
278 public virtual bool CanBeStolen
279 {
280 get
281 {
282 if (!CanOnlyCarry)
283 {
284 return CanBeHeld;
285 }
286 return false;
287 }
288 }
289
290 public virtual bool CanOnlyCarry => false;
291
292 public virtual bool CanBeDestroyed => true;
293
294 public virtual bool CanBeSmashedToDeath => false;
295
296 public virtual bool CanBeHallucinated => true;
297
298 public virtual bool CanBeDropped => true;
299
300 public virtual string ReqHarvest => null;
301
302 public virtual bool CanBeDisassembled
303 {
304 get
305 {
306 if (CanBeDestroyed && !(this is TraitTrap) && owner.things.Count == 0)
307 {
308 return owner.rarity < Rarity.Artifact;
309 }
310 return false;
311 }
312 }
313
314 public virtual bool CanBeShipped
315 {
316 get
317 {
318 if (!owner.IsImportant)
319 {
320 return !owner.IsUnique;
321 }
322 return false;
323 }
324 }
325
326 public virtual bool HasCharges => false;
327
328 public virtual bool ShowCharges => HasCharges;
329
330 public virtual bool ShowChildrenNumber => IsContainer;
331
332 public virtual bool ShowAsTool => false;
333
334 public virtual bool CanBeHeldAsFurniture
335 {
336 get
337 {
338 if (!(this is TraitTool))
339 {
340 return IsThrowMainAction;
341 }
342 return true;
343 }
344 }
345
346 public virtual bool HideInAdv => false;
347
348 public virtual bool NoHeldDir => false;
349
350 public virtual bool AlwaysHideOnLowWall => false;
351
353
354 public virtual bool RenderExtra => false;
355
356 public virtual float DropChance => 0f;
357
358 public virtual string IdNoRestock => owner.id;
359
360 public virtual int IdleUseChance => 3;
361
362 public virtual string RecipeCat => owner.sourceCard.RecipeCat;
363
364 public virtual bool IsTool => false;
365
366 public virtual string LangUse => "actUse";
367
368 public virtual bool IsOn => owner.isOn;
369
370 public virtual bool IsAnimeOn
371 {
372 get
373 {
374 if (!IsOn)
375 {
376 return !IsToggle;
377 }
378 return true;
379 }
380 }
381
382 public bool IsToggle => ToggleType != ToggleType.None;
383
384 public virtual bool AutoToggle
385 {
386 get
387 {
388 if (IsLighting || ToggleType == ToggleType.Curtain || ToggleType == ToggleType.Electronics)
389 {
390 return !owner.disableAutoToggle;
391 }
392 return false;
393 }
394 }
395
396 public bool IsLighting
397 {
398 get
399 {
400 if (ToggleType != ToggleType.Fire)
401 {
402 return ToggleType == ToggleType.Light;
403 }
404 return true;
405 }
406 }
407
408 public virtual bool IsLightOn
409 {
410 get
411 {
412 if (!owner.isChara)
413 {
414 return owner.isOn;
415 }
416 return true;
417 }
418 }
419
420 public virtual bool IsNightOnlyLight
421 {
422 get
423 {
424 if (ToggleType != ToggleType.Electronics && IsToggle)
425 {
426 return !owner.isRoofItem;
427 }
428 return false;
429 }
430 }
431
432 public virtual TileMode tileMode => TileMode.Default;
433
434 public virtual bool UseAltTiles => owner.isOn;
435
436 public virtual bool UseLowblock => false;
437
438 public virtual bool UseExtra => true;
439
440 public virtual bool UseLightColor => true;
441
442 public virtual Color? ColorExtra => null;
443
444 public virtual int MaxFuel
445 {
446 get
447 {
448 if (ToggleType != ToggleType.Fire)
449 {
450 return 0;
451 }
452 return 100;
453 }
454 }
455
456 public virtual int FuelCost => 1;
457
458 public virtual bool ShowFuelWindow => true;
459
460 public bool IsRequireFuel => MaxFuel > 0;
461
462 public string IdToggleExtra => owner.Thing?.source.idToggleExtra;
463
464 public virtual ToggleType ToggleType
465 {
466 get
467 {
468 if (Electricity >= 0)
469 {
470 return ToggleType.None;
471 }
472 return ToggleType.Electronics;
473 }
474 }
475
476 public virtual string IdSoundToggleOn
477 {
478 get
479 {
480 if (Electricity >= 0)
481 {
482 if (ToggleType != ToggleType.Fire)
483 {
484 return "switch_on";
485 }
486 return "torch_lit";
487 }
488 return "switch_on_electricity";
489 }
490 }
491
492 public virtual string IdSoundToggleOff
493 {
494 get
495 {
496 if (Electricity >= 0)
497 {
498 if (ToggleType != ToggleType.Fire)
499 {
500 return "switch_off";
501 }
502 return "torch_unlit";
503 }
504 return "switch_off_electricity";
505 }
506 }
507
508 public virtual int ShopLv => Mathf.Max(1, EClass._zone.development / 10 + owner.c_invest + 1);
509
510 public virtual CopyShopType CopyShop => CopyShopType.None;
511
512 public virtual int NumCopyItem => 2 + Mathf.Min(owner.c_invest / 10, 3);
513
514 public virtual ShopType ShopType => ShopType.None;
515
516 public virtual CurrencyType CurrencyType => CurrencyType.Money;
517
518 public virtual PriceType PriceType => PriceType.Default;
519
520 public virtual bool AllowSell
521 {
522 get
523 {
524 if (CurrencyType != CurrencyType.Money)
525 {
526 return CurrencyType == CurrencyType.None;
527 }
528 return true;
529 }
530 }
531
532 public virtual int CostRerollShop
533 {
534 get
535 {
536 if (CurrencyType == CurrencyType.Money || CurrencyType == CurrencyType.Influence)
537 {
538 return 1;
539 }
540 return 0;
541 }
542 }
543
544 public virtual bool AllowCriminal => owner.isThing;
545
546 public virtual int RestockDay => 5;
547
548 public virtual SlaverType SlaverType => SlaverType.None;
549
550 public virtual string LangBarter => "daBuy";
551
552 public string TextNextRestock => GetTextRestock(LangBarter, pet: false);
553
554 public string TextNextRestockPet => GetTextRestock((SlaverType == SlaverType.Slave) ? "daBuySlave" : "daBuyPet", pet: true);
555
556 public string GetParam(int i, string def = null)
557 {
558 if (i < Params.Length)
559 {
560 return Params[i];
561 }
562 return def;
563 }
564
565 public int GetParamInt(int i, int def)
566 {
567 if (i < Params.Length)
568 {
569 return Params[i].ToInt();
570 }
571 return def;
572 }
573
574 public virtual bool Contains(RecipeSource r)
575 {
576 return r.idFactory == ((owner.sourceCard.origin != null) ? owner.sourceCard.origin.id : owner.id);
577 }
578
579 public virtual int GetValue()
580 {
581 return owner.sourceCard.value;
582 }
583
584 public virtual bool CanStackTo(Thing to)
585 {
586 return CanStack;
587 }
588
589 public virtual string GetHoverText()
590 {
591 return null;
592 }
593
594 public virtual Action GetHealAction(Chara c)
595 {
596 return null;
597 }
598
599 public virtual bool CanBlend(Thing t)
600 {
601 return false;
602 }
603
604 public virtual void OnBlend(Thing t, Chara c)
605 {
606 }
607
608 public virtual int GetActDuration(Chara c)
609 {
610 return 0;
611 }
612
614 {
615 return null;
616 }
617
618 public virtual Sprite GetRefSprite()
619 {
620 return null;
621 }
622
623 public virtual void OnRenderExtra(RenderParam p)
624 {
625 }
626
627 public virtual Emo2 GetHeldEmo(Chara c)
628 {
629 return Emo2.none;
630 }
631
632 public virtual void SetOwner(Card _owner)
633 {
634 owner = _owner;
635 OnSetOwner();
636 }
637
638 public virtual bool IdleUse(Chara c, int dist)
639 {
640 return false;
641 }
642
643 public virtual void OnSetOwner()
644 {
645 }
646
647 public virtual void OnImportMap()
648 {
649 }
650
651 public virtual void SetParams(params string[] s)
652 {
653 }
654
655 public virtual void OnCrafted(Recipe recipe, List<Thing> ings)
656 {
657 }
658
659 public virtual void OnCreate(int lv)
660 {
661 }
662
663 public virtual void OnEquip(Chara c, bool onSetOwner)
664 {
665 }
666
667 public virtual void OnUnequip(Chara c)
668 {
669 }
670
671 public virtual void OnChangePlaceState(PlaceState state)
672 {
673 }
674
675 public virtual void OnAddedToZone()
676 {
677 }
678
679 public virtual void OnRemovedFromZone()
680 {
681 }
682
683 public virtual void OnSimulateHour(VirtualDate date)
684 {
685 }
686
687 public virtual string GetName()
688 {
689 return owner.sourceCard.GetText();
690 }
691
692 public virtual void SetName(ref string s)
693 {
694 }
695
696 public virtual void OnRenderTile(Point point, HitResult result, int dir)
697 {
698 if (radius == 0)
699 {
700 return;
701 }
702 Vector3 vector = point.Position();
703 vector.z += EClass.setting.render.thingZ;
704 foreach (Point item in ListPoints(point))
705 {
706 Vector3 vector2 = item.Position();
707 EClass.screen.guide.passGuideFloor.Add(vector2.x, vector2.y, vector2.z, 10f, 0.3f);
708 }
709 }
710
711 public virtual int CompareTo(Card b)
712 {
713 return 0;
714 }
715
716 public virtual bool CanBuiltAt(Point p)
717 {
718 return true;
719 }
720
721 public virtual void Update()
722 {
723 }
724
726 {
727 return owner.pos;
728 }
729
730 public Point GetRandomPoint(Func<Point, bool> func = null, Chara accessChara = null)
731 {
732 if (radius == 0)
733 {
734 return owner.pos;
735 }
736 List<Point> list = ListPoints();
737 for (int i = 0; i < 50; i++)
738 {
739 Point point = list.RandomItem();
740 if (point.IsValid && (func == null || func(point)) && (accessChara == null || accessChara.HasAccess(point)))
741 {
742 return point;
743 }
744 }
745 return list[0];
746 }
747
748 public virtual List<Point> ListPoints(Point center = null, bool onlyPassable = true)
749 {
750 listRadiusPoints.Clear();
751 if (center == null)
752 {
753 center = owner.pos;
754 }
755 if (radius == 0)
756 {
757 listRadiusPoints.Add(center.Copy());
758 return listRadiusPoints;
759 }
760 Room room = center.cell.room;
761 if (room != null && CanUseRoomRadius)
762 {
763 foreach (Point point in room.points)
764 {
765 if (radiusType == TraitRadiusType.Farm)
766 {
767 listRadiusPoints.Add(point.Copy());
768 }
769 else if ((!onlyPassable || !point.cell.blocked) && !point.cell.HasBlock && point.cell.HasFloor)
770 {
771 listRadiusPoints.Add(point.Copy());
772 }
773 }
774 }
775 else
776 {
777 EClass._map.ForeachSphere(center.x, center.z, radius + 1, delegate(Point p)
778 {
779 if (radiusType == TraitRadiusType.Farm)
780 {
781 if (!p.cell.HasBlock || p.cell.HasFence)
782 {
783 listRadiusPoints.Add(p.Copy());
784 }
785 }
786 else if ((!onlyPassable || !p.cell.blocked) && !p.cell.HasBlock && p.cell.HasFloor && (!onlyPassable || Los.IsVisible(center, p)))
787 {
788 listRadiusPoints.Add(p.Copy());
789 }
790 });
791 }
792 if (listRadiusPoints.Count == 0)
793 {
794 listRadiusPoints.Add(center.Copy());
795 }
796 return listRadiusPoints;
797 }
798
799 public virtual Recipe GetRecipe()
800 {
801 return Recipe.Create(owner.Thing);
802 }
803
804 public virtual Recipe GetBuildModeRecipe()
805 {
806 return Recipe.Create(owner.Thing);
807 }
808
809 public virtual bool CanCook(Card c)
810 {
811 if (c == null || !ExistsOnMap || !(c.trait is TraitFood))
812 {
813 return false;
814 }
815 return true;
816 }
817
818 public void CookProgress()
819 {
820 if (!ExistsOnMap)
821 {
822 return;
823 }
824 foreach (Card item in owner.pos.ListCards())
825 {
826 owner.PlaySound("cook");
827 item.renderer.PlayAnime(AnimeID.Jump);
828 }
829 }
830
831 public virtual bool CanOffer(Card tg)
832 {
833 if (tg == null || tg.isChara || tg.trait.CanOnlyCarry)
834 {
835 return false;
836 }
837 if (tg.rarity == Rarity.Artifact)
838 {
839 return false;
840 }
841 return true;
842 }
843
844 public void OfferProcess(Chara cc)
845 {
846 if (!ExistsOnMap)
847 {
848 return;
849 }
850 SourceReligion.Row row = EClass.sources.religions.map.TryGetValue(owner.c_idDeity, EClass.sources.religions.map["eyth"]);
851 string @ref = row.GetTextArray("name2")[1];
852 string ref2 = row.GetTextArray("name2")[0];
853 if (EClass.rnd(3) == 0)
854 {
855 cc.Talk("offer", @ref, ref2);
856 }
857 foreach (Card item in owner.pos.ListCards())
858 {
859 if (CanOffer(item))
860 {
861 item.renderer.PlayAnime(AnimeID.Shiver);
862 }
863 }
864 }
865
866 public void Offer(Chara cc)
867 {
868 if (!ExistsOnMap)
869 {
870 return;
871 }
872 foreach (Card item in owner.pos.ListCards())
873 {
874 if (CanOffer(item))
875 {
876 item.Destroy();
877 cc.depression.Mod(100);
878 owner.PlaySound("offering");
879 }
880 }
881 }
882
883 public virtual bool TryProgress(AIProgress p)
884 {
885 return true;
886 }
887
888 public virtual LockOpenState TryOpenLock(Chara cc, bool msgFail = true)
889 {
890 Thing thing = cc.things.FindBest<TraitLockpick>((Thing t) => -t.c_charges);
891 int num = ((thing == null) ? (cc.Evalue(280) / 2 + 2) : (cc.Evalue(280) + 10));
892 int num2 = owner.c_lockLv;
893 bool flag = this is TraitChestPractice;
894 if (flag)
895 {
896 num2 = num / 4 * 3 - 1;
897 }
898 if (num <= num2 && cc.IsPC)
899 {
900 cc.PlaySound("lock");
901 cc.Say("openLockFail2");
902 owner.PlayAnime(AnimeID.Shiver);
903 return LockOpenState.NotEnoughSkill;
904 }
905 if (thing != null && !flag)
906 {
907 thing.ModCharge(-1, destroy: true);
908 }
909 if (EClass.rnd(num + 6) > num2 + 5 || (!cc.IsPC && EClass.rnd(20) == 0) || EClass.rnd(200) == 0)
910 {
911 cc.PlaySound("lock_open");
912 cc.Say("lockpick_success", cc, owner);
913 int num3 = 100 + num2 * 10;
914 if (owner.c_lockedHard)
915 {
916 num3 *= 10;
917 }
918 cc.ModExp(280, num3);
919 owner.c_lockLv = 0;
920 if (owner.c_lockedHard)
921 {
922 owner.c_lockedHard = false;
923 owner.c_priceAdd = 0;
924 }
925 if (cc.IsPC && owner.isLostProperty)
926 {
928 }
929 owner.isLostProperty = false;
930 return LockOpenState.Success;
931 }
932 cc.PlaySound("lock");
933 if (cc.IsPC)
934 {
935 cc.Say("openLockFail");
936 }
937 cc.ModExp(280, (thing != null) ? 50 : 30);
938 if ((thing == null) | (EClass.rnd(2) == 0))
939 {
940 cc.stamina.Mod(-1);
941 }
942 return LockOpenState.Fail;
943 }
944
945 public virtual void WriteNote(UINote n, bool identified)
946 {
947 }
948
950 {
951 _ = 7;
952 return owner.sourceCard._index;
953 }
954
955 public virtual HotItem GetHotItem()
956 {
957 return new HotItemHeld(owner as Thing);
958 }
959
960 public virtual bool CanRead(Chara c)
961 {
962 return false;
963 }
964
965 public virtual void OnRead(Chara c)
966 {
967 }
968
969 public virtual bool CanEat(Chara c)
970 {
971 return owner.HasElement(10);
972 }
973
974 public virtual void OnEat(Chara c)
975 {
976 }
977
978 public virtual bool CanDrink(Chara c)
979 {
980 return false;
981 }
982
983 public virtual void OnDrink(Chara c)
984 {
985 }
986
987 public virtual void OnThrowGround(Chara c, Point p)
988 {
989 }
990
991 public virtual bool CanUse(Chara c)
992 {
993 return false;
994 }
995
996 public virtual bool CanUse(Chara c, Card tg)
997 {
998 return false;
999 }
1000
1001 public virtual bool CanUse(Chara c, Point p)
1002 {
1003 return false;
1004 }
1005
1006 public virtual bool OnUse(Chara c)
1007 {
1008 if (c.held != owner)
1009 {
1010 c.TryHoldCard(owner);
1011 }
1012 return true;
1013 }
1014
1015 public virtual bool OnUse(Chara c, Card tg)
1016 {
1017 return true;
1018 }
1019
1020 public virtual bool OnUse(Chara c, Point p)
1021 {
1022 return true;
1023 }
1024
1025 public virtual void TrySetAct(ActPlan p)
1026 {
1027 if (CanUse(owner.Chara))
1028 {
1029 p.TrySetAct(LangUse, () => OnUse(p.cc), owner);
1030 }
1031 }
1032
1033 public virtual void TrySetHeldAct(ActPlan p)
1034 {
1035 }
1036
1037 public virtual void OnHeld()
1038 {
1039 }
1040
1041 public virtual void OnTickHeld()
1042 {
1043 }
1044
1045 public virtual void OnSetCurrentItem()
1046 {
1047 }
1048
1049 public virtual void OnUnsetCurrentItem()
1050 {
1051 }
1052
1053 public virtual bool OnChildDecay(Card c, bool firstDecay)
1054 {
1055 return true;
1056 }
1057
1058 public virtual bool CanChildDecay(Card c)
1059 {
1060 return false;
1061 }
1062
1063 public virtual void OnSetCardGrid(ButtonGrid b)
1064 {
1065 }
1066
1067 public virtual void OnStepped(Chara c)
1068 {
1069 }
1070
1071 public virtual void OnSteppedOut(Chara c)
1072 {
1073 }
1074
1075 public virtual void OnOpenDoor(Chara c)
1076 {
1077 }
1078
1079 public void Install(bool byPlayer)
1080 {
1081 if (Electricity != 0)
1082 {
1083 EClass._zone.dirtyElectricity = true;
1084 if (Electricity > 0)
1085 {
1086 EClass._zone.electricity += Electricity;
1087 EClass.pc.PlaySound("electricity_on");
1088 }
1089 }
1090 TryToggle();
1091 owner.RecalculateFOV();
1092 if (EClass._zone.isStarted && ToggleType == ToggleType.Fire && owner.isOn)
1093 {
1094 owner.PlaySound("fire");
1095 }
1096 OnInstall(byPlayer);
1097 }
1098
1099 public void Uninstall()
1100 {
1101 if (Electricity != 0)
1102 {
1103 if (owner.isOn)
1104 {
1105 Toggle(on: false, silent: true);
1106 }
1107 EClass._zone.dirtyElectricity = true;
1108 if (Electricity > 0)
1109 {
1110 EClass._zone.electricity -= Electricity;
1111 EClass.pc.PlaySound("electricity_off");
1112 }
1113 }
1114 OnUninstall();
1115 }
1116
1117 public virtual void OnInstall(bool byPlayer)
1118 {
1119 }
1120
1121 public virtual void OnUninstall()
1122 {
1123 }
1124
1125 public virtual void TryToggle()
1126 {
1127 if (!owner.IsInstalled)
1128 {
1129 return;
1130 }
1131 if (Electricity < 0 && owner.isOn && EClass._zone.electricity < 0)
1132 {
1133 Toggle(on: false, silent: true);
1134 }
1135 else if (AutoToggle)
1136 {
1137 int num = ((EClass._map.config.hour == -1) ? EClass.world.date.hour : EClass._map.config.hour);
1138 bool on = !IsNightOnlyLight || num >= 17 || num <= 5 || EClass._map.IsIndoor;
1140 {
1141 on = false;
1142 }
1143 Toggle(on, silent: true);
1144 }
1145 }
1146
1147 public virtual void Toggle(bool on, bool silent = false)
1148 {
1149 if (owner.isOn == on)
1150 {
1151 return;
1152 }
1153 if (Electricity < 0)
1154 {
1155 if (on)
1156 {
1157 if (EClass._zone.electricity + Electricity < 0)
1158 {
1160 {
1161 if (!silent)
1162 {
1163 owner.Say("notEnoughElectricity", owner);
1164 }
1165 owner.PlaySound("electricity_insufficient");
1166 }
1167 return;
1168 }
1169 EClass._zone.electricity += Electricity;
1170 }
1171 else
1172 {
1173 EClass._zone.electricity -= Electricity;
1174 }
1175 }
1176 owner.isOn = on;
1177 PlayToggleEffect(silent);
1178 OnToggle();
1179 }
1180
1181 public virtual void PlayToggleEffect(bool silent)
1182 {
1183 bool flag = ToggleType == ToggleType.Fire;
1184 bool isOn = owner.isOn;
1185 switch (ToggleType)
1186 {
1187 case ToggleType.Lever:
1188 if (!silent)
1189 {
1190 owner.Say("lever", EClass.pc, owner);
1191 owner.PlaySound("switch_lever");
1192 }
1193 return;
1194 case ToggleType.Curtain:
1195 if (!silent)
1196 {
1197 owner.Say(isOn ? "close" : "open", EClass.pc, owner);
1198 owner.PlaySound("Material/leather_drop");
1199 }
1200 owner.pos.RefreshNeighborTiles();
1202 return;
1203 case ToggleType.None:
1204 return;
1205 }
1206 if (isOn)
1207 {
1208 if (!silent)
1209 {
1210 owner.Say(flag ? "toggle_fire" : "toggle_ele", EClass.pc, owner);
1211 owner.PlaySound(IdSoundToggleOn);
1212 }
1213 RefreshRenderer();
1214 owner.RecalculateFOV();
1215 }
1216 else
1217 {
1218 if (!silent)
1219 {
1220 owner.PlaySound(IdSoundToggleOff);
1221 }
1222 RefreshRenderer();
1223 owner.RecalculateFOV();
1224 }
1225 }
1226
1227 public virtual void OnToggle()
1228 {
1229 }
1230
1231 public virtual void TrySetToggleAct(ActPlan p)
1232 {
1233 if (!p.IsSelfOrNeighbor)
1234 {
1235 return;
1236 }
1237 switch (ToggleType)
1238 {
1239 case ToggleType.Lever:
1240 p.TrySetAct("ActToggleLever", delegate
1241 {
1242 Toggle(!owner.isOn);
1243 return true;
1244 }, owner);
1245 break;
1246 case ToggleType.Curtain:
1247 p.TrySetAct(owner.isOn ? "actOpen" : "actClose", delegate
1248 {
1249 Toggle(!owner.isOn);
1250 return true;
1251 }, owner);
1252 break;
1253 case ToggleType.Fire:
1254 case ToggleType.Light:
1255 case ToggleType.Electronics:
1256 {
1257 bool flag = ToggleType == ToggleType.Fire;
1258 if (EClass._zone.IsPCFaction || p.altAction || this is TraitCrafter || Electricity < 0)
1259 {
1260 if (owner.isOn)
1261 {
1262 if (p.altAction)
1263 {
1264 p.TrySetAct(flag ? "ActExtinguishTorch" : "ActToggleOff", delegate
1265 {
1266 Toggle(on: false);
1267 return true;
1268 }, owner);
1269 }
1270 }
1271 else if (!(this is TraitFactory) && !(this is TraitIncubator) && (!IsRequireFuel || owner.c_charges > 0))
1272 {
1273 p.TrySetAct(flag ? "ActTorch" : "ActToggleOn", delegate
1274 {
1275 Toggle(on: true);
1276 return true;
1277 }, owner);
1278 }
1279 if (IsRequireFuel && ((p.altAction && owner.c_charges < MaxFuel) || (!owner.isOn && owner.c_charges == 0)) && ShowFuelWindow)
1280 {
1281 p.TrySetAct("ActFuel", delegate
1282 {
1284 return false;
1285 }, owner);
1286 }
1287 }
1288 if (p.altAction)
1289 {
1290 p.TrySetAct("disableAutoToggle".lang((owner.disableAutoToggle ? "off" : "on").lang()), delegate
1291 {
1292 owner.disableAutoToggle = !owner.disableAutoToggle;
1293 SE.Click();
1294 return true;
1295 }, owner);
1296 }
1297 break;
1298 }
1299 }
1300 }
1301
1302 public bool IsFuelEnough(int num = 1, List<Thing> excludes = null, bool tryRefuel = true)
1303 {
1304 if (!IsRequireFuel)
1305 {
1306 return true;
1307 }
1308 if (owner.c_charges >= FuelCost * num)
1309 {
1310 return true;
1311 }
1312 if (owner.autoRefuel)
1313 {
1314 TryRefuel(FuelCost * num - owner.c_charges, excludes);
1315 }
1316 return owner.c_charges >= FuelCost * num;
1317 }
1318
1319 public bool IsFuel(string s)
1320 {
1321 return GetFuelValue(s) > 0;
1322 }
1323
1324 public bool IsFuel(Thing t)
1325 {
1326 return GetFuelValue(t) > 0;
1327 }
1328
1329 public int GetFuelValue(Thing t)
1330 {
1331 if (t.c_isImportant)
1332 {
1333 return 0;
1334 }
1335 return GetFuelValue(t.id);
1336 }
1337
1338 public int GetFuelValue(string id)
1339 {
1340 if (ToggleType == ToggleType.Electronics)
1341 {
1342 if (id == "battery")
1343 {
1344 return 20;
1345 }
1346 }
1347 else
1348 {
1349 if (id == "log")
1350 {
1351 return 20;
1352 }
1353 if (id == "branch")
1354 {
1355 return 5;
1356 }
1357 }
1358 return 0;
1359 }
1360
1361 public void Refuel(Thing t)
1362 {
1363 t.PlaySoundDrop(spatial: false);
1364 owner.ModCharge(t.Num * GetFuelValue(t));
1365 Msg.Say("fueled", t);
1366 if (!owner.isOn)
1367 {
1368 owner.trait.Toggle(on: true);
1369 }
1370 t.Destroy();
1371 owner.renderer.PlayAnime(AnimeID.Shiver);
1372 }
1373
1374 public void TryRefuel(int dest, List<Thing> excludes)
1375 {
1376 if (FindFuel(refuel: false))
1377 {
1378 FindFuel(refuel: true);
1379 }
1380 bool FindFuel(bool refuel)
1381 {
1382 int num = dest;
1383 List<Thing> list = EClass._zone.TryListThingsInSpot<TraitSpotFuel>((Thing t) => IsFuel(t));
1384 EClass.pc.things.Foreach(delegate(Thing t)
1385 {
1386 if (IsFuel(t) && t.tier == 0 && (excludes == null || !excludes.Contains(t)))
1387 {
1388 list.Add(t);
1389 }
1390 });
1391 foreach (Thing item in list)
1392 {
1393 if (num > 0)
1394 {
1395 int num2 = Mathf.Min(item.Num, Mathf.CeilToInt((float)num / (float)GetFuelValue(item)));
1396 num -= GetFuelValue(item) * num2;
1397 if (refuel)
1398 {
1399 Refuel(item.Split(num2));
1400 }
1401 }
1402 }
1403 return num <= 0;
1404 }
1405 }
1406
1407 public virtual void OnEnterScreen()
1408 {
1409 RefreshRenderer();
1410 }
1411
1412 public virtual void RefreshRenderer()
1413 {
1414 if (owner.renderer.isSynced && !IdToggleExtra.IsEmpty())
1415 {
1416 if (owner.isOn)
1417 {
1418 owner.renderer.AddExtra(IdToggleExtra);
1419 }
1420 else
1421 {
1422 owner.renderer.RemoveExtra(IdToggleExtra);
1423 }
1424 }
1425 }
1426
1427 public virtual void SetMainText(UIText t, bool hotitem)
1428 {
1429 if (owner.isThing && !owner.Thing.source.attackType.IsEmpty() && owner.ammoData != null)
1430 {
1431 t.SetText(owner.c_ammo.ToString() ?? "", FontColor.Charge);
1432 t.SetActive(enable: true);
1433 }
1434 else if (owner.Num == 1 && ShowCharges && owner.IsIdentified)
1435 {
1436 t.SetText(owner.c_charges.ToString() ?? "", FontColor.Charge);
1437 t.SetActive(enable: true);
1438 }
1439 else
1440 {
1441 t.SetText(owner.Num.ToShortNumber(), FontColor.ButtonGrid);
1442 t.SetActive(owner.Num > 1);
1443 }
1444 }
1445
1446 public virtual bool CanCopy(Thing t)
1447 {
1448 return false;
1449 }
1450
1451 public string GetTextRestock(string lang, bool pet)
1452 {
1453 int rawDeadLine = 0;
1454 if (pet)
1455 {
1456 SlaverData obj = owner.GetObj<SlaverData>(5);
1457 if (obj != null)
1458 {
1459 rawDeadLine = obj.dateRefresh;
1460 }
1461 }
1462 else
1463 {
1464 rawDeadLine = owner.c_dateStockExpire;
1465 }
1466 int remainingHours = EClass.world.date.GetRemainingHours(rawDeadLine);
1467 if (remainingHours > 0)
1468 {
1469 return "nextRestock".lang(lang.lang(), Date.GetText(remainingHours) ?? "");
1470 }
1471 return lang.lang();
1472 }
1473
1475 {
1476 if (SlaverType != 0)
1477 {
1478 SlaverData obj = owner.GetObj<SlaverData>(5);
1479 if (obj != null && EClass.world.date.IsExpired(obj.dateRefresh))
1480 {
1481 return Emo2.restock;
1482 }
1483 }
1484 int c_dateStockExpire = owner.c_dateStockExpire;
1485 if (c_dateStockExpire != 0 && EClass.world.date.IsExpired(c_dateStockExpire))
1486 {
1487 if (ShopType == ShopType.None)
1488 {
1489 return Emo2.blessing;
1490 }
1491 return Emo2.restock;
1492 }
1493 return Emo2.none;
1494 }
1495
1496 public void OnBarter()
1497 {
1498 Thing t = owner.things.Find("chest_merchant");
1499 if (t == null)
1500 {
1501 t = ThingGen.Create("chest_merchant");
1502 owner.AddThing(t);
1503 }
1504 t.c_lockLv = 0;
1506 {
1507 return;
1508 }
1509 owner.c_dateStockExpire = EClass.world.date.GetRaw(24 * RestockDay);
1510 owner.isRestocking = true;
1511 t.things.DestroyAll((Thing _t) => _t.GetInt(101) != 0);
1512 foreach (Thing thing8 in t.things)
1513 {
1514 thing8.invX = -1;
1515 }
1516 switch (ShopType)
1517 {
1518 case ShopType.Plat:
1519 NoRestock(ThingGen.Create("lucky_coin").SetNum(10));
1520 NoRestock(ThingGen.CreateSkillbook(6662));
1521 NoRestock(ThingGen.CreateSkillbook(6664));
1522 break;
1523 case ShopType.Copy:
1524 {
1525 Thing c_copyContainer = owner.c_copyContainer;
1526 if (c_copyContainer == null)
1527 {
1528 break;
1529 }
1530 int num3 = 0;
1531 foreach (Thing thing9 in c_copyContainer.things)
1532 {
1533 if (!owner.trait.CanCopy(thing9))
1534 {
1535 continue;
1536 }
1537 Thing thing4 = thing9.Duplicate(1);
1538 thing4.isStolen = false;
1539 thing4.isCopy = true;
1540 thing4.c_priceFix = 0;
1541 foreach (Element item in thing4.elements.dict.Values.Where((Element e) => e.HasTag("noInherit")).ToList())
1542 {
1543 thing4.elements.Remove(item.id);
1544 }
1545 int num4 = 1;
1546 switch (owner.trait.CopyShop)
1547 {
1548 case CopyShopType.Item:
1549 {
1550 num4 = (1000 + owner.c_invest * 100) / (thing4.GetPrice(CurrencyType.Money, sell: false, PriceType.CopyShop) + 50);
1551 int[] array = new int[4] { 701, 704, 703, 702 };
1552 foreach (int ele in array)
1553 {
1554 if (thing4.HasElement(ele))
1555 {
1556 num4 = 1;
1557 }
1558 }
1559 break;
1560 }
1561 case CopyShopType.Spellbook:
1562 thing4.c_charges = thing9.c_charges;
1563 break;
1564 }
1565 if (num4 > 1 && thing4.trait.CanStack)
1566 {
1567 thing4.SetNum(num4);
1568 }
1569 AddThing(thing4);
1570 num3++;
1571 if (num3 > owner.trait.NumCopyItem)
1572 {
1573 break;
1574 }
1575 }
1576 break;
1577 }
1578 case ShopType.Specific:
1579 {
1580 string id2 = owner.id;
1581 if (!(id2 == "mogu"))
1582 {
1583 if (!(id2 == "felmera"))
1584 {
1585 break;
1586 }
1587 foreach (Thing item2 in new DramaOutcome().ListFelmeraBarter())
1588 {
1589 AddThing(item2);
1590 }
1591 }
1592 else
1593 {
1594 AddThing(ThingGen.Create("casino_coin").SetNum(5000));
1595 }
1596 break;
1597 }
1598 case ShopType.Deed:
1599 Add("deed", 1, 0);
1600 Add("deed_move", 2 + EClass.rnd(5), 0);
1601 Add("license_illumination", 1, 0);
1602 Add("license_void", 1, 0);
1603 Add("license_adv", 1, 0);
1604 break;
1605 case ShopType.RedBook:
1606 {
1607 for (int num5 = 0; num5 < 30; num5++)
1608 {
1609 AddThing(ThingGen.CreateFromCategory("book"));
1610 }
1611 break;
1612 }
1613 case ShopType.Seed:
1614 {
1615 AddThing(TraitSeed.MakeSeed("rice")).SetNum(4 + EClass.rnd(4));
1616 AddThing(TraitSeed.MakeSeed("cabbage")).SetNum(4 + EClass.rnd(4));
1617 AddThing(TraitSeed.MakeSeed("carrot")).SetNum(4 + EClass.rnd(4));
1618 AddThing(TraitSeed.MakeSeed("potato")).SetNum(4 + EClass.rnd(4));
1619 AddThing(TraitSeed.MakeSeed("corn")).SetNum(4 + EClass.rnd(4));
1620 for (int num6 = 0; num6 < EClass.rnd(3) + 1; num6++)
1621 {
1622 Add("462", 1, 0);
1623 }
1624 for (int num7 = 0; num7 < EClass.rnd(3) + 1; num7++)
1625 {
1626 Add("1167", 1, 0);
1627 }
1628 break;
1629 }
1630 case ShopType.Loytel:
1631 Add("board_map", 1, 0);
1632 Add("board_build", 1, 0);
1633 Add("book_resident", 1, 0);
1634 Add("3", 1, 0);
1635 Add("4", 1, 0);
1636 Add("5", 1, 0);
1637 AddThing(ThingGen.CreatePlan(2512));
1638 AddThing(ThingGen.CreatePlan(2810));
1639 NoRestock(ThingGen.Create("rp_block").SetLv(1).SetNum(10));
1640 if (EClass.game.quests.GetPhase<QuestVernis>() >= 3)
1641 {
1642 NoRestock(ThingGen.CreateRecipe("explosive"));
1643 }
1644 break;
1645 case ShopType.Starter:
1646 case ShopType.StarterEx:
1647 Add("board_home", 1, 0);
1648 Add("board_resident", 1, 0);
1649 Add("1", 1, 0);
1650 Add("2", 1, 0);
1651 if (ShopType == ShopType.StarterEx)
1652 {
1653 Add("board_expedition", 1, 0);
1654 Add("mailpost", 1, 0);
1655 Add("record", 1, 0);
1656 Add("tent2", 1, 0);
1657 Add("tent1", 1, 0);
1658 Add("wagon1", 1, 0);
1659 Add("wagon_big", 1, 0);
1660 Add("wagon_big2", 1, 0);
1661 Add("wagon_big3", 1, 0);
1662 Add("wagon_big4", 1, 0);
1663 Add("wagon_big5", 1, 0);
1664 Add("teleporter", 1, 0);
1665 Add("teleporter2", 1, 0);
1666 Add("recharger", 1, 0);
1667 Add("machine_gene2", 1, 0);
1668 NoRestock(ThingGen.CreateRecipe("torch_wall"));
1669 NoRestock(ThingGen.CreateRecipe("factory_sign"));
1670 NoRestock(ThingGen.CreateRecipe("beehive"));
1671 NoRestock(ThingGen.Create("rp_food").SetNum(5).SetLv(10)
1672 .Thing);
1673 }
1674 else
1675 {
1676 AddThing(ThingGen.CreatePlan(2119));
1677 NoRestock(ThingGen.Create("rp_food").SetNum(5).SetLv(5)
1678 .Thing);
1679 }
1680 break;
1681 case ShopType.Farris:
1682 AddThing(ThingGen.CreateScroll(8220, 4 + EClass.rnd(6)));
1683 AddThing(ThingGen.CreateScroll(8221, 4 + EClass.rnd(6)));
1684 Add("drawing_paper", 10, 0);
1685 Add("drawing_paper2", 10, 0);
1686 Add("stethoscope", 1, 0);
1687 Add("whip_love", 1, 0);
1688 Add("whip_interest", 1, 0);
1689 break;
1690 case ShopType.Guild:
1691 if (this is TraitClerk_Merchant)
1692 {
1693 Add("flyer", 1, 0).SetNum(99);
1694 }
1695 break;
1696 case ShopType.Influence:
1697 {
1698 bool num2 = owner.id == "big_sister";
1699 TraitTicketFurniture.SetZone(num2 ? EClass.game.spatials.Find("little_garden") : EClass._zone, Add("ticket_furniture", 1, 0).SetNum(99));
1700 if (num2)
1701 {
1702 Add("littleball", 10, 0);
1703 break;
1704 }
1705 for (int l = 0; l < 10; l++)
1706 {
1707 Thing thing3 = ThingGen.Create(EClass._zone.IsFestival ? "1123" : ((EClass.rnd(3) == 0) ? "1169" : "1160"));
1708 thing3.DyeRandom();
1709 AddThing(thing3);
1710 }
1711 if (EClass._zone is Zone_Exile)
1712 {
1713 for (int m = 0; m < 30; m++)
1714 {
1715 Add("1235", 1, -1);
1716 Add("1236", 1, -1);
1717 Add("1237", 1, -1);
1718 Add("1239", 1, -1);
1719 Add("candle9", 1, -1);
1720 Add("candle9", 1, -1);
1721 Add("candle9", 1, -1);
1722 Add("candle8", 1, 0);
1723 Add("candle8b", 1, 0);
1724 Add("candle8c", 1, 0);
1725 }
1726 }
1727 break;
1728 }
1729 case ShopType.Casino:
1730 {
1731 Add("chest_tax", 1, 0);
1732 Add("1165", 1, 0);
1733 Add("monsterball", 1, 0).SetNum(3).SetLv(10);
1734 Add("1175", 1, 0);
1735 Add("1176", 1, 0);
1736 Add("pillow_ehekatl", 1, 0);
1737 Add("grave_dagger1", 1, 0);
1738 Add("grave_dagger2", 1, 0);
1739 Add("434", 1, 0);
1740 Add("433", 1, 0);
1741 Add("714", 1, 0);
1742 Add("1017", 1, 0);
1743 Add("1155", 1, 0);
1744 Add("1011", 1, 0);
1745 AddThing(ThingGen.CreatePerfume(9500, 5));
1746 AddThing(ThingGen.CreatePerfume(9501, 5));
1747 AddThing(ThingGen.CreatePerfume(9502, 5));
1748 AddThing(ThingGen.CreatePerfume(9503, 5));
1749 for (int k = 0; k < 5; k++)
1750 {
1751 Thing thing2 = ThingGen.CreateFromCategory("seasoning").SetNum(10);
1752 thing2.elements.SetBase(2, 40);
1753 thing2.c_priceFix = 1000;
1754 AddThing(thing2);
1755 }
1756 break;
1757 }
1758 case ShopType.Medal:
1759 NoRestock(ThingGen.Create("sword_dragon"));
1760 Add("sword_dragon", 1, 0).SetReplica(on: true);
1761 NoRestock(ThingGen.Create("axe_destruction"));
1762 Add("axe_destruction", 1, 0).SetReplica(on: true);
1763 NoRestock(ThingGen.Create("blunt_bonehammer"));
1764 Add("blunt_bonehammer", 1, 0).SetReplica(on: true);
1765 NoRestock(ThingGen.Create("pole_gunlance"));
1766 Add("pole_gunlance", 1, 0).SetReplica(on: true);
1767 NoRestock(ThingGen.Create("sword_muramasa"));
1768 Add("sword_muramasa", 1, 0).SetReplica(on: true);
1769 NoRestock(ThingGen.Create("sword_forgetmenot"));
1770 Add("sword_forgetmenot", 1, 0).SetReplica(on: true);
1771 NoRestock(ThingGen.Create("dagger_fish"));
1772 Add("dagger_fish", 1, 0).SetReplica(on: true);
1773 NoRestock(ThingGen.Create("sword_zephir"));
1774 Add("sword_zephir", 1, 0).SetReplica(on: true);
1775 Add("ribbon", 1, 0);
1776 Add("helm_sage", 1, 0);
1777 Add("diary_sister", 1, 0);
1778 Add("diary_catsister", 1, 0);
1779 Add("diary_lady", 1, 0);
1780 Add("1165", 1, 0).SetNum(5);
1781 AddThing(ThingGen.CreateScroll(9160).SetNum(5));
1782 Add("monsterball", 1, 0).SetNum(3).SetLv(20);
1783 Add("monsterball", 1, 0).SetNum(3).SetLv(40);
1784 Add("bill_tax", 1, 0).c_bill = 1;
1785 Add("bill_tax", 1, 0).c_bill = 1;
1786 Add("bill_tax", 1, 0).c_bill = 1;
1787 Add("container_magic", 1, 0);
1788 Add("container_magic", 1, 0).ChangeMaterial("iron").idSkin = 1;
1789 Add("container_magic", 1, 0).ChangeMaterial("bamboo").idSkin = 2;
1790 Add("container_magic", 1, 0).ChangeMaterial("feywood").idSkin = 3;
1791 Add("wrench_tent_elec", 1, 0);
1792 Add("wrench_tent_soil", 1, 0);
1793 Add("wrench_tent_seabed", 1, 0);
1794 Add("wrench_bed", 1, 0).SetNum(20);
1795 Add("wrench_storage", 1, 0).SetNum(10);
1796 Add("wrench_fridge", 1, 0).SetNum(1);
1797 Add("wrench_extend_v", 1, 0).SetNum(2);
1798 Add("wrench_extend_h", 1, 0).SetNum(2);
1799 break;
1800 default:
1801 {
1802 float num = (float)(3 + Mathf.Min(ShopLv / 5, 10)) + Mathf.Sqrt(ShopLv);
1803 num = num * (float)(100 + EClass.pc.Evalue(1406) * 5) / 100f;
1804 num = Mathf.Min(num, 300f);
1805 for (int j = 0; (float)j < num; j++)
1806 {
1807 Thing thing = CreateStock();
1808 if ((!thing.trait.IsNoShop || (ShopType == ShopType.LoytelMart && (EClass.debug.enable || EClass.player.flags.loytelMartLv >= 2))) && (!(thing.trait is TraitRod) || thing.c_charges != 0) && thing.GetPrice() > 0)
1809 {
1810 t.AddThing(thing);
1811 }
1812 }
1813 break;
1814 }
1815 }
1816 foreach (RecipeSource item3 in RecipeManager.list)
1817 {
1818 if (item3.row.recipeKey.IsEmpty())
1819 {
1820 continue;
1821 }
1822 string[] recipeKey = item3.row.recipeKey;
1823 for (int n = 0; n < recipeKey.Length; n++)
1824 {
1825 if (recipeKey[n] == ShopType.ToString())
1826 {
1827 NoRestock(ThingGen.CreateRecipe(item3.id));
1828 break;
1829 }
1830 }
1831 }
1832 switch (ShopType)
1833 {
1834 case ShopType.Moyer:
1835 {
1836 for (int num10 = 1; num10 <= 12; num10++)
1837 {
1838 AddAdvWeek(num10);
1839 }
1840 break;
1841 }
1842 case ShopType.StrangeGirl:
1843 {
1844 int num11 = (EClass.debug.enable ? 20 : (EClass._zone.development / 10));
1845 if (num11 > 0)
1846 {
1847 Add("syringe_gene", num11, 0);
1848 Add("diary_little", 1, 0);
1849 }
1850 if (num11 > 10)
1851 {
1852 Add("syringe_heaven", num11 / 5, 0);
1853 }
1854 break;
1855 }
1856 case ShopType.GeneralExotic:
1857 Add("tool_talisman", 1, 0);
1858 break;
1859 case ShopType.Healer:
1860 AddThing(ThingGen.CreatePotion(8400).SetNum(4 + EClass.rnd(6)));
1861 AddThing(ThingGen.CreatePotion(8401).SetNum(2 + EClass.rnd(4)));
1862 AddThing(ThingGen.CreatePotion(8402).SetNum(1 + EClass.rnd(3)));
1863 break;
1864 case ShopType.Food:
1865 Add("ration", 2 + EClass.rnd(4), 0);
1866 break;
1867 case ShopType.Ecopo:
1868 Add("ecomark", 5, 0);
1869 Add("whip_egg", 1, 0);
1870 Add("helm_chef", 1, 0);
1871 Add("hammer_strip", 1, 0);
1872 Add("1165", 1, 0);
1873 Add("plat", 100, 0);
1874 AddThing(ThingGen.CreateScroll(9160).SetNum(5));
1875 AddThing(ThingGen.CreateRune(450, 1, free: true));
1876 break;
1877 case ShopType.Gun:
1878 Add("bullet", 1, 0).SetNum(300 + EClass.rnd(100)).ChangeMaterial("iron");
1879 Add("bullet_energy", 1, 0).SetNum(100 + EClass.rnd(100)).ChangeMaterial("iron");
1880 break;
1881 case ShopType.Magic:
1882 if ((EClass._zone.id == "lumiest" && EClass._zone.lv == 0) || (EClass._zone.id != "lumiest" && EClass.rnd(4) == 0))
1883 {
1884 t.AddThing(ThingGen.Create("letter_trial"));
1885 }
1886 break;
1887 case ShopType.Festival:
1889 {
1890 Add("1085", 1, 0);
1891 if (EClass._zone.id == "noyel")
1892 {
1893 Add("holyFeather", 1, 0);
1894 }
1895 }
1896 break;
1897 case ShopType.Junk:
1898 case ShopType.LoytelMart:
1899 {
1900 if (ShopType == ShopType.LoytelMart)
1901 {
1902 Add("ticket_massage", 1, 0);
1903 Add("ticket_armpillow", 1, 0);
1904 Add("ticket_champagne", 1, 0);
1905 }
1906 for (int num8 = 0; num8 < 3; num8++)
1907 {
1908 if (EClass.rnd(5) == 0)
1909 {
1910 TreasureType treasureType = ((EClass.rnd(10) == 0) ? TreasureType.BossNefia : ((EClass.rnd(10) == 0) ? TreasureType.Map : TreasureType.RandomChest));
1911 int num9 = EClass.rnd(EClass.rnd(ShopLv + (EClass.debug.enable ? 200 : 50)) + 1) + 1;
1912 Thing thing5 = ThingGen.Create(treasureType switch
1913 {
1914 TreasureType.Map => "chest_treasure",
1915 TreasureType.BossNefia => "chest_boss",
1916 _ => "chest3",
1917 });
1918 thing5.c_lockedHard = true;
1919 thing5.c_lockLv = num9;
1920 thing5.c_priceAdd = 2000 + num9 * 250 * ((treasureType == TreasureType.RandomChest) ? 1 : 5);
1921 thing5.c_revealLock = true;
1922 ThingGen.CreateTreasureContent(thing5, num9, treasureType, clearContent: true);
1923 AddThing(thing5);
1924 }
1925 }
1926 break;
1927 }
1928 }
1929 ShopType shopType = ShopType;
1930 if (shopType == ShopType.General || shopType == ShopType.Food)
1931 {
1932 for (int num12 = 0; num12 < (EClass.debug.enable ? 3 : 3); num12++)
1933 {
1934 if (EClass.rnd(3) == 0)
1935 {
1936 int lv = EClass.rnd(EClass.rnd(ShopLv + (EClass.debug.enable ? 200 : 50)) + 1) + 1;
1937 Thing t2 = ThingGen.Create("chest_gamble", -1, lv).SetNum(1 + EClass.rnd(20));
1938 AddThing(t2);
1939 }
1940 }
1941 }
1942 switch (owner.id)
1943 {
1944 case "rodwyn":
1945 AddThing(ThingGen.CreateSpellbook(8790));
1946 AddThing(ThingGen.CreatePotion(8791).SetNum(3 + EClass.rnd(3)));
1947 AddThing(ThingGen.CreatePotion(8792).SetNum(3 + EClass.rnd(3)));
1948 break;
1949 case "girl_blue":
1950 Add("779", 1 + EClass.rnd(3), 0);
1951 break;
1952 case "nola":
1953 AddThing(ThingGen.CreateRecipe("ic").SetPriceFix(400));
1954 AddThing(ThingGen.CreateRecipe("bullet").SetPriceFix(300));
1955 AddThing(ThingGen.CreateRecipe("break_powder").SetPriceFix(1000));
1956 AddThing(ThingGen.CreateRecipe("quarrel").SetPriceFix(100));
1957 AddThing(ThingGen.CreateRecipe("1099").SetPriceFix(400));
1958 AddThing(ThingGen.CreateRecipe("detector").SetPriceFix(700));
1959 AddThing(ThingGen.CreatePlan(2710)).SetPriceFix(-100);
1960 AddThing(ThingGen.CreatePlan(2711)).SetPriceFix(-100);
1961 AddThing(ThingGen.CreatePlan(2712)).SetPriceFix(200);
1962 break;
1963 }
1965 {
1966 Add("lockpick", 1, 0);
1967 if (EClass.rnd(2) == 0)
1968 {
1969 Add("lockpick", 1, 0);
1970 }
1971 AddThing(ThingGen.CreateScroll(8780, EClass.rndHalf(5)));
1972 }
1973 foreach (Thing thing10 in t.things)
1974 {
1975 thing10.c_idBacker = 0;
1976 if (ShopType != ShopType.Copy)
1977 {
1978 thing10.TryMakeRandomItem(ShopLv);
1979 if (thing10.Num == 1)
1980 {
1981 thing10.SetNum(thing10.trait.DefaultStock);
1982 }
1983 if (thing10.trait is TraitFoodMeal)
1984 {
1985 CraftUtil.MakeDish(thing10, ShopLv, owner.Chara);
1986 }
1987 if (thing10.IsFood && owner.id == "rodwyn")
1988 {
1989 SourceElement.Row row = EClass.sources.elements.rows.Where((SourceElement.Row e) => !e.foodEffect.IsEmpty() && e.category != "feat" && e.chance > 0).RandomItem();
1990 thing10.elements.SetBase(row.id, 10 + EClass.rnd(10));
1991 }
1992 }
1993 if (CurrencyType == CurrencyType.Casino_coin)
1994 {
1995 thing10.noSell = true;
1996 }
1998 {
1999 thing10.isStolen = true;
2000 }
2001 if (!(thing10.trait is TraitErohon))
2002 {
2003 thing10.c_IDTState = 0;
2004 }
2005 if (CurrencyType == CurrencyType.Money && (thing10.category.IsChildOf("meal") || thing10.category.IsChildOf("preserved")) && thing10.id != "ration")
2006 {
2007 thing10.c_priceFix = -70;
2008 }
2009 if (thing10.trait is TraitErohon)
2010 {
2011 thing10.c_IDTState = 5;
2012 }
2013 if (thing10.IsContainer && !thing10.c_revealLock)
2014 {
2015 thing10.RemoveThings();
2016 t.c_lockLv = 0;
2017 }
2018 }
2019 if (t.things.Count <= t.things.GridSize)
2020 {
2021 return;
2022 }
2023 int num13 = t.things.width * 10;
2024 if (t.things.Count > num13)
2025 {
2026 int num14 = t.things.Count - num13;
2027 for (int num15 = 0; num15 < num14; num15++)
2028 {
2029 t.things.LastItem().Destroy();
2030 }
2031 }
2032 t.things.ChangeSize(t.things.width, Mathf.Min(t.things.Count / t.things.width + 1, 10));
2033 Thing Add(string id, int a, int idSkin)
2034 {
2036 Thing thing7 = ThingGen.Create(id, -1, ShopLv).SetNum(a);
2037 thing7.idSkin = ((idSkin == -1) ? EClass.rnd(thing7.source.skins.Length + 1) : idSkin);
2038 return t.AddThing(thing7);
2039 }
2040 void AddAdvWeek(int i)
2041 {
2042 Thing thing6 = ThingGen.CreateRedBook("advweek_" + i);
2043 thing6.c_priceFix = -90;
2044 AddThing(thing6);
2045 }
2046 Thing AddThing(Thing _t)
2047 {
2048 return t.AddThing(_t);
2049 }
2050 void NoRestock(Thing _t)
2051 {
2052 HashSet<string> hashSet = EClass.player.noRestocks.TryGetValue(owner.id);
2053 if (hashSet == null)
2054 {
2055 hashSet = new HashSet<string>();
2056 }
2057 if (!hashSet.Contains(_t.trait.IdNoRestock))
2058 {
2059 hashSet.Add(_t.trait.IdNoRestock);
2060 EClass.player.noRestocks[owner.id] = hashSet;
2061 _t.SetInt(101, 1);
2062 AddThing(_t);
2063 }
2064 }
2065 }
2066
2068 {
2069 switch (ShopType)
2070 {
2071 case ShopType.Dye:
2072 {
2073 Thing thing = ThingGen.Create("dye").SetNum(15 + EClass.rnd(30));
2074 thing.ChangeMaterial(EClass.sources.materials.rows.RandomItem().alias);
2075 return thing;
2076 }
2077 case ShopType.GeneralExotic:
2078 return FromFilter("shop_generalExotic");
2079 case ShopType.VMachine:
2080 if (EClass.rnd(10) == 0)
2081 {
2082 return Create("panty");
2083 }
2084 if (EClass.rnd(5) == 0)
2085 {
2086 return Create("234");
2087 }
2088 return FromFilter("shop_drink");
2089 case ShopType.Furniture:
2090 return FromFilter("shop_furniture");
2091 case ShopType.Book:
2092 return FromFilter("shop_book");
2093 case ShopType.Magic:
2094 return FromFilter("shop_magic");
2095 case ShopType.Ecopo:
2096 {
2097 Thing thing3 = TraitSeed.MakeRandomSeed(enc: true);
2098 if (EClass.rnd(2) == 0)
2099 {
2100 TraitSeed.LevelSeed(thing3, (thing3.trait as TraitSeed).row, 1);
2101 }
2102 return thing3;
2103 }
2104 case ShopType.Healer:
2105 {
2106 Thing thing2 = null;
2107 for (int i = 0; i < 1000; i++)
2108 {
2109 thing2 = FromFilter("shop_healer");
2110 if (thing2.trait is TraitScroll { source: not null } traitScroll)
2111 {
2112 if (!(traitScroll.source.aliasParent != "WIL") && !(traitScroll.source.categorySub == "attack"))
2113 {
2114 break;
2115 }
2116 }
2117 else if (thing2.trait is TraitPotionRandom { source: not null } traitPotionRandom)
2118 {
2119 if (!(traitPotionRandom.source.aliasParent != "WIL") && !(traitPotionRandom.source.categorySub == "attack"))
2120 {
2121 thing2.SetNum(EClass.rnd(5) + 1);
2122 break;
2123 }
2124 }
2125 else if (thing2.trait is TraitRodRandom { source: not null } traitRodRandom && !(traitRodRandom.source.aliasParent != "WIL") && !(traitRodRandom.source.categorySub == "attack"))
2126 {
2127 break;
2128 }
2129 }
2130 return thing2;
2131 }
2132 case ShopType.Milk:
2133 if (EClass._zone is Zone_Nefu && EClass.rnd(2) == 0)
2134 {
2135 Thing thing4 = ThingGen.Create("milk");
2136 thing4.MakeRefFrom(EClass.sources.charas.rows.Where((SourceChara.Row r) => r.race == "mifu" || r.race == "nefu").RandomItem().model);
2137 Debug.Log(thing4);
2138 return thing4;
2139 }
2140 return Create("milk");
2141 case ShopType.Map:
2142 return ThingGen.CreateMap();
2143 case ShopType.Plan:
2144 return Create("book_plan");
2145 case ShopType.Weapon:
2146 return FromFilter("shop_weapon");
2147 case ShopType.Gun:
2148 if (EClass.rnd(8) == 0)
2149 {
2150 return Create("mod_ranged");
2151 }
2152 return FromFilter("shop_gun");
2153 case ShopType.Blackmarket:
2154 case ShopType.Exotic:
2155 {
2156 int num = 30;
2158 {
2159 num = 25;
2160 }
2162 {
2163 num = 15;
2164 }
2165 if (EClass.debug.enable)
2166 {
2167 num = 1;
2168 }
2169 CardBlueprint.SetRarity((EClass.rnd(num * 5) == 0) ? Rarity.Mythical : ((EClass.rnd(num) == 0) ? Rarity.Legendary : ((EClass.rnd(5) == 0) ? Rarity.Superior : Rarity.Normal)));
2170 return FromFilter("shop_blackmarket");
2171 }
2172 case ShopType.Drink:
2173 return FromFilter("shop_drink");
2174 case ShopType.Booze:
2175 return FromFilter("shop_booze");
2176 case ShopType.Fruit:
2177 return FromFilter("shop_fruit");
2178 case ShopType.Fish:
2179 if (EClass.rnd(2) == 0)
2180 {
2181 return Create("bait");
2182 }
2183 if (EClass.rnd(3) == 0)
2184 {
2185 return Create("fishingRod");
2186 }
2187 return FromFilter("shop_fish");
2188 case ShopType.Meat:
2189 if (EClass.rnd(5) == 0)
2190 {
2191 return Create("seasoning");
2192 }
2193 return FromFilter("shop_meat");
2194 case ShopType.Bread:
2195 if (EClass.rnd(3) == 0)
2196 {
2197 return Create("dough");
2198 }
2199 return FromFilter("shop_bread");
2200 case ShopType.Sweet:
2201 if (EClass.rnd(3) == 0)
2202 {
2203 return Create("dough");
2204 }
2205 return FromFilter("shop_sweet");
2206 case ShopType.Food:
2207 if (EClass.rnd(5) == 0)
2208 {
2209 return Create("seasoning");
2210 }
2211 return FromFilter("shop_food");
2212 case ShopType.Drug:
2213 return FromFilter("shop_drug");
2214 case ShopType.LoytelMart:
2215 {
2216 int loytelMartLv = EClass.player.flags.loytelMartLv;
2217 if (loytelMartLv >= 1)
2218 {
2219 if (EClass.rnd(10) == 0)
2220 {
2221 return Create("monsterball").SetLv(40 + EClass.rnd(ShopLv)).Thing;
2222 }
2223 if (EClass.rnd(30) == 0)
2224 {
2225 return ThingGen.Create("rp_random", -1, ShopLv + 10);
2226 }
2227 if (EClass.rnd(100) == 0)
2228 {
2229 return ThingGen.Create("map_treasure", -1, EClass.rndHalf(ShopLv));
2230 }
2231 if (EClass.rnd(40) == 0)
2232 {
2233 return Create("water").SetPriceFix(1000);
2234 }
2235 if (EClass.rnd(1000) == 0)
2236 {
2237 return Create("1165");
2238 }
2239 }
2240 if ((loytelMartLv >= 2 || EClass.debug.enable) && EClass.rnd(10) == 0)
2241 {
2242 SourceElement.Row row = EClass.sources.elements.rows.Where((SourceElement.Row r) => r.tag.Contains("loytelMart") && ShopLv + 10 >= r.LV).ToList().RandomItemWeighted((SourceElement.Row r) => r.chance);
2243 switch ((from _s in row.thing.ToCharArray()
2244 where _s != ' '
2245 select _s).RandomItem())
2246 {
2247 case 'B':
2248 return ThingGen.CreateSpellbook(row.id);
2249 case 'P':
2250 return ThingGen.CreatePotion(row.id);
2251 case 'R':
2252 return ThingGen.CreateRod(row.id);
2253 case 'S':
2254 return ThingGen.CreateScroll(row.id);
2255 }
2256 }
2257 return FromFilter("shop_junk");
2258 }
2259 case ShopType.Junk:
2260 case ShopType.Moyer:
2261 return FromFilter("shop_junk");
2262 case ShopType.Souvenir:
2263 return FromFilter("shop_souvenir");
2264 case ShopType.StrangeGirl:
2265 return DNA.GenerateGene(SpawnList.Get("chara").Select(ShopLv + 10), DNA.Type.Brain);
2266 case ShopType.Fireworks:
2267 if (EClass.rnd(3) == 0)
2268 {
2269 return Create("firework_launcher");
2270 }
2271 return Create("firework");
2272 case ShopType.Festival:
2273 if (EClass.rnd(3) == 0)
2274 {
2275 if (IsFestival("olvina"))
2276 {
2277 return Create(new string[4] { "1125", "1126", "pillow_truth", "1230" }.RandomItem());
2278 }
2279 if (IsFestival("yowyn"))
2280 {
2281 return Create(new string[3] { "hat_mushroom", "hat_witch", "hat_kumiromi" }.RandomItem());
2282 }
2283 if (IsFestival("noyel"))
2284 {
2285 return Create(new string[9] { "1127", "1128", "xmas_sled", "xmas_bigbag", "xmas_bigbox", "xmas_blackcat", "xmas_blackcat", "xmas_jure", "xmas_crown" }.RandomItem());
2286 }
2287 }
2288 if (EClass.rnd(2) == 0)
2289 {
2290 return Create(new string[4] { "1081", "1082", "1083", "1084" }.RandomItem());
2291 }
2292 if (EClass.rnd(3) == 0)
2293 {
2294 return FromFilter("shop_junk");
2295 }
2296 return FromFilter("shop_souvenir");
2297 case ShopType.Lamp:
2298 if (EClass.rnd(3) != 0)
2299 {
2300 if (IsFestival("kapul"))
2301 {
2302 return Create(new string[6] { "999", "1000", "1001", "1002", "1003", "1004" }.RandomItem());
2303 }
2304 if (IsFestival("yowyn"))
2305 {
2306 return Create(new string[2] { "1072", "1073" }.RandomItem());
2307 }
2308 if (IsFestival("noyel"))
2309 {
2310 return Create(new string[1] { "1069" }.RandomItem());
2311 }
2312 if (IsFestival("olvina"))
2313 {
2314 return Create(new string[2] { "1070", "1071" }.RandomItem());
2315 }
2316 }
2317 if (EClass._zone.IsFestival && EClass.rnd(2) == 0)
2318 {
2319 return Create(new string[4] { "953", "954", "955", "956" }.RandomItem());
2320 }
2321 return FromFilter("shop_lamp");
2322 default:
2323 if (EClass.rnd(100) == 0)
2324 {
2325 return Create("lockpick");
2326 }
2327 return FromFilter("shop_general");
2328 }
2329 Thing Create(string s)
2330 {
2331 return ThingGen.Create(s, -1, ShopLv);
2332 }
2333 Thing FromFilter(string s)
2334 {
2335 return ThingGen.CreateFromFilter(s, ShopLv);
2336 }
2337 static bool IsFestival(string id)
2338 {
2339 if (EClass._zone.id == id)
2340 {
2341 return EClass._zone.IsFestival;
2342 }
2343 return false;
2344 }
2345 }
2346 }
AnimeID
Definition: AnimeID.cs:2
CTAG
Definition: CTAG.cs:2
ContainerType
Definition: ContainerType.cs:2
CurrencyType
Definition: CurrencyType.cs:2
EffectDead
Definition: EffectDead.cs:2
Emo2
Definition: Emo2.cs:2
FontColor
Definition: FontColor.cs:2
HitResult
Definition: HitResult.cs:2
InvGridSize
Definition: InvGridSize.cs:2
LockOpenState
Definition: LockOpenState.cs:2
PlaceState
Definition: PlaceState.cs:2
PriceType
Definition: PriceType.cs:2
Rarity
Definition: Rarity.cs:2
RefCardName
Definition: RefCardName.cs:2
ShopType
Definition: ShopType.cs:2
SlaverType
Definition: SlaverType.cs:2
ThrowType
Definition: ThrowType.cs:2
ToggleType
Definition: ToggleType.cs:2
TraitRadiusType
TreasureType
Definition: TreasureType.cs:2
list. Add(item3)
bool altAction
Definition: ActPlan.cs:156
Chara cc
Definition: ActPlan.cs:202
bool IsSelfOrNeighbor
Definition: ActPlan.cs:176
bool TrySetAct(string lang, Func< bool > onPerform, Card tc, CursorInfo cursor=null, int dist=1, bool isHostileAct=false, bool localAct=true, bool canRepeat=false)
Definition: ActPlan.cs:366
PointList points
Definition: BaseArea.cs:26
int GetInt(int id, int? defaultInt=null)
Definition: BaseCard.cs:25
void SetInt(int id, int value=0)
Definition: BaseCard.cs:39
ScreenGuide guide
static void SetRarity(Rarity q=Rarity.Normal)
static void SetNormalRarity(bool fixedMat=false)
void PlayAnime(AnimeID id, bool force)
void AddExtra(string id)
void RemoveExtra(string id)
CardRow origin
Definition: CardRow.cs:49
string[] trait
Definition: CardRow.cs:33
string id
Definition: CardRow.cs:7
Definition: Card.cs:11
Thing TryMakeRandomItem(int lv=-1, TryMakeRandomItemSource itemSource=TryMakeRandomItemSource.Default, Chara crafter=null)
Definition: Card.cs:5204
virtual bool isThing
Definition: Card.cs:2043
bool IsImportant
Definition: Card.cs:2067
void MakeRefFrom(string id)
Definition: Card.cs:5458
virtual Chara Chara
Definition: Card.cs:2032
ElementContainerCard elements
Definition: Card.cs:39
int c_ammo
Definition: Card.cs:1435
string id
Definition: Card.cs:33
bool isNPCProperty
Definition: Card.cs:540
bool IsUnique
Definition: Card.cs:2053
bool HasElement(int ele, int req=1)
Definition: Card.cs:5638
bool isRoofItem
Definition: Card.cs:564
bool c_lockedHard
Definition: Card.cs:1010
bool isLostProperty
Definition: Card.cs:792
SourceMaterial.Row material
Definition: Card.cs:2013
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5852
string c_idDeity
Definition: Card.cs:1555
int c_invest
Definition: Card.cs:1267
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:2994
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Definition: Card.cs:6951
Thing ammoData
Definition: Card.cs:1759
int c_lockLv
Definition: Card.cs:938
Thing AddThing(string id, int lv=-1)
Definition: Card.cs:3057
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6402
Card SetLv(int a)
Definition: Card.cs:2858
Rarity rarity
Definition: Card.cs:300
bool ExistsOnMap
Definition: Card.cs:2047
bool c_revealLock
Definition: Card.cs:1022
Thing SetNum(int a)
Definition: Card.cs:3393
bool autoRefuel
Definition: Card.cs:612
bool IsFood
Definition: Card.cs:2137
TileType TileType
Definition: Card.cs:2097
virtual SourcePref Pref
Definition: Card.cs:2069
void RecalculateFOV()
Definition: Card.cs:6064
bool HasTag(CTAG tag)
Definition: Card.cs:2557
Point pos
Definition: Card.cs:57
void DyeRandom()
Definition: Card.cs:5703
void Dye(string idMat)
Definition: Card.cs:5708
Trait trait
Definition: Card.cs:51
bool disableAutoToggle
Definition: Card.cs:588
int c_dateStockExpire
Definition: Card.cs:1207
void ModCharge(int a, bool destroy=false)
Definition: Card.cs:3842
void Destroy()
Definition: Card.cs:4850
bool c_isImportant
Definition: Card.cs:998
ThingContainer things
Definition: Card.cs:36
bool IsInstalled
Definition: Card.cs:2343
virtual bool IsPC
Definition: Card.cs:2105
bool IsMeleeWeapon
Definition: Card.cs:2203
string NameSimple
Definition: Card.cs:2101
virtual bool isChara
Definition: Card.cs:2045
virtual Thing Thing
Definition: Card.cs:2020
int Evalue(int ele)
Definition: Card.cs:2533
int idSkin
Definition: Card.cs:348
bool isOn
Definition: Card.cs:528
Thing SetPriceFix(int a)
Definition: Card.cs:6846
Cell Cell
Definition: Card.cs:2017
Thing Duplicate(int num)
Definition: Card.cs:3342
void PlaySoundDrop(bool spatial=true)
Definition: Card.cs:5837
Thing c_copyContainer
Definition: Card.cs:1783
virtual CardRow sourceCard
Definition: Card.cs:2093
void ModExp(string alias, int a)
Definition: Card.cs:2610
int Num
Definition: Card.cs:156
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:5871
SourceCategory.Row category
Definition: Card.cs:2011
bool IsIdentified
Definition: Card.cs:2339
bool IsContainer
Definition: Card.cs:2051
int c_charges
Definition: Card.cs:1243
string c_editorTraitVal
Definition: Card.cs:1687
CardRenderer renderer
Definition: Card.cs:59
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6499
void RemoveThings()
Definition: Card.cs:3208
bool HasBlock
Definition: Cell.cs:643
bool HasRoof
Definition: Cell.cs:648
bool HasFloor
Definition: Cell.cs:645
Definition: Chara.cs:10
Card held
Definition: Chara.cs:70
override bool IsPC
Definition: Chara.cs:610
bool TryHoldCard(Card t, int num=-1, bool pickHeld=false)
Definition: Chara.cs:4321
Stats stamina
Definition: Chara.cs:1128
bool enable
Definition: CoreDebug.cs:285
static void MakeDish(Thing food, int lv, Chara crafter=null)
Definition: CraftUtil.cs:61
Definition: DNA.cs:8
Type
Definition: DNA.cs:10
static Thing GenerateGene(Chara c, Type? type=null)
Definition: DNA.cs:104
Definition: Date.cs:4
int hour
Definition: Date.cs:74
int GetRaw(int offsetHours=0)
Definition: Date.cs:322
bool IsExpired(int time)
Definition: Date.cs:332
string GetText(TextFormat format)
Definition: Date.cs:245
int GetRemainingHours(int rawDeadLine)
Definition: Date.cs:337
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static Zone _zone
Definition: EClass.cs:20
static World world
Definition: EClass.cs:40
static Map _map
Definition: EClass.cs:18
static int rnd(long a)
Definition: EClass.cs:58
static SourceManager sources
Definition: EClass.cs:42
static BaseGameScreen screen
Definition: EClass.cs:32
static int rndHalf(int a)
Definition: EClass.cs:87
static Player player
Definition: EClass.cs:12
static Chara pc
Definition: EClass.cs:14
static CoreDebug debug
Definition: EClass.cs:48
static GameSetting setting
Definition: EClass.cs:34
Element SetBase(string alias, int v, int potential=0)
void Remove(int id)
bool HasTag(string tag)
Definition: ELEMENT.cs:471
int Evalue(int ele)
RenderSetting render
Definition: GameSetting.cs:301
SpatialManager spatials
Definition: Game.cs:152
QuestManager quests
Definition: Game.cs:179
override bool IsCurrentZone
Definition: GuildMerchant.cs:5
override bool IsCurrentZone
Definition: GuildThief.cs:6
Definition: Guild.cs:2
static GuildMerchant Merchant
Definition: Guild.cs:29
static GuildThief Thief
Definition: Guild.cs:27
static LayerDragGrid Create(InvOwnerDraglet owner, bool refuelFromLayerDragGrid=false)
Definition: Los.cs:5
static bool IsVisible(Point p1, Point p2, Action< Point, bool > _onVisit=null)
Definition: Los.cs:167
int hour
Definition: MapConfig.cs:95
bool IsIndoor
Definition: Map.cs:131
void ForeachSphere(int _x, int _z, float r, Action< Point > action)
Definition: Map.cs:2367
MapConfig config
Definition: Map.cs:37
void Add(Point point, float tile=0f, float color=0f)
Definition: MeshPass.cs:122
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
int loytelMartLv
Definition: Player.cs:638
Flags flags
Definition: Player.cs:1014
void ModKarma(int a)
Definition: Player.cs:2408
Dictionary< string, HashSet< string > > noRestocks
Definition: Player.cs:1047
Definition: Point.cs:9
ref Vector3 Position(int height)
Definition: Point.cs:536
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1035
Point Copy()
Definition: Point.cs:479
bool IsValid
Definition: Point.cs:88
void RefreshNeighborTiles()
Definition: Point.cs:1260
Cell cell
Definition: Point.cs:51
static List< RecipeSource > list
Definition: RecipeManager.cs:9
RenderRow row
Definition: RecipeSource.cs:5
Definition: Recipe.cs:7
static Recipe Create(RecipeSource _source, int idMat=-1, Thing ing=null)
Definition: Recipe.cs:321
string RecipeCat
Definition: RenderRow.cs:121
string[] recipeKey
Definition: RenderRow.cs:56
int value
Definition: RenderRow.cs:20
Definition: Room.cs:4
MeshPass passGuideFloor
Definition: ScreenGuide.cs:7
int dateRefresh
Definition: SlaverData.cs:10
string GetText(string id="name", bool returnNull=false)
Definition: SourceData.cs:553
SourceMaterial materials
SourceElement elements
SourceChara charas
SourceReligion religions
bool Surface
Definition: SourcePref.cs:318
Zone Find(string id)
int lv
Definition: Spatial.cs:142
int electricity
Definition: Spatial.cs:250
string id
Definition: Spatial.cs:13
int development
Definition: Spatial.cs:238
static SpawnList Get(string id, string parent=null, CardFilter filter=null)
Definition: SpawnList.cs:18
CardRow Select(int lv=-1, int levelRange=-1)
Definition: SpawnList.cs:139
virtual void Mod(int a)
Definition: Stats.cs:135
void DestroyAll(Func< Thing, bool > funcExclude=null)
Thing Find(int uid)
void Foreach(Action< Thing > action, bool onlyAccessible=true)
static Thing CreateRune(int ele, int v, bool free=false)
Definition: ThingGen.cs:185
static Thing CreatePotion(int ele, int num=1)
Definition: ThingGen.cs:200
static Thing CreateFromFilter(string id, int lv=-1)
Definition: ThingGen.cs:63
static Thing CreateMap(string idSource=null, int lv=-1)
Definition: ThingGen.cs:124
static Thing CreatePerfume(int ele, int num=1)
Definition: ThingGen.cs:207
static Thing CreateRod(int ele)
Definition: ThingGen.cs:193
static Thing CreateRedBook(string id, int num=1)
Definition: ThingGen.cs:163
static void CreateTreasureContent(Thing t, int lv, TreasureType type, bool clearContent)
Definition: ThingGen.cs:240
static Thing CreateSpellbook(string alias, int num=1)
Definition: ThingGen.cs:151
static Thing CreatePlan(int ele)
Definition: ThingGen.cs:137
static Thing CreateRecipe(string id)
Definition: ThingGen.cs:144
static Thing CreateSkillbook(int ele, int num=1)
Definition: ThingGen.cs:171
static Thing CreateFromCategory(string idCat, int lv=-1)
Definition: ThingGen.cs:75
static Thing CreateScroll(int ele, int num=1)
Definition: ThingGen.cs:178
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
SourceThing.Row source
Definition: Thing.cs:11
virtual bool IsBlockSight
Definition: TileType.cs:157
virtual bool IsBlockPass
Definition: TileType.cs:153
static Thing MakeSeed(SourceObj.Row obj, PlantData plant=null)
Definition: TraitSeed.cs:88
static Thing MakeRandomSeed(bool enc=false)
Definition: TraitSeed.cs:187
static void LevelSeed(Thing t, SourceObj.Row obj, int num)
Definition: TraitSeed.cs:140
static void SetZone(Zone zone, Thing t)
Definition: Trait.cs:7
virtual string LangBarter
Definition: Trait.cs:550
virtual void OnImportMap()
Definition: Trait.cs:647
virtual bool IsBlendBase
Definition: Trait.cs:260
virtual bool RequireFullStackCheck
Definition: Trait.cs:196
virtual bool OnUse(Chara c, Card tg)
Definition: Trait.cs:1015
virtual bool CanExtendBuild
Definition: Trait.cs:168
bool IsFuel(string s)
Definition: Trait.cs:1319
virtual bool IsFactory
Definition: Trait.cs:140
virtual bool IsRestSpot
Definition: Trait.cs:256
virtual TileMode tileMode
Definition: Trait.cs:432
void OfferProcess(Chara cc)
Definition: Trait.cs:844
virtual bool IsBlockPath
Definition: Trait.cs:53
virtual bool CanBeMasked
Definition: Trait.cs:258
virtual bool IsBlockSight
Definition: Trait.cs:55
virtual bool HoldAsDefaultInteraction
Definition: Trait.cs:130
virtual int radius
Definition: Trait.cs:93
virtual int GetActDuration(Chara c)
Definition: Trait.cs:608
virtual bool CanBeAttacked
Definition: Trait.cs:164
virtual void Update()
Definition: Trait.cs:721
virtual bool CanBeHallucinated
Definition: Trait.cs:296
virtual string IDActorEx
Definition: Trait.cs:174
virtual void SetMainText(UIText t, bool hotitem)
Definition: Trait.cs:1427
virtual bool CanUse(Chara c)
Definition: Trait.cs:991
virtual bool ShouldRefreshTile
Definition: Trait.cs:76
virtual string GetName()
Definition: Trait.cs:687
virtual bool ShowChildrenNumber
Definition: Trait.cs:330
virtual List< Point > ListPoints(Point center=null, bool onlyPassable=true)
Definition: Trait.cs:748
virtual CopyShopType CopyShop
Definition: Trait.cs:510
virtual void OnChangePlaceState(PlaceState state)
Definition: Trait.cs:671
string IdToggleExtra
Definition: Trait.cs:462
virtual Recipe GetRecipe()
Definition: Trait.cs:799
void OnBarter()
Definition: Trait.cs:1496
virtual bool IsOpenPath
Definition: Trait.cs:61
virtual bool ShowAsTool
Definition: Trait.cs:332
virtual void OnSetCardGrid(ButtonGrid b)
Definition: Trait.cs:1063
virtual string IDInvStyle
Definition: Trait.cs:172
virtual string IdSoundToggleOff
Definition: Trait.cs:493
virtual HotItem GetHotItem()
Definition: Trait.cs:955
virtual bool CanHarvest
Definition: Trait.cs:91
virtual float DropChance
Definition: Trait.cs:356
int GetSortVal(UIList.SortMode m)
Definition: Trait.cs:949
virtual bool Contains(RecipeSource r)
Definition: Trait.cs:574
virtual void OnEquip(Chara c, bool onSetOwner)
Definition: Trait.cs:663
virtual void OnHeld()
Definition: Trait.cs:1037
virtual void OnTickHeld()
Definition: Trait.cs:1041
virtual void WriteNote(UINote n, bool identified)
Definition: Trait.cs:945
int GetParamInt(int i, int def)
Definition: Trait.cs:565
virtual void OnSteppedOut(Chara c)
Definition: Trait.cs:1071
virtual bool TryProgress(AIProgress p)
Definition: Trait.cs:883
virtual bool CanBeDisassembled
Definition: Trait.cs:303
virtual void OnRead(Chara c)
Definition: Trait.cs:965
virtual bool UseAltTiles
Definition: Trait.cs:434
virtual bool IgnoreLastStackHeight
Definition: Trait.cs:118
virtual bool IsTool
Definition: Trait.cs:364
virtual void TryToggle()
Definition: Trait.cs:1125
Point GetRandomPoint(Func< Point, bool > func=null, Chara accessChara=null)
Definition: Trait.cs:730
virtual void OnInstall(bool byPlayer)
Definition: Trait.cs:1117
virtual bool CanChangeHeight
Definition: Trait.cs:148
virtual bool ShowOrbit
Definition: Trait.cs:134
virtual void TrySetAct(ActPlan p)
Definition: Trait.cs:1025
virtual bool IsAltar
Definition: Trait.cs:254
virtual bool CanSearchContent
Definition: Trait.cs:217
virtual int GetValue()
Definition: Trait.cs:579
virtual int FuelCost
Definition: Trait.cs:456
virtual bool CanChildDecay(Card c)
Definition: Trait.cs:1058
virtual void TrySetHeldAct(ActPlan p)
Definition: Trait.cs:1033
virtual string IdSoundToggleOn
Definition: Trait.cs:477
virtual void OnThrowGround(Chara c, Point p)
Definition: Trait.cs:987
virtual bool RenderExtra
Definition: Trait.cs:354
Thing CreateStock()
Definition: Trait.cs:2067
virtual bool CanStackTo(Thing to)
Definition: Trait.cs:584
virtual string ReqHarvest
Definition: Trait.cs:300
virtual bool CanBeDestroyed
Definition: Trait.cs:292
bool IsToggle
Definition: Trait.cs:382
virtual bool CanRead(Chara c)
Definition: Trait.cs:960
virtual int RestockDay
Definition: Trait.cs:546
virtual string langNote
Definition: Trait.cs:170
virtual bool AlwaysHideOnLowWall
Definition: Trait.cs:350
virtual bool CanCook(Card c)
Definition: Trait.cs:809
virtual string IdNoRestock
Definition: Trait.cs:358
virtual int CraftNum
Definition: Trait.cs:132
virtual bool CanBuildInTown
Definition: Trait.cs:265
virtual void SetOwner(Card _owner)
Definition: Trait.cs:632
virtual bool AllowSell
Definition: Trait.cs:521
virtual bool OnChildDecay(Card c, bool firstDecay)
Definition: Trait.cs:1053
virtual bool UseLowblock
Definition: Trait.cs:436
virtual bool HasCharges
Definition: Trait.cs:326
virtual void OnRenderTile(Point point, HitResult result, int dir)
Definition: Trait.cs:696
string GetTextRestock(string lang, bool pet)
Definition: Trait.cs:1451
virtual void OnOpenDoor(Chara c)
Definition: Trait.cs:1075
virtual bool NoHeldDir
Definition: Trait.cs:348
virtual LockOpenState TryOpenLock(Chara cc, bool msgFail=true)
Definition: Trait.cs:888
virtual bool IsLightOn
Definition: Trait.cs:409
bool IsRequireFuel
Definition: Trait.cs:460
virtual bool IsNoShop
Definition: Trait.cs:65
virtual bool CanOpenContainer
Definition: Trait.cs:233
virtual int DefaultStock
Definition: Trait.cs:128
bool IsFuel(Thing t)
Definition: Trait.cs:1324
virtual void TrySetToggleAct(ActPlan p)
Definition: Trait.cs:1231
virtual bool ShowCharges
Definition: Trait.cs:328
virtual TileType tileType
Definition: Trait.cs:49
virtual bool IsFloating
Definition: Trait.cs:63
virtual void PlayToggleEffect(bool silent)
Definition: Trait.cs:1181
virtual bool CanUse(Chara c, Card tg)
Definition: Trait.cs:996
virtual bool CanUseRoomRadius
Definition: Trait.cs:97
virtual bool CanCopy(Thing t)
Definition: Trait.cs:1446
virtual bool CanBeHeld
Definition: Trait.cs:276
virtual bool UseDummyTile
Definition: Trait.cs:194
virtual void OnUnequip(Chara c)
Definition: Trait.cs:667
virtual int DecaySpeedChild
Definition: Trait.cs:124
virtual Sprite GetRefSprite()
Definition: Trait.cs:618
virtual bool IsOnlyUsableByPc
Definition: Trait.cs:69
virtual bool IsHomeItem
Definition: Trait.cs:252
TileMode
Definition: Trait.cs:9
void Offer(Chara cc)
Definition: Trait.cs:866
virtual bool IsDoor
Definition: Trait.cs:57
virtual void OnAddedToZone()
Definition: Trait.cs:675
virtual bool CanName
Definition: Trait.cs:144
virtual void Toggle(bool on, bool silent=false)
Definition: Trait.cs:1147
string GetParam(int i, string def=null)
Definition: Trait.cs:556
virtual int IdSkin
Definition: Trait.cs:45
void Refuel(Thing t)
Definition: Trait.cs:1361
virtual void OnUnsetCurrentItem()
Definition: Trait.cs:1049
virtual void OnRenderExtra(RenderParam p)
Definition: Trait.cs:623
bool ExistsOnMap
Definition: Trait.cs:352
virtual bool IsAnimeOn
Definition: Trait.cs:371
virtual bool CanEat(Chara c)
Definition: Trait.cs:969
virtual bool CanPutAway
Definition: Trait.cs:146
CopyShopType
Definition: Trait.cs:19
virtual bool IsOpenSight
Definition: Trait.cs:59
virtual Recipe GetBuildModeRecipe()
Definition: Trait.cs:804
virtual int CostRerollShop
Definition: Trait.cs:533
virtual void OnSimulateHour(VirtualDate date)
Definition: Trait.cs:683
int GetFuelValue(Thing t)
Definition: Trait.cs:1329
virtual bool OnUse(Chara c, Point p)
Definition: Trait.cs:1020
Point GetPoint()
Definition: Trait.cs:725
virtual bool IsThrowMainAction
Definition: Trait.cs:181
virtual bool HaveUpdate
Definition: Trait.cs:136
virtual bool InvertHeldSprite
Definition: Trait.cs:71
virtual bool HideInAdv
Definition: Trait.cs:346
virtual bool CanBeHeldAsFurniture
Definition: Trait.cs:335
string TextNextRestockPet
Definition: Trait.cs:554
virtual string RecipeCat
Definition: Trait.cs:362
virtual bool UseExtra
Definition: Trait.cs:438
virtual int MaxFuel
Definition: Trait.cs:445
virtual bool IsChangeFloorHeight
Definition: Trait.cs:73
virtual void OnStepped(Chara c)
Definition: Trait.cs:1067
virtual bool CanBeTeleported
Definition: Trait.cs:166
bool IsLighting
Definition: Trait.cs:397
virtual string GetHoverText()
Definition: Trait.cs:589
string TextNextRestock
Definition: Trait.cs:552
virtual bool IsGround
Definition: Trait.cs:67
virtual void RefreshRenderer()
Definition: Trait.cs:1412
virtual bool CanUse(Chara c, Point p)
Definition: Trait.cs:1001
virtual bool CanOffer(Card tg)
Definition: Trait.cs:831
virtual bool DisableAutoCombat
Definition: Trait.cs:198
virtual void OnCreate(int lv)
Definition: Trait.cs:659
virtual bool IsSpot
Definition: Trait.cs:138
virtual ? Color ColorExtra
Definition: Trait.cs:442
string[] Params
Definition: Trait.cs:32
virtual int Electricity
Definition: Trait.cs:102
virtual void OnSetCurrentItem()
Definition: Trait.cs:1045
virtual TraitRadiusType radiusType
Definition: Trait.cs:95
virtual bool CanCopyInBlueprint
Definition: Trait.cs:153
Emo2 GetRestockedIcon()
Definition: Trait.cs:1474
virtual bool OnUse(Chara c)
Definition: Trait.cs:1006
int GetFuelValue(string id)
Definition: Trait.cs:1338
void TryRefuel(int dest, List< Thing > excludes)
Definition: Trait.cs:1374
virtual bool CanBeShipped
Definition: Trait.cs:315
Card owner
Definition: Trait.cs:27
virtual void OnUninstall()
Definition: Trait.cs:1121
virtual bool IsOn
Definition: Trait.cs:368
void CookProgress()
Definition: Trait.cs:818
static List< Point > listRadiusPoints
Definition: Trait.cs:29
virtual void OnSetOwner()
Definition: Trait.cs:643
virtual bool CanBuiltAt(Point p)
Definition: Trait.cs:716
virtual bool CanUseContent
Definition: Trait.cs:214
virtual bool AutoToggle
Definition: Trait.cs:385
virtual bool IsNightOnlyLight
Definition: Trait.cs:421
virtual void OnDrink(Chara c)
Definition: Trait.cs:983
virtual int GuidePriotiy
Definition: Trait.cs:99
virtual bool UseLightColor
Definition: Trait.cs:440
virtual bool MaskOnBuild
Definition: Trait.cs:176
virtual int DecaySpeed
Definition: Trait.cs:122
virtual void OnRemovedFromZone()
Definition: Trait.cs:679
virtual void OnToggle()
Definition: Trait.cs:1227
virtual bool ShouldTryRefreshRoom
Definition: Trait.cs:87
virtual int ShopLv
Definition: Trait.cs:508
virtual bool CanBlend(Thing t)
Definition: Trait.cs:599
virtual Emo2 GetHeldEmo(Chara c)
Definition: Trait.cs:627
virtual bool CanBeDropped
Definition: Trait.cs:298
virtual void OnCrafted(Recipe recipe, List< Thing > ings)
Definition: Trait.cs:655
virtual bool CanBeStolen
Definition: Trait.cs:279
bool IsFuelEnough(int num=1, List< Thing > excludes=null, bool tryRefuel=true)
Definition: Trait.cs:1302
virtual bool CanBeSmashedToDeath
Definition: Trait.cs:294
virtual bool LevelAsQuality
Definition: Trait.cs:192
virtual void OnEat(Chara c)
Definition: Trait.cs:974
virtual Action GetHealAction(Chara c)
Definition: Trait.cs:594
virtual int IdleUseChance
Definition: Trait.cs:360
static TraitSelfFactory SelfFactory
Definition: Trait.cs:25
virtual bool CanStack
Definition: Trait.cs:150
virtual bool ShowContextOnPick
Definition: Trait.cs:178
virtual byte WeightMod
Definition: Trait.cs:43
virtual SourceElement.Row GetRefElement()
Definition: Trait.cs:613
virtual bool IdleUse(Chara c, int dist)
Definition: Trait.cs:638
virtual int Decay
Definition: Trait.cs:120
virtual int NumCopyItem
Definition: Trait.cs:512
virtual void OnEnterScreen()
Definition: Trait.cs:1407
virtual bool IsSpecialContainer
Definition: Trait.cs:244
void Uninstall()
Definition: Trait.cs:1099
virtual bool ShowFuelWindow
Definition: Trait.cs:458
virtual string LangUse
Definition: Trait.cs:366
virtual void SetName(ref string s)
Definition: Trait.cs:692
virtual bool CanBeOnlyBuiltInHome
Definition: Trait.cs:262
virtual bool CanAutofire
Definition: Trait.cs:142
virtual bool IsFridge
Definition: Trait.cs:126
virtual void SetParams(params string[] s)
Definition: Trait.cs:651
virtual int CompareTo(Card b)
Definition: Trait.cs:711
virtual bool IsContainer
Definition: Trait.cs:212
virtual bool CanDrink(Chara c)
Definition: Trait.cs:978
virtual int InstallBottomPriority
Definition: Trait.cs:89
virtual bool CanOnlyCarry
Definition: Trait.cs:290
void Install(bool byPlayer)
Definition: Trait.cs:1079
virtual string Name
Definition: Trait.cs:47
virtual bool AllowCriminal
Definition: Trait.cs:544
virtual void OnBlend(Thing t, Chara c)
Definition: Trait.cs:604
Definition: UIList.cs:9
SortMode
Definition: UIList.cs:27
Definition: UINote.cs:6
Definition: UIText.cs:6
void SetText(string s)
Definition: UIText.cs:159
bool IsRaining
Definition: Weather.cs:117
GameDate date
Definition: World.cs:6
Weather weather
Definition: World.cs:12
bool isStarted
Definition: Zone.cs:70
FactionBranch branch
Definition: Zone.cs:34
virtual bool IsFestival
Definition: Zone.cs:206
bool IsPCFaction
Definition: Zone.cs:470