2using System.Collections.Generic;
200 bool flag = idTab == 3 || idTab == 4;
201 scrollSkill.horizontal = flag;
202 scrollSkill.content.anchoredPosition =
new Vector2(0f, 0f);
218 if (currentId ==
"BG_1")
230 if (currentId ==
"BGF_1")
245 EClass.game.config.showAllFeat = a;
252 buttonFeatMode.mainText.text =
"featMode".lang(
EClass.
pc.
feat.ToString() ??
"");
254 colors.normalColor = colors.normalColor.SetAlpha(
featMode ? 1 : 0);
255 buttonFeatMode.colors = colors;
265 textHealth.text = chara.hp +
"/" +
chara.
MaxHP;
266 textMood.text = chara.mana.value +
"/" +
chara.
mana.
max;
269 @object.texture.filterMode = FilterMode.Bilinear;
270 portrait.image.sprite = @object;
272 @object.texture.filterMode = FilterMode.Bilinear;
273 portrait.imageFrame.sprite = @object;
321 uIItem.
text2.SetActive(enable:
false);
327 UIBar componentInChildren = uIItem.GetComponentInChildren<
UIBar>();
334 string text = st?.
GetText() ??
"noItem".lang();
343 uIItem.button1.interactable =
false;
345 else if (text.IsEmpty())
353 uIItem.
image1.SetNativeSize();
369 textTitle.text = (chara.IsPC ? EClass.player.title :
"-");
372 textBio.text =
chara.
job.GetText().ToTitleCase();
375 textDV.text =
"_DV".lang(
chara.
DV.ToString() ??
"",
chara.
PV.ToString() ??
"");
379 textFame.text = (chara.IsPC ? (
EClass.
player.
fame.ToString() ??
"") :
"???");
387 textDeepest.text = text;
412 b.button1.interactable =
false;
419 b.button1.icon.material =
matItem;
424 b.button1.icon.material =
null;
458 if (list.items.Count < 12)
460 int num = 12 - list.items.Count;
461 for (
int i = 0; i < num; i++)
466 if (list.items.Count > 18)
468 gridEquip.cellSize =
new Vector2(52f, 44f);
469 gridEquip.spacing =
new Vector2(-6f, -12f);
486 textFaction.text = ((chara.faction ==
null) ?
"???" :
chara.
faction.
name.ToTitleCase());
507 contentList.DestroyChildren();
509 note.RebuildLayout();
513 List(
"skillsGeneral",
"general");
514 List(
"skillsCraft",
"craft");
515 List(
"skillsCombat",
"combat");
516 List(
"skillsWeapon",
"weapon");
523 List(
"availableFeats",
"general");
524 List(
"availableFeats_special",
"special");
525 List(
"availableFeats_skill",
"skill");
526 List(
"availableFeats_attribute",
"attribute");
551 if (list.
items.Count == 0)
553 _header.SetActive(enable:
false);
554 list.SetActive(enable:
false);
556 Header(
"etherDisease",
null);
578 if (list.
items.Count == 0)
580 _header.SetActive(enable:
false);
581 list.SetActive(enable:
false);
583 Header(
"innateFeats",
null);
632 Header(
"resistance",
null);
633 headerEquip.
SetText(
"resistance".lang());
656 if (a.
source.tag.Contains(
"godAbility") || a.
source.categorySub ==
"god")
671 if (a.source.IsWeaponEnc)
676 if ((uint)(
id - 55) <= 2u ||
id == 68 ||
id == 93)
689 string[] skillCats =
new string[7] {
"general",
"labor",
"mind",
"stealth",
"combat",
"craft",
"weapon" };
691 headerEquip.
SetText(
"enchant".lang());
701 foreach (
Element item6
in eles)
703 if (!skillCats.Contains(item6.
source.categorySub))
721 foreach (
Element item7
in eles)
723 if (skillCats.Contains(item7.
source.categorySub))
735 note.transform.SetAsLastSibling();
736 RefreshNote(chara, note);
738 void Header(
string lang,
string lang2)
747 void List(
string lang,
string idSubCat)
749 List<string> cats =
new List<string>();
751 if (idSubCat ==
"general")
781 void List(
string lang,
string idSubCat)
797 Msg.
Say(
"notEnoughFeatPoint");
803 EClass.pc.feat -= a.CostLearn;
804 EClass.pc.SetFeat(a.id, a.Value, msg: true);
808 this.RebuildLayout(recursive: true);
820 if (item9.
source.categorySub == idSubCat)
833 void ListFeatPurchase()
849 if (focus && window.idTab == 5)
851 RefreshNote(chara, note);
870 uIItem.
button1.SetOnClick(delegate
878 uIItem.
button1.SetActive(enable:
false);
885 foreach (
Element value
in elementContainer.dict.Values)
887 text = text + ((value == elementContainer.dict.Values.First()) ?
"" :
", ") + value.Name;
889 n.AddTopic(
"TopicDomain",
"domain".lang(), text).button1.SetActive(enable:
false);
890 string text2 = chara.
GetFavCat().GetName();
892 Add(
"favgift".lang(text2.ToLower().ToTitleCase(), @ref));
901 n.AddTopic(
"TopicDomain",
"attackStyle".lang(), text);
907 if (chara.
ride !=
null)
917 AddText(
"info_criminal".lang());
924 AddText(
"affinity_exp_bonus".lang(chara.
affinity.
Name, ((num > 0) ?
"+" :
"") + num));
929 AddText(
"info_daysWithPC".lang(chara.
c_daysWithPC.ToString() ??
"") + Environment.NewLine +
"daystogether_bonus".lang(((num > 0) ?
"+" :
"") + num));
934 n.AddText(
"LV:" + chara.
LV +
" exp:" + chara.
exp +
" next:" + chara.
ExpToNext);
935 n.AddText(
"Luck:" + chara.
Evalue(78));
940 string[] array = s.Split(
':');
941 n.AddTopic(
"TopicDomain", array[0], (array.Length >= 2) ? array[1].TrimStart(
' ') :
"").button1.SetActive(enable:
false);
943 void AddText(
string s)
945 n.AddText(
" ・ " + s);
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
void SetStr(int id, string value=null)
string GetStr(int id, string defaultStr=null)
virtual Sprite GetSprite()
virtual void SetText(UIText t, SkinColorProfile cols=null)
virtual void WriteNote(UINote n, Action< UINote > onWriteNote=null)
string TextBirthDate(Chara c, bool _age=false)
SourceElement.Row element
ElementContainerCard elements
int GetAffinityExpBonus()
int GetCurrency(string id="money")
int GetDaysTogetherBonus()
void SetImage(Image image, int dir, int idSkin=0)
AttackStyle GetAttackStyle()
int GetSortVal(BodySlot slot)
int GetWeight(bool armorOnly=false)
SourceCategory.Row GetFavCat()
override int GetArmorSkill()
List< Condition > conditions
override bool IsPCFaction
List< Element > ListAvailabeFeats(bool pet=false, bool showAll=false)
SourceThing.Row GetFavFood()
Element GetFavWeaponSkill()
Element GetFavArmorSkill()
string GetTextWork(bool simple=false)
string GetTextHobby(bool simple=false)
AttackStyle GetFavAttackStyle()
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
static SourceManager sources
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)
virtual bool IsPurchaseFeatReqMet(ElementContainer owner, int lv=-1)
static SourceElement.Row Get(int id)
int GetSortVal(UIList.SortMode m)
int SortVal(bool charaSheet=false)
static string _weight(int a, int b, bool showUnit=true, int unitSize=0)
static string _currency(object a, string IDCurrency)
string GetNextID(string currentId, int a, bool ignoreCategory=true)
ModItem< T > GetItem(string id, bool returnNull=false)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
ElementContainer GetDomains()
int CountKeyItem(string alias)
string GetBackgroundText()
void EditBackgroundText()
static ModItemList< Sprite > modPortraitBGFs
static ModItemList< Sprite > modPortraitBGs
void SetChara(Chara c, PCCData pccData=null)
Dictionary< string, CardRow > map
static Sprite Get(string id)
override string GetText()
override Color GetColor(Gradient g)
override void WriteNote(UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
static void AddAttackEvaluation(UINote n, Chara chara, Thing current=null)
void Refresh(float current, float max)
override void Add(object item)
virtual void Refresh(bool highlightLast=false)
void ChangeSort(SortMode m)
UIItem AddItem(string id)
UIItem AddHeader(string text, Sprite sprite=null)
UIItem AddTopic(string id, string text, string value=null)
UIItem AddText(string text, FontColor color=FontColor.DontChange)
void Space(int sizeY=0, int sizeX=1)
static Transform Instantiate(string path, Component parent=null)
void OnApplicationFocus(bool focus)
GridLayoutGroup gridEquip
void AddStatus(BaseStats st)
ButtonElement buttonVigor
UIList moldListFeatPurchase
void SetPortraitBG(int a)
UIButton buttonFeatOption
override void OnSwitchContent(Window window)
static void RefreshNote(Chara chara, UINote n, bool shortMode=false)
void SetPortraitFrame(int a)
void RefreshEquipment(UIList list, bool sort=true)
static WindowChara Instance
ButtonElement buttonSpeed
void RefreshSkill(int idTab)
void SwitchContent(UIContent content)
void SetCaption(string text)