Elin Decompiled Documentation EA 23.320 Nyaightly Patch 1
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)
 
Chara GetChara (string id)
 
Person GetPerson (string id)
 
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
 
string path
 
DramaEventTalk lastTalk
 
bool enableTone
 
bool customEventsAdded
 
bool idDefaultPassed
 
int countLine
 

Static Public Attributes

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

Properties

bool keepAmbientBGM [get]
 
EScriptSubmission Scripting [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 10 of file DramaManager.cs.

Member Function Documentation

◆ AddCustomEvents()

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

Definition at line 230 of file DramaManager.cs.

231 {
233 {
234 return;
235 }
236 DramaCustomSequence dramaCustomSequence = new DramaCustomSequence
237 {
238 manager = this,
240 idCustom = idCustom,
241 events = customEvents,
244 };
245 CustomEvent(delegate
246 {
247 sequence.Exit();
248 });
249 if (tg != null && tg.hasChara)
250 {
251 TG = tg.chara;
252 dramaCustomSequence.Build(tg.chara);
253 }
254 if (!sequence.setup.textData.IsEmpty())
255 {
256 dramaCustomSequence.BuildTextData();
257 }
258 foreach (DramaEvent customEvent in customEvents)
259 {
260 AddEvent(customEvent);
261 }
262 customEventsAdded = true;
263 }
DramaSequence sequence
Definition: DramaManager.cs:28
bool customEventsAdded
Definition: DramaManager.cs:71
DramaEvent CustomEvent(Action func, string step=null, float duration=0f, bool halt=false)
string idDefault
Definition: DramaManager.cs:77
List< DramaEvent > customEvents
Definition: DramaManager.cs:48
DramaEvent AddEvent(DramaEvent e)
static Chara TG
Definition: DramaManager.cs:12
DramaSetup setup
Definition: DramaManager.cs:34
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 1143 of file DramaManager.cs.

1144 {
1145 return sequence.AddEvent(e);
1146 }
DramaEvent AddEvent(DramaEvent e)

References DramaSequence.AddEvent().

◆ AddEvent() [2/3]

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

Definition at line 1148 of file DramaManager.cs.

1149 {
1150 return AddEvent(new DramaEventMethod(func, duration, halt)) as DramaEventMethod;
1151 }
1152
1153 public DramaEventMethod AddEvent(Action func, Func<string> funcJump)
1154 {

◆ AddEvent() [3/3]

DramaEvent DramaManager.AddEvent ( DramaEvent  e)
inline

Definition at line 1138 of file DramaManager.cs.

1139 {
1140 return sequence.GetActor(id);
1141 }
DramaActor GetActor(string id)

References DramaSequence.GetActor().

Referenced by AddCustomEvents(), and ParseLine().

◆ CheckIF()

bool DramaManager.CheckIF ( string  IF)
inline

Definition at line 1183 of file DramaManager.cs.

1189 {
1190 if (IF == null || IF.IsEmpty())
1191 {
1192 return true;
1193 }
1194 string[] array = IF.Split(',');
1195 switch (array[0])
1196 {
1197 case "garden_bloom":
1198 foreach (Chara member in EMono.pc.party.members)
1199 {
1200 if (member.CanBloom())
1201 {
1202 return true;
1203 }
1204 }
1205 return false;
1206 case "wedding_whoring":
1207 return false;
1208 case "duponne_mino":
1209 return EMono.pc.things.Find("minohorn") != null;
1210 case "duponne_rescued":
1212 {
1213 return EMono._map.FindChara("lurie_boss") != null;
1214 }
1215 return false;
1216 case "duponne_gone":
1218 {
1219 return EMono.pc.things.Find("duponneball") == null;
1220 }
1221 return false;
1222 case "duponne_killed":
1224 {
1226 }
1227 return false;
1228 case "survival":
1229 return EMono.game.IsSurvival;
1230 case "!survival":
1231 return !EMono.game.IsSurvival;
1232 case "fromBook":
1233 return LayerDrama.fromBook;
1234 case "nerun_nadenade":
1235 if (!EMono.game.startVersion.IsBelow(0, 23, 232))
1236 {
1237 return EMono.player.stats.death2 == 0;
1238 }
1239 return false;
1240 case "nerun_nadenade2":
1241 GameLang.refDrama1 = EMono.player.stats.death2.ToString() ?? "";
1242 return EMono.player.stats.death2 >= 100;
1243 case "!fromBook":
1244 return !LayerDrama.fromBook;
1245 case "WindRest":
1246 return EMono._zone is Zone_WindRest;
1247 case "guild_promote":
1248 return Guild.CurrentDrama.relation.exp >= Guild.CurrentDrama.relation.ExpToNext;
1249 case "guild_maxpromote":
1250 return Guild.CurrentDrama.relation.rank >= Guild.CurrentDrama.relation.MaxRank;
1251 case "scratch_check":
1252 return EMono.game.dateScratch > EMono.game.world.date.GetRaw();
1253 case "sister_money":
1254 return EMono.pc.GetCurrency() >= 10000;
1255 case "fiamaPet":
1256 if (EMono.pc.homeBranch != null)
1257 {
1258 foreach (Chara member2 in EMono.pc.homeBranch.members)
1259 {
1260 if (member2.isDead && member2.CanRevive() && member2.GetInt(100) != 0)
1261 {
1262 return true;
1263 }
1264 }
1265 }
1266 return false;
1267 case "hasMelilithCurse":
1268 return EMono.pc.HasElement(1206);
1269 case "merchant":
1270 return Guild.CurrentDrama == Guild.Merchant;
1271 case "fighter":
1272 return Guild.CurrentDrama == Guild.Fighter;
1273 case "thief":
1274 return Guild.CurrentDrama == Guild.Thief;
1275 case "mage":
1276 return Guild.CurrentDrama == Guild.Mage;
1277 case "hasDLC":
1278 return Steam.HasDLC(array[1].ToEnum<ID_DLC>());
1279 case "hasFlag":
1280 return EMono.player.dialogFlags.TryGetValue(array[1], 0) != 0;
1281 case "!hasFlag":
1282 return EMono.player.dialogFlags.TryGetValue(array[1], 0) == 0;
1283 case "!hasMiscreation":
1284 return !EMono.pc.party.HasElement(1248, excludePC: true);
1285 case "hasItem":
1286 return EMono.pc.things.Find(array[1]) != null;
1287 case "nasuDeliver":
1288 if (EMono.game.quests.GetPhase<QuestNasu>() == 2)
1289 {
1290 return EMono.pc.things.Find("backpack_holding") != null;
1291 }
1292 return false;
1293 case "isCompleted":
1294 return EMono.game.quests.IsCompleted(array[1]);
1295 case "costRecruit":
1296 if (EMono.Branch != null && EMono.Branch.IsRecruit(tg.chara))
1297 {
1298 return EMono.pc.GetCurrency("money2") >= CalcGold.Hire(tg.chara);
1299 }
1300 return true;
1301 case "costRecruitTicket":
1302 if (EMono.Branch != null && EMono.Branch.IsRecruit(tg.chara))
1303 {
1304 return EMono.pc.things.Find("ticket_resident") != null;
1305 }
1306 return false;
1307 case "letterTrial":
1309 {
1310 return EMono.pc.things.Find("letter_trial") != null;
1311 }
1312 return false;
1313 default:
1314 if (array.Length > 2)
1315 {
1316 int value;
1317 bool flag = EMono.player.dialogFlags.TryGetValue(array[1], out value);
1318 int num = 0;
1319 if (array[1].StartsWith("*"))
1320 {
1321 string text = array[1].TrimStart('*');
1322 Quest quest = EMono.game.quests.Get(text);
1323 if (text == "guild")
1324 {
1325 quest = Guild.CurrentQuest;
1326 }
1327 flag = quest != null;
1328 if (!EMono.game.quests.completedIDs.Contains(text))
1329 {
1330 value = quest?.phase ?? (-1);
1331 }
1332 else
1333 {
1334 value = 999;
1335 flag = true;
1336 }
1337 num = ((!int.TryParse(array[2], out var result)) ? ((quest != null) ? array[2].ToInt(quest.GetType()) : 0) : result);
1338 }
1339 else
1340 {
1341 num = int.Parse(array[2]);
1342 }
1343 switch (array[0])
1344 {
1345 case "=":
1346 if (!flag && num == -1)
1347 {
1348 return true;
1349 }
1350 if (flag && value == num)
1351 {
1352 return true;
1353 }
1354 break;
1355 case "!":
1356 if (!flag || value != num)
1357 {
1358 return true;
1359 }
1360 break;
1361 case ">":
1362 if (flag && value > num)
1363 {
1364 return true;
1365 }
1366 break;
1367 case ">=":
1368 if (flag && value >= num)
1369 {
1370 return true;
1371 }
1372 break;
1373 case "<":
1374 if (!flag || value < num)
1375 {
1376 return true;
1377 }
1378 break;
1379 case "<=":
1380 if (!flag || value <= num)
1381 {
1382 return true;
1383 }
1384 break;
1385 }
static int Hire(Chara c)
Definition: CalcGold.cs:8
int GetCurrency(string id="money")
Definition: Card.cs:4133
ThingContainer things
Definition: Card.cs:39
int GetInt(string id, int? defaultInt=null)
Definition: Card.cs:2551
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6304
Definition: Chara.cs:10
bool CanRevive()
Definition: Chara.cs:5301
Party party
Definition: Chara.cs:43
bool CanBloom()
Definition: Chara.cs:9030
FactionBranch homeBranch
Definition: Chara.cs:1089
bool isDead
Definition: Chara.cs:393
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:2646
bool HasElement(int ele, bool excludePC=false)
Definition: Party.cs:198
List< Chara > members
Definition: Party.cs:19
bool killedDuponne
Definition: Player.cs:592
int death2
Definition: Player.cs:108
Flags flags
Definition: Player.cs:1161
Stats stats
Definition: Player.cs:1083
Dictionary< string, int > dialogFlags
Definition: Player.cs:1107
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 1156 of file DramaManager.cs.

1156 {
1157 jumpFunc = funcJump
1158 }) as DramaEventMethod;
1159 }
1160
1161 public DramaEvent CustomEvent(Action func, string step = null, float duration = 0f, bool halt = false)
1162 {
1163 DramaEventMethod dramaEventMethod = new DramaEventMethod(func, duration, halt)
1164 {

Referenced by AddCustomEvents(), and CustomDramaExpansionHelper.InjectUniqueRumor().

◆ GetActor()

DramaActor DramaManager.GetActor ( string  id)
inline

Definition at line 1133 of file DramaManager.cs.

1134 {
1135 return GetActor(id)?.owner;
1136 }
Person owner
Definition: DramaActor.cs:12
DramaActor GetActor(string id)

◆ GetChara()

Chara DramaManager.GetChara ( string  id)
inline

Definition at line 1123 of file DramaManager.cs.

1123 {
1124 AddEvent(new DramaEventGoto(jump));
1125 }
1126 }

Referenced by if(), if_element(), if_faith(), if_fame(), if_has_item(), join_party(), move_zone(), play_screen_effect(), and pop_text().

◆ GetPerson()

Person DramaManager.GetPerson ( string  id)
inline

Definition at line 1128 of file DramaManager.cs.

1129 {
1130 return GetPerson(id)?.chara;
1131 }
Person GetPerson(string id)

◆ Hide()

void DramaManager.Hide ( )
inline

Definition at line 1395 of file DramaManager.cs.

1395 : true);
1396 layer.cg.alpha = 0f;
1397 layer.cg.DOFade(1f, 0.3f);
1398 }
LayerDrama layer
Definition: DramaManager.cs:14
CanvasGroup cg
Definition: LayerDrama.cs:30

◆ Load()

DramaSequence DramaManager.Load ( )
inline

Definition at line 129 of file DramaManager.cs.

130 {
131 sequence.Clear();
132 customEvents.Clear();
133 customTalkTopics.Clear();
134 moldActor = actorPos.CreateMold<DramaActor>();
135 if (tg != null)
136 {
137 sequence.AddActor("tg", tg);
138 }
139 sequence.AddActor("pc", new Person(EMono.pc));
140 string text = PackageIterator.GetFiles("Dialog/Drama/" + setup.book + ".xlsx").LastOrDefault()?.FullName;
141 ExcelData excelData = dictCache.TryGetValue(text);
142 if (excelData != null && excelData.IsModified())
143 {
144 excelData = null;
145 }
146 if (excelData == null)
147 {
148 excelData = new ExcelData();
149 }
150 excelData.maxEmptyRows = 10;
151 path = (excelData.path = text ?? (CorePath.DramaData + setup.book + ".xlsx"));
152 List<Dictionary<string, string>> list = excelData.BuildList(setup.sheet);
153 dictCache[excelData.path] = excelData;
154 string key = text ?? (CorePath.DramaDataLocal + setup.book + ".xlsx");
155 if (!File.Exists(key))
156 {
157 key = excelData.path;
158 }
159 ExcelData excelData2 = dictCache.TryGetValue(key);
160 if (excelData2 != excelData)
161 {
162 if (excelData2 != null && excelData2.IsModified())
163 {
164 excelData2 = null;
165 }
166 if (excelData2 == null)
167 {
168 excelData2 = new ExcelData();
169 }
170 excelData2.maxEmptyRows = 10;
171 excelData2.path = key;
172 dictCache[excelData2.path] = excelData2;
173 }
174 dictLocalize.Clear();
175 string[] array = new string[3]
176 {
177 "text_" + Lang.langCode,
178 "text",
179 "text_EN"
180 };
181 foreach (Dictionary<string, string> item in excelData2.BuildList(setup.sheet))
182 {
183 string text2 = item["id"];
184 if (text2.IsEmpty())
185 {
186 continue;
187 }
188 string value = null;
189 string[] array2 = array;
190 foreach (string key2 in array2)
191 {
192 if (item.TryGetValue(key2, out value) && !value.IsEmpty())
193 {
194 break;
195 }
196 }
197 if (value == null)
198 {
199 value = "[ID '" + text2 + "'] <empty text>";
200 }
201 if (!dictLocalize.TryAdd(text2, value))
202 {
203 string text3 = dictLocalize[text2];
204 dictLocalize[text2] = ("[DUPLICATE ID '" + text2 + "']\n").TagColor(Color.red) + text3;
205 Debug.LogWarning("#drama duplicate id '" + text2 + "' at " + path + "\n" + text3 + " -> " + value);
206 }
207 }
209 lastTalk = null;
211 countLine = 0;
212 for (int j = 0; j < list.Count; j++)
213 {
214 try
215 {
216 ParseLine(list[j]);
217 }
218 catch (Exception exception)
219 {
220 Debug.LogException(exception);
221 }
222 countLine++;
223 }
225 sequence.steps["end"] = 99999;
226 sequence.AddActor("narrator", new Person("narrator"));
227 return sequence;
228 }
Dictionary< string, string > dictLocalize
Definition: DramaManager.cs:54
static Dictionary< string, ExcelData > dictCache
Definition: DramaManager.cs:81
Transform actorPos
Definition: DramaManager.cs:22
bool idDefaultPassed
Definition: DramaManager.cs:73
void ParseLine(Dictionary< string, string > item)
void AddCustomEvents(string idCustom="Resident")
Dictionary< string, string > customTalkTopics
Definition: DramaManager.cs:52
DramaActor moldActor
Definition: DramaManager.cs:26
DramaEventTalk lastTalk
Definition: DramaManager.cs:67
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
string path
Definition: ExcelData.cs:27
Definition: Lang.cs:7
static string langCode
Definition: Lang.cs:29
Definition: Person.cs:6

References actorPos, DramaSequence.AddActor(), AddCustomEvents(), DramaSetup.book, ExcelData.BuildList(), DramaSequence.Clear(), Color, countLine, customEvents, customEventsAdded, customTalkTopics, Debug, dictCache, dictLocalize, enableTone, idDefault, idDefaultPassed, ExcelData.IsModified(), item, Lang.langCode, lastTalk, moldActor, ParseLine(), path, ExcelData.path, 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 265 of file DramaManager.cs.

266 {
267 string text2 = item.TryGetValue("step");
268 if (text2 == "//")
269 {
270 return;
271 }
272 if (text2 == idDefault)
273 {
274 idDefaultPassed = true;
275 }
276 string[] array = item.TryGetValue("action")?.Split('/');
277 string action = array.TryGet(0, returnNull: true);
278 string actor = item.GetValueOrDefault("actor", "#1");
279 string[] p = item.TryGetValue("param")?.Split(',') ?? Array.Empty<string>();
280 string p2 = ((p.Length != 0) ? p[0] : "");
281 string p3 = ((p.Length > 1) ? p[1] : "");
282 string p4 = ((p.Length > 2) ? p[2] : "");
283 float.TryParse(p2, out var p0f);
284 float.TryParse(p3, out var result);
285 string text = item.TryGetValue("text_JP");
286 bool flag = !text.IsEmpty();
287 string id = item["id"];
288 if (!id.IsEmpty())
289 {
290 text = dictLocalize.TryGetValue(id);
291 flag = !text.IsEmpty();
292 }
293 if (flag && text.StartsWith("$") && tg != null && tg.hasChara)
294 {
295 string text3 = text.Split(' ')[0];
296 text = text.Replace(text3, tg.chara.GetTalkText(text3[1..]));
297 }
298 string jump = item.TryGetValue("jump");
299 string text4 = item.TryGetValue("if");
300 string iF = item.TryGetValue("if2");
301 string cHECK = item.TryGetValue("check");
302 bool flag2 = false;
303 if (!text2.IsEmpty() && !sequence.steps.ContainsKey(text2) && action != "choice" && action != "cancel")
304 {
305 sequence.steps.Add(text2, sequence.events.Count);
306 }
307 if (text4 == "*")
308 {
309 text4 = lastIF;
310 iF = lastIF2;
311 }
312 else
313 {
314 lastIF = text4;
315 lastIF2 = iF;
316 }
317 if (!CheckIF(text4) || !CheckIF(iF))
318 {
319 if (action == "reload")
320 {
321 string id2 = "flag" + countLine;
322 sequence.AddStep(id2);
323 }
324 return;
325 }
326 if (LayerDrama.fromBook && action == "editPlaylist")
327 {
328 action = "BGM";
329 }
330 switch (action)
331 {
332 case "disableFullPortrait":
333 AddEvent(delegate
334 {
335 sequence.fullPortrait = false;
336 });
337 break;
338 case "enableTone":
339 enableTone = true;
340 break;
341 case "canSkip":
342 AddEvent(delegate
343 {
344 sequence.skipJump = p2;
345 });
346 break;
347 case "screenLock":
349 break;
350 case "haltBGM":
351 EMono.Sound.haltUpdate = true;
352 break;
353 case "forceBGM":
354 AddEvent(delegate
355 {
356 SoundManager.ForceBGM();
357 });
358 break;
359 case "setFlag":
360 AddEvent(delegate
361 {
362 if (p2.StartsWith("*"))
363 {
364 Quest quest3 = EMono.game.quests.Get(p2.TrimStart('*'));
365 quest3?.ChangePhase(p3.ToInt(quest3.GetType()));
366 }
367 else
368 {
369 EMono.player.dialogFlags[p2] = (p3.IsEmpty() ? 1 : int.Parse(p3));
370 }
371 });
372 break;
373 case "reload":
374 {
375 string __step = "flag" + countLine;
376 AddEvent(delegate
377 {
378 Load();
379 sequence.Play(jump.IsEmpty(__step));
380 }, 0.01f, halt: true);
381 sequence.AddStep(__step);
382 break;
383 }
384 case "inject":
385 {
386 DramaEventTalk dramaEventTalk = lastTalk;
387 if (idDefaultPassed)
388 {
389 AddCustomEvents(p2);
390 }
391 lastTalk = dramaEventTalk;
392 break;
393 }
394 case "topic":
395 customTalkTopics[p2] = text;
396 break;
397 case "cancel":
398 lastTalk.canCancel = true;
399 lastTalk.idCancelJump = jump;
400 break;
401 case "_choices":
402 foreach (DramaChoice choice in _choices)
403 {
404 lastTalk.AddChoice(choice);
405 }
406 break;
407 case "choice":
408 {
409 if (array.Length > 1)
410 {
411 switch (array[1])
412 {
413 case "quest":
414 text = "deQuest".lang();
415 jump = "_quest";
416 break;
417 case "depart":
418 text = "depart".lang();
419 jump = "_depart";
420 break;
421 case "rumor":
422 text = "letsTalk".lang();
423 jump = "_rumor";
424 break;
425 case "buy":
426 text = "daBuy".lang();
427 jump = "_buy";
428 break;
429 case "sell":
430 text = "daSell".lang();
431 jump = "_sell";
432 break;
433 case "give":
434 text = "daGive".lang();
435 jump = "_give";
436 break;
437 case "trade":
438 text = "daTrade".lang();
439 jump = "_trade";
440 break;
441 case "bye":
442 text = "bye".lang();
443 jump = "_bye";
444 break;
445 }
446 }
447 flag2 = true;
448 DramaChoice dramaChoice = new DramaChoice(text, jump, p2, cHECK, text4);
449 lastTalk.AddChoice(dramaChoice);
450 var (invoke, invokeP) = CustomDramaExpansion.BuildInvokeExpression(item.TryGetValue("param"));
451 if (invoke.Method != null)
452 {
453 dramaChoice.idAction = "";
454 dramaChoice.SetCondition(() => invoke.SafeInvoke(this, item, invokeP));
455 }
456 break;
457 }
458 case "addTempActor":
459 {
460 Person person = new Person(actor);
461 Chara chara = EMono.game.cards.globalCharas.Find(actor) ?? EMono._map.FindChara(actor);
462 if (chara != null)
463 {
464 person.SetChara(chara);
465 }
466 sequence.AddActor(actor, person);
467 break;
468 }
469 case "addActor":
470 {
471 if (actor == "god")
472 {
474 break;
475 }
476 DramaActor dramaActor = sequence.AddActor(actor, new Person(actor));
477 if (!text.IsEmpty())
478 {
479 dramaActor.owner.tempName = text;
480 }
481 break;
482 }
483 case "invoke":
485 {
486 break;
487 }
488 if (jump.IsEmpty())
489 {
490 AddEvent(delegate
491 {
492 typeof(DramaOutcome).GetMethod(p[0]).Invoke(outcome, null);
493 });
494 break;
495 }
496 AddEvent(delegate
497 {
498 }, () => (!(bool)typeof(DramaOutcome).GetMethod(p[0]).Invoke(outcome, null)) ? "" : jump);
499 flag2 = true;
500 break;
501 case "refAction1":
502 AddEvent(delegate
503 {
505 });
506 break;
507 case "refAction2":
508 AddEvent(delegate
509 {
511 });
512 break;
513 case "setBG":
514 AddEvent(delegate
515 {
516 if (p2.IsEmpty())
517 {
518 imageBG.enabled = false;
519 }
520 else
521 {
522 imageBG.enabled = true;
523 imageBG.sprite = Resources.Load<Sprite>("Media/Graphics/Image/Drama/" + p2) ?? ModUtil.LoadSprite(p2);
524 }
525 });
526 break;
527 case "setBG2":
528 AddEvent(delegate
529 {
530 Util.Instantiate<Transform>("Media/Graphics/Image/Drama/" + p2, layer).SetAsFirstSibling();
531 });
532 break;
533 case "setAdvBG":
534 AddEvent(delegate
535 {
536 if (p2.IsEmpty())
537 {
538 dialog.imageBgAdv.enabled = false;
539 }
540 else
541 {
542 dialog.imageBgAdv.enabled = true;
543 dialog.imageBgAdv.sprite = Resources.Load<Sprite>("Media/Graphics/Image/Drama/" + p2) ?? ModUtil.LoadSprite(p2);
544 }
545 });
546 break;
547 case "glitch":
548 AddEvent(delegate
549 {
550 DramaActor.useGlitch = true;
551 });
552 break;
553 case "setDialog":
554 AddEvent(delegate
555 {
556 SetDialog(p2.IsEmpty("Default"));
557 });
558 break;
559 case "Playlist":
560 AddEvent(delegate
561 {
562 LayerDrama.haltPlaylist = false;
563 EMono.Sound.StopBGM();
564 EMono.Sound.currentBGM = null;
565 bgmChanged = true;
566 });
567 break;
568 case "editPlaylist":
569 AddEvent(delegate
570 {
571 List<int> list = new List<int>();
572 string[] array2 = p;
573 foreach (string s in array2)
574 {
575 list.Add(int.Parse(s));
576 }
577 EMono._zone.SetBGM(list);
578 });
579 break;
580 case "BGM":
581 AddEvent(delegate
582 {
583 LayerDrama.haltPlaylist = true;
584 LayerDrama.maxBGMVolume = true;
585 EMono.Sound.PlayBGM(EMono.core.refs.dictBGM[p2.ToInt()]);
586 bgmChanged = true;
587 });
588 break;
589 case "BGMStay":
590 AddEvent(delegate
591 {
592 EMono.Sound.PlayBGM(EMono.core.refs.dictBGM[p2.ToInt()]);
593 });
594 break;
595 case "lastBGM":
596 AddEvent(delegate
597 {
598 EMono.Sound.StopBGM(p0f, playLastBGM: true);
599 });
600 break;
601 case "stopBGM":
602 AddEvent(delegate
603 {
604 LayerDrama.haltPlaylist = true;
605 EMono.Sound.StopBGM(p0f);
606 EMono.Sound.currentBGM = null;
607 });
608 break;
609 case "sound":
610 AddEvent(delegate
611 {
612 if (p3 != "")
613 {
614 SoundManager.current.MuteBGMFor(float.Parse(p3, CultureInfo.InvariantCulture));
615 }
616 lastSound?.Stop();
617 lastSound = EMono.Sound.Play(p2);
618 });
619 break;
620 case "haltPlaylist":
621 LayerDrama.haltPlaylist = true;
622 break;
623 case "keepBGM":
624 LayerDrama.keepBGM = true;
625 break;
626 case "alphaInOut":
627 AddEvent(delegate
628 {
629 DOTween.Kill(cg);
630 cg.alpha = 1f;
631 cg.DOFade(0f, p0f).SetDelay(0.1f);
632 }, p0f, halt: true);
633 AddEvent(new DramaEventWait((result == 0f) ? 0.1f : result));
634 AddEvent(delegate
635 {
636 DOTween.Kill(cg);
637 cg.alpha = 0f;
638 cg.DOFade(1f, p0f).SetDelay(0.1f);
639 }, p0f);
640 break;
641 case "alphaIn":
642 AddEvent(delegate
643 {
644 DOTween.Kill(cg);
645 cg.alpha = 0f;
646 cg.DOFade(1f, p0f).SetDelay(0.1f);
647 }, p0f);
648 break;
649 case "alphaOut":
650 AddEvent(delegate
651 {
652 DOTween.Kill(cg);
653 cg.alpha = 1f;
654 cg.DOFade(0f, p0f).SetDelay(0.1f);
655 }, p0f, halt: true);
656 break;
657 case "fadeIn":
658 AddEvent(delegate
659 {
660 imageCover.color = ((p3 != null && p3 == "white") ? Color.white : Color.black);
661 cgCover.SetActive(enable: true);
662 cgCover.alpha = 1f;
663 cgCover.DOFade(0f, p0f).SetDelay(0.1f);
664 }, p0f);
665 break;
666 case "fadeOut":
667 AddEvent(delegate
668 {
669 imageCover.color = ((p3 != null && p3 == "white") ? Color.white : Color.black);
670 cgCover.SetActive(enable: true);
671 cgCover.alpha = 0f;
672 cgCover.DOFade(1f, p0f).SetDelay(0.1f);
673 }, p0f, halt: true);
674 break;
675 case "fadeInOut":
676 AddEvent(delegate
677 {
678 imageCover.color = ((p4 != null && p4 == "white") ? Color.white : Color.black);
679 cgCover.SetActive(enable: true);
680 cgCover.alpha = 0f;
681 cgCover.DOFade(1f, p0f).SetDelay(0.1f);
682 }, p0f, halt: true);
683 AddEvent(new DramaEventWait((result == 0f) ? 0.1f : result));
684 AddEvent(delegate
685 {
686 imageCover.color = ((p4 != null && p4 == "white") ? Color.white : Color.black);
687 cgCover.SetActive(enable: true);
688 cgCover.alpha = 1f;
689 cgCover.DOFade(0f, p0f).SetDelay(0.1f);
690 }, p0f);
691 break;
692 case "hideUI":
693 AddEvent(delegate
694 {
695 EMono.ui.Hide(p0f);
696 });
697 break;
698 case "hideDialog":
699 AddEvent(delegate
700 {
701 dialog.SetActive(enable: false);
702 });
703 break;
704 case "fadeEnd":
705 if (p0f == 0f)
706 {
707 p0f = 1f;
708 }
709 AddEvent(delegate
710 {
711 imageCover.color = Color.black;
712 cgCover.SetActive(enable: true);
713 cgCover.alpha = 0f;
714 cgCover.DOFade(1f, p0f).SetDelay(0.1f);
715 }, p0f, halt: true);
716 AddEvent(delegate
717 {
718 dialog.SetActive(enable: false);
719 imageBG.enabled = false;
720 });
721 AddEvent(delegate
722 {
723 DOTween.Kill(cg);
724 cg.alpha = 1f;
725 cg.DOFade(0f, p0f).SetDelay(0.1f);
726 }, p0f, halt: true);
727 break;
728 case "endroll":
730 break;
731 case "showSkip":
732 goSkip.SetActive(value: true);
733 break;
734 case "canCancel":
735 AddEvent(delegate
736 {
737 sequence.canCancel = bool.Parse(p2);
738 });
739 break;
740 case "wait":
741 AddEvent(new DramaEventWait(p0f));
742 break;
743 case "end":
745 break;
746 case "modAffinity":
747 AddEvent(delegate
748 {
749 int num = int.Parse(p2);
750 if (EMono.debug.enable)
751 {
752 num *= 10;
753 }
755 });
756 break;
757 case "acceptQuest":
759 {
760 break;
761 }
762 AddEvent(delegate
763 {
764 Quest quest = EMono.game.quests.globalList.Where((Quest a) => a.source.id == p2).First();
765 EMono.game.quests.globalList.Remove(quest);
766 EMono.game.quests.Start(quest);
767 });
768 break;
769 case "startQuest":
770 AddEvent(delegate
771 {
772 Quest quest2 = Quest.Create(p2);
773 if (!quest2.HasDLC)
774 {
775 Msg.Say("(Failed DLC check)");
776 }
777 else
778 {
779 EMono.game.quests.Start(quest2);
780 LayerDrama.currentQuest = quest2;
781 if (tg != null && tg.chara != null)
782 {
783 Debug.Log("Starting Quest:" + quest2?.ToString() + "/" + tg.chara.quest?.ToString() + "/" + (quest2 == tg.chara.quest));
784 }
785 }
786 });
787 break;
788 case "setQuestClient":
789 AddEvent(delegate
790 {
791 if (LayerDrama.currentQuest != null)
792 {
793 LayerDrama.currentQuest.SetClient(tg.chara, assignQuest: false);
794 }
795 });
796 break;
797 case "updateJournal":
798 AddEvent(delegate
799 {
801 });
802 break;
803 case "addKeyItem":
804 if (!LayerDrama.fromBook)
805 {
806 AddEvent(delegate
807 {
808 int num2 = p3.ToInt();
809 EMono.player.ModKeyItem(p2, (num2 == 0) ? 1 : num2);
810 });
811 }
812 break;
813 case "drop":
814 if (!LayerDrama.fromBook)
815 {
816 AddEvent(delegate
817 {
818 Msg.Say("dropReward");
820 Thing t = ThingGen.Create(p2);
822 });
823 }
824 break;
825 case "completeQuest":
826 if (!LayerDrama.fromBook)
827 {
828 AddEvent(delegate
829 {
832 });
833 }
834 break;
835 case "nextPhase":
836 if (!LayerDrama.fromBook)
837 {
838 AddEvent(delegate
839 {
840 EMono.game.quests.Get(p2).NextPhase();
841 });
842 }
843 break;
844 case "changePhase":
845 if (!LayerDrama.fromBook)
846 {
847 AddEvent(delegate
848 {
849 EMono.game.quests.Get(p2).ChangePhase(p3.ToInt());
850 });
851 }
852 break;
853 case "addResource":
854 AddEvent(delegate
855 {
856 EMono.BranchOrHomeBranch.resources.Get(p2).Mod(p3.ToInt());
857 });
858 break;
859 case "getAchievement":
860 AddEvent(delegate
861 {
862 if (new string[2] { "ONEV", "NERUN2" }.Contains(p2))
863 {
864 Steam.GetAchievement(p2.ToEnum<ID_Achievement>());
865 }
866 });
867 break;
868 case "bossText":
869 AddEvent(delegate
870 {
871 foreach (Chara chara3 in EMono._map.charas)
872 {
873 if (chara3.bossText)
874 {
875 chara3.renderer.ShowBossText();
876 }
877 }
878 });
879 break;
880 case "shake":
881 AddEvent(delegate
882 {
884 });
885 break;
886 case "tutorial":
888 {
889 Tutorial.Play(p2);
890 });
891 break;
892 case "slap":
893 AddEvent(delegate
894 {
896 {
898 });
899 });
900 break;
901 case "removeItem":
902 AddEvent(delegate
903 {
904 Thing thing = EMono.pc.things.Find(p2);
905 int num3 = p3.ToInt();
906 thing?.ModNum((num3 == 0) ? (-1) : (-num3));
907 });
908 break;
909 case "destroyItem":
910 AddEvent(delegate
911 {
912 EMono.pc.things.Find(p2).Destroy();
913 });
914 break;
915 case "focus":
916 AddEvent(delegate
917 {
919 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
920 {
921 pos = pos
922 };
923 });
924 break;
925 case "focusChara":
926 AddEvent(delegate
927 {
928 Point pos2 = EMono._map.FindChara(p2).pos.Copy();
930 {
931 pos = pos2,
932 speed = p3.IsEmpty("2").ToFloat()
933 };
934 });
935 break;
936 case "focusPC":
937 AddEvent(delegate
938 {
939 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
940 {
941 player = true,
942 speed = p2.IsEmpty("2").ToFloat()
943 };
944 });
945 break;
946 case "focusPos":
947 AddEvent(delegate
948 {
949 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
950 {
951 pos = new Point(p2.ToInt(), p3.ToInt()),
952 speed = p4.IsEmpty("2").ToFloat()
953 };
954 });
955 break;
956 case "unfocus":
957 AddEvent(delegate
958 {
959 EMono.scene.screenElin.focusOption = null;
960 });
961 break;
962 case "setAlwaysVisible":
963 AddEvent(delegate
964 {
965 LayerDrama.alwaysVisible = EMono._map.FindChara(p2);
966 });
967 break;
968 case "effect":
969 AddEvent(delegate
970 {
971 Point from = new Point(p[1].ToInt(), p[2].ToInt());
972 Effect.Get(p2).Play(from);
973 });
974 break;
975 case "effectEmbarkIn":
976 AddEvent(delegate
977 {
979 Util.Instantiate("UI/Layer/LayerEmbark/EmbarkActor_crystal");
980 });
981 break;
982 case "effectEmbarkOut":
983 AddEvent(delegate
984 {
985 UnityEngine.Object.FindObjectOfType<EmbarkActor>().Hide();
986 });
987 break;
988 case "propEnter":
989 AddEvent(delegate
990 {
991 DramaProp component = Util.Instantiate("Media/Drama/Prop/" + p2).GetComponent<DramaProp>();
992 component.name = p2;
993 if (p3.IsEmpty())
994 {
995 component.transform.position = EMono.scene.cam.transform.position;
996 }
997 else
998 {
999 Point point = new Point(p[1].ToInt(), p[2].ToInt());
1000 component.transform.position = point.PositionCenter();
1001 }
1002 component.Enter();
1003 });
1004 break;
1005 case "propLeave":
1006 AddEvent(delegate
1007 {
1008 GameObject.Find(p2).GetComponent<DramaProp>().Leave();
1009 });
1010 break;
1011 case "destroy":
1012 AddEvent(delegate
1013 {
1014 Chara chara2 = EMono._map.FindChara(p2);
1015 if (chara2 != null)
1016 {
1017 chara2.Destroy();
1018 }
1019 else
1020 {
1021 Debug.Log("Drama.destroy chara not found:" + p2);
1022 }
1023 });
1024 break;
1025 case "bout_win":
1026 case "bout_lose":
1027 AddEvent(delegate
1028 {
1030 {
1032 if (action == "bout_win")
1033 {
1035 {
1036 target = tg.chara
1037 });
1038 }
1039 EMono.pc.MoveZone(zone);
1040 });
1041 });
1042 break;
1043 case "moveZone":
1044 AddEvent(delegate
1045 {
1047 });
1048 break;
1049 case "save":
1050 AddEvent(delegate
1051 {
1052 EMono.game.Save(isAutoSave: false, silent: true);
1053 });
1054 break;
1055 case "setHour":
1056 AddEvent(delegate
1057 {
1058 EMono.world.date.hour = (int)p0f;
1059 EMono.world.date.min = 0;
1063 });
1064 break;
1065 case "%worship":
1066 AddEvent(delegate
1067 {
1069 Tutorial.Reserve("faith");
1070 });
1071 break;
1072 case "replace":
1073 AddEvent(delegate
1074 {
1075 textReplace = text;
1076 });
1077 break;
1078 default:
1079 if (CustomDramaExpansion.ParseAction(action, this, item))
1080 {
1081 return;
1082 }
1083 if (!flag)
1084 {
1085 break;
1086 }
1087 lastTalk = AddEvent(new DramaEventTalk(actor, delegate
1088 {
1089 if (!textReplace.IsEmpty())
1090 {
1091 text = textReplace;
1092 textReplace = null;
1093 }
1094 if (text.StartsWith("#eval"))
1095 {
1096 string script = text[5..].Trim();
1097 if (!EScript.IsScriptingAvailable)
1098 {
1099 return ("[ID '" + id + "'] <scripting is disabled>").TagColor(Color.red);
1100 }
1101 Func<EDramaScriptState, object> func = Scripting.Compile<EDramaScriptState>(script);
1103 {
1104 dm = this,
1105 line = item
1106 };
1107 text = func(arg).TryToString("[ID '" + id + "'] <scripting returns no text>");
1108 }
1109 if (tg != null && (actor == "tg" || actor.IsEmpty()))
1110 {
1111 text = (enableTone ? tg.ApplyTone(text) : text);
1112 }
1113 return text;
1114 })) as DramaEventTalk;
1115 lastTalk.center = p2 == "center";
1116 break;
1117 case "new":
1118 case "saveBGM":
1119 case "checkAffinity":
1120 break;
1121 }
if(!match.Success)
ID_Achievement
FocusOption focusOption
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:6778
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:7267
Point pos
Definition: Card.cs:60
void Destroy()
Definition: Card.cs:5268
void ModNum(int a, bool notify=true)
Definition: Card.cs:3673
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:8235
void Slap(Chara c, bool slapToDeath=false)
Definition: Chara.cs:6510
Zone currentZone
Definition: Chara.cs:259
void MoveZone(string alias)
Definition: Chara.cs:3451
bool enable
Definition: CoreDebug.cs:301
Dictionary< int, BGMData > dictBGM
Definition: CoreRef.cs:386
CoreRef refs
Definition: Core.cs:51
DramaChoice SetCondition(Func< bool > condition)
Definition: DramaChoice.cs:62
void AddChoice(DramaChoice choice)
DramaOutcome outcome
Definition: DramaManager.cs:30
string lastIF2
Definition: DramaManager.cs:63
string textReplace
Definition: DramaManager.cs:79
CanvasGroup cg
Definition: DramaManager.cs:16
CanvasGroup cgCover
Definition: DramaManager.cs:18
DialogDrama dialog
Definition: DramaManager.cs:32
DramaSequence Load()
bool CheckIF(string IF)
void SetDialog(string id="Default")
SoundSource lastSound
Definition: DramaManager.cs:65
List< DramaChoice > _choices
Definition: DramaManager.cs:50
EScriptSubmission Scripting
Definition: DramaManager.cs:85
string lastIF
Definition: DramaManager.cs:61
GameObject goSkip
Definition: DramaManager.cs:36
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
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:80
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:918
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:2208
void MoveZone(Zone z)
Definition: Player.cs:2101
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
virtual void JoinFaith(Chara c, ConvertType type=ConvertType.Default)
Definition: Religion.cs:330
GameScreen screenElin
Definition: Scene.cs:93
void OnChangeHour()
Definition: Scene.cs:783
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:3145
ZoneInstance instance
Definition: Zone.cs:55
Card AddCard(Card t, Point point)
Definition: Zone.cs:2086

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, item, 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(), DramaChoice.SetCondition(), 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 103 of file DramaManager.cs.

104 {
105 this.setup = setup;
106 cgCover.SetActive(enable: false);
107 endroll.SetActive(enable: false);
108 tg = setup.person;
109 SetDialog();
111 {
112 setup = setup,
113 manager = this,
114 id = setup.sheet
115 };
116 Load();
117 sequence.lastStep = (sequence.lastlastStep = setup.step);
118 if (!setup.forceJump.IsEmpty())
119 {
121 }
122 else
123 {
124 sequence.Play();
125 }
126 return sequence;
127 }
Transform endroll
Definition: DramaManager.cs:24
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 1166 of file DramaManager.cs.

1172 {
1173 DialogDrama[] componentsInChildren = GetComponentsInChildren<DialogDrama>(includeInactive: true);
1174 foreach (DialogDrama dialogDrama in componentsInChildren)
1175 {
1176 if ((bool)dialogDrama.portrait)
1177 {
1178 dialogDrama.portrait.imageFull.SetActive(enable: false);
1179 }
1180 dialogDrama.SetActive(enable: false);
1181 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 1387 of file DramaManager.cs.

1393 {

◆ Update()

void DramaManager.Update ( )
inlineprivate

Definition at line 89 of file DramaManager.cs.

90 {
91 try
92 {
94 }
95 catch (Exception ex)
96 {
97 layer.Close();
98 ModUtil.LogModError("error during drama play\n" + ex.GetType().Name + ": " + ex.Message, new FileInfo(path));
99 Debug.LogException(ex);
100 }
101 }
virtual void Close()
Definition: Layer.cs:463

References Layer.Close(), Debug, layer, DramaSequence.OnUpdate(), path, and sequence.

Member Data Documentation

◆ _choices

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

◆ actorPos

Transform DramaManager.actorPos

Definition at line 22 of file DramaManager.cs.

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

◆ bgmChanged

bool DramaManager.bgmChanged

Definition at line 46 of file DramaManager.cs.

Referenced by ParseLine().

◆ cg

CanvasGroup DramaManager.cg

Definition at line 16 of file DramaManager.cs.

Referenced by ParseLine().

◆ cgCover

CanvasGroup DramaManager.cgCover

Definition at line 18 of file DramaManager.cs.

Referenced by ParseLine(), and Play().

◆ countLine

int DramaManager.countLine

Definition at line 75 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ creditSpeed

float DramaManager.creditSpeed

Definition at line 56 of file DramaManager.cs.

◆ customEvents

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

Definition at line 48 of file DramaManager.cs.

Referenced by AddCustomEvents(), and Load().

◆ customEventsAdded

bool DramaManager.customEventsAdded

Definition at line 71 of file DramaManager.cs.

Referenced by AddCustomEvents(), and Load().

◆ customTalkTopics

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

Definition at line 52 of file DramaManager.cs.

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

◆ dialog

DialogDrama DramaManager.dialog

Definition at line 32 of file DramaManager.cs.

Referenced by ParseLine().

◆ dictCache

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

Definition at line 81 of file DramaManager.cs.

Referenced by Load().

◆ dictLocalize

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

Definition at line 54 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ enableTone

bool DramaManager.enableTone

Definition at line 69 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ endroll

Transform DramaManager.endroll

Definition at line 24 of file DramaManager.cs.

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

◆ fonts

Font [] DramaManager.fonts

Definition at line 42 of file DramaManager.cs.

◆ goSkip

GameObject DramaManager.goSkip

Definition at line 36 of file DramaManager.cs.

Referenced by ParseLine().

◆ idDefault

string DramaManager.idDefault
private

Definition at line 77 of file DramaManager.cs.

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

◆ idDefaultPassed

bool DramaManager.idDefaultPassed

Definition at line 73 of file DramaManager.cs.

Referenced by Load(), and ParseLine().

◆ imageBG

Image DramaManager.imageBG

Definition at line 38 of file DramaManager.cs.

◆ imageCover

Image DramaManager.imageCover

Definition at line 40 of file DramaManager.cs.

◆ lastIF

string DramaManager.lastIF
private

Definition at line 61 of file DramaManager.cs.

Referenced by ParseLine().

◆ lastIF2

string DramaManager.lastIF2
private

Definition at line 63 of file DramaManager.cs.

Referenced by ParseLine().

◆ lastSound

SoundSource DramaManager.lastSound
private

Definition at line 65 of file DramaManager.cs.

Referenced by ParseLine().

◆ lastTalk

◆ layer

LayerDrama DramaManager.layer

Definition at line 14 of file DramaManager.cs.

Referenced by ParseLine(), and Update().

◆ listCredit

UIDynamicList DramaManager.listCredit

Definition at line 20 of file DramaManager.cs.

◆ moldActor

DramaActor DramaManager.moldActor

Definition at line 26 of file DramaManager.cs.

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

◆ outcome

DramaOutcome DramaManager.outcome

Definition at line 30 of file DramaManager.cs.

Referenced by ParseLine().

◆ path

string DramaManager.path

Definition at line 59 of file DramaManager.cs.

Referenced by Load(), DramaInvokeDetail.SafeInvoke(), and Update().

◆ sequence

◆ setup

DramaSetup DramaManager.setup

◆ textReplace

string DramaManager.textReplace
private

Definition at line 79 of file DramaManager.cs.

◆ TG

Chara DramaManager.TG
static

Definition at line 12 of file DramaManager.cs.

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

◆ tg

Property Documentation

◆ keepAmbientBGM

bool DramaManager.keepAmbientBGM
get

Definition at line 83 of file DramaManager.cs.

Referenced by ActorEx.GetVolume().

◆ Scripting

EScriptSubmission DramaManager.Scripting
get

Definition at line 85 of file DramaManager.cs.

◆ tgActor

DramaActor DramaManager.tgActor
get

Definition at line 87 of file DramaManager.cs.


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