1using System.Collections.Generic;
199 bool flag = idTab == 3 || idTab == 4;
200 scrollSkill.horizontal = flag;
201 scrollSkill.content.anchoredPosition =
new Vector2(0f, 0f);
217 if (currentId ==
"BG_1")
229 if (currentId ==
"BGF_1")
244 EClass.game.config.showAllFeat = a;
251 buttonFeatMode.mainText.text =
"featMode".lang(
EClass.
pc.
feat.ToString() ??
"");
253 colors.normalColor = colors.normalColor.SetAlpha(
featMode ? 1 : 0);
254 buttonFeatMode.colors = colors;
264 textHealth.text = chara.hp +
"/" +
chara.
MaxHP;
265 textMood.text = chara.mana.value +
"/" +
chara.
mana.
max;
268 @object.texture.filterMode = FilterMode.Bilinear;
269 portrait.image.sprite = @object;
271 @object.texture.filterMode = FilterMode.Bilinear;
272 portrait.imageFrame.sprite = @object;
320 uIItem.
text2.SetActive(enable:
false);
326 UIBar componentInChildren = uIItem.GetComponentInChildren<
UIBar>();
333 string text = st?.
GetText() ??
"noItem".lang();
342 uIItem.button1.interactable =
false;
344 else if (text.IsEmpty())
352 uIItem.
image1.SetNativeSize();
368 textTitle.text = (chara.IsPC ? EClass.player.title :
"-");
371 textBio.text =
chara.
job.GetText().ToTitleCase();
374 textDV.text =
"_DV".lang(
chara.
DV.ToString() ??
"",
chara.
PV.ToString() ??
"");
378 textFame.text = (chara.IsPC ? (
EClass.
player.
fame.ToString() ??
"") :
"???");
386 textDeepest.text = text;
411 b.button1.interactable =
false;
418 b.button1.icon.material =
matItem;
423 b.button1.icon.material =
null;
457 if (list.items.Count < 12)
459 int num = 12 - list.items.Count;
460 for (
int i = 0; i < num; i++)
465 if (list.items.Count > 18)
467 gridEquip.cellSize =
new Vector2(52f, 44f);
468 gridEquip.spacing =
new Vector2(-6f, -12f);
485 textFaction.text = ((chara.faction ==
null) ?
"???" :
chara.
faction.
name.ToTitleCase());
506 contentList.DestroyChildren();
508 note.RebuildLayout();
512 List(
"skillsGeneral",
"general");
513 List(
"skillsCraft",
"craft");
514 List(
"skillsCombat",
"combat");
515 List(
"skillsWeapon",
"weapon");
522 List(
"availableFeats",
"general");
523 List(
"availableFeats_special",
"special");
524 List(
"availableFeats_skill",
"skill");
525 List(
"availableFeats_attribute",
"attribute");
550 if (list.
items.Count == 0)
552 _header.SetActive(enable:
false);
553 list.SetActive(enable:
false);
555 Header(
"etherDisease",
null);
577 if (list.
items.Count == 0)
579 _header.SetActive(enable:
false);
580 list.SetActive(enable:
false);
582 Header(
"innateFeats",
null);
631 Header(
"resistance",
null);
632 headerEquip.
SetText(
"resistance".lang());
655 if (a.
source.tag.Contains(
"godAbility") || a.
source.categorySub ==
"god")
670 if (a.source.IsWeaponEnc)
675 if ((uint)(
id - 55) <= 2u ||
id == 68 ||
id == 93)
688 string[] skillCats =
new string[7] {
"general",
"labor",
"mind",
"stealth",
"combat",
"craft",
"weapon" };
690 headerEquip.
SetText(
"enchant".lang());
700 foreach (
Element item6
in eles)
702 if (!skillCats.Contains(item6.
source.categorySub))
720 foreach (
Element item7
in eles)
722 if (skillCats.Contains(item7.
source.categorySub))
734 note.transform.SetAsLastSibling();
735 RefreshNote(chara, note);
737 void Header(
string lang,
string lang2)
746 void List(
string lang,
string idSubCat)
748 List<string> cats =
new List<string>();
750 if (idSubCat ==
"general")
780 void List(
string lang,
string idSubCat)
796 Msg.
Say(
"notEnoughFeatPoint");
802 EClass.pc.feat -= a.CostLearn;
803 EClass.pc.SetFeat(a.id, a.Value, msg: true);
807 this.RebuildLayout(recursive: true);
819 if (item9.
source.categorySub == idSubCat)
832 void ListFeatPurchase()
848 if (focus && window.idTab == 5)
850 RefreshNote(chara, note);
869 uIItem.
button1.SetOnClick(delegate
877 uIItem.
button1.SetActive(enable:
false);
884 foreach (
Element value
in elementContainer.dict.Values)
886 text = text + ((value == elementContainer.dict.Values.First()) ?
"" :
", ") + value.Name;
888 n.AddTopic(
"TopicDomain",
"domain".lang(), text).button1.SetActive(enable:
false);
889 string text2 = chara.
GetFavCat().GetName();
891 Add(
"favgift".lang(text2.ToLower().ToTitleCase(), @ref));
900 n.AddTopic(
"TopicDomain",
"attackStyle".lang(), text);
906 if (chara.
ride !=
null)
916 AddText(
"info_criminal".lang());
920 n.AddText(
"LV:" + chara.
LV +
" exp:" + chara.
exp +
" next:" + chara.
ExpToNext);
921 n.AddText(
"Luck:" + chara.
Evalue(78));
926 string[] array = s.Split(
':');
927 n.AddTopic(
"TopicDomain", array[0], (array.Length >= 2) ? array[1].TrimStart(
' ') :
"").button1.SetActive(enable:
false);
929 void AddText(
string s)
931 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 GetCurrency(string id="money")
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)