2using System.Collections.Generic;
 
   35    public override void List()
 
   73                    Util.Instantiate<
UIItem>(
"UI/Element/Grid/Attach/affinity", b).image1.sprite = icon;
 
   89                        EClass.pc.SetAI(new AI_Goto(room.GetRandomFreePos(), 1));
 
   96                    t.
note.
AddTopic(
"TopicLeft", 
"infoBed".lang(), (
bed != 
null) ? 
bed.Name.ToTitleCase() : 
"none".lang());
 
  104                }).icon.SetAlpha((
bed != 
null) ? 1f : 0.4f);
 
  111                SE.Play(
"pop_paper");
 
  119            b.gameObject.AddComponent<CanvasGroup>().alpha = 0.6f;
 
  127        foreach (
Hobby item in a.ListWorks().Concat(a.ListHobbies()))
 
  129            if (
item.GetEfficiency(a) <= 0)
 
  137            if (roomWork == null)
 
  143                EClass.pc.SetAI(new AI_Goto(roomWork.GetRandomFreePos(), 1));
 
  148            WriteHobbies(t, a, roomWork);
 
  149        }).icon.SetAlpha(flag ? 1f : 0.4f);
 
  155        t.
note.
AddHeader(
"infoWork".lang((roomWork != 
null) ? roomWork.
Name : 
"none".lang()));
 
  158            AddText(
item, 
"work", a.source.works.Contains(
item.source.alias));
 
  160        foreach (
Hobby item2 
in a.ListHobbies())
 
  162            AddText(item2, 
"hobby", a.
source.hobbies.Contains(item2.
source.alias));
 
  167            t.note.AddText(
"workNotActive_party".lang(), 
FontColor.Warning);
 
  169        if (a.IsPCFactionOrMinion && !a.trait.IsCountAsResident)
 
  171            t.note.AddText(
"notCountResident".lang(), 
FontColor.Good);
 
  174        void AddText(
Hobby h, 
string lang, 
bool fix)
 
  177            string text = h.
Name;
 
  184            string text2 = array[Mathf.Clamp(efficiency / 50, (efficiency != 0) ? 1 : 0, array.Length - 1)];
 
  185            t.note.AddTopic(
"TopicLeft", lang.lang(), text + 
" (" + text2 + 
")");
 
  186            if (!h.
source.destTrait.IsEmpty())
 
  192                t.note.AddText(
"NoteText_small", 
"・ " + 
"workDestTrait".lang(cardRow.
GetName().ToTitleCase().TagColor(flag ? 
FontColor.Good : 
FontColor.Warning)));
 
  196                t.note.AddText(
"NoteText_small", 
"・ " + 
"workNotActive".lang());
 
  200                for (
int i = 0; i < h.
source.things.Length; i += 2)
 
  202                    float num = Mathf.Max(1f, (
long)h.
source.things[i + 1].ToInt() * (
long)efficiency * a.homeBranch.GetProductBonus(a) / 100 / 1000);
 
  203                    string text3 = h.
source.things[i];
 
  205                    if (h.
source.alias == 
"Breeding")
 
  207                        num = a.race.breeder * 100 / 2500;
 
  208                        num = num * (float)((!(text3 == 
"_egg")) ? 1 : 2) / 3f;
 
  209                        if (a.race.breeder > 0 && num <= 0f)
 
  214                    t.note.AddText(
"NoteText_small", 
"・ " + 
"work_produce".lang(s.ToTitleCase(), num.ToString() ?? 
""));
 
  216                if (!h.
source.elements.IsEmpty())
 
  218                    for (
int j = 0; j < h.
source.elements.Length; j += 2)
 
  221                        int num2 = h.
source.elements[j + 1];
 
  222                        float num3 = ((num2 < 0 || row.id == 2115 || row.id == 2207) ? ((
float)(num2 / 10)) : Mathf.Max((h.
GetEfficiency(a) > 0) ? 1 : 0, (
long)num2 * (long)h.
GetEfficiency(a) * a.homeBranch.efficiency / 100 / 1000));
 
  223                        t.note.AddText(
"NoteText_small", 
"・ " + 
"workBonus_skill".lang(row.
GetName().ToTitleCase(), ((num2 > 0) ? 
"+" : 
"") + num3) + ((row.
id == 2115 || row.
id == 2207) ? (
" " + 
"fixedFactionSkill".lang()) : 
""), (num2 >= 0) ? 
FontColor.Default : 
FontColor.Bad);
 
  226                string[] array2 = h.
source.GetDetail().SplitNewline();
 
  227                foreach (
string text4 
in array2)
 
  229                    if (!text4.IsEmpty())
 
  231                        t.note.AddText(
"NoteText_small", 
"・ " + text4);
 
  247            b.
SetSubText(a.
job.GetName().ToTitleCase(wholeText: 
true), 300);
 
  272            uIContextMenu.
AddButton(
"findMember", delegate
 
  282                uIContextMenu.
AddButton(
"findMember", delegate
 
  288            uIContextMenu.
AddButton(
"changeName", delegate
 
  296                            text = NameGen.getRandomName();
 
  309                        uIContextMenu.
AddButton(
"editPCC", delegate
 
  315                            uIContextMenu.
AddButton(
"editSkin", delegate
 
  325                        uIContextMenu.
AddButton(
"togglePCC", delegate
 
  348                        uIContextMenu.
AddButton(
"editPCC", delegate
 
  352                        uIContextMenu.
AddButton(
"togglePCC", delegate
 
  374                    uIContextMenu.
AddButton(
"makeMaid", delegate
 
  378                            EClass.Branch.uidMaid = 0;
 
  382                            EClass.Branch.uidMaid = c.
uid;
 
  395                        if (isLivestockTimerOn)
 
  433        uIContextMenu.
Show();
 
  458            if (member2.
memberType == memberType && !list.items.Contains(member2))
 
  473        menuLeft.
AddButton2Line(
"sort", () => list.sortMode.ToString(), delegate
 
  482                layer.showMode = layer.showMode.NextEnum();
 
int GetInt(int id, int? defaultInt=null)
void SetInt(int id, int value=0)
List< Action > actionsNextFrame
void WriteHobbies(UITooltip t, Chara a, BaseArea roomWork)
override void OnClick(Chara c, ItemGeneral i)
override string IdHeaderRow
override void OnRefreshMenu()
virtual bool ShowShowMode
virtual bool IsDisabled(Chara c)
override void OnInstantiate(Chara a, ItemGeneral b)
void AddSubButtonWork(ItemGeneral b, Chara a)
virtual void SetSubText(Chara a, ItemGeneral b)
FactionMemberType memberType
virtual bool ShowCharaSheet
virtual LayerPeople.ShowMode ShowMode
override void OnLeaveScreen()
override void OnEnterScreen()
virtual string GetName(int i)
override bool IsAliveInCurrentZone
override void SetSortVal(UIList.SortMode m, CurrencyType currency=CurrencyType.Money)
override CardRenderer _CreateRenderer()
override bool IsPCFaction
FactionMemberType memberType
override CardRow sourceCard
string GetTextWork(bool simple=false)
string GetTextHobby(bool simple=false)
int GetRaw(int offsetHours=0)
string GetText(TextFormat format)
int GetRemainingHours(int rawDeadLine)
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
static SourceManager sources
static FactionBranch Branch
void ChangeMemberType(Chara c, FactionMemberType type)
List< HireInfo > listReserve
int GetEfficiency(Chara c)
UIButton AddSubButton(Sprite sprite, Action action, string lang=null, Action< UITooltip > onTooltip=null)
void SetChara(Chara c, Mode mode=Mode.Default)
UIButton SetSubText(string lang, int x, FontColor c=FontColor.Default, TextAnchor align=TextAnchor.MiddleLeft)
static string[] GetList(string id)
LayerChara SetChara(Chara c)
void Activate(Chara _chara)
override void OnSwitchContent(Window window)
Layer SetOnKill(Action action)
Thing FindThing(Func< Thing, bool > func)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
List< ISyncScreen > syncList
Dictionary< string, CardRow > map
override string GetName()
SourceCategory categories
UIItem AddHeader(string text, Sprite sprite=null)
UIItem AddTopic(string id, string text, string value=null)