2using System.Collections.Generic;
24 base.gameObject.SetActive(value:
false);
27 public void Talk(
string text, List<DramaChoice> choices,
bool center,
bool unknown)
30 dialog.gameObject.SetActive(value:
true);
39 if (!text.StartsWith(
"("))
41 text =
"(" + text +
")";
43 text = text.Replace(
"。)",
")");
55 string text2 = chara.
id;
56 if (!(text2 ==
"adv_gaki"))
58 if (text2 ==
"corgon")
69 text = text.Replace(
"((",
"(").Replace(
"))",
")").Replace(
"((",
"(")
85 dialog.textRank.text =
"factionRank2".lang() +
" " + chara.
trait.
GetAdvRankText() +
" " + ((chara.
GetInt(111) > 0) ?
"advDefeated".lang(chara.
GetInt(111).ToString() ??
"") :
"");
90 dialog.textAffinity.text = ((chara.c_bossType != 0) ?
" - " : (chara.
affinity.
Name +
" (" + chara.
_affinity +
")"));
92 int num = chara.interest / 10 + 1;
101 for (
int i = 0; i < num; i++)
107 if ((
bool)dialog.textFav && chara.
knowFav)
109 dialog.textFav.text = chara.
GetFavCat().GetName().ToTitleCase() + Environment.NewLine + chara.
GetFavFood().GetName().ToTitleCase();
114 dialog.textAffinity.text =
"???";
115 dialog.textNoInterest.text =
"???";
126 for (
int j = 0; j < choices.Count; j++)
147 DramaOutcome.idJump =
null;
148 string text =
item.text.TrimEnd(Environment.NewLine.ToCharArray());
156 string idJump =
item.idJump;
157 string idAction =
item.idAction;
158 object[] PARAMS =
null;
159 int? affinity =
null;
160 if (!
item.CHECK.IsEmpty())
162 string[] array =
item.CHECK.Split(
'/');
163 string text2 = array[0];
164 if (!(text2 ==
"check"))
166 if (text2 ==
"affinity")
177 base.gameObject.SetActive(value:
false);
178 DramaChoice.lastChoice =
item;
180 if (affinity.HasValue)
185 idJump = idJump.Split(
'/')[0];
189 idJump = idJump.Split(
'/')[1];
191 PARAMS =
new object[1] { flag };
193 if (!idAction.IsEmpty())
195 typeof(DramaOutcome).GetMethod(sequence.id +
"_" + idAction).Invoke(sequence.manager.outcome, PARAMS);
196 if (DramaOutcome.idJump != null)
198 sequence.Play(DramaOutcome.idJump);
202 if (
item.onClick !=
null)
211 else if (idJump.IsEmpty())
217 sequence.Play(idJump);
220 if ((
bool)uIButton.subText)
226 uIButton.soundClick =
null;
228 if (
item.onTooltip !=
null)
230 uIButton.SetTooltip(
item.onTooltip);
232 if (
item.forceHighlight)
234 uIButton.DoHighlightTransition();
235 item.forceHighlight =
false;
242 StringBuilder stringBuilder =
new StringBuilder(text);
244 if (currentReligion !=
null)
246 stringBuilder.Replace(
"#god_name", currentReligion.
Name);
247 stringBuilder.Replace(
"#god_desc", currentReligion.
source.GetDetail());
248 stringBuilder.Replace(
"#god_benefit", currentReligion.
GetTextBenefit());
249 stringBuilder.Replace(
"#godtalk_worship", currentReligion.
GetGodTalk(
"worship"));
251 return stringBuilder.ToString();
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
static void GakiConvert(ref string text, string idLang="zako")
int GetInt(int id, int? defaultInt=null)
List< Action > actionsNextFrame
bool HasElement(int ele, int req=1)
SourceCategory.Row GetFavCat()
SourceThing.Row GetFavFood()
static Check Get(string id, float dcMod=1f)
virtual void SetText(string detail="", bool center=false)
LayoutGroup layoutInterest
virtual UIButton AddChoice(DramaChoice choice, string text, Action func=null, bool deactivateOnChoice=true)
void SetChoice(DramaChoice item, int index)
string ConvertAdv(string text)
void Init(DramaSequence _sequence, string _id, Person _owner)
void Talk(string text, List< DramaChoice > choices, bool center, bool unknown)
static bool If(DramaChoice item, Chara c)
List< DramaEvent > tempEvents
static string ConvertDrama(string text, Chara c=null)
static Religion currentReligion
string GetGodTalk(string suffix)
SourceReligion.Row source