Elin Decompiled Documentation EA 23.288 Nightly
Loading...
Searching...
No Matches
DramaManager Class Reference
Inheritance diagram for DramaManager:
EMono

Public Member Functions

DramaSequence Play (DramaSetup setup)
 
DramaSequence Load ()
 
void AddCustomEvents (string idCustom="Resident")
 
void ParseLine (Dictionary< string, string > item)
 
DramaActor GetActor (string id)
 
DramaEvent AddEvent (DramaEvent e)
 
DramaEventMethod AddEvent (Action func, float duration=0f, bool halt=false)
 
DramaEventMethod AddEvent (Action func, Func< string > funcJump)
 
DramaEvent CustomEvent (Action func, string step=null, float duration=0f, bool halt=false)
 
void SetDialog (string id="Default")
 
bool CheckIF (string IF)
 
void Show ()
 
void Hide ()
 

Public Attributes

LayerDrama layer
 
CanvasGroup cg
 
CanvasGroup cgCover
 
UIDynamicList listCredit
 
Transform actorPos
 
Transform endroll
 
DramaActor moldActor
 
DramaSequence sequence
 
DramaOutcome outcome
 
DialogDrama dialog
 
DramaSetup setup
 
GameObject goSkip
 
Image imageBG
 
Image imageCover
 
Font[] fonts
 
Person tg
 
bool bgmChanged
 
List< DramaChoice_choices = new List<DramaChoice>()
 
Dictionary< string, string > customTalkTopics = new Dictionary<string, string>()
 
Dictionary< string, string > dictLocalize = new Dictionary<string, string>()
 
float creditSpeed
 
DramaEventTalk lastTalk
 
bool enableTone
 
bool customEventsAdded
 
bool idDefaultPassed
 
int countLine
 

Static Public Attributes

static Chara TG
 
static Dictionary< string, ExcelDatadictCache = new Dictionary<string, ExcelData>()
 
- Static Public Attributes inherited from EMono
static Core core
 

Properties

bool keepAmbientBGM [get]
 
DramaActor tgActor [get]
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Private Member Functions

void Update ()
 

Private Attributes

List< DramaEventcustomEvents = new List<DramaEvent>()
 
string lastIF
 
string lastIF2
 
SoundSource lastSound
 
string idDefault
 
string textReplace
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 

Detailed Description

Definition at line 9 of file DramaManager.cs.

Member Function Documentation

◆ AddCustomEvents()

void DramaManager.AddCustomEvents ( string  idCustom = "Resident")
inline

Definition at line 178 of file DramaManager.cs.

179 {
181 {
182 return;
183 }
184 DramaCustomSequence dramaCustomSequence = new DramaCustomSequence
185 {
186 manager = this,
188 idCustom = idCustom,
189 events = customEvents,
192 };
193 CustomEvent(delegate
194 {
195 sequence.Exit();
196 });
197 if (tg != null && tg.hasChara)
198 {
199 TG = tg.chara;
200 dramaCustomSequence.Build(tg.chara);
201 }
202 if (!sequence.setup.textData.IsEmpty())
203 {
204 dramaCustomSequence.BuildTextData();
205 }
206 foreach (DramaEvent customEvent in customEvents)
207 {
208 AddEvent(customEvent);
209 }
210 customEventsAdded = true;
211 }
DramaSequence sequence
Definition: DramaManager.cs:27
bool customEventsAdded
Definition: DramaManager.cs:67
DramaEvent CustomEvent(Action func, string step=null, float duration=0f, bool halt=false)
string idDefault
Definition: DramaManager.cs:73
List< DramaEvent > customEvents
Definition: DramaManager.cs:47
DramaEvent AddEvent(DramaEvent e)
static Chara TG
Definition: DramaManager.cs:11
DramaSetup setup
Definition: DramaManager.cs:33
DramaSetup setup
string textData
Definition: DramaSetup.cs:11
bool hasChara
Definition: Person.cs:38
Chara chara
Definition: Person.cs:36

References AddEvent(), DramaCustomSequence.Build(), DramaCustomSequence.BuildTextData(), Person.chara, CustomEvent(), customEvents, customEventsAdded, DramaSequence.Exit(), Person.hasChara, idDefault, sequence, setup, DramaSequence.setup, DramaSetup.textData, TG, and tg.

Referenced by Load(), and ParseLine().

◆ AddEvent() [1/3]

DramaEventMethod DramaManager.AddEvent ( Action  func,
float  duration = 0f,
bool  halt = false 
)
inline

Definition at line 1084 of file DramaManager.cs.

1085 {
1086 return sequence.AddEvent(e);
1087 }
DramaEvent AddEvent(DramaEvent e)

References DramaSequence.AddEvent().

◆ AddEvent() [2/3]

DramaEventMethod DramaManager.AddEvent ( Action  func,
Func< string >  funcJump 
)
inline

Definition at line 1089 of file DramaManager.cs.

1090 {
1091 return AddEvent(new DramaEventMethod(func, duration, halt)) as DramaEventMethod;
1092 }
1093
1094 public DramaEventMethod AddEvent(Action func, Func<string> funcJump)
1095 {

◆ AddEvent() [3/3]

DramaEvent DramaManager.AddEvent ( DramaEvent  e)
inline

Definition at line 1079 of file DramaManager.cs.

1080 {
1081 return sequence.GetActor(id);
1082 }
DramaActor GetActor(string id)

References DramaSequence.GetActor().

Referenced by AddCustomEvents(), and ParseLine().

◆ CheckIF()

bool DramaManager.CheckIF ( string  IF)
inline

Definition at line 1124 of file DramaManager.cs.

1130 {
1131 if (IF == null || IF.IsEmpty())
1132 {
1133 return true;
1134 }
1135 string[] array = IF.Split(',');
1136 switch (array[0])
1137 {
1138 case "garden_bloom":
1139 foreach (Chara member in EMono.pc.party.members)
1140 {
1141 if (member.CanBloom())
1142 {
1143 return true;
1144 }
1145 }
1146 return false;
1147 case "wedding_whoring":
1148 return false;
1149 case "duponne_mino":
1150 return EMono.pc.things.Find("minohorn") != null;
1151 case "duponne_rescued":
1153 {
1154 return EMono._map.FindChara("lurie_boss") != null;
1155 }
1156 return false;
1157 case "duponne_gone":
1159 {
1160 return EMono.pc.things.Find("duponneball") == null;
1161 }
1162 return false;
1163 case "duponne_killed":
1165 {
1167 }
1168 return false;
1169 case "survival":
1170 return EMono.game.IsSurvival;
1171 case "!survival":
1172 return !EMono.game.IsSurvival;
1173 case "fromBook":
1174 return LayerDrama.fromBook;
1175 case "nerun_nadenade":
1176 if (!EMono.game.startVersion.IsBelow(0, 23, 232))
1177 {
1178 return EMono.player.stats.death2 == 0;
1179 }
1180 return false;
1181 case "nerun_nadenade2":
1182 GameLang.refDrama1 = EMono.player.stats.death2.ToString() ?? "";
1183 return EMono.player.stats.death2 >= 100;
1184 case "!fromBook":
1185 return !LayerDrama.fromBook;
1186 case "WindRest":
1187 return EMono._zone is Zone_WindRest;
1188 case "guild_promote":
1189 return Guild.CurrentDrama.relation.exp >= Guild.CurrentDrama.relation.ExpToNext;
1190 case "guild_maxpromote":
1191 return Guild.CurrentDrama.relation.rank >= Guild.CurrentDrama.relation.MaxRank;
1192 case "scratch_check":
1193 return EMono.game.dateScratch > EMono.game.world.date.GetRaw();
1194 case "sister_money":
1195 return EMono.pc.GetCurrency() >= 10000;
1196 case "fiamaPet":
1197 if (EMono.pc.homeBranch != null)
1198 {
1199 foreach (Chara member2 in EMono.pc.homeBranch.members)
1200 {
1201 if (member2.isDead && member2.CanRevive() && member2.GetInt(100) != 0)
1202 {
1203 return true;
1204 }
1205 }
1206 }
1207 return false;
1208 case "hasMelilithCurse":
1209 return EMono.pc.HasElement(1206);
1210 case "merchant":
1211 return Guild.CurrentDrama == Guild.Merchant;
1212 case "fighter":
1213 return Guild.CurrentDrama == Guild.Fighter;
1214 case "thief":
1215 return Guild.CurrentDrama == Guild.Thief;
1216 case "mage":
1217 return Guild.CurrentDrama == Guild.Mage;
1218 case "hasDLC":
1219 return Steam.HasDLC(array[1].ToEnum<ID_DLC>());
1220 case "hasFlag":
1221 return EMono.player.dialogFlags.TryGetValue(array[1], 0) != 0;
1222 case "!hasFlag":
1223 return EMono.player.dialogFlags.TryGetValue(array[1], 0) == 0;
1224 case "!hasMiscreation":
1225 return !EMono.pc.party.HasElement(1248, excludePC: true);
1226 case "hasItem":
1227 return EMono.pc.things.Find(array[1]) != null;
1228 case "nasuDeliver":
1229 if (EMono.game.quests.GetPhase<QuestNasu>() == 2)
1230 {
1231 return EMono.pc.things.Find("backpack_holding") != null;
1232 }
1233 return false;
1234 case "isCompleted":
1235 return EMono.game.quests.IsCompleted(array[1]);
1236 case "costRecruit":
1237 if (EMono.Branch != null && EMono.Branch.IsRecruit(tg.chara))
1238 {
1239 return EMono.pc.GetCurrency("money2") >= CalcGold.Hire(tg.chara);
1240 }
1241 return true;
1242 case "costRecruitTicket":
1243 if (EMono.Branch != null && EMono.Branch.IsRecruit(tg.chara))
1244 {
1245 return EMono.pc.things.Find("ticket_resident") != null;
1246 }
1247 return false;
1248 case "letterTrial":
1250 {
1251 return EMono.pc.things.Find("letter_trial") != null;
1252 }
1253 return false;
1254 default:
1255 if (array.Length > 2)
1256 {
1257 int value;
1258 bool flag = EMono.player.dialogFlags.TryGetValue(array[1], out value);
1259 int num = 0;
1260 if (array[1].StartsWith("*"))
1261 {
1262 string text = array[1].TrimStart('*');
1263 Quest quest = EMono.game.quests.Get(text);
1264 if (text == "guild")
1265 {
1266 quest = Guild.CurrentQuest;
1267 }
1268 flag = quest != null;
1269 if (!EMono.game.quests.completedIDs.Contains(text))
1270 {
1271 value = quest?.phase ?? (-1);
1272 }
1273 else
1274 {
1275 value = 999;
1276 flag = true;
1277 }
1278 num = ((!int.TryParse(array[2], out var result)) ? ((quest != null) ? array[2].ToInt(quest.GetType()) : 0) : result);
1279 }
1280 else
1281 {
1282 num = int.Parse(array[2]);
1283 }
1284 switch (array[0])
1285 {
1286 case "=":
1287 if (!flag && num == -1)
1288 {
1289 return true;
1290 }
1291 if (flag && value == num)
1292 {
1293 return true;
1294 }
1295 break;
1296 case "!":
1297 if (!flag || value != num)
1298 {
1299 return true;
1300 }
1301 break;
1302 case ">":
1303 if (flag && value > num)
1304 {
1305 return true;
1306 }
1307 break;
1308 case ">=":
1309 if (flag && value >= num)
1310 {
1311 return true;
1312 }
1313 break;
1314 case "<":
1315 if (!flag || value < num)
1316 {
1317 return true;
1318 }
1319 break;
1320 case "<=":
1321 if (!flag || value <= num)
1322 {
1323 return true;
1324 }
1325 break;
1326 }
int GetInt(int id, int? defaultInt=null)
Definition: BaseCard.cs:25
static int Hire(Chara c)
Definition: CalcGold.cs:8
int GetCurrency(string id="money")
Definition: Card.cs:4057
ThingContainer things
Definition: Card.cs:39
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6122
Definition: Chara.cs:10
bool CanRevive()
Definition: Chara.cs:5216
Party party
Definition: Chara.cs:43
bool CanBloom()
Definition: Chara.cs:8845
FactionBranch homeBranch
Definition: Chara.cs:1080
bool isDead
Definition: Chara.cs:391
int GetRaw(int offsetHours=0)
Definition: Date.cs:328
Definition: EMono.cs:4
static Chara pc
Definition: EMono.cs:13
static Player player
Definition: EMono.cs:11
static Game game
Definition: EMono.cs:7
static FactionBranch Branch
Definition: EMono.cs:21
static Map _map
Definition: EMono.cs:17
bool IsRecruit(Chara c)
List< Chara > members
FactionRelation relation
Definition: FACTION.cs:126
bool IsSurvival
Definition: Game.cs:276
Version startVersion
Definition: Game.cs:171
new World world
Definition: Game.cs:177
QuestManager quests
Definition: Game.cs:183
Definition: Guild.cs:2
static Guild CurrentDrama
Definition: Guild.cs:24
static GuildMerchant Merchant
Definition: Guild.cs:62
static QuestGuild CurrentQuest
Definition: Guild.cs:64
static GuildMage Mage
Definition: Guild.cs:58
static GuildFighter Fighter
Definition: Guild.cs:56
static GuildThief Thief
Definition: Guild.cs:60
static bool fromBook
Definition: LayerDrama.cs:16
Chara FindChara(string id)
Definition: Map.cs:2568
bool HasElement(int ele, bool excludePC=false)
Definition: Party.cs:198
List< Chara > members
Definition: Party.cs:19
bool killedDuponne
Definition: Player.cs:580
int death2
Definition: Player.cs:108
Flags flags
Definition: Player.cs:1149
Stats stats
Definition: Player.cs:1071
Dictionary< string, int > dialogFlags
Definition: Player.cs:1095
HashSet< string > completedIDs
Definition: QuestManager.cs:17
int GetPhase(string id)
bool IsCompleted(string id)
Quest Get(string id)
Definition: Quest.cs:7
int phase
Definition: Quest.cs:40
Definition: Steam.cs:10
static bool HasDLC(ID_DLC id)
Definition: Steam.cs:41
Thing Find(int uid)
GameDate date
Definition: World.cs:6
bool IsBelow(int _major, int _minor, int _batch)
Definition: Version.cs:31

Referenced by ParseLine().

◆ CustomEvent()

DramaEvent DramaManager.CustomEvent ( Action  func,
string  step = null,
float  duration = 0f,
bool  halt = false 
)
inline

Definition at line 1097 of file DramaManager.cs.

1097 {
1098 jumpFunc = funcJump
1099 }) as DramaEventMethod;
1100 }
1101
1102 public DramaEvent CustomEvent(Action func, string step = null, float duration = 0f, bool halt = false)
1103 {
1104 DramaEventMethod dramaEventMethod = new DramaEventMethod(func, duration, halt)
1105 {

Referenced by AddCustomEvents().

◆ GetActor()

DramaActor DramaManager.GetActor ( string  id)
inline

Definition at line 1074 of file DramaManager.cs.

1074 {
1075 AddEvent(new DramaEventGoto(jump));
1076 }
1077 }

◆ Hide()

void DramaManager.Hide ( )
inline

Definition at line 1336 of file DramaManager.cs.

1336 : true);
1337 layer.cg.alpha = 0f;
1338 layer.cg.DOFade(1f, 0.3f);
1339 }
LayerDrama layer
Definition: DramaManager.cs:13
CanvasGroup cg
Definition: LayerDrama.cs:30

◆ Load()

DramaSequence DramaManager.Load ( )
inline

Definition at line 117 of file DramaManager.cs.

118 {
119 sequence.Clear();
120 customEvents.Clear();
121 customTalkTopics.Clear();
122 moldActor = actorPos.CreateMold<DramaActor>();
123 if (tg != null)
124 {
125 sequence.AddActor("tg", tg);
126 }
127 sequence.AddActor("pc", new Person(EMono.pc));
128 string text = PackageIterator.GetFiles("Dialog/Drama/" + setup.book + ".xlsx").LastOrDefault()?.FullName ?? (CorePath.DramaData + setup.book + ".xlsx");
129 ExcelData excelData = dictCache.TryGetValue(text);
130 if (excelData != null && excelData.IsModified())
131 {
132 excelData = null;
133 }
134 if (excelData == null)
135 {
136 excelData = new ExcelData();
137 }
138 excelData.maxEmptyRows = 10;
139 excelData.path = text;
140 List<Dictionary<string, string>> list = excelData.BuildList(setup.sheet);
141 if (!Lang.isBuiltin && dictLocalize.Count == 0)
142 {
143 foreach (Dictionary<string, string> item in new ExcelData
144 {
145 maxEmptyRows = 10,
146 path = (PackageIterator.GetFiles("Dialog/Drama/" + setup.book + ".xlsx").LastOrDefault()?.FullName ?? (CorePath.DramaDataLocal + setup.book + ".xlsx"))
148 {
149 string text2 = item["id"];
150 if (!text2.IsEmpty())
151 {
152 string text3 = item.TryGetValue("text_" + Lang.langCode) ?? item["text"];
153 if (!dictLocalize.TryAdd(text2, text3))
154 {
155 string text4 = dictLocalize[text2];
156 dictLocalize[text2] = ("[DUPLICATE ID '" + text2 + "']\n").TagColor(Color.red) + text4;
157 Debug.LogError("#drama duplicate id '" + text2 + "' at " + text + "\n" + text4 + " -> " + text3);
158 }
159 }
160 }
161 }
162 dictCache[text] = excelData;
164 lastTalk = null;
166 countLine = 0;
167 for (int i = 0; i < list.Count; i++)
168 {
169 ParseLine(list[i]);
170 countLine++;
171 }
173 sequence.steps["end"] = 99999;
174 sequence.AddActor("narrator", new Person("narrator"));
175 return sequence;
176 }
static string DramaDataLocal
Definition: CorePath.cs:184
Dictionary< string, string > dictLocalize
Definition: DramaManager.cs:53
static Dictionary< string, ExcelData > dictCache
Definition: DramaManager.cs:77
Transform actorPos
Definition: DramaManager.cs:21
bool idDefaultPassed
Definition: DramaManager.cs:69
void ParseLine(Dictionary< string, string > item)
void AddCustomEvents(string idCustom="Resident")
Dictionary< string, string > customTalkTopics
Definition: DramaManager.cs:51
DramaActor moldActor
Definition: DramaManager.cs:25
DramaEventTalk lastTalk
Definition: DramaManager.cs:63
DramaActor AddActor(string id, Person person)
Dictionary< string, int > steps
string sheet
Definition: DramaSetup.cs:5
string step
Definition: DramaSetup.cs:7
string book
Definition: DramaSetup.cs:9
bool IsModified()
Definition: ExcelData.cs:72
List< Dictionary< string, string > > BuildList(string sheetName="_default")
Definition: ExcelData.cs:92
Definition: Lang.cs:7
static string langCode
Definition: Lang.cs:29
static bool isBuiltin
Definition: Lang.cs:43
Definition: Person.cs:6

References actorPos, DramaSequence.AddActor(), AddCustomEvents(), DramaSetup.book, ExcelData.BuildList(), DramaSequence.Clear(), Color, countLine, customEvents, customEventsAdded, customTalkTopics, Debug, dictCache, dictLocalize, CorePath.DramaDataLocal, enableTone, idDefault, idDefaultPassed, Lang.isBuiltin, ExcelData.IsModified(), item, Lang.langCode, lastTalk, moldActor, ParseLine(), EMono.pc, sequence, setup, DramaSetup.sheet, DramaSetup.step, DramaSequence.steps, and tg.

Referenced by ParseLine(), and Play().

◆ ParseLine()

void DramaManager.ParseLine ( Dictionary< string, string >  item)
inline

Definition at line 213 of file DramaManager.cs.

214 {
215 string[] array = (item.ContainsKey("action") ? item["action"].Split('/') : null);
216 string action = ((array != null) ? array[0] : null);
217 string text2 = (item.ContainsKey("step") ? item["step"] : null);
218 if (text2 == "//")
219 {
220 return;
221 }
222 if (text2 == idDefault)
223 {
224 idDefaultPassed = true;
225 }
226 string actor = (item.ContainsKey("actor") ? item["actor"] : "#1");
227 string[] p = (item.ContainsKey("param") ? item["param"].Split(',') : new string[0]);
228 string p2 = ((p.Length != 0) ? p[0] : "");
229 string p3 = ((p.Length > 1) ? p[1] : "");
230 string p4 = ((p.Length > 2) ? p[2] : "");
231 float.TryParse(p2, out var p0f);
232 float.TryParse(p3, out var result);
233 bool flag = !item["text_JP"].IsEmpty();
234 item.TryGetValue("text_JP");
235 string text = null;
236 if (flag)
237 {
238 if (!Lang.isBuiltin)
239 {
240 string key = item["id"];
241 if (dictLocalize.ContainsKey(key))
242 {
243 text = dictLocalize[key];
244 }
245 else
246 {
247 text = item.TryGetValue("text_EN");
248 }
249 }
250 else
251 {
252 text = item["text_" + Lang.langCode];
253 }
254 }
255 if (flag && text.StartsWith("$") && tg != null && tg.hasChara)
256 {
257 string text3 = text.Split(' ')[0];
258 text = text.Replace(text3, tg.chara.GetTalkText(text3.Remove(0, 1)));
259 }
260 string jump = (item.ContainsKey("jump") ? item["jump"] : null);
261 string text4 = (item.ContainsKey("if") ? item["if"] : null);
262 string iF = (item.ContainsKey("if2") ? item["if2"] : null);
263 string cHECK = (item.ContainsKey("check") ? item["check"] : null);
264 bool flag2 = false;
265 if (text2 != null && !sequence.steps.ContainsKey(text2) && action != "choice" && action != "cancel")
266 {
267 sequence.steps.Add(text2, sequence.events.Count);
268 }
269 if (text4 == "*")
270 {
271 text4 = lastIF;
272 iF = lastIF2;
273 }
274 else
275 {
276 lastIF = text4;
277 lastIF2 = iF;
278 }
279 if (!CheckIF(text4) || !CheckIF(iF))
280 {
281 if (action == "reload")
282 {
283 string id = "flag" + countLine;
284 sequence.AddStep(id);
285 }
286 return;
287 }
288 if (LayerDrama.fromBook && action == "editPlaylist")
289 {
290 action = "BGM";
291 }
292 switch (action)
293 {
294 case "disableFullPortrait":
295 AddEvent(delegate
296 {
297 sequence.fullPortrait = false;
298 });
299 break;
300 case "enableTone":
301 enableTone = true;
302 break;
303 case "canSkip":
304 AddEvent(delegate
305 {
306 sequence.skipJump = p2;
307 });
308 break;
309 case "screenLock":
311 break;
312 case "haltBGM":
313 EMono.Sound.haltUpdate = true;
314 break;
315 case "forceBGM":
316 AddEvent(delegate
317 {
318 SoundManager.ForceBGM();
319 });
320 break;
321 case "setFlag":
322 AddEvent(delegate
323 {
324 if (p2.StartsWith("*"))
325 {
326 Quest quest3 = EMono.game.quests.Get(p2.TrimStart('*'));
327 quest3?.ChangePhase(p3.ToInt(quest3.GetType()));
328 }
329 else
330 {
331 EMono.player.dialogFlags[p2] = (p3.IsEmpty() ? 1 : int.Parse(p3));
332 }
333 });
334 break;
335 case "reload":
336 {
337 string __step = "flag" + countLine;
338 AddEvent(delegate
339 {
340 Load();
341 sequence.Play(jump.IsEmpty(__step));
342 }, 0.01f, halt: true);
343 sequence.AddStep(__step);
344 break;
345 }
346 case "inject":
347 {
348 DramaEventTalk dramaEventTalk = lastTalk;
349 if (idDefaultPassed)
350 {
351 AddCustomEvents(p2);
352 }
353 lastTalk = dramaEventTalk;
354 break;
355 }
356 case "topic":
357 customTalkTopics[p2] = text;
358 break;
359 case "cancel":
360 lastTalk.canCancel = true;
361 lastTalk.idCancelJump = jump;
362 break;
363 case "_choices":
364 foreach (DramaChoice choice in _choices)
365 {
366 lastTalk.AddChoice(choice);
367 }
368 break;
369 case "choice":
370 if (!CheckIF(text4) || !CheckIF(iF))
371 {
372 break;
373 }
374 if (array.Length > 1)
375 {
376 switch (array[1])
377 {
378 case "quest":
379 text = "deQuest".lang();
380 jump = "_quest";
381 break;
382 case "depart":
383 text = "depart".lang();
384 jump = "_depart";
385 break;
386 case "rumor":
387 text = "letsTalk".lang();
388 jump = "_rumor";
389 break;
390 case "buy":
391 text = "daBuy".lang();
392 jump = "_buy";
393 break;
394 case "sell":
395 text = "daSell".lang();
396 jump = "_sell";
397 break;
398 case "give":
399 text = "daGive".lang();
400 jump = "_give";
401 break;
402 case "trade":
403 text = "daTrade".lang();
404 jump = "_trade";
405 break;
406 case "bye":
407 text = "bye".lang();
408 jump = "_bye";
409 break;
410 }
411 }
412 flag2 = true;
413 lastTalk.AddChoice(new DramaChoice(text, jump, p2, cHECK, text4));
414 break;
415 case "addTempActor":
416 {
417 Person person = new Person(actor);
418 Chara chara = EMono.game.cards.globalCharas.Find(actor) ?? EMono._map.FindChara(actor);
419 if (chara != null)
420 {
421 person.SetChara(chara);
422 }
423 sequence.AddActor(actor, person);
424 break;
425 }
426 case "addActor":
427 {
428 if (actor == "god")
429 {
431 break;
432 }
433 DramaActor dramaActor = sequence.AddActor(actor, new Person(actor));
434 if (!text.IsEmpty())
435 {
436 dramaActor.owner.tempName = text;
437 }
438 break;
439 }
440 case "invoke":
442 {
443 break;
444 }
445 if (jump.IsEmpty())
446 {
447 AddEvent(delegate
448 {
449 typeof(DramaOutcome).GetMethod(p[0]).Invoke(outcome, null);
450 });
451 break;
452 }
453 AddEvent(delegate
454 {
455 }, () => (!(bool)typeof(DramaOutcome).GetMethod(p[0]).Invoke(outcome, null)) ? "" : jump);
456 flag2 = true;
457 break;
458 case "refAction1":
459 AddEvent(delegate
460 {
462 });
463 break;
464 case "refAction2":
465 AddEvent(delegate
466 {
468 });
469 break;
470 case "setBG":
471 AddEvent(delegate
472 {
473 if (p2.IsEmpty())
474 {
475 imageBG.enabled = false;
476 }
477 else
478 {
479 imageBG.enabled = true;
480 imageBG.sprite = Resources.Load<Sprite>("Media/Graphics/Image/Drama/" + p2);
481 }
482 });
483 break;
484 case "setBG2":
485 AddEvent(delegate
486 {
487 Util.Instantiate<Transform>("Media/Graphics/Image/Drama/" + p2, layer).SetAsFirstSibling();
488 });
489 break;
490 case "setAdvBG":
491 AddEvent(delegate
492 {
493 if (p2.IsEmpty())
494 {
495 dialog.imageBgAdv.enabled = false;
496 }
497 else
498 {
499 dialog.imageBgAdv.enabled = true;
500 dialog.imageBgAdv.sprite = Resources.Load<Sprite>("Media/Graphics/Image/Drama/" + p2);
501 }
502 });
503 break;
504 case "glitch":
505 AddEvent(delegate
506 {
507 DramaActor.useGlitch = true;
508 });
509 break;
510 case "setDialog":
511 AddEvent(delegate
512 {
513 SetDialog(p2.IsEmpty("Default"));
514 });
515 break;
516 case "Playlist":
517 AddEvent(delegate
518 {
519 LayerDrama.haltPlaylist = false;
520 EMono.Sound.StopBGM();
521 EMono.Sound.currentBGM = null;
522 bgmChanged = true;
523 });
524 break;
525 case "editPlaylist":
526 AddEvent(delegate
527 {
528 List<int> list = new List<int>();
529 string[] array2 = p;
530 foreach (string s in array2)
531 {
532 list.Add(int.Parse(s));
533 }
534 EMono._zone.SetBGM(list);
535 });
536 break;
537 case "BGM":
538 AddEvent(delegate
539 {
540 LayerDrama.haltPlaylist = true;
541 LayerDrama.maxBGMVolume = true;
542 EMono.Sound.PlayBGM(EMono.core.refs.dictBGM[p2.ToInt()]);
543 bgmChanged = true;
544 });
545 break;
546 case "BGMStay":
547 AddEvent(delegate
548 {
549 EMono.Sound.PlayBGM(EMono.core.refs.dictBGM[p2.ToInt()]);
550 });
551 break;
552 case "lastBGM":
553 AddEvent(delegate
554 {
555 EMono.Sound.StopBGM(p0f, playLastBGM: true);
556 });
557 break;
558 case "stopBGM":
559 AddEvent(delegate
560 {
561 LayerDrama.haltPlaylist = true;
562 EMono.Sound.StopBGM(p0f);
563 EMono.Sound.currentBGM = null;
564 });
565 break;
566 case "sound":
567 AddEvent(delegate
568 {
569 if (p3 != "")
570 {
571 SoundManager.current.MuteBGMFor(float.Parse(p3, CultureInfo.InvariantCulture));
572 }
573 lastSound?.Stop();
574 lastSound = EMono.Sound.Play(p2);
575 });
576 break;
577 case "haltPlaylist":
578 LayerDrama.haltPlaylist = true;
579 break;
580 case "keepBGM":
581 LayerDrama.keepBGM = true;
582 break;
583 case "alphaInOut":
584 AddEvent(delegate
585 {
586 DOTween.Kill(cg);
587 cg.alpha = 1f;
588 cg.DOFade(0f, p0f).SetDelay(0.1f);
589 }, p0f, halt: true);
590 AddEvent(new DramaEventWait((result == 0f) ? 0.1f : result));
591 AddEvent(delegate
592 {
593 DOTween.Kill(cg);
594 cg.alpha = 0f;
595 cg.DOFade(1f, p0f).SetDelay(0.1f);
596 }, p0f);
597 break;
598 case "alphaIn":
599 AddEvent(delegate
600 {
601 DOTween.Kill(cg);
602 cg.alpha = 0f;
603 cg.DOFade(1f, p0f).SetDelay(0.1f);
604 }, p0f);
605 break;
606 case "alphaOut":
607 AddEvent(delegate
608 {
609 DOTween.Kill(cg);
610 cg.alpha = 1f;
611 cg.DOFade(0f, p0f).SetDelay(0.1f);
612 }, p0f, halt: true);
613 break;
614 case "fadeIn":
615 AddEvent(delegate
616 {
617 imageCover.color = ((p3 != null && p3 == "white") ? Color.white : Color.black);
618 cgCover.SetActive(enable: true);
619 cgCover.alpha = 1f;
620 cgCover.DOFade(0f, p0f).SetDelay(0.1f);
621 }, p0f);
622 break;
623 case "fadeOut":
624 AddEvent(delegate
625 {
626 imageCover.color = ((p3 != null && p3 == "white") ? Color.white : Color.black);
627 cgCover.SetActive(enable: true);
628 cgCover.alpha = 0f;
629 cgCover.DOFade(1f, p0f).SetDelay(0.1f);
630 }, p0f, halt: true);
631 break;
632 case "fadeInOut":
633 AddEvent(delegate
634 {
635 imageCover.color = ((p4 != null && p4 == "white") ? Color.white : Color.black);
636 cgCover.SetActive(enable: true);
637 cgCover.alpha = 0f;
638 cgCover.DOFade(1f, p0f).SetDelay(0.1f);
639 }, p0f, halt: true);
640 AddEvent(new DramaEventWait((result == 0f) ? 0.1f : result));
641 AddEvent(delegate
642 {
643 imageCover.color = ((p4 != null && p4 == "white") ? Color.white : Color.black);
644 cgCover.SetActive(enable: true);
645 cgCover.alpha = 1f;
646 cgCover.DOFade(0f, p0f).SetDelay(0.1f);
647 }, p0f);
648 break;
649 case "hideUI":
650 AddEvent(delegate
651 {
652 EMono.ui.Hide(p0f);
653 });
654 break;
655 case "hideDialog":
656 AddEvent(delegate
657 {
658 dialog.SetActive(enable: false);
659 });
660 break;
661 case "fadeEnd":
662 if (p0f == 0f)
663 {
664 p0f = 1f;
665 }
666 AddEvent(delegate
667 {
668 imageCover.color = Color.black;
669 cgCover.SetActive(enable: true);
670 cgCover.alpha = 0f;
671 cgCover.DOFade(1f, p0f).SetDelay(0.1f);
672 }, p0f, halt: true);
673 AddEvent(delegate
674 {
675 dialog.SetActive(enable: false);
676 imageBG.enabled = false;
677 });
678 AddEvent(delegate
679 {
680 DOTween.Kill(cg);
681 cg.alpha = 1f;
682 cg.DOFade(0f, p0f).SetDelay(0.1f);
683 }, p0f, halt: true);
684 break;
685 case "endroll":
687 break;
688 case "showSkip":
689 goSkip.SetActive(value: true);
690 break;
691 case "canCancel":
692 AddEvent(delegate
693 {
694 sequence.canCancel = bool.Parse(p2);
695 });
696 break;
697 case "wait":
698 AddEvent(new DramaEventWait(p0f));
699 break;
700 case "end":
702 break;
703 case "modAffinity":
704 AddEvent(delegate
705 {
706 int num = int.Parse(p2);
707 if (EMono.debug.enable)
708 {
709 num *= 10;
710 }
712 });
713 break;
714 case "acceptQuest":
716 {
717 break;
718 }
719 AddEvent(delegate
720 {
721 Quest quest = EMono.game.quests.globalList.Where((Quest a) => a.source.id == p2).First();
722 EMono.game.quests.globalList.Remove(quest);
723 EMono.game.quests.Start(quest);
724 });
725 break;
726 case "startQuest":
727 AddEvent(delegate
728 {
729 Quest quest2 = Quest.Create(p2);
730 if (!quest2.HasDLC)
731 {
732 Msg.Say("(Failed DLC check)");
733 }
734 else
735 {
736 EMono.game.quests.Start(quest2);
737 LayerDrama.currentQuest = quest2;
738 if (tg != null && tg.chara != null)
739 {
740 Debug.Log("Starting Quest:" + quest2?.ToString() + "/" + tg.chara.quest?.ToString() + "/" + (quest2 == tg.chara.quest));
741 }
742 }
743 });
744 break;
745 case "setQuestClient":
746 AddEvent(delegate
747 {
748 if (LayerDrama.currentQuest != null)
749 {
750 LayerDrama.currentQuest.SetClient(tg.chara, assignQuest: false);
751 }
752 });
753 break;
754 case "updateJournal":
755 AddEvent(delegate
756 {
758 });
759 break;
760 case "addKeyItem":
761 if (!LayerDrama.fromBook)
762 {
763 AddEvent(delegate
764 {
765 int num2 = p3.ToInt();
766 EMono.player.ModKeyItem(p2, (num2 == 0) ? 1 : num2);
767 });
768 }
769 break;
770 case "drop":
771 if (!LayerDrama.fromBook)
772 {
773 AddEvent(delegate
774 {
775 Msg.Say("dropReward");
777 Thing t = ThingGen.Create(p2);
779 });
780 }
781 break;
782 case "completeQuest":
783 if (!LayerDrama.fromBook)
784 {
785 AddEvent(delegate
786 {
789 });
790 }
791 break;
792 case "nextPhase":
793 if (!LayerDrama.fromBook)
794 {
795 AddEvent(delegate
796 {
797 EMono.game.quests.Get(p2).NextPhase();
798 });
799 }
800 break;
801 case "changePhase":
802 if (!LayerDrama.fromBook)
803 {
804 AddEvent(delegate
805 {
806 EMono.game.quests.Get(p2).ChangePhase(p3.ToInt());
807 });
808 }
809 break;
810 case "addResource":
811 AddEvent(delegate
812 {
813 EMono.BranchOrHomeBranch.resources.Get(p2).Mod(p3.ToInt());
814 });
815 break;
816 case "getAchievement":
817 AddEvent(delegate
818 {
819 if (new string[2] { "ONEV", "NERUN2" }.Contains(p2))
820 {
821 Steam.GetAchievement(p2.ToEnum<ID_Achievement>());
822 }
823 });
824 break;
825 case "bossText":
826 AddEvent(delegate
827 {
828 foreach (Chara chara3 in EMono._map.charas)
829 {
830 if (chara3.bossText)
831 {
832 chara3.renderer.ShowBossText();
833 }
834 }
835 });
836 break;
837 case "shake":
838 AddEvent(delegate
839 {
841 });
842 break;
843 case "tutorial":
845 {
846 Tutorial.Play(p2);
847 });
848 break;
849 case "slap":
850 AddEvent(delegate
851 {
853 {
855 });
856 });
857 break;
858 case "removeItem":
859 AddEvent(delegate
860 {
861 Thing thing = EMono.pc.things.Find(p2);
862 int num3 = p3.ToInt();
863 thing?.ModNum((num3 == 0) ? (-1) : (-num3));
864 });
865 break;
866 case "destroyItem":
867 AddEvent(delegate
868 {
869 EMono.pc.things.Find(p2).Destroy();
870 });
871 break;
872 case "focus":
873 AddEvent(delegate
874 {
876 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
877 {
878 pos = pos
879 };
880 });
881 break;
882 case "focusChara":
883 AddEvent(delegate
884 {
885 Point pos2 = EMono._map.FindChara(p2).pos.Copy();
887 {
888 pos = pos2,
889 speed = p3.IsEmpty("2").ToFloat()
890 };
891 });
892 break;
893 case "focusPC":
894 AddEvent(delegate
895 {
896 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
897 {
898 player = true,
899 speed = p2.IsEmpty("2").ToFloat()
900 };
901 });
902 break;
903 case "focusPos":
904 AddEvent(delegate
905 {
906 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
907 {
908 pos = new Point(p2.ToInt(), p3.ToInt()),
909 speed = p4.IsEmpty("2").ToFloat()
910 };
911 });
912 break;
913 case "unfocus":
914 AddEvent(delegate
915 {
916 EMono.scene.screenElin.focusOption = null;
917 });
918 break;
919 case "setAlwaysVisible":
920 AddEvent(delegate
921 {
922 LayerDrama.alwaysVisible = EMono._map.FindChara(p2);
923 });
924 break;
925 case "effect":
926 AddEvent(delegate
927 {
928 Point from = new Point(p[1].ToInt(), p[2].ToInt());
929 Effect.Get(p2).Play(from);
930 });
931 break;
932 case "effectEmbarkIn":
933 AddEvent(delegate
934 {
936 Util.Instantiate("UI/Layer/LayerEmbark/EmbarkActor_crystal");
937 });
938 break;
939 case "effectEmbarkOut":
940 AddEvent(delegate
941 {
942 UnityEngine.Object.FindObjectOfType<EmbarkActor>().Hide();
943 });
944 break;
945 case "propEnter":
946 AddEvent(delegate
947 {
948 DramaProp component = Util.Instantiate("Media/Drama/Prop/" + p2).GetComponent<DramaProp>();
949 component.name = p2;
950 if (p3.IsEmpty())
951 {
952 component.transform.position = EMono.scene.cam.transform.position;
953 }
954 else
955 {
956 Point point = new Point(p[1].ToInt(), p[2].ToInt());
957 component.transform.position = point.PositionCenter();
958 }
959 component.Enter();
960 });
961 break;
962 case "propLeave":
963 AddEvent(delegate
964 {
965 GameObject.Find(p2).GetComponent<DramaProp>().Leave();
966 });
967 break;
968 case "destroy":
969 AddEvent(delegate
970 {
971 Chara chara2 = EMono._map.FindChara(p2);
972 if (chara2 != null)
973 {
974 chara2.Destroy();
975 }
976 else
977 {
978 Debug.Log("Drama.destroy chara not found:" + p2);
979 }
980 });
981 break;
982 case "bout_win":
983 case "bout_lose":
984 AddEvent(delegate
985 {
987 {
989 if (action == "bout_win")
990 {
992 {
993 target = tg.chara
994 });
995 }
996 EMono.pc.MoveZone(zone);
997 });
998 });
999 break;
1000 case "moveZone":
1001 AddEvent(delegate
1002 {
1004 });
1005 break;
1006 case "save":
1007 AddEvent(delegate
1008 {
1009 EMono.game.Save(isAutoSave: false, silent: true);
1010 });
1011 break;
1012 case "setHour":
1013 AddEvent(delegate
1014 {
1015 EMono.world.date.hour = (int)p0f;
1016 EMono.world.date.min = 0;
1020 });
1021 break;
1022 case "%worship":
1023 AddEvent(delegate
1024 {
1026 Tutorial.Reserve("faith");
1027 });
1028 break;
1029 case "replace":
1030 AddEvent(delegate
1031 {
1032 textReplace = text;
1033 });
1034 break;
1035 default:
1036 {
1038 {
1039 dm = this,
1040 line = item
1041 };
1042 elinDramaParseActionEventArgs.SetData(action);
1043 BaseModManager.PublishEvent("elin.drama.parse_action", elinDramaParseActionEventArgs);
1044 if (elinDramaParseActionEventArgs.IsUsed)
1045 {
1046 return;
1047 }
1048 if (!flag)
1049 {
1050 break;
1051 }
1052 lastTalk = AddEvent(new DramaEventTalk(actor, delegate
1053 {
1054 if (!textReplace.IsEmpty())
1055 {
1056 text = textReplace;
1057 textReplace = null;
1058 }
1059 if (tg != null && (actor == "tg" || actor.IsEmpty()))
1060 {
1061 text = (enableTone ? tg.ApplyTone(text) : text);
1062 }
1063 return text;
1064 })) as DramaEventTalk;
1065 lastTalk.center = p2 == "center";
1066 break;
1067 }
1068 case "new":
1069 case "saveBGM":
1070 case "checkAffinity":
1071 break;
1072 }
ID_Achievement
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
FocusOption focusOption
static void PublishEvent(string eventId, object data=null)
static void SetNormalRarity(bool fixedMat=false)
Chara Find(string id)
Definition: CardManager.cs:20
GlobalCharaList globalCharas
Definition: CardManager.cs:46
void RecalculateFOV()
Definition: Card.cs:6591
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:7079
Point pos
Definition: Card.cs:60
void Destroy()
Definition: Card.cs:5164
void ModNum(int a, bool notify=true)
Definition: Card.cs:3597
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:8114
void Slap(Chara c, bool slapToDeath=false)
Definition: Chara.cs:6422
Zone currentZone
Definition: Chara.cs:257
void MoveZone(string alias)
Definition: Chara.cs:3378
bool enable
Definition: CoreDebug.cs:286
Dictionary< int, BGMData > dictBGM
Definition: CoreRef.cs:385
CoreRef refs
Definition: Core.cs:51
void AddChoice(DramaChoice choice)
DramaOutcome outcome
Definition: DramaManager.cs:29
string lastIF2
Definition: DramaManager.cs:59
string textReplace
Definition: DramaManager.cs:75
CanvasGroup cg
Definition: DramaManager.cs:15
CanvasGroup cgCover
Definition: DramaManager.cs:17
DialogDrama dialog
Definition: DramaManager.cs:31
DramaSequence Load()
bool CheckIF(string IF)
void SetDialog(string id="Default")
SoundSource lastSound
Definition: DramaManager.cs:61
List< DramaChoice > _choices
Definition: DramaManager.cs:49
string lastIF
Definition: DramaManager.cs:57
GameObject goSkip
Definition: DramaManager.cs:35
void Enter()
Definition: DramaProp.cs:11
List< DramaEvent > events
void Play(string id)
void AddStep(string id)
Person person
Definition: DramaSetup.cs:19
static Core core
Definition: EMono.cs:5
static Zone _zone
Definition: EMono.cs:19
static FactionBranch BranchOrHomeBranch
Definition: EMono.cs:23
static Scene scene
Definition: EMono.cs:27
static UI ui
Definition: EMono.cs:15
static SoundManager Sound
Definition: EMono.cs:39
static CoreDebug debug
Definition: EMono.cs:45
virtual void SetData(T newData)
Definition: EVENT.cs:11
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:85
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:100
HomeResourceManager resources
bool Save(bool isAutoSave=false, bool silent=false)
Definition: Game.cs:1040
SpatialManager spatials
Definition: Game.cs:153
CardManager cards
Definition: Game.cs:156
BaseHomeResource Get(string id)
static LayerDrama Instance
Definition: LayerDrama.cs:20
static Quest currentQuest
Definition: LayerDrama.cs:6
static Religion currentReligion
Definition: LayerDrama.cs:8
static Action refAction2
Definition: LayerDrama.cs:26
static Action refAction1
Definition: LayerDrama.cs:24
void ShowScreenLock(string id)
Definition: Layer.cs:207
Layer SetOnKill(Action action)
Definition: Layer.cs:579
List< Chara > charas
Definition: Map.cs:81
void RevealAll(bool reveal=true)
Definition: Map.cs:905
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
void SetChara(Chara c)
Definition: Person.cs:88
void ModKeyItem(string alias, int num=1, bool msg=true)
Definition: Player.cs:2196
void MoveZone(Zone z)
Definition: Player.cs:2089
Definition: Point.cs:9
Point Copy()
Definition: Point.cs:491
void Complete(Quest q)
Definition: QuestManager.cs:98
void UpdateJournal()
Quest Start(string id, string idGlobalChara)
Definition: QuestManager.cs:41
List< Quest > globalList
Definition: QuestManager.cs:14
virtual bool HasDLC
Definition: Quest.cs:147
static Quest Create(string _id, string _idPerson=null, Chara c=null, bool assignQuest=true)
Definition: Quest.cs:241
virtual SourceQuest.Row source
Definition: Quest.cs:107
void JoinFaith(Chara c, ConvertType type=ConvertType.Default)
Definition: Religion.cs:407
GameScreen screenElin
Definition: Scene.cs:93
void OnChangeHour()
Definition: Scene.cs:779
Definition: Shaker.cs:5
static void ShakeCam(string id="default", float magnitude=1f)
Definition: Shaker.cs:25
Zone Find(string id)
static void GetAchievement(ID_Achievement id)
Definition: Steam.cs:51
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
static void Reserve(string idStep, Action onBeforePlay=null)
Definition: Tutorial.cs:55
static void Play(string idStep)
Definition: Tutorial.cs:7
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67
void AddPreEnter(ZonePreEnterEvent e, bool executeIfActiveZone=true)
Definition: Zone.cs:12
ZoneEventManager events
Definition: Zone.cs:40
void SetBGM(List< int > ids, bool refresh=true, float fadeDuration=0f)
Definition: Zone.cs:3023
ZoneInstance instance
Definition: Zone.cs:55
Card AddCard(Card t, Point point)
Definition: Zone.cs:2014

References _choices, EMono._map, EMono._zone, DramaSequence.AddActor(), Zone.AddCard(), DramaEventTalk.AddChoice(), AddCustomEvents(), AddEvent(), DramaSequence.AddStep(), bgmChanged, EMono.BranchOrHomeBranch, Game.cards, cg, cgCover, Person.chara, Map.charas, CheckIF(), Color, QuestManager.Complete(), EMono.core, countLine, Quest.Create(), ThingGen.Create(), LayerDrama.currentQuest, LayerDrama.currentReligion, customTalkTopics, EMono.debug, dialog, CoreRef.dictBGM, dictLocalize, CoreDebug.enable, enableTone, DramaSequence.events, CardManager.GlobalCharaList.Find(), Map.FindChara(), LayerDrama.fromBook, EMono.game, HomeResourceManager.Get(), QuestManager.Get(), Steam.GetAchievement(), Card.GetTalkText(), CardManager.globalCharas, QuestManager.globalList, goSkip, Person.hasChara, Quest.HasDLC, idDefault, idDefaultPassed, Lang.isBuiltin, item, Lang.langCode, lastIF, lastIF2, lastSound, lastTalk, layer, Load(), Chara.ModAffinity(), Player.ModKeyItem(), outcome, EMono.pc, DramaSequence.Play(), EMono.player, Card.pos, Game.quests, LayerDrama.refAction1, LayerDrama.refAction2, Core.refs, FactionBranch.resources, Msg.Say(), sequence, Zone.SetBGM(), Person.SetChara(), SetDialog(), CardBlueprint.SetNormalRarity(), Layer.ShowScreenLock(), EMono.Sound, Quest.source, QuestManager.Start(), DramaSequence.steps, tg, EMono.ui, QuestManager.UpdateJournal(), and Util.

Referenced by Load().

◆ Play()

DramaSequence DramaManager.Play ( DramaSetup  setup)
inline

Definition at line 91 of file DramaManager.cs.

92 {
93 this.setup = setup;
94 cgCover.SetActive(enable: false);
95 endroll.SetActive(enable: false);
96 tg = setup.person;
97 SetDialog();
99 {
100 setup = setup,
101 manager = this,
102 id = setup.sheet
103 };
104 Load();
105 sequence.lastStep = (sequence.lastlastStep = setup.step);
106 if (!setup.forceJump.IsEmpty())
107 {
109 }
110 else
111 {
112 sequence.Play();
113 }
114 return sequence;
115 }
Transform endroll
Definition: DramaManager.cs:23
string forceJump
Definition: DramaSetup.cs:13

References cgCover, endroll, DramaSetup.forceJump, Load(), DramaSetup.person, DramaSequence.Play(), sequence, SetDialog(), setup, DramaSetup.step, and tg.

Referenced by LayerDrama.Activate(), and LayerDrama.ActivateNerun().

◆ SetDialog()

void DramaManager.SetDialog ( string  id = "Default")
inline

Definition at line 1107 of file DramaManager.cs.

1113 {
1114 DialogDrama[] componentsInChildren = GetComponentsInChildren<DialogDrama>(includeInactive: true);
1115 foreach (DialogDrama dialogDrama in componentsInChildren)
1116 {
1117 if ((bool)dialogDrama.portrait)
1118 {
1119 dialogDrama.portrait.imageFull.SetActive(enable: false);
1120 }
1121 dialogDrama.SetActive(enable: false);
1122 if (dialogDrama.name == "Dialog" + id)
Portrait portrait
Definition: DialogDrama.cs:41
Image imageFull
Definition: Portrait.cs:30

Referenced by ParseLine(), and Play().

◆ Show()

void DramaManager.Show ( )
inline

Definition at line 1328 of file DramaManager.cs.

1334 {

◆ Update()

void DramaManager.Update ( )
inlineprivate

Definition at line 83 of file DramaManager.cs.

84 {
85 if (sequence != null)
86 {
88 }
89 }

References DramaSequence.OnUpdate(), and sequence.

Member Data Documentation

◆ _choices

List<DramaChoice> DramaManager._choices = new List<DramaChoice>()

Definition at line 49 of file DramaManager.cs.

Referenced by DramaCustomSequence.Choice2(), and ParseLine().

◆ actorPos

Transform DramaManager.actorPos

Definition at line 21 of file DramaManager.cs.

Referenced by DramaSequence.AddActor(), and Load().

◆ bgmChanged

bool DramaManager.bgmChanged

Definition at line 45 of file DramaManager.cs.

Referenced by ParseLine().

◆ cg

CanvasGroup DramaManager.cg

Definition at line 15 of file DramaManager.cs.

Referenced by ParseLine().

◆ cgCover

CanvasGroup DramaManager.cgCover

Definition at line 17 of file DramaManager.cs.

Referenced by ParseLine(), and Play().

◆ countLine

int DramaManager.countLine

Definition at line 71 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ creditSpeed

float DramaManager.creditSpeed

Definition at line 55 of file DramaManager.cs.

◆ customEvents

List<DramaEvent> DramaManager.customEvents = new List<DramaEvent>()
private

Definition at line 47 of file DramaManager.cs.

Referenced by AddCustomEvents(), and Load().

◆ customEventsAdded

bool DramaManager.customEventsAdded

Definition at line 67 of file DramaManager.cs.

Referenced by AddCustomEvents(), and Load().

◆ customTalkTopics

Dictionary<string, string> DramaManager.customTalkTopics = new Dictionary<string, string>()

Definition at line 51 of file DramaManager.cs.

Referenced by DramaCustomSequence.GetText(), Load(), and ParseLine().

◆ dialog

DialogDrama DramaManager.dialog

Definition at line 31 of file DramaManager.cs.

Referenced by ParseLine().

◆ dictCache

Dictionary<string, ExcelData> DramaManager.dictCache = new Dictionary<string, ExcelData>()
static

Definition at line 77 of file DramaManager.cs.

Referenced by Load().

◆ dictLocalize

Dictionary<string, string> DramaManager.dictLocalize = new Dictionary<string, string>()

Definition at line 53 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ enableTone

bool DramaManager.enableTone

Definition at line 65 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ endroll

Transform DramaManager.endroll

Definition at line 23 of file DramaManager.cs.

Referenced by DramaEventEndRoll.Play(), and Play().

◆ fonts

Font [] DramaManager.fonts

Definition at line 41 of file DramaManager.cs.

◆ goSkip

GameObject DramaManager.goSkip

Definition at line 35 of file DramaManager.cs.

Referenced by ParseLine().

◆ idDefault

string DramaManager.idDefault
private

Definition at line 73 of file DramaManager.cs.

Referenced by AddCustomEvents(), Load(), and ParseLine().

◆ idDefaultPassed

bool DramaManager.idDefaultPassed

Definition at line 69 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ imageBG

Image DramaManager.imageBG

Definition at line 37 of file DramaManager.cs.

◆ imageCover

Image DramaManager.imageCover

Definition at line 39 of file DramaManager.cs.

◆ lastIF

string DramaManager.lastIF
private

Definition at line 57 of file DramaManager.cs.

Referenced by ParseLine().

◆ lastIF2

string DramaManager.lastIF2
private

Definition at line 59 of file DramaManager.cs.

Referenced by ParseLine().

◆ lastSound

SoundSource DramaManager.lastSound
private

Definition at line 61 of file DramaManager.cs.

Referenced by ParseLine().

◆ lastTalk

◆ layer

LayerDrama DramaManager.layer

Definition at line 13 of file DramaManager.cs.

Referenced by ParseLine().

◆ listCredit

UIDynamicList DramaManager.listCredit

Definition at line 19 of file DramaManager.cs.

◆ moldActor

DramaActor DramaManager.moldActor

Definition at line 25 of file DramaManager.cs.

Referenced by DramaSequence.AddActor(), and Load().

◆ outcome

DramaOutcome DramaManager.outcome

Definition at line 29 of file DramaManager.cs.

Referenced by ParseLine().

◆ sequence

DramaSequence DramaManager.sequence

Definition at line 27 of file DramaManager.cs.

Referenced by AddCustomEvents(), LayerDrama.LateUpdate(), Load(), ParseLine(), Play(), and Update().

◆ setup

DramaSetup DramaManager.setup

Definition at line 33 of file DramaManager.cs.

Referenced by AddCustomEvents(), Load(), and Play().

◆ textReplace

string DramaManager.textReplace
private

Definition at line 75 of file DramaManager.cs.

◆ TG

Chara DramaManager.TG
static

Definition at line 11 of file DramaManager.cs.

Referenced by AddCustomEvents(), and GameLang.ConvertDrama().

◆ tg

Person DramaManager.tg

Property Documentation

◆ keepAmbientBGM

bool DramaManager.keepAmbientBGM
get

Definition at line 79 of file DramaManager.cs.

Referenced by ActorEx.GetVolume().

◆ tgActor

DramaActor DramaManager.tgActor
get

Definition at line 81 of file DramaManager.cs.


The documentation for this class was generated from the following file: