2using System.Collections.Generic;
3using System.Reflection;
25 base.gameObject.SetActive(value:
false);
28 public void Talk(
string text, List<DramaChoice> choices,
bool center,
bool unknown)
31 dialog.gameObject.SetActive(value:
true);
40 if (!text.StartsWith(
"("))
42 text =
"(" + text +
")";
44 text = text.Replace(
"。)",
")");
56 string text2 = chara.
id;
57 if (!(text2 ==
"adv_gaki"))
59 if (text2 ==
"corgon")
70 text = text.Replace(
"((",
"(").Replace(
"))",
")").Replace(
"((",
"(")
86 dialog.textRank.text =
"factionRank2".lang() +
" " + chara.
trait.
GetAdvRankText() +
" " + ((chara.
GetInt(111) > 0) ?
"advDefeated".lang(chara.
GetInt(111).ToString() ??
"") :
"");
93 int num = chara.interest / 10 + 1;
102 for (
int i = 0; i < num; i++)
108 if ((
bool)dialog.textFav && chara.
knowFav)
110 dialog.textFav.text = chara.
GetFavCat().GetName().ToTitleCase() + Environment.NewLine + chara.
GetFavFood().GetName().ToTitleCase();
115 dialog.textAffinity.text =
"???";
116 dialog.textNoInterest.text =
"???";
127 for (
int j = 0; j < choices.Count; j++)
148 DramaOutcome.idJump =
null;
149 string text =
item.text.TrimEnd(Environment.NewLine.ToCharArray());
157 string idJump =
item.idJump;
158 string idAction =
item.idAction;
159 object[] PARAMS =
null;
160 int? affinity =
null;
161 if (!
item.CHECK.IsEmpty())
163 string[] array =
item.CHECK.Split(
'/');
164 string text2 = array[0];
165 if (!(text2 ==
"check"))
167 if (text2 ==
"affinity")
178 base.gameObject.SetActive(value:
false);
179 DramaChoice.lastChoice =
item;
181 if (affinity.HasValue)
186 idJump = idJump.Split(
'/')[0];
190 idJump = idJump.Split(
'/')[1];
192 PARAMS =
new object[1] { flag };
194 if (!idAction.IsEmpty())
196 MethodInfo method = typeof(DramaOutcome).GetMethod(sequence.id +
"_" + idAction);
199 method.Invoke(sequence.manager.outcome, PARAMS);
200 if (DramaOutcome.idJump != null)
202 sequence.Play(DramaOutcome.idJump);
207 if (
item.onClick !=
null)
216 else if (idJump.IsEmpty())
222 sequence.Play(idJump);
225 if ((
bool)uIButton.subText)
231 uIButton.soundClick =
null;
233 if (
item.onTooltip !=
null)
235 uIButton.SetTooltip(
item.onTooltip);
237 if (
item.forceHighlight)
239 uIButton.DoHighlightTransition();
240 item.forceHighlight =
false;
247 StringBuilder stringBuilder =
new StringBuilder(text);
249 if (currentReligion !=
null)
251 stringBuilder.Replace(
"#god_name", currentReligion.
Name);
252 stringBuilder.Replace(
"#god_desc",
"<i>" + currentReligion.
source.GetDetail() +
"</i>");
253 stringBuilder.Replace(
"#god_benefit", currentReligion.
GetTextBenefit());
254 stringBuilder.Replace(
"#godtalk_worship", currentReligion.
GetGodTalk(
"worship"));
256 return stringBuilder.ToString();
static void GakiConvert(ref string text, string idLang="zako")
List< Action > actionsNextFrame
int GetInt(string id, int? defaultInt=null)
bool HasElement(int ele, bool includeNagative=false)
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
SourceReligion.Row source
virtual string GetGodTalk(string idTalk)
virtual string GetTextBenefit()
virtual string GetAdvRankText()
virtual bool CanChangeAffinity