Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
WindowChara.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Linq;
4using UnityEngine;
5using UnityEngine.UI;
6
8{
9 public static WindowChara Instance;
10
11 public Chara chara;
12
14
16
18
20
22
24
26
28
30
32
34
36
38
40
42
44
46
48
50
52
54
56
58
60
62
64
66
68
70
72
74
76
78
79 public UINote note;
80
82
84
86
88
90
92
94
95 public UIText textDV;
96
98
99 public LayoutGroup layoutNeeds;
100
101 public LayoutGroup layoutStatus;
102
103 public GridLayoutGroup gridEquip;
104
106
108
110
112
114
116
118
120
122
124
126
128
130
132
133 public Transform contentList;
134
135 public RectTransform rectEquip;
136
138
140
141 public Image imageView;
142
143 public Sprite mask;
144
145 public Sprite maskResist;
146
148
150
151 public Vector2 equipPos;
152
153 public bool featMode;
154
155 public float barColor1;
156
157 public float barColor2;
158
160
162
163 public void SetChara(Chara c)
164 {
165 Instance = this;
166 chara = c;
167 portrait.interactable = chara.IsPC;
169 if (window.setting.tabs.Count > 6)
170 {
171 window.setting.tabs[6].button.SetActive(chara.IsPC);
172 }
173 if (window.idTab == 6 && !chara.IsPC)
174 {
176 }
177 }
178
179 private void Update()
180 {
181 rectEquip.anchoredPosition = new Vector2(scrollSkill.content.anchoredPosition.x + equipPos.x, equipPos.y);
182 }
183
184 public override void OnSwitchContent(Window window)
185 {
186 if (chara != null)
187 {
189 int idTab = window.idTab;
190 if (idTab == 0)
191 {
192 RefreshInfo();
194 }
195 else
196 {
197 RefreshSkill(idTab);
198 }
199 bool flag = idTab == 3 || idTab == 4;
200 scrollSkill.horizontal = flag;
201 scrollSkill.content.anchoredPosition = new Vector2(0f, 0f);
202 imageView.sprite = (flag ? maskResist : mask);
203 if (flag)
204 {
206 }
207 listEquipment2.transform.parent.SetActive(flag);
208 buttonFeatMode.SetActive(idTab == 2 && chara.IsPC);
209 buttonFeatOption.SetActive(idTab == 2 && chara.IsPC && featMode);
210 }
211 }
212
213 public void SetPortraitBG(int a)
214 {
215 string currentId = chara.GetStr(23) ?? "BG_1";
216 currentId = Portrait.modPortraitBGs.GetNextID(currentId, a);
217 if (currentId == "BG_1")
218 {
219 currentId = null;
220 }
221 chara.SetStr(23, currentId);
223 }
224
225 public void SetPortraitFrame(int a)
226 {
227 string currentId = chara.GetStr(24) ?? "BGF_1";
228 currentId = Portrait.modPortraitBGFs.GetNextID(currentId, a);
229 if (currentId == "BGF_1")
230 {
231 currentId = null;
232 }
233 chara.SetStr(24, currentId);
235 }
236
237 public void ToggleFeatMode()
238 {
241 buttonFeatOption.SetActive(featMode);
243 {
244 EClass.game.config.showAllFeat = a;
246 });
247 }
248
249 public void RefreshFeatMode()
250 {
251 buttonFeatMode.mainText.text = "featMode".lang(EClass.pc.feat.ToString() ?? "");
252 ColorBlock colors = buttonFeatMode.colors;
253 colors.normalColor = colors.normalColor.SetAlpha(featMode ? 1 : 0);
254 buttonFeatMode.colors = colors;
255 }
256
257 public void Refresh()
258 {
260 }
261
262 public void RefreshStatic()
263 {
264 textHealth.text = chara.hp + "/" + chara.MaxHP;
265 textMood.text = chara.mana.value + "/" + chara.mana.max;
267 Sprite @object = Portrait.modPortraitBGs.GetItem(chara.GetStr(23) ?? "BG_1").GetObject();
268 @object.texture.filterMode = FilterMode.Bilinear;
269 portrait.image.sprite = @object;
270 @object = Portrait.modPortraitBGFs.GetItem(chara.GetStr(24) ?? "BGF_1").GetObject();
271 @object.texture.filterMode = FilterMode.Bilinear;
272 portrait.imageFrame.sprite = @object;
275 listAttaribute.callbacks = new UIList.Callback<Element, ButtonElement>
276 {
277 onClick = delegate(Element a, ButtonElement b)
278 {
281 },
282 onInstantiate = delegate(Element a, ButtonElement b)
283 {
284 b.SetElement(a, chara.elements, ButtonElement.Mode.Attribute);
285 }
286 };
287 List<Element> list = chara.elements.ListElements((Element a) => a.HasTag("primary"));
288 list.Sort((Element a, Element b) => a.source.sort - b.source.sort);
289 foreach (Element item in list)
290 {
292 }
294 }
295
296 public void RefreshStatus()
297 {
298 layoutStatus.DestroyChildren();
299 foreach (Stats item in new List<Stats> { chara.hunger, chara.burden, chara.stamina, chara.depression, chara.bladder, chara.hygiene })
300 {
302 }
303 foreach (Condition condition in chara.conditions)
304 {
305 AddStatus(condition);
306 }
307 if (layoutStatus.transform.childCount == 1)
308 {
309 AddStatus(null);
310 }
311 layoutStatus.RebuildLayout();
312 }
313
314 public void AddNeeds(Stats st)
315 {
316 UIItem uIItem = Util.Instantiate(moldNeeds, layoutNeeds);
317 uIItem.text1.SetText(st.source.GetName());
318 if (st.GetText().IsEmpty())
319 {
320 uIItem.text2.SetActive(enable: false);
321 }
322 else
323 {
324 st.SetText(uIItem.text2);
325 }
326 UIBar componentInChildren = uIItem.GetComponentInChildren<UIBar>();
327 componentInChildren.Refresh(st.value, st.max);
328 componentInChildren.image.color = st.GetColor().Multiply(barColor1, barColor2);
329 }
330
331 public void AddStatus(BaseStats st)
332 {
333 string text = st?.GetText() ?? "noItem".lang();
334 if (text.IsEmpty())
335 {
336 return;
337 }
338 UIItem uIItem = Util.Instantiate(moldStats, layoutStatus);
339 if (st == null)
340 {
341 uIItem.text1.SetText(text, FontColor.Passive);
342 uIItem.button1.interactable = false;
343 }
344 else if (text.IsEmpty())
345 {
346 uIItem.text1.SetText(st.source.GetName());
347 }
348 else
349 {
350 st.SetText(uIItem.text1);
351 uIItem.image1.sprite = st.GetSprite();
352 uIItem.image1.SetNativeSize();
353 }
354 if (st != null)
355 {
356 uIItem.button1.SetTooltip(delegate(UITooltip t)
357 {
358 st.WriteNote(t.note);
359 });
360 }
361 }
362
363 public void RefreshProfile()
364 {
366 textName.text = chara.NameSimple;
367 textAlias.text = chara.Aka;
368 textTitle.text = (chara.IsPC ? EClass.player.title : "-");
369 textCurrentZone.text = ((chara.currentZone == null) ? "???" : chara.currentZone.Name);
370 textHomeZone.text = ((chara.homeZone == null) ? "???" : chara.homeZone.Name);
371 textBio.text = chara.job.GetText().ToTitleCase();
372 textBio2.text = bio.TextBio(chara);
373 textBio3.text = bio.TextBio2(chara);
374 textDV.text = "_DV".lang(chara.DV.ToString() ?? "", chara.PV.ToString() ?? "");
375 textStyle.text = "_style".lang(Lang._weight(chara.body.GetWeight(armorOnly: true)) ?? "", chara.elements.GetOrCreateElement(chara.GetArmorSkill()).Name, ("style" + chara.body.GetAttackStyle()).lang());
376 textKarma.text = (chara.IsPC ? (EClass.player.karma.ToString() ?? "") : "???");
377 textSAN.text = chara.SAN.value.ToString() ?? "";
378 textFame.text = (chara.IsPC ? (EClass.player.fame.ToString() ?? "") : "???");
379 textMoney.text = Lang._currency(chara.GetCurrency(), showUnit: true);
380 textDeposit.text = Lang._currency(chara.IsPC ? EClass.game.cards.container_deposit.GetCurrency() : chara.c_allowance, showUnit: true);
381 string text = "deepestLv2".lang((chara.IsPCFaction ? EClass.player.stats.deepest : chara.LV).ToString() ?? "");
382 if (chara.IsPCFaction && EClass.player.CountKeyItem("license_void") > 0)
383 {
384 text = text + " " + "deepestLv3".lang(Mathf.Abs(EClass.game.spatials.Find("void").GetDeepestLv()).ToString() ?? "");
385 }
386 textDeepest.text = text;
387 textAssets.text = (chara.IsPC ? "tGameTime".lang(EClass.player.stats.days.ToFormat(), EClass.player.stats.turns.ToFormat()) : "???");
388 textTerritory.text = (chara.IsPC ? (EClass.pc.faction.CountTerritories().ToString() ?? "") : "???");
394 }
395
396 public void RefreshEquipment(UIList list, bool sort = true)
397 {
398 string text = chara.GetFavWeaponSkill()?.Name ?? Element.Get(100).GetText();
399 text = text + "/" + (chara.GetFavArmorSkill()?.Name ?? Element.Get(120).GetText());
400 textFavArmor.SetText(text);
401 list.Clear();
402 list.callbacks = new UIList.Callback<BodySlot, UIItem>
403 {
404 onClick = delegate
405 {
406 },
407 onInstantiate = delegate(BodySlot a, UIItem b)
408 {
409 if (a.elementId == 0)
410 {
411 b.button1.interactable = false;
412 }
413 else
414 {
415 Thing thing = (Thing)(b.refObj = a.thing);
416 if (thing != null)
417 {
418 b.button1.icon.material = matItem;
419 thing.SetImage(b.button1.icon);
420 }
421 else
422 {
423 b.button1.icon.material = null;
424 b.button1.icon.sprite = SpriteSheet.Get("Media/Graphics/Icon/Element/", "eq_" + a.element.alias);
425 b.button1.icon.color = colorUnequipped;
426 b.button1.icon.SetNativeSize();
427 }
428 b.button1.SetTooltip(delegate(UITooltip tt)
429 {
430 if (a.thing != null)
431 {
432 a.thing.WriteNote(tt.note);
433 }
434 else
435 {
436 tt.note.Clear();
437 tt.note.AddHeader(a.name);
438 tt.note.AddText("noEQ".lang());
439 if (a.elementId == 35)
440 {
442 }
443 }
444 tt.note.Build();
445 });
446 }
447 },
448 onSort = (BodySlot a, UIList.SortMode m) => (a.element.id != 0) ? chara.body.GetSortVal(a) : (-99999)
449 };
450 foreach (BodySlot slot in chara.body.slots)
451 {
452 if (slot.elementId != 44)
453 {
454 list.Add(slot);
455 }
456 }
457 if (list.items.Count < 12)
458 {
459 int num = 12 - list.items.Count;
460 for (int i = 0; i < num; i++)
461 {
462 list.Add(new BodySlot());
463 }
464 }
465 if (list.items.Count > 18)
466 {
467 gridEquip.cellSize = new Vector2(52f, 44f);
468 gridEquip.spacing = new Vector2(-6f, -12f);
469 }
470 if (sort)
471 {
472 list.Sort();
473 }
474 list.Refresh();
475 }
476
477 public void RefreshInfo()
478 {
479 textBirthday.text = bio.TextBirthDate(chara);
480 textMom.text = chara.bio.nameMom.ToTitleCase();
481 textDad.text = chara.bio.nameDad.ToTitleCase();
482 textBirthplace.text = chara.bio.nameBirthplace.ToTitleCase();
483 textLike.text = EClass.sources.cards.map.TryGetValue(bio.idLike, EClass.sources.cards.map["ash"]).GetName();
484 textHobby.text = EClass.sources.elements.map[bio.idHobby].GetText();
485 textFaction.text = ((chara.faction == null) ? "???" : chara.faction.name.ToTitleCase());
486 textFaith.text = chara.faith.Name.ToTitleCase();
487 }
488
489 public void OnClickPortrait()
490 {
491 if (chara.IsPC)
492 {
493 EClass.ui.AddLayer<LayerEditPCC>().Activate(chara, UIPCC.Mode.Body, null, delegate
494 {
496 });
497 }
498 else
499 {
500 SE.Beep();
501 }
502 }
503
504 public void RefreshSkill(int idTab)
505 {
506 contentList.DestroyChildren();
507 note.Clear();
508 note.RebuildLayout();
509 UIList list = default(UIList);
510 if (idTab == 1)
511 {
512 List("skillsGeneral", "general");
513 List("skillsCraft", "craft");
514 List("skillsCombat", "combat");
515 List("skillsWeapon", "weapon");
516 }
517 else if (idTab == 2)
518 {
519 RefreshFeatMode();
520 if (featMode)
521 {
522 List("availableFeats", "general");
523 List("availableFeats_special", "special");
524 List("availableFeats_skill", "skill");
525 List("availableFeats_attribute", "attribute");
526 return;
527 }
528 Header("mutation", null);
529 ListFeat();
530 list.callbacks = new UIList.Callback<Feat, ButtonElement>
531 {
532 onClick = delegate(Feat a, ButtonElement b)
533 {
535 b.SetElement(a, chara.elements, ButtonElement.Mode.Feat);
536 },
537 onInstantiate = delegate(Feat a, ButtonElement b)
538 {
539 b.SetElement(a, chara.elements, ButtonElement.Mode.Feat);
540 },
541 onList = delegate
542 {
543 foreach (Element item in chara.elements.ListElements((Element a) => a.source.category == "mutation" && a.Value != 0))
544 {
545 list.Add(item);
546 }
547 }
548 };
549 list.List();
550 if (list.items.Count == 0)
551 {
552 _header.SetActive(enable: false);
553 list.SetActive(enable: false);
554 }
555 Header("etherDisease", null);
556 ListFeat();
557 list.callbacks = new UIList.Callback<Feat, ButtonElement>
558 {
559 onClick = delegate(Feat a, ButtonElement b)
560 {
562 b.SetElement(a, chara.elements, ButtonElement.Mode.Feat);
563 },
564 onInstantiate = delegate(Feat a, ButtonElement b)
565 {
566 b.SetElement(a, chara.elements, ButtonElement.Mode.Feat);
567 },
568 onList = delegate
569 {
570 foreach (Element item2 in chara.elements.ListElements((Element a) => a.source.category == "ether" && a.Value != 0))
571 {
572 list.Add(item2);
573 }
574 }
575 };
576 list.List();
577 if (list.items.Count == 0)
578 {
579 _header.SetActive(enable: false);
580 list.SetActive(enable: false);
581 }
582 Header("innateFeats", null);
583 ListFeat();
584 list.callbacks = new UIList.Callback<Feat, ButtonElement>
585 {
586 onClick = delegate(Feat a, ButtonElement b)
587 {
589 b.SetElement(a, chara.elements, ButtonElement.Mode.Feat);
590 },
591 onInstantiate = delegate(Feat a, ButtonElement b)
592 {
593 b.SetElement(a, chara.elements, ButtonElement.Mode.Feat);
594 },
595 onList = delegate
596 {
597 foreach (Element item3 in chara.elements.ListElements((Element a) => a.source.category == "feat" && a.HasTag("innate") && a.Value != 0))
598 {
599 list.Add(item3);
600 }
601 }
602 };
603 list.List();
604 Header("feats", null);
605 ListFeat();
606 list.callbacks = new UIList.Callback<Feat, ButtonElement>
607 {
608 onClick = delegate(Feat a, ButtonElement b)
609 {
611 b.SetElement(a, chara.elements, ButtonElement.Mode.Feat);
612 },
613 onInstantiate = delegate(Feat a, ButtonElement b)
614 {
615 b.SetElement(a, chara.elements, ButtonElement.Mode.Feat);
616 },
617 onList = delegate
618 {
619 foreach (Element item4 in chara.elements.ListElements((Element a) => a.source.category == "feat" && !a.HasTag("innate") && a.Value != 0))
620 {
621 list.Add(item4);
622 }
623 },
624 onSort = (Feat a, UIList.SortMode m) => a.GetSortVal(m)
625 };
626 list.ChangeSort(UIList.SortMode.ByID);
627 list.List();
628 }
629 else if (idTab == 3)
630 {
631 Header("resistance", null);
632 headerEquip.SetText("resistance".lang());
633 ListResist();
634 list.callbacks = new UIList.Callback<Element, ButtonElement>
635 {
636 onInstantiate = delegate(Element a, ButtonElement b)
637 {
638 b.SetGrid(a, chara);
639 },
640 onList = delegate
641 {
642 foreach (SourceElement.Row item5 in EClass.sources.elements.rows.Where((SourceElement.Row a) => a.category == "resist" && ((!a.tag.Contains("hidden") && !a.tag.Contains("high")) || chara.Evalue(a.id) != 0)))
643 {
644 list.Add(chara.elements.GetOrCreateElement(item5.id));
645 }
646 }
647 };
648 list.List();
649 }
650 else if (idTab == 4)
651 {
653 List<Element> eles = chara.elements.ListElements(delegate(Element a)
654 {
655 if (a.source.tag.Contains("godAbility") || a.source.categorySub == "god")
656 {
657 return false;
658 }
659 if (a.IsFlag)
660 {
661 if (a.Value == 0)
662 {
663 return false;
664 }
665 }
666 else
667 {
668 if (a.vSource != 0)
669 {
670 if (a.source.IsWeaponEnc)
671 {
672 return true;
673 }
674 int id = a.id;
675 if ((uint)(id - 55) <= 2u || id == 68 || id == 93)
676 {
677 return true;
678 }
679 }
680 if ((a.owner == chara.elements && a.vLink == 0 && !a.IsFactionElement(chara)) || a.source.category == "resist")
681 {
682 return false;
683 }
684 }
685 return true;
686 });
687 eles.Sort((Element a, Element b) => a.SortVal(charaSheet: true) - b.SortVal(charaSheet: true));
688 string[] skillCats = new string[7] { "general", "labor", "mind", "stealth", "combat", "craft", "weapon" };
689 Header("enchant", null);
690 headerEquip.SetText("enchant".lang());
691 ListResist();
692 list.callbacks = new UIList.Callback<Element, ButtonElement>
693 {
694 onInstantiate = delegate(Element a, ButtonElement b)
695 {
696 b.SetGrid(a, chara);
697 },
698 onList = delegate
699 {
700 foreach (Element item6 in eles)
701 {
702 if (!skillCats.Contains(item6.source.categorySub))
703 {
704 list.Add(item6);
705 }
706 }
707 }
708 };
709 list.List();
710 Header("skill", null);
711 ListResist();
712 list.callbacks = new UIList.Callback<Element, ButtonElement>
713 {
714 onInstantiate = delegate(Element a, ButtonElement b)
715 {
716 b.SetGrid(a, chara);
717 },
718 onList = delegate
719 {
720 foreach (Element item7 in eles)
721 {
722 if (skillCats.Contains(item7.source.categorySub))
723 {
724 list.Add(item7);
725 }
726 }
727 }
728 };
729 list.List();
730 }
731 else if (idTab == 5)
732 {
733 Header("note", null);
734 note.transform.SetAsLastSibling();
735 RefreshNote(chara, note);
736 }
737 void Header(string lang, string lang2)
738 {
739 _header = Util.Instantiate(moldHeader, contentList);
740 _header.SetText(lang);
741 if (lang2 != null)
742 {
743 Util.Instantiate(moldHeader2, contentList).SetText(lang2);
744 }
745 }
746 void List(string lang, string idSubCat)
747 {
748 List<string> cats = new List<string>();
749 cats.Add(idSubCat);
750 if (idSubCat == "general")
751 {
752 cats.Add("labor");
753 cats.Add("mind");
754 cats.Add("stealth");
755 }
756 Header(lang, null);
757 ListSkill();
758 list.callbacks = new UIList.Callback<Element, ButtonElement>
759 {
760 onClick = delegate(Element a, ButtonElement b)
761 {
763 b.SetElement(a, chara.elements);
764 },
765 onInstantiate = delegate(Element a, ButtonElement b)
766 {
767 b.SetElement(a, chara.elements);
768 },
769 onList = delegate
770 {
771 foreach (Element item8 in chara.elements.ListElements((Element a) => (a.Value != 0 || a.ValueWithoutLink != 0 || a.vSource > 0) && a.source.category == "skill" && cats.Contains(a.source.categorySub)))
772 {
773 list.Add(item8);
774 }
775 },
776 onSort = (Element c, UIList.SortMode m) => EClass.sources.elements.alias[c.source.aliasParent].id * -10000 - c.id
777 };
778 list.List(UIList.SortMode.ByElementParent);
779 }
780 void List(string lang, string idSubCat)
781 {
782 Header(lang, "cost");
783 ListFeatPurchase();
784 UIList _list = list;
785 _list.callbacks = new UIList.Callback<Element, ButtonElement>
786 {
787 onClick = delegate(Element a, ButtonElement b)
788 {
790 {
791 SE.BeepSmall();
792 }
793 else if (EClass.pc.feat < a.CostLearn)
794 {
795 SE.BeepSmall();
796 Msg.Say("notEnoughFeatPoint");
797 }
798 else
799 {
800 Dialog.YesNo("dialogBuyFeat".lang(a.CostLearn.ToString() ?? "", a.FullName), delegate
801 {
802 EClass.pc.feat -= a.CostLearn;
803 EClass.pc.SetFeat(a.id, a.Value, msg: true);
804 RefreshSkill(idTab);
805 RefreshFeatMode();
806 RefreshStatic();
807 this.RebuildLayout(recursive: true);
808 });
809 }
810 },
811 onInstantiate = delegate(Element a, ButtonElement b)
812 {
813 b.SetElement(a, chara.elements, ButtonElement.Mode.FeatPurchase);
814 },
815 onList = delegate
816 {
817 foreach (Element item9 in chara.ListAvailabeFeats(pet: false, EClass.game.config.showAllFeat))
818 {
819 if (item9.source.categorySub == idSubCat)
820 {
821 _list.Add(item9);
822 }
823 }
824 }
825 };
826 _list.List();
827 }
828 void ListFeat()
829 {
830 list = Util.Instantiate(moldListFeat, contentList);
831 }
832 void ListFeatPurchase()
833 {
834 list = Util.Instantiate(moldListFeatPurchase, contentList);
835 }
836 void ListResist()
837 {
838 list = Util.Instantiate(moldListResist, contentList);
839 }
840 void ListSkill()
841 {
842 list = Util.Instantiate(moldListSkill, contentList);
843 }
844 }
845
846 private void OnApplicationFocus(bool focus)
847 {
848 if (focus && window.idTab == 5)
849 {
850 RefreshNote(chara, note);
851 }
852 }
853
854 public static void RefreshNote(Chara chara, UINote n, bool shortMode = false)
855 {
856 n.Clear();
857 Biography biography = chara.bio;
858 if (shortMode)
859 {
860 n.AddText(biography.TextBio(chara) + " " + biography.TextBio2(chara));
861 n.Space();
862 }
863 else
864 {
865 UIItem uIItem = n.AddItem("ItemBackground");
866 if (chara.IsPC)
867 {
869 uIItem.button1.SetOnClick(delegate
870 {
872 });
873 }
874 else
875 {
876 uIItem.text1.SetText("???");
877 uIItem.button1.SetActive(enable: false);
878 }
879 n.Space(16);
880 n.AddTopic("TopicDomain", "profile".lang(), biography.TextBio(chara) + " " + biography.TextBio2(chara));
881 }
882 string text = "";
883 ElementContainer elementContainer = (chara.IsPC ? EClass.player.GetDomains() : new ElementContainer().ImportElementMap(chara.job.domain));
884 foreach (Element value in elementContainer.dict.Values)
885 {
886 text = text + ((value == elementContainer.dict.Values.First()) ? "" : ", ") + value.Name;
887 }
888 n.AddTopic("TopicDomain", "domain".lang(), text).button1.SetActive(enable: false);
889 string text2 = chara.GetFavCat().GetName();
890 string @ref = chara.GetFavFood().GetName();
891 Add("favgift".lang(text2.ToLower().ToTitleCase(), @ref));
892 Add(chara.GetTextHobby());
893 Add(chara.GetTextWork());
894 if (chara.IsPC)
895 {
896 n.AddTopic("TopicDomain", "totalFeat".lang(), EClass.player.totalFeat.ToString() ?? "");
897 }
898 text = chara.GetFavWeaponSkill()?.Name ?? Element.Get(100).GetText();
899 text = text + " / " + ("style" + chara.GetFavAttackStyle()).lang();
900 n.AddTopic("TopicDomain", "attackStyle".lang(), text);
901 n.AddTopic("TopicDomain", "armorStyle".lang(), chara.GetFavArmorSkill()?.Name ?? Element.Get(120).GetText());
902 if (chara.IsPC && EClass.pc.c_daysWithGod > 0)
903 {
904 AddText("info_daysWithGod".lang(EClass.pc.c_daysWithGod.ToString() ?? "", EClass.pc.faith.Name));
905 }
906 if (chara.ride != null)
907 {
908 AddText("info_ride".lang(chara.ride.NameBraced));
909 }
910 if (chara.parasite != null)
911 {
912 AddText("info_parasite".lang(chara.parasite.NameBraced));
913 }
915 {
916 AddText("info_criminal".lang());
917 }
919 {
920 n.AddText("LV:" + chara.LV + " exp:" + chara.exp + " next:" + chara.ExpToNext);
921 n.AddText("Luck:" + chara.Evalue(78));
922 }
923 n.Build();
924 void Add(string s)
925 {
926 string[] array = s.Split(':');
927 n.AddTopic("TopicDomain", array[0], (array.Length >= 2) ? array[1].TrimStart(' ') : "").button1.SetActive(enable: false);
928 }
929 void AddText(string s)
930 {
931 n.AddText(" ・ " + s);
932 }
933 }
934}
FontColor
Definition: FontColor.cs:2
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
list. Add(item3)
void SetStr(int id, string value=null)
Definition: BaseCard.cs:63
string GetStr(int id, string defaultStr=null)
Definition: BaseCard.cs:54
virtual Sprite GetSprite()
Definition: BaseStats.cs:57
virtual void SetText(UIText t, SkinColorProfile cols=null)
Definition: BaseStats.cs:62
virtual void WriteNote(UINote n, Action< UINote > onWriteNote=null)
Definition: BaseStats.cs:93
SourceStat.Row source
Definition: BaseStats.cs:15
virtual string GetText()
Definition: BaseStats.cs:42
string TextBio(Chara c)
Definition: Biography.cs:479
string nameBirthplace
Definition: Biography.cs:264
string nameDad
Definition: Biography.cs:260
string TextBirthDate(Chara c, bool _age=false)
Definition: Biography.cs:489
string TextBio2(Chara c)
Definition: Biography.cs:484
string nameMom
Definition: Biography.cs:262
string idLike
Definition: Biography.cs:17
int idHobby
Definition: Biography.cs:173
string name
Definition: BodySlot.cs:14
int elementId
Definition: BodySlot.cs:6
Thing thing
Definition: BodySlot.cs:8
SourceElement.Row element
Definition: BodySlot.cs:16
void SetElement(Element _e, ElementContainer _owner, Mode _mode=Mode.Skill)
void SetGrid(Element e, Chara c)
Thing container_deposit
Definition: CardManager.cs:58
ElementContainerCard elements
Definition: Card.cs:37
int ExpToNext
Definition: Card.cs:1884
Biography bio
Definition: Card.cs:40
int GetCurrency(string id="money")
Definition: Card.cs:3652
int c_daysWithGod
Definition: Card.cs:1397
int c_allowance
Definition: Card.cs:1253
int exp
Definition: Card.cs:382
int feat
Definition: Card.cs:358
string NameSimple
Definition: Card.cs:2015
int Evalue(int ele)
Definition: Card.cs:2431
void SetImage(Image image, int dir, int idSkin=0)
Definition: Card.cs:5355
int LV
Definition: Card.cs:370
List< BodySlot > slots
Definition: CharaBody.cs:8
AttackStyle GetAttackStyle()
Definition: CharaBody.cs:427
int GetSortVal(BodySlot slot)
Definition: CharaBody.cs:470
int GetWeight(bool armorOnly=false)
Definition: CharaBody.cs:384
Definition: Chara.cs:10
SourceCategory.Row GetFavCat()
Definition: Chara.cs:7274
Stats depression
Definition: Chara.cs:957
CharaBody body
Definition: Chara.cs:91
Faction faction
Definition: Chara.cs:412
override bool IsPC
Definition: Chara.cs:597
override int GetArmorSkill()
Definition: Chara.cs:7101
SourceJob.Row job
Definition: Chara.cs:451
List< Condition > conditions
Definition: Chara.cs:196
Stats hunger
Definition: Chara.cs:951
override bool IsPCFaction
Definition: Chara.cs:656
string NameBraced
Definition: Chara.cs:499
override int DV
Definition: Chara.cs:714
List< Element > ListAvailabeFeats(bool pet=false, bool showAll=false)
Definition: Chara.cs:8949
override int MaxHP
Definition: Chara.cs:693
Zone currentZone
Definition: Chara.cs:240
string Aka
Definition: Chara.cs:201
Stats bladder
Definition: Chara.cs:959
Stats SAN
Definition: Chara.cs:967
Stats mana
Definition: Chara.cs:963
override int PV
Definition: Chara.cs:743
Stats stamina
Definition: Chara.cs:955
Stats burden
Definition: Chara.cs:953
SourceThing.Row GetFavFood()
Definition: Chara.cs:7254
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27
Zone homeZone
Definition: Chara.cs:252
Religion faith
Definition: Chara.cs:424
Element GetFavWeaponSkill()
Definition: Chara.cs:4281
Element GetFavArmorSkill()
Definition: Chara.cs:4286
string GetTextWork(bool simple=false)
Definition: Chara.cs:8235
string GetTextHobby(bool simple=false)
Definition: Chara.cs:8225
AttackStyle GetFavAttackStyle()
Definition: Chara.cs:4261
bool showExtra
Definition: CoreDebug.cs:167
bool enable
Definition: CoreDebug.cs:285
Definition: Dialog.cs:7
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
Definition: Dialog.cs:244
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static SourceManager sources
Definition: EClass.cs:42
static Player player
Definition: EClass.cs:12
static Chara pc
Definition: EClass.cs:14
static CoreDebug debug
Definition: EClass.cs:48
static UI ui
Definition: EClass.cs:16
List< Element > ListElements(Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
void ImportElementMap(Dictionary< int, int > map)
Element GetOrCreateElement(Element ele)
bool IsFactionElement(Chara c)
Definition: ELEMENT.cs:483
int ValueWithoutLink
Definition: ELEMENT.cs:284
int id
Definition: ELEMENT.cs:240
SourceElement.Row source
Definition: ELEMENT.cs:263
virtual bool IsPurchaseFeatReqMet(ElementContainer owner, int lv=-1)
Definition: ELEMENT.cs:904
static SourceElement.Row Get(int id)
Definition: ELEMENT.cs:391
ElementContainer owner
Definition: ELEMENT.cs:256
bool HasTag(string tag)
Definition: ELEMENT.cs:463
virtual string FullName
Definition: ELEMENT.cs:296
int GetSortVal(UIList.SortMode m)
Definition: ELEMENT.cs:834
int Value
Definition: ELEMENT.cs:282
virtual string Name
Definition: ELEMENT.cs:294
int vLink
Definition: ELEMENT.cs:250
int vSource
Definition: ELEMENT.cs:252
virtual int CostLearn
Definition: ELEMENT.cs:304
bool IsFlag
Definition: ELEMENT.cs:292
int SortVal(bool charaSheet=false)
Definition: ELEMENT.cs:452
string name
Definition: FACTION.cs:133
int CountTerritories()
Definition: FACTION.cs:227
Definition: FEAT.cs:249
bool showAllFeat
Definition: Game.cs:57
SpatialManager spatials
Definition: Game.cs:152
CardManager cards
Definition: Game.cs:155
Config config
Definition: Game.cs:215
Definition: Lang.cs:6
static string _weight(int a, int b, bool showUnit=true, int unitSize=0)
Definition: Lang.cs:172
static string _currency(object a, string IDCurrency)
Definition: Lang.cs:162
string GetNextID(string currentId, int a, bool ignoreCategory=true)
Definition: ModItemList.cs:35
ModItem< T > GetItem(string id, bool returnNull=false)
Definition: ModItemList.cs:61
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 deepest
Definition: Player.cs:92
int turns
Definition: Player.cs:74
int days
Definition: Player.cs:68
bool IsCriminal
Definition: Player.cs:1138
int karma
Definition: Player.cs:685
Stats stats
Definition: Player.cs:817
ElementContainer GetDomains()
Definition: Player.cs:1332
int totalFeat
Definition: Player.cs:712
int CountKeyItem(string alias)
Definition: Player.cs:1946
int fame
Definition: Player.cs:688
string GetBackgroundText()
Definition: Player.cs:1423
void EditBackgroundText()
Definition: Player.cs:1457
static ModItemList< Sprite > modPortraitBGFs
Definition: Portrait.cs:8
static ModItemList< Sprite > modPortraitBGs
Definition: Portrait.cs:10
void SetChara(Chara c, PCCData pccData=null)
Definition: Portrait.cs:138
string Name
Definition: Religion.cs:30
Dictionary< string, CardRow > map
Definition: SourceCard.cs:8
SourceCard cards
SourceElement elements
Zone Find(string id)
virtual string Name
Definition: Spatial.cs:495
static Sprite Get(string id)
Definition: SpriteSheet.cs:28
Definition: Stats.cs:5
override string GetText()
Definition: Stats.cs:94
override Color GetColor(Gradient g)
Definition: Stats.cs:104
virtual int value
Definition: Stats.cs:56
virtual int max
Definition: Stats.cs:68
Definition: Thing.cs:8
override void WriteNote(UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
Definition: Thing.cs:837
static void AddAttackEvaluation(UINote n, Chara chara, Thing current=null)
Definition: Thing.cs:1373
Definition: UIBar.cs:5
void Refresh(float current, float max)
Definition: UIBar.cs:12
Image icon
Definition: UIButton.cs:110
void SetTooltip(Action< UITooltip > onShowTooltip=null, bool enable=true)
Definition: UIButton.cs:361
void SetToggle(bool isOn, Action< bool > onToggle=null)
Definition: UIButton.cs:341
void SetText(string s)
Definition: UIHeader.cs:24
Definition: UIItem.cs:5
UIButton button1
Definition: UIItem.cs:18
Image image1
Definition: UIItem.cs:14
UIText text2
Definition: UIItem.cs:8
UIText text1
Definition: UIItem.cs:6
object refObj
Definition: UIItem.cs:30
Definition: UIList.cs:9
List< object > items
Definition: UIList.cs:241
override void Clear()
Definition: UIList.cs:349
UIList parent
Definition: UIList.cs:261
SortMode
Definition: UIList.cs:27
override void Add(object item)
Definition: UIList.cs:302
virtual void Refresh(bool highlightLast=false)
Definition: UIList.cs:424
void ChangeSort(SortMode m)
Definition: UIList.cs:705
override void List()
Definition: UIList.cs:717
Definition: UINote.cs:6
void Clear()
Definition: UINote.cs:35
UIItem AddItem(string id)
Definition: UINote.cs:139
UIItem AddHeader(string text, Sprite sprite=null)
Definition: UINote.cs:79
UIItem AddTopic(string id, string text, string value=null)
Definition: UINote.cs:144
UIItem AddText(string text, FontColor color=FontColor.DontChange)
Definition: UINote.cs:113
void Space(int sizeY=0, int sizeX=1)
Definition: UINote.cs:62
void Build()
Definition: UINote.cs:49
Definition: UIText.cs:6
void SetText(string s)
Definition: UIText.cs:159
UINote note
Definition: UITooltip.cs:21
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67
static void Toggle(Element e)
Sprite maskResist
Definition: WindowChara.cs:145
void OnApplicationFocus(bool focus)
Definition: WindowChara.cs:846
LayoutGroup layoutStatus
Definition: WindowChara.cs:101
UIText textFaith
Definition: WindowChara.cs:35
void RefreshProfile()
Definition: WindowChara.cs:363
void SetChara(Chara c)
Definition: WindowChara.cs:163
GridLayoutGroup gridEquip
Definition: WindowChara.cs:103
Biography bio
Definition: WindowChara.cs:161
void AddStatus(BaseStats st)
Definition: WindowChara.cs:331
Chara chara
Definition: WindowChara.cs:11
ButtonElement buttonVigor
Definition: WindowChara.cs:111
UIText textStability
Definition: WindowChara.cs:83
UIList moldListFeatPurchase
Definition: WindowChara.cs:131
ButtonElement buttonMana
Definition: WindowChara.cs:107
void SetPortraitBG(int a)
Definition: WindowChara.cs:213
Sprite mask
Definition: WindowChara.cs:143
UIText textTerritory
Definition: WindowChara.cs:59
UIText textHealth
Definition: WindowChara.cs:17
UIText textLike
Definition: WindowChara.cs:45
UIItem moldStats
Definition: WindowChara.cs:115
UIButton buttonFeatOption
Definition: WindowChara.cs:139
ButtonElement buttonLife
Definition: WindowChara.cs:109
void RefreshStatus()
Definition: WindowChara.cs:296
UIList listEquipment2
Definition: WindowChara.cs:77
void ToggleFeatMode()
Definition: WindowChara.cs:237
UIText textName
Definition: WindowChara.cs:19
RectTransform rectEquip
Definition: WindowChara.cs:135
UIText textDad
Definition: WindowChara.cs:41
Image imageView
Definition: WindowChara.cs:141
UIText textTitle
Definition: WindowChara.cs:23
UIText textSAN
Definition: WindowChara.cs:51
UIList listEquipment
Definition: WindowChara.cs:75
override void OnSwitchContent(Window window)
Definition: WindowChara.cs:184
UIText textStyle
Definition: WindowChara.cs:97
static void RefreshNote(Chara chara, UINote n, bool shortMode=false)
Definition: WindowChara.cs:854
void OnClickPortrait()
Definition: WindowChara.cs:489
UIText textBio2
Definition: WindowChara.cs:27
UIText textAlias
Definition: WindowChara.cs:21
UIText textHobby
Definition: WindowChara.cs:47
UIItem moldNeeds
Definition: WindowChara.cs:117
UIText textKarma
Definition: WindowChara.cs:49
UIText textDV
Definition: WindowChara.cs:95
UIText textBirthday
Definition: WindowChara.cs:31
UIText textFaction
Definition: WindowChara.cs:33
float barColor1
Definition: WindowChara.cs:155
UIText textDeepest
Definition: WindowChara.cs:67
void Update()
Definition: WindowChara.cs:179
LayoutGroup layoutNeeds
Definition: WindowChara.cs:99
Vector2 equipPos
Definition: WindowChara.cs:151
UIText textMoney
Definition: WindowChara.cs:55
UIText textAssets
Definition: WindowChara.cs:63
UIText textFame
Definition: WindowChara.cs:53
UIList listAttaribute
Definition: WindowChara.cs:73
UIHeader moldHeader
Definition: WindowChara.cs:119
UIText textFavArmor
Definition: WindowChara.cs:93
UIList moldListResist
Definition: WindowChara.cs:127
void SetPortraitFrame(int a)
Definition: WindowChara.cs:225
void RefreshStatic()
Definition: WindowChara.cs:262
UIText textDeposit
Definition: WindowChara.cs:65
void AddNeeds(Stats st)
Definition: WindowChara.cs:314
Transform contentList
Definition: WindowChara.cs:133
UIText textDominance
Definition: WindowChara.cs:89
UIScrollView scrollSkill
Definition: WindowChara.cs:105
UIHeader _header
Definition: WindowChara.cs:159
Color colorUnequipped
Definition: WindowChara.cs:149
UIText textTax
Definition: WindowChara.cs:57
UIHeader moldHeader2
Definition: WindowChara.cs:121
void RefreshEquipment(UIList list, bool sort=true)
Definition: WindowChara.cs:396
Portrait portrait
Definition: WindowChara.cs:13
UIText textHomeZone
Definition: WindowChara.cs:71
UIText textBirthplace
Definition: WindowChara.cs:43
static WindowChara Instance
Definition: WindowChara.cs:9
PUIExampleRPGStats graph
Definition: WindowChara.cs:81
UIList moldListFeat
Definition: WindowChara.cs:129
UIHeader headerEquip
Definition: WindowChara.cs:123
float barColor2
Definition: WindowChara.cs:157
ButtonElement buttonSpeed
Definition: WindowChara.cs:113
UIText textBio3
Definition: WindowChara.cs:29
UIText textBio
Definition: WindowChara.cs:25
UIText textExtroversion
Definition: WindowChara.cs:91
UIText textCurrentZone
Definition: WindowChara.cs:69
UIText textHome
Definition: WindowChara.cs:37
UIText textIncome
Definition: WindowChara.cs:61
void RefreshSkill(int idTab)
Definition: WindowChara.cs:504
void RefreshFeatMode()
Definition: WindowChara.cs:249
UIText textLaw
Definition: WindowChara.cs:85
UIText textAffection
Definition: WindowChara.cs:87
void RefreshInfo()
Definition: WindowChara.cs:477
UIText textMood
Definition: WindowChara.cs:15
UINote note
Definition: WindowChara.cs:79
UIList moldListSkill
Definition: WindowChara.cs:125
Material matItem
Definition: WindowChara.cs:147
UIText textMom
Definition: WindowChara.cs:39
void Refresh()
Definition: WindowChara.cs:257
UIButton buttonFeatMode
Definition: WindowChara.cs:137
List< Tab > tabs
Definition: Window.cs:81
Definition: Window.cs:13
void SwitchContent(UIContent content)
Definition: Window.cs:1198
void SetCaption(string text)
Definition: Window.cs:1289
Setting setting
Definition: Window.cs:606
int idTab
Definition: Window.cs:694
int GetDeepestLv()
Definition: Zone.cs:2815