123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Runtime.CompilerServices;
- using System.Text;
- using Kasizuki;
- using MaidStatus;
- using MaidStatus.CsvData;
- using MaidStatus.Old;
- using PlayerStatus;
- using Schedule;
- using UnityEngine;
- using wf;
- public class ScriptManager : IDisposable
- {
- public static string ReplaceCharaName(string text)
- {
- if (string.IsNullOrEmpty(text))
- {
- return text;
- }
- string[] array = new string[]
- {
- "[HF]",
- "[HF1]",
- "[HF2]",
- "[HF3]",
- "[HF4]"
- };
- string[] array2 = new string[]
- {
- "[HL]",
- "[HL1]",
- "[HL2]",
- "[HL3]",
- "[HL4]"
- };
- string[] array3 = new string[]
- {
- "[HLF]",
- "[HLF1]",
- "[HLF2]",
- "[HLF3]",
- "[HLF4]"
- };
- for (int i = 0; i < array.Length; i++)
- {
- for (int j = 0; j < 2; j++)
- {
- string text2 = (j != 0) ? "[HF]" : "[hf]";
- string text3 = (j != 0) ? array[i].ToUpper() : array[i].ToLower();
- if (0 <= text.IndexOf(text3))
- {
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i);
- if (maid != null)
- {
- if (text3 != text2)
- {
- text = text.Replace(text3, text2);
- }
- text = text.Replace(text2, (!maid.status.isFirstNameCall) ? maid.status.lastName : maid.status.firstName);
- }
- }
- text2 = ((j != 0) ? "[HL]" : "[hl]");
- text3 = ((j != 0) ? array2[i].ToUpper() : array2[i].ToLower());
- if (0 <= text.IndexOf(text3))
- {
- Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(i);
- if (maid2 != null)
- {
- if (text3 != text2)
- {
- text = text.Replace(text3, text2);
- }
- text = text.Replace(text2, maid2.status.lastName);
- }
- }
- text2 = ((j != 0) ? "[HLF]" : "[hlf]");
- text3 = ((j != 0) ? array3[i].ToUpper() : array3[i].ToLower());
- if (0 <= text.IndexOf(text3))
- {
- Maid maid3 = GameMain.Instance.CharacterMgr.GetMaid(i);
- if (maid3 != null)
- {
- if (text3 != text2)
- {
- text = text.Replace(text3, text2);
- }
- text = text.Replace(text2, maid3.status.fullNameJpStyle);
- }
- }
- }
- }
- if (0 <= text.IndexOf("[SF]"))
- {
- text = text.Replace("[SF]", GameMain.Instance.CharacterMgr.status.playerName);
- }
- if (0 <= text.IndexOf("[sf]"))
- {
- text = text.Replace("[sf]", GameMain.Instance.CharacterMgr.status.playerName);
- }
- return text;
- }
- public static string ReplaceCharaName(Maid maid, string text)
- {
- if (text == null)
- {
- return string.Empty;
- }
- if (maid == null)
- {
- maid = GameMain.Instance.CharacterMgr.GetMaid(0);
- }
- if (maid == null)
- {
- return text;
- }
- if (0 <= text.IndexOf("[HF]"))
- {
- if (maid.status.isFirstNameCall)
- {
- text = text.Replace("[HF]", maid.status.firstName);
- }
- else
- {
- text = text.Replace("[HF]", maid.status.lastName);
- }
- }
- if (0 <= text.IndexOf("[HL]"))
- {
- text = text.Replace("[HL]", maid.status.lastName);
- }
- if (0 <= text.IndexOf("[SF]"))
- {
- text = text.Replace("[SF]", GameMain.Instance.CharacterMgr.status.playerName);
- }
- return text;
- }
- public static string ReplacePersonal(Maid maid, string text)
- {
- return ScriptManager.ReplacePersonal(new Maid[]
- {
- maid
- }, text);
- }
- public static string ReplacePersonal(Maid[] maid_array, string text)
- {
- if (string.IsNullOrEmpty(text))
- {
- return string.Empty;
- }
- Maid maid = null;
- string oldValue = string.Empty;
- if (0 <= text.IndexOf("?4"))
- {
- maid = maid_array[4];
- oldValue = "?4";
- }
- else if (0 <= text.IndexOf("?3"))
- {
- maid = maid_array[3];
- oldValue = "?3";
- }
- else if (0 <= text.IndexOf("?2"))
- {
- maid = maid_array[2];
- oldValue = "?2";
- }
- else if (0 <= text.IndexOf("?1"))
- {
- maid = maid_array[1];
- oldValue = "?1";
- }
- else if (0 <= text.IndexOf("?0"))
- {
- maid = maid_array[0];
- oldValue = "?0";
- }
- else if (0 <= text.IndexOf("?"))
- {
- maid = maid_array[0];
- oldValue = "?";
- }
- if (maid == null)
- {
- return text;
- }
- if (maid.status.subCharaData == null)
- {
- text = text.Replace(oldValue, maid.status.personal.replaceText);
- }
- else
- {
- text = text.Replace(oldValue, maid.status.subCharaData.replaceText);
- }
- return text;
- }
- public void Initialize()
- {
- this.is_motion_blend = true;
- GameObject gameObject = GameObject.Find("SystemUI Root/Manager_SystemUI/MessageWindowMgr");
- NDebug.Assert(gameObject != null, "MessageWindowMgrが見つかりません");
- this.message_mgr_ = gameObject.GetComponent<MessageWindowMgr>();
- NDebug.Assert(this.message_mgr_ != null, "コンポーネント:MessageWindowMgrが見つかりません");
- this.tjs_ = TJSScript.Create(this.file_system);
- this.tjs_.AddFunction("GetMaidMPN", new TJSScript.FunctionCallBack(this.TJSFuncGetMaidMPN));
- this.tjs_.AddFunction("GetMenuFileNameFromMaidMPN", new TJSScript.FunctionCallBack(this.TJSFuncGetMenuFileNameFromMaidMPN));
- this.tjs_.AddFunction("SetMaidFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetMaidFlag));
- this.tjs_.AddFunction("SetManFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetManFlag));
- this.tjs_.AddFunction("SetTmpFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetTmpFlag));
- this.tjs_.AddFunction("GetMaidFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetMaidFlag));
- this.tjs_.AddFunction("GetManFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetManFlag));
- this.tjs_.AddFunction("GetTmpFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetTmpFlag));
- this.tjs_.AddFunction("SetSystemFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetSystemFlag));
- this.tjs_.AddFunction("GetSystemFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetSystemFlag));
- this.tjs_.AddFunction("GetMaidStatus", new TJSScript.FunctionCallBack(this.TJSFuncGetMaidStatus));
- this.tjs_.AddFunction("SetMainCharaFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetMainCharaFlag));
- this.tjs_.AddFunction("IsSeikantai", new TJSScript.FunctionCallBack(this.OldTJSFuncConIsSeikantai));
- this.tjs_.AddFunction("CreateNewMaid", new TJSScript.FunctionCallBack(this.TJSFuncCreateNewMaid));
- this.tjs_.AddFunction("PresetLoad", new TJSScript.FunctionCallBack(this.TJSFuncPresetLoad));
- this.tjs_.AddFunction("PresetLoadNPC", new TJSScript.FunctionCallBack(this.TJSFuncPresetLoadNPC));
- this.tjs_.AddFunction("AddMaidStatus", new TJSScript.FunctionCallBack(this.TJSFuncAddMaidStatus));
- this.tjs_.AddFunction("IsMaidFeature", new TJSScript.FunctionCallBack(this.TJSFuncIsMaidFeature));
- this.tjs_.AddFunction("IsMaidPropensity", new TJSScript.FunctionCallBack(this.TJSFuncIsMaidPropensity));
- this.tjs_.AddFunction("GetYotogiSkillLevel", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiSkillLevel));
- this.tjs_.AddFunction("IsYotogiSkill", new TJSScript.FunctionCallBack(this.TJSFuncIsYotogiSkill));
- this.tjs_.AddFunction("GetStockMaidCount", new TJSScript.FunctionCallBack(this.TJSFuncGetStockMaidCount));
- this.tjs_.AddFunction("SetSalonGrade", new TJSScript.FunctionCallBack(this.TJSFuncSetSalonGrade));
- this.tjs_.AddFunction("GetSalonGrade", new TJSScript.FunctionCallBack(this.TJSFuncGetSalonGrade));
- this.tjs_.AddFunction("GetClubEvaluation", new TJSScript.FunctionCallBack(this.TJSFuncGetClubEvaluation));
- this.tjs_.AddFunction("SetClubGauge", new TJSScript.FunctionCallBack(this.TJSFuncSetClubGauge));
- this.tjs_.AddFunction("GetClubGauge", new TJSScript.FunctionCallBack(this.TJSFuncGetClubGauge));
- this.tjs_.AddFunction("GetBGName", new TJSScript.FunctionCallBack(this.TJSFuncGetBGName));
- this.tjs_.AddFunction("IsItemParam", new TJSScript.FunctionCallBack(this.TJSFuncIsItemParam));
- this.tjs_.AddFunction("IsItemSlot", new TJSScript.FunctionCallBack(this.TJSFuncIsItemSlot));
- this.tjs_.AddFunction("IsMaidClass", new TJSScript.FunctionCallBack(this.OldTJSFuncIsMaidClass));
- this.tjs_.AddFunction("GetMaidClassLevel", new TJSScript.FunctionCallBack(this.OldTJSFuncGetMaidClassLevel));
- this.tjs_.AddFunction("IsJobMaid", new TJSScript.FunctionCallBack(this.TJSFuncIsJobMaid));
- this.tjs_.AddFunction("GetJobMaidLevel", new TJSScript.FunctionCallBack(this.TJSFuncGetJobMaidLevel));
- this.tjs_.AddFunction("IsYotogiClass", new TJSScript.FunctionCallBack(this.TJSFuncIsYotogiClass));
- this.tjs_.AddFunction("GetYotogiClassLevel", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiClassLevel));
- this.tjs_.AddFunction("GetNoonScuccessLevel", new TJSScript.FunctionCallBack(this.TJSFuncGetNoonScuccessLevel));
- this.tjs_.AddFunction("IsMaid", new TJSScript.FunctionCallBack(this.TJSFuncIsMaid));
- this.tjs_.AddFunction("IsOldPersonal", new TJSScript.FunctionCallBack(this.TJSFuncIsOldPersonal));
- this.tjs_.AddFunction("GetSalonLoan", new TJSScript.FunctionCallBack(this.TJSFuncConGetSalonLoan));
- this.tjs_.AddFunction("GetPhase", new TJSScript.FunctionCallBack(this.TJSFuncConGetPhase));
- this.tjs_.AddFunction("GetDay", new TJSScript.FunctionCallBack(this.TJSFuncGetDay));
- this.tjs_.AddFunction("CreateStockMaidLoopData", new TJSScript.FunctionCallBack(this.TJSFuncCreateStockMaidLoopData));
- this.tjs_.AddFunction("CreateCompetitiveShowLoopData", new TJSScript.FunctionCallBack(this.TJSFuncCreateCompetitiveShowLoopData));
- this.tjs_.AddFunction("GetCompetitiveShowLoopCount", new TJSScript.FunctionCallBack(this.TJSFuncGetCompetitiveShowLoopCount));
- this.tjs_.AddFunction("SetActiveSlotFromStockMaidLoopData", new TJSScript.FunctionCallBack(this.TJSFuncSetActiveSlotFromStockMaidLoopData));
- this.tjs_.AddFunction("SetMaidCondition", new TJSScript.FunctionCallBack(this.TJSFuncSetMaidCondition));
- this.tjs_.AddFunction("SetSeikeikenFront", new TJSScript.FunctionCallBack(this.TJSFuncSetSeikeikenFront));
- this.tjs_.AddFunction("SetSeikeikenBack", new TJSScript.FunctionCallBack(this.TJSFuncSetSeikeikenBack));
- this.tjs_.AddFunction("SetInitSeikeiken", new TJSScript.FunctionCallBack(this.TJSFuncSetInitSeikeiken));
- this.tjs_.AddFunction("SetNewItem", new TJSScript.FunctionCallBack(this.TJSFuncSetNewItem));
- this.tjs_.AddFunction("IsGameInShopItemPurchased", new TJSScript.FunctionCallBack(this.TJSFuncIsGameInShopItemPurchased));
- this.tjs_.AddFunction("SetContractType", new TJSScript.FunctionCallBack(this.TJSFuncSetContractType));
- this.tjs_.AddFunction("SetFeature", new TJSScript.FunctionCallBack(this.TJSFuncSetFeature));
- this.tjs_.AddFunction("SetPropensity", new TJSScript.FunctionCallBack(this.TJSFuncSetPropensity));
- this.tjs_.AddFunction("SetSexualParam", new TJSScript.FunctionCallBack(this.TJSFuncComSetSexualParam));
- this.tjs_.AddFunction("SetNewTrophy", new TJSScript.FunctionCallBack(this.TJSFuncSetNewTrophy));
- this.tjs_.AddFunction("CheckTrophyContractType", new TJSScript.FunctionCallBack(this.TJSFuncCheckTrophyContractType));
- this.tjs_.AddFunction("SetYotogiSelectStageName", new TJSScript.FunctionCallBack(this.TJSFuncSetYotogiSelectStageName));
- this.tjs_.AddFunction("GetYotogiSelectStageName", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiSelectStageName));
- this.tjs_.AddFunction("ClearCallStack", new TJSScript.FunctionCallBack(this.TJSFuncClearCallStack));
- this.tjs_.AddFunction("IsCommunicationChara", new TJSScript.FunctionCallBack(this.OldTJSFuncIsCommunicationChara));
- this.tjs_.AddFunction("SetCommunicationChara", new TJSScript.FunctionCallBack(this.TJSFuncSetCommunicationChara));
- this.tjs_.AddFunction("SetRandomCommuChara", new TJSScript.FunctionCallBack(this.TJSFuncSetRandomCommuChara));
- this.tjs_.AddFunction("CreateYotogiCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateYotogiCharaList));
- this.tjs_.AddFunction("CreateVipCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateVipCharaList));
- this.tjs_.AddFunction("CreateFacilityCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateFacilityCharaList));
- this.tjs_.AddFunction("IsReceptionChara", new TJSScript.FunctionCallBack(this.TJSFuncIsReceptionChara));
- this.tjs_.AddFunction("SetRandomReceptionChara", new TJSScript.FunctionCallBack(this.TJSFuncSetRandomReceptionChara));
- this.tjs_.AddFunction("IsSelectChara", new TJSScript.FunctionCallBack(this.TJSFuncIsSelectChara));
- this.tjs_.AddFunction("GetDateYear", new TJSScript.FunctionCallBack(this.TJSFuncGetDateYear));
- this.tjs_.AddFunction("GetDateMonth", new TJSScript.FunctionCallBack(this.TJSFuncGetDateMonth));
- this.tjs_.AddFunction("GetDateDay", new TJSScript.FunctionCallBack(this.TJSFuncGetDateDay));
- this.tjs_.AddFunction("UpdateMaidRanking", new TJSScript.FunctionCallBack(this.TJSFuncUpdateMaidRanking));
- this.tjs_.AddFunction("ResetMaidRanking", new TJSScript.FunctionCallBack(this.TJSFuncResetMaidRanking));
- this.tjs_.AddFunction("SetMaidRanking1st", new TJSScript.FunctionCallBack(this.TJSFuncSetMaidRanking1st));
- this.tjs_.AddFunction("IsAvailableRanking", new TJSScript.FunctionCallBack(this.TJSFuncIsAvailableRanking));
- this.tjs_.AddFunction("IsMVPEvent", new TJSScript.FunctionCallBack(this.TJSFuncIsMVPEvent));
- this.tjs_.AddFunction("IsYotogiSubCharaSelect", new TJSScript.FunctionCallBack(this.TJSFuncIsYotogiSubCharaSelect));
- this.tjs_.AddFunction("GetYotogiSkillSpecialType", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiSkillSpecialType));
- this.tjs_.AddFunction("IsSelectedYotogiSkill", new TJSScript.FunctionCallBack(this.TJSFuncIsSelectedYotogiSkill));
- this.tjs_.AddFunction("IsExistentFile", new TJSScript.FunctionCallBack(this.TJSFuncIsExistentFile));
- this.tjs_.AddFunction("IsExistentFileLegacy", new TJSScript.FunctionCallBack(this.TJSFuncIsExistentFileLegacy));
- this.tjs_.AddFunction("CheckClearVIP", new TJSScript.FunctionCallBack(this.TJSFuncCheckClearVIP));
- this.tjs_.AddFunction("IsCBLVersion", new TJSScript.FunctionCallBack(this.TJSFuncIsCBLVersion));
- this.tjs_.AddFunction("GetRentalNPCName", new TJSScript.FunctionCallBack(this.OldTJSFuncGetRentalNPCName));
- this.tjs_.AddFunction("IsMarriage", new TJSScript.FunctionCallBack(this.OldTJSFuncIsMarriage));
- this.tjs_.AddFunction("IsNewWifeFlag", new TJSScript.FunctionCallBack(this.OldTJSFuncIsNewWifeFlag));
- this.tjs_.AddFunction("IsPluginPack", new TJSScript.FunctionCallBack(this.TJSFuncIsPluginPack));
- this.tjs_.AddFunction("AddShopLineup", new TJSScript.FunctionCallBack(this.TJSFuncAddShopLineup));
- this.tjs_.AddFunction("SetEventItemFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetEventItemFlag));
- this.tjs_.AddFunction("IsEventItemFlag", new TJSScript.FunctionCallBack(this.TJSFuncIsEventItemFlag));
- this.tjs_.AddFunction("GetVRMode", new TJSScript.FunctionCallBack(this.TJSFuncGetVRMode));
- this.tjs_.AddFunction("IsVRMode", new TJSScript.FunctionCallBack(this.TJSFuncIsVRMode));
- this.tjs_.AddFunction("SetDanceData", new TJSScript.FunctionCallBack(this.TJSFuncSetDanceData));
- this.tjs_.AddFunction("GetEventAdded", new TJSScript.FunctionCallBack(this.TJSFuncGetEventAdded));
- this.tjs_.AddFunction("GetLockNTRPlayFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetLockNTRPlayFlag));
- this.tjs_.AddFunction("GetLockUserDraftMaid", new TJSScript.FunctionCallBack(this.TJSFuncGetLockUserDraftMaid));
- this.tjs_.AddFunction("IsComPlayer", new TJSScript.FunctionCallBack(this.TJSFuncIsComPlayer));
- this.tjs_.AddFunction("SetPlayerMoney", new TJSScript.FunctionCallBack(this.TJSFuncSetPlayerMoney));
- this.tjs_.AddFunction("GetPlayerMoney", new TJSScript.FunctionCallBack(this.TJSFuncGetPlayerMoney));
- this.tjs_.AddFunction("SetMaidLeader", new TJSScript.FunctionCallBack(this.TJSFuncSetMaidLeader));
- this.tjs_.AddFunction("SetMaidCostumeFacility", new TJSScript.FunctionCallBack(this.TJSFuncSetMaidCostumeFacility));
- this.tjs_.AddFunction("ResetMaidCostumeFacility", new TJSScript.FunctionCallBack(this.TJSFuncResetMaidCostumeFacility));
- this.tjs_.AddFunction("CallTitleBar", new TJSScript.FunctionCallBack(this.TJSFuncCallTitleBar));
- this.tjs_.AddFunction("SetCompatibilityMode", new TJSScript.FunctionCallBack(this.TJSFuncSetCompatibilityMode));
- this.tjs.AddFunction("IsBuildingFacility", new TJSScript.FunctionCallBack(this.TJSFuncIsBuildingFacility));
- this.tjs.AddFunction("IsBuildingFacilityUpward", new TJSScript.FunctionCallBack(this.TJSFuncIsBuildingFacilityUpward));
- this.tjs.AddFunction("CheckDanceType", new TJSScript.FunctionCallBack(this.TJSCheckDanceType));
- this.tjs.AddFunction("SetMusicRelease", new TJSScript.FunctionCallBack(this.TJSSetMusicRelease));
- this.tjs.AddFunction("GetChallengeRank", new TJSScript.FunctionCallBack(this.TJSGetChallengeRank));
- this.tjs.AddFunction("SetVsSetting", new TJSScript.FunctionCallBack(this.TJSSetVsSetting));
- this.tjs.AddFunction("NeedDanceResult", new TJSScript.FunctionCallBack(this.TJSNeedDanceResult));
- this.tjs.AddFunction("BjDayFirst", new TJSScript.FunctionCallBack(this.TJSBjDayFirst));
- this.tjs.AddFunction("CasinoShopBuy", new TJSScript.FunctionCallBack(this.TJSCasinoShopBuy));
- this.tjs.AddFunction("SetEventEndFlag", new TJSScript.FunctionCallBack(this.TJSSetEventEndFlag));
- this.tjs_.AddFunction("IsKasizukiGuest", new TJSScript.FunctionCallBack(this.TJSFuncIsKasizukiGuest));
- this.tjs_.AddFunction("GetKasizukiSelectRoomName", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiSelectRoomName));
- this.tjs_.AddFunction("GetKasizukiMaidLikability", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiMaidLikability));
- this.tjs_.AddFunction("GetKasizukiMaidLikabilityName", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiMaidLikabilityName));
- this.tjs_.AddFunction("GetKasizukiMaidWorkCount", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiMaidWorkCount));
- this.tjs_.AddFunction("GetKasizukiMaidWorkCountName", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiMaidWorkCountName));
- this.tjs_.AddFunction("GetKasizukiSystemFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiSystemFlag));
- this.tjs_.AddFunction("SetKasizukiSystemFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetKasizukiSystemFlag));
- this.tjs_.AddFunction("AddKasizukiSystemFlag", new TJSScript.FunctionCallBack(this.TJSFuncAddKasizukiSystemFlag));
- this.tjs_.AddFunction("SetKasizukiPassFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetKasizukiPassFlag));
- this.tjs_.AddFunction("GetKasizukiMaidFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiMaidFlag));
- this.tjs_.AddFunction("SetKasizukiMaidFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetKasizukiMaidFlag));
- this.tjs_.AddFunction("IsKasizukiCorrectSenarioFlag", new TJSScript.FunctionCallBack(this.TJSFuncIsKasizukiCorrectSenarioFlag));
- this.tjs_.AddFunction("IsVRKaraokeMode", new TJSScript.FunctionCallBack(this.TJSFuncIsVRKaraokeMode));
- this.tjs_.AddFunction("GetRemainingDanceTime", new TJSScript.FunctionCallBack(this.TJSFuncGetRemainingDanceTime));
- MotionKagManager motionKagManager = new MotionKagManager(this.tjs_, this);
- motionKagManager.Initialize();
- motionKagManager.SetSloatNo(0);
- this.kag_mot_dic_.Add(0, motionKagManager);
- this.adv_kag_ = new ADVKagManager(this.tjs_, this, this.message_mgr_);
- this.adv_kag_.Initialize();
- this.adv_kag_.kag.SetOnReturnFunction(new KagScript.OnReturnCallBack(this.OnReturnEvent));
- this.adv_kag_.kag.SetOnRReturnFunction(new KagScript.OnScenarioLoadCallBack(this.OnRReturnEvent));
- this.yotogi_kag_ = new YotogiKagManager(this.tjs_, this);
- this.yotogi_kag_.Initialize();
- this.tmp_kag_ = new BaseKagManager(this.tjs_, this);
- this.tmp_kag_.Initialize();
- using (AFileBase afileBase = this.file_system.FileOpen("startup.tjs"))
- {
- this.tjs_.ExecScript(afileBase);
- }
- }
- ~ScriptManager()
- {
- this.Dispose(false);
- }
- public void ClearCallStack()
- {
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
- {
- keyValuePair.Value.kag.ClearCallStack();
- }
- this.adv_kag_.kag.ClearCallStack();
- this.yotogi_kag_.kag.ClearCallStack();
- this.tmp_kag_.kag.ClearCallStack();
- }
- public void Update()
- {
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
- {
- keyValuePair.Value.Update();
- }
- this.adv_kag_.Update();
- this.yotogi_kag_.Update();
- this.tmp_kag_.Update();
- }
- public void ExecScript(string exec_str, ref TJSVariant result)
- {
- this.tjs_.ExecScript(exec_str, ref result);
- }
- public void ExecScript(string exec_str)
- {
- this.tjs_.ExecScript(exec_str);
- }
- public void ExecScriptFile(string file_name, ref TJSVariant result)
- {
- using (AFileBase afileBase = this.file_system.FileOpen(file_name))
- {
- NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
- this.tjs_.ExecScript(afileBase, ref result);
- }
- }
- public void ExecScriptFile(string file_name)
- {
- using (AFileBase afileBase = this.file_system.FileOpen(file_name))
- {
- NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
- this.tjs_.ExecScript(afileBase);
- }
- }
- public void EvalScript(string eval_str, TJSVariant result)
- {
- this.tjs_.EvalScript(eval_str, result);
- }
- public void EvalScript(string eval_str)
- {
- this.tjs_.EvalScript(eval_str);
- }
- public void EvalScriptFile(string file_name, TJSVariant result)
- {
- using (AFileBase afileBase = this.file_system.FileOpen(file_name))
- {
- NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
- this.tjs_.EvalScript(afileBase, result);
- }
- }
- public void EvalScriptFile(string file_name)
- {
- using (AFileBase afileBase = this.file_system.FileOpen(file_name))
- {
- NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
- this.tjs_.EvalScript(afileBase);
- }
- }
- public void LoadAdvScenarioScript(string file_name, string label_name = "")
- {
- this.adv_kag_.enabled = true;
- this.adv_kag_.LoadScriptFile(file_name, label_name);
- }
- public void LoadYotogiScript(string file_name, string label_name = "")
- {
- this.yotogi_kag_.enabled = true;
- this.yotogi_kag_.LoadScriptFile(file_name, string.Empty);
- this.yotogi_kag_.Exec();
- }
- public void LoadTempScript(string file_name, string label_name = "")
- {
- this.tmp_kag_.enabled = true;
- this.tmp_kag_.LoadScriptFile(file_name, label_name);
- }
- public void LoadMotionScript(int sloat, bool is_next, string file_name, string label_name = "", string maid_guid = "", string man_guid = "", bool face_fix = false, bool valid_pos = true)
- {
- if (!string.IsNullOrEmpty(maid_guid))
- {
- Maid x = null;
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
- {
- Maid maid3 = GameMain.Instance.CharacterMgr.GetMaid(i);
- if (maid3 != null && maid3.status.guid == maid_guid)
- {
- x = maid3;
- break;
- }
- }
- if (x == null)
- {
- return;
- }
- }
- if (!string.IsNullOrEmpty(man_guid))
- {
- Maid x2 = null;
- for (int j = 0; j < GameMain.Instance.CharacterMgr.GetManCount(); j++)
- {
- Maid man = GameMain.Instance.CharacterMgr.GetMan(j);
- if (man != null && man.status.guid == man_guid)
- {
- x2 = man;
- break;
- }
- }
- if (x2 == null)
- {
- return;
- }
- }
- this.is_motion_all_prop_seq = false;
- this.motion_all_prop_seq_maid = null;
- MotionKagManager motionKagManager2;
- if (!this.kag_mot_dic_.ContainsKey(sloat))
- {
- MotionKagManager motionKagManager = new MotionKagManager(this.tjs_, this);
- motionKagManager.Initialize();
- motionKagManager.SetSloatNo(sloat);
- motionKagManager.kag.SetFileSystem(this.file_system);
- this.kag_mot_dic_.Add(sloat, motionKagManager);
- motionKagManager2 = motionKagManager;
- }
- else
- {
- motionKagManager2 = this.kag_mot_dic_[sloat];
- }
- Maid mainMaid = motionKagManager2.SetMainMaid(maid_guid);
- Maid maid2 = motionKagManager2.SetMainMan(man_guid);
- if (mainMaid == null && maid2 != null)
- {
- mainMaid = maid2;
- }
- motionKagManager2.valid_pos = valid_pos;
- motionKagManager2.enabled = true;
- motionKagManager2.ExecForcWaitEvent();
- motionKagManager2.LoadScriptFile(file_name, label_name);
- motionKagManager2.SetNextMotion(is_next);
- motionKagManager2.SetFaceFix(face_fix);
- Vector3 b = Vector3.zero;
- if (mainMaid != null)
- {
- b = mainMaid.transform.position;
- }
- motionKagManager2.Exec();
- if (mainMaid != null && motionKagManager2.maidOffsetSetList.Find((Maid maid) => maid == mainMaid) != null)
- {
- Vector3 b2 = mainMaid.transform.position - b;
- Quaternion rotation = mainMaid.transform.rotation;
- for (int k = 0; k < motionKagManager2.maidOffsetSetList.Count; k++)
- {
- motionKagManager2.maidOffsetSetList[k].transform.rotation = rotation;
- motionKagManager2.maidOffsetSetList[k].transform.position -= b2;
- }
- }
- }
- public void StopMotionScript()
- {
- this.ClearForcExecWaitEvent();
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
- {
- keyValuePair.Value.ClearMotion();
- keyValuePair.Value.enabled = false;
- }
- }
- public void ClearForcExecWaitEvent()
- {
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
- {
- keyValuePair.Value.ClearForcExecWaitEvent();
- }
- }
- private void TJSFuncGetMaidMPN(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(2 == param.Length, "GetMaidMPN args count error.");
- if (result == null)
- {
- return;
- }
- TJSVariantRef.Type[] array = new TJSVariantRef.Type[]
- {
- TJSVariantRef.Type.tvtInteger,
- TJSVariantRef.Type.tvtString
- };
- for (int i = 0; i < param.Length; i++)
- {
- NDebug.Assert(param[i].type == array[i], "TJSFuncGetMaidProp args[" + i + "] type error.");
- }
- int nMaidNo = param[0].AsInteger();
- string text = param[1].AsString();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- MPN mpn = (MPN)Enum.Parse(typeof(MPN), text);
- MaidProp prop = maid.GetProp(mpn);
- NDebug.Assert(prop != null, "[" + text + "] 指定MPNが不正です。");
- if (prop.type == 3)
- {
- result.SetString(prop.name);
- }
- else
- {
- result.SetInteger(prop.value);
- }
- }
- private void TJSFuncGetMenuFileNameFromMaidMPN(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(2 == param.Length, "GetMenuFileNameFromMaidMPN args count error.");
- if (result == null)
- {
- return;
- }
- TJSVariantRef.Type[] array = new TJSVariantRef.Type[]
- {
- TJSVariantRef.Type.tvtInteger,
- TJSVariantRef.Type.tvtString
- };
- for (int i = 0; i < param.Length; i++)
- {
- NDebug.Assert(param[i].type == array[i], "TJSFuncGetMaidProp args[" + i + "] type error.");
- }
- int nMaidNo = param[0].AsInteger();
- string text = param[1].AsString();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- MPN mpn = (MPN)Enum.Parse(typeof(MPN), text);
- MaidProp prop = maid.GetProp(mpn);
- NDebug.Assert(prop != null, "[" + text + "] 指定MPNが不正です。");
- if (prop.type == 3)
- {
- result.SetString(prop.strFileName.ToLower());
- }
- else
- {
- result.SetString(string.Empty);
- }
- }
- private void TJSFuncSetMaidFlag(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(param.Length == 2 || 3 == param.Length, "SetMaidFlag args count error.");
- int nMaidNo = 0;
- string flagName = string.Empty;
- int num;
- if (param.Length == 3)
- {
- nMaidNo = param[0].AsInteger();
- flagName = param[1].AsString();
- num = param[2].AsInteger();
- }
- else
- {
- flagName = param[0].AsString();
- num = param[1].AsInteger();
- }
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- if (this.compatibilityMode || this.tjsLegacyMode)
- {
- maid.status.OldStatus.SetFlag(flagName, num);
- }
- else
- {
- maid.status.SetFlag(flagName, num);
- }
- if (result != null)
- {
- result.SetInteger(num);
- }
- }
- private void TJSFuncSetManFlag(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(param.Length == 2 || 3 == param.Length, "SetManFlag args count error.");
- string flagName = string.Empty;
- int value;
- if (param.Length == 3)
- {
- int num = param[0].AsInteger();
- flagName = param[1].AsString();
- value = param[2].AsInteger();
- }
- else
- {
- flagName = param[0].AsString();
- value = param[1].AsInteger();
- }
- if (!this.compatibilityMode)
- {
- GameMain.Instance.CharacterMgr.status.SetFlag(flagName, value);
- }
- }
- private void TJSFuncSetTmpFlag(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(2 == param.Length, "SetTmpFlag args count error.");
- string flag_name = string.Empty;
- flag_name = param[0].AsString();
- int num = param[1].AsInteger();
- GameMain.Instance.CMSystem.SetTmpGenericFlag(flag_name, num);
- if (result != null)
- {
- result.SetInteger(num);
- }
- }
- private void TJSFuncGetMaidFlag(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(param.Length == 1 || 2 == param.Length, "GetMaidFlag args count error.");
- if (result == null)
- {
- return;
- }
- int nMaidNo = 0;
- string flagName = string.Empty;
- if (param.Length == 2)
- {
- nMaidNo = param[0].AsInteger();
- flagName = param[1].AsString();
- }
- else
- {
- flagName = param[0].AsString();
- }
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- if (this.compatibilityMode || this.tjsLegacyMode)
- {
- result.SetInteger(maid.status.OldStatus.GetFlag(flagName));
- }
- else
- {
- result.SetInteger(maid.status.GetFlag(flagName));
- }
- }
- private void TJSFuncGetManFlag(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(param.Length == 1 || 2 == param.Length, "GetManFlag args count error.");
- if (result == null)
- {
- return;
- }
- string flagName = string.Empty;
- if (param.Length == 2)
- {
- int num = param[0].AsInteger();
- flagName = param[1].AsString();
- }
- else
- {
- flagName = param[0].AsString();
- }
- result.SetInteger(GameMain.Instance.CharacterMgr.status.GetFlag(flagName));
- }
- private void TJSFuncGetTmpFlag(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(1 == param.Length, "GetTmpFlag args count error.");
- if (result == null)
- {
- return;
- }
- string flag_name = param[0].AsString();
- result.SetInteger(GameMain.Instance.CMSystem.GetTmpGenericFlag(flag_name));
- }
- private void TJSFuncSetSystemFlag(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(2 == param.Length, "SetSystemFlag args count error.");
- string f_strKey = string.Empty;
- f_strKey = param[0].AsString();
- int integer = param[1].AsInteger();
- GameMain.Instance.CMSystem.SetSystemVers(f_strKey, integer.ToString());
- if (result != null)
- {
- result.SetInteger(integer);
- }
- }
- private void TJSFuncGetSystemFlag(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(1 == param.Length, "GetSystemFlag args count error.");
- if (result == null)
- {
- return;
- }
- string f_strKey = param[0].AsString();
- string text = GameMain.Instance.CMSystem.GetSystemVers(f_strKey);
- if (string.IsNullOrEmpty(text))
- {
- text = "0";
- }
- result.SetInteger(int.Parse(text));
- }
- private void TJSFuncGetMaidStatus(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "GetMaidStatus args count error.");
- if (result == null)
- {
- return;
- }
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- MaidStatus.Status status = maid.status;
- string a = tjs_param[1].AsString();
- bool flag = this.compatibilityMode || this.tjsLegacyMode;
- if (flag && a == "状態")
- {
- a = "旧関係";
- }
- if (a == "性経験")
- {
- result.SetString(EnumConvert.GetString(status.seikeiken));
- }
- else if (a == "初期性経験")
- {
- result.SetString(EnumConvert.GetString(status.initSeikeiken));
- }
- else if (a == "性格")
- {
- result.SetString(status.personal.drawName);
- }
- else if (a == "契約タイプ")
- {
- result.SetString(EnumConvert.GetString(status.contract));
- }
- else if (a == "ヒロインタイプ")
- {
- result.SetString(EnumConvert.GetString(status.heroineType));
- }
- else if (a == "サブメイドユニークネーム")
- {
- if (status.subCharaData != null)
- {
- result.SetString(status.subCharaData.uniqueName);
- }
- else
- {
- result.SetString(string.Empty);
- }
- }
- else if (a == "ジョブメイド")
- {
- result.SetString(status.selectedJobClass.data.uniqueName);
- }
- else if (a == "夜伽クラス")
- {
- if (status.selectedJobClass.data.classType == AbstractClassData.ClassType.New)
- {
- result.SetString("Debut");
- }
- else
- {
- result.SetString(status.selectedYotogiClass.data.drawName);
- }
- }
- else if (a == "関係")
- {
- result.SetString(EnumConvert.GetString(status.relation));
- }
- else if (a == "旧関係")
- {
- if (status.OldStatus != null)
- {
- result.SetString(EnumConvert.GetString(status.OldStatus.relation));
- }
- else
- {
- result.SetString(EnumConvert.GetString(status.relation));
- }
- }
- else if (a == "カップ")
- {
- result.SetString(status.body.cup);
- }
- else if (a == "苗字")
- {
- result.SetString(status.lastName);
- }
- else if (a == "名前")
- {
- result.SetString(status.firstName);
- }
- else if (a == "身長")
- {
- result.SetInteger(status.body.height);
- }
- else if (a == "夜伽プレイ回数")
- {
- result.SetInteger(status.playCountYotogi);
- }
- else if (a == "接客プレイ回数")
- {
- result.SetInteger(status.playCountNightWork);
- }
- else if (a == "興奮値")
- {
- result.SetInteger(status.currentExcite);
- }
- else if (a == "好感度")
- {
- result.SetInteger(status.likability);
- if (flag && 300 <= status.likability)
- {
- result.SetInteger(299);
- }
- }
- else if (a == "習得率")
- {
- result.SetInteger(status.studyRate);
- }
- else if (a == "接待")
- {
- result.SetInteger(status.reception);
- }
- else if (a == "お世話")
- {
- result.SetInteger(status.care);
- }
- else if (a == "可憐")
- {
- result.SetInteger(status.lovely);
- }
- else if (a == "淫欲")
- {
- result.SetInteger(status.inyoku);
- }
- else if (a == "気品")
- {
- result.SetInteger(status.elegance);
- }
- else if (a == "M性")
- {
- result.SetInteger(status.mvalue);
- }
- else if (a == "魅惑")
- {
- result.SetInteger(status.charm);
- }
- else if (a == "変態")
- {
- result.SetInteger(status.hentai);
- }
- else if (a == "奉仕")
- {
- result.SetInteger(status.housi);
- }
- else if (a == "料理")
- {
- result.SetInteger(status.cooking);
- }
- else if (a == "ボーカル")
- {
- result.SetInteger(status.vocal);
- }
- else if (a == "ダンス")
- {
- result.SetInteger(status.dance);
- }
- else if (a == "アピール")
- {
- result.SetInteger(status.appealPoint);
- }
- else if (a == "指導")
- {
- result.SetInteger(status.teachRate);
- }
- else if (a == "経験人数")
- {
- result.SetInteger(status.sexPlayNumberOfPeople);
- }
- else if (a == "昼仕事ID")
- {
- result.SetInteger(status.noonWorkId);
- }
- else if (a == "夜仕事ID")
- {
- result.SetInteger(status.nightWorkId);
- }
- else if (a == "昼仕事レベル")
- {
- if (!status.workDatas.ContainsKey(status.noonWorkId))
- {
- result.SetInteger(1);
- }
- else
- {
- result.SetInteger(status.workDatas.Get(status.noonWorkId).level);
- }
- }
- else if (a == "夜仕事レベル")
- {
- if (!status.workDatas.ContainsKey(status.nightWorkId))
- {
- result.SetInteger(1);
- }
- else
- {
- result.SetInteger(status.workDatas.Get(status.nightWorkId).level);
- }
- }
- else if (a == "夜伽クラスレベル")
- {
- result.SetInteger(status.selectedYotogiClass.level);
- }
- else if (a == "ジョブメイドレベル")
- {
- result.SetInteger(status.selectedJobClass.level);
- }
- else if (flag)
- {
- if (a == "レンタルメイド")
- {
- result.SetInteger(0);
- }
- else if (a == "雇用中")
- {
- result.SetInteger(1);
- }
- else if (a == "特殊状態")
- {
- result.SetString(EnumConvert.GetString(status.OldStatus.condition));
- }
- else if (a == "欲求不満")
- {
- result.SetInteger(status.OldStatus.frustration);
- }
- else if (a == "淫乱ギャップ値")
- {
- result.SetInteger(status.inranGap);
- }
- else if (a == "M性ギャップ値")
- {
- result.SetInteger(status.mValueGap);
- }
- else if (a == "変態ギャップ値")
- {
- result.SetInteger(status.hentaiGap);
- }
- else if (a == "メイドクラス")
- {
- if (status.selectedJobClass.data.classType == AbstractClassData.ClassType.Old)
- {
- result.SetString(status.selectedJobClass.data.drawName);
- }
- else
- {
- result.SetString("ノービスメイド");
- }
- }
- }
- }
- private void TJSFuncSetMainCharaFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "SetMainCharaFlag args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- if (maid == null)
- {
- Debug.LogError("SetMainCharaFlag error\nメイド[" + nMaidNo.ToString() + "]にはメイドはいません");
- }
- else
- {
- maid.status.mainChara = tjs_param[1].AsBool();
- }
- }
- private void OldTJSFuncConIsSeikantai(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@IsSeikantaiがよばれました");
- NDebug.Assert(2 == tjs_param.Length, "IsSeikantai args count error.");
- if (result == null)
- {
- return;
- }
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- MaidStatus.Old.Status oldStatus = maid.status.OldStatus;
- string text = tjs_param[1].AsString();
- int num = 1000;
- if (text == "口")
- {
- result.SetBool(num <= oldStatus.sexual.mouth);
- }
- else if (text == "喉")
- {
- result.SetBool(num <= oldStatus.sexual.throat);
- }
- else if (text == "乳首")
- {
- result.SetBool(num <= oldStatus.sexual.nipple);
- }
- else if (text == "前穴")
- {
- result.SetBool(num <= oldStatus.sexual.front);
- }
- else if (text == "後穴")
- {
- result.SetBool(num <= oldStatus.sexual.back);
- }
- else if (text == "クリ")
- {
- result.SetBool(num <= oldStatus.sexual.curi);
- }
- else
- {
- NDebug.Assert("IsSeikantai error.\n" + text, false);
- }
- }
- private void TJSFuncCreateNewMaid(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "CreateNewMaid args count error.");
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid maid = null;
- string text = tjs_param[0].AsString();
- if (!MaidStatus.Personal.Contains(text))
- {
- NDebug.Assert(SubMaid.Contains(text), "CreateNewMaidの指定名が間違っています[" + text + "]");
- SubMaid.Data data = SubMaid.GetData(text);
- GameMain.Instance.ScriptMgr.StopMotionScript();
- bool flag = false;
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetStockMaidCount(); i++)
- {
- Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaid(i);
- if (stockMaid != null && stockMaid.status.heroineType == HeroineType.Sub && stockMaid.status.subCharaData.id == data.id)
- {
- flag = true;
- break;
- }
- }
- if (!flag)
- {
- maid = characterMgr.AddStockMaid();
- data.ApplyStatus(maid.status, characterMgr.status.lockUserDraftMaid);
- data.ApplyPreset(maid, characterMgr.status.lockUserDraftMaid);
- }
- }
- else
- {
- NDebug.Assert(MaidStatus.Personal.IsEnabled(text), "CreateNewMaidで指定された対象名[" + text + "]は有効状態ではありません");
- MaidStatus.Personal.Data data2 = MaidStatus.Personal.GetData(text);
- GameMain.Instance.ScriptMgr.StopMotionScript();
- maid = characterMgr.AddStockMaid();
- maid.status.SetPersonal(data2);
- }
- if (maid != null)
- {
- characterMgr.SetActiveMaid(maid, 0);
- maid.Visible = true;
- maid.AllProcPropSeqStart();
- }
- }
- private void TJSFuncPresetLoad(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "PresetLoad args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- if (maid == null)
- {
- NDebug.Assert("PresetLoad\nmaid null.", false);
- return;
- }
- byte[] array = null;
- string text = tjs_param[1].AsString();
- if (text == "pre_maid_secretary")
- {
- CharacterMgr.Preset f_prest = GameMain.Instance.CharacterMgr.PresetLoadFromResources(text);
- GameMain.Instance.CharacterMgr.PresetSet(maid, f_prest);
- }
- else
- {
- if (this.file_system.IsExistentFile(text + ".preset"))
- {
- using (AFileBase afileBase = GameUty.FileOpen(text + ".preset", null))
- {
- if (afileBase != null && afileBase.IsValid())
- {
- array = afileBase.ReadAll();
- }
- }
- }
- if (array == null)
- {
- NDebug.Assert("PresetLoad\n[" + text + "] file not fund.", false);
- return;
- }
- using (BinaryReader binaryReader = new BinaryReader(new MemoryStream(array), Encoding.UTF8))
- {
- CharacterMgr.Preset f_prest2 = GameMain.Instance.CharacterMgr.PresetLoad(binaryReader, text);
- GameMain.Instance.CharacterMgr.PresetSet(maid, f_prest2);
- }
- array = null;
- }
- }
- private void TJSFuncPresetLoadNPC(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert("未実装TJS関数[PresetLoadNPC]が呼ばれました", false);
- }
- private void TJSFuncAddMaidStatus(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(3 == tjs_param.Length, "AddMaidStatus args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- MaidStatus.Status status = maid.status;
- string a = tjs_param[1].AsString();
- int num = tjs_param[2].AsInteger();
- Action<int> action = null;
- if (a == "夜伽プレイ回数")
- {
- maid.status.playCountNightWork += num;
- }
- else if (a == "接客プレイ回数")
- {
- maid.status.playCountNightWork += num;
- }
- else if (a == "好感度")
- {
- maid.status.likability += num;
- }
- else if (a == "習得率")
- {
- maid.status.studyRate += num;
- }
- else if (a == "接待")
- {
- maid.status.baseReception += num;
- }
- else if (a == "お世話")
- {
- maid.status.baseCare += num;
- }
- else if (a == "可憐")
- {
- maid.status.baseLovely += num;
- }
- else if (a == "気品")
- {
- maid.status.baseElegance += num;
- }
- else if (a == "魅惑")
- {
- maid.status.baseCharm += num;
- }
- else if (a == "淫欲")
- {
- maid.status.baseInyoku += num;
- }
- else if (a == "M性")
- {
- maid.status.baseMvalue += num;
- }
- else if (a == "変態")
- {
- maid.status.baseHentai += num;
- }
- else if (a == "奉仕")
- {
- maid.status.baseHousi += num;
- }
- else if (a == "指導")
- {
- maid.status.baseTeachRate += num;
- }
- else if (a == "経験人数")
- {
- maid.status.sexPlayNumberOfPeople += num;
- }
- if (action != null)
- {
- action(num);
- }
- }
- private void TJSFuncIsMaidFeature(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "IsMaidFeature args count error.");
- if (result == null)
- {
- return;
- }
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- MaidStatus.Status status = maid.status;
- string uniqueName = tjs_param[1].AsString();
- Feature.Data data = Feature.GetData(uniqueName);
- result.SetInteger(Convert.ToInt32(status.features.ContainsKey(data.id)));
- }
- private void TJSFuncIsMaidPropensity(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "IsMaidPropensity args count error.");
- if (result == null)
- {
- return;
- }
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- MaidStatus.Status status = maid.status;
- string uniqueName = tjs_param[1].AsString();
- Propensity.Data data = Propensity.GetData(uniqueName);
- result.SetInteger(Convert.ToInt32(status.propensitys.ContainsKey(data.id)));
- }
- private void TJSFuncGetYotogiSkillLevel(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "GetYotogiSkillLevel args count error.");
- if (result == null)
- {
- return;
- }
- int nMaidNo = tjs_param[0].AsInteger();
- int skillId = tjs_param[1].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- MaidStatus.Status status = maid.status;
- result.SetInteger(0);
- if (status.yotogiSkill.Contains(skillId))
- {
- YotogiSkillData yotogiSkillData = status.yotogiSkill.Get(skillId);
- result.SetInteger(yotogiSkillData.level);
- }
- }
- private void TJSFuncIsYotogiSkill(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "IsYotogiSkill args count error.");
- if (result == null)
- {
- return;
- }
- int nMaidNo = tjs_param[0].AsInteger();
- int skillId = tjs_param[1].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- result.SetBool(maid.status.yotogiSkill.Contains(skillId));
- }
- private void TJSFuncGetStockMaidCount(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetInteger(GameMain.Instance.CharacterMgr.GetStockMaidCount());
- }
- private void TJSFuncSetSalonGrade(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "SetSalonGrade args count error.");
- GameMain.Instance.CharacterMgr.status.clubGrade = tjs_param[0].AsInteger();
- }
- private void TJSFuncGetSalonGrade(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetInteger(GameMain.Instance.CharacterMgr.status.clubGrade);
- }
- private void TJSFuncGetClubEvaluation(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetInteger(GameMain.Instance.CharacterMgr.status.clubEvaluation);
- }
- private void TJSFuncSetClubGauge(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "SetClubGauge args count error.");
- GameMain.Instance.CharacterMgr.status.clubGauge = tjs_param[0].AsInteger();
- }
- private void TJSFuncGetClubGauge(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetInteger(GameMain.Instance.CharacterMgr.status.clubGauge);
- }
- private void TJSFuncGetBGName(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetString(GameMain.Instance.BgMgr.GetBGName());
- }
- private void TJSFuncIsItemParam(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(2 == tjs_param.Length, "IsItemParam args count error.");
- if (result == null)
- {
- return;
- }
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- string f_strTag = tjs_param[1].AsString();
- result.SetInteger(Convert.ToInt32(!string.IsNullOrEmpty(maid.body0.GetPartsParam(f_strTag))));
- }
- private void TJSFuncIsItemSlot(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(2 == tjs_param.Length, "IsItemSlot args count error.");
- if (result == null)
- {
- return;
- }
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- string text = tjs_param[1].AsString();
- TBody.SlotID f_eSlot = TBody.SlotID.wear;
- try
- {
- f_eSlot = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), text);
- }
- catch
- {
- NDebug.Assert("Parse error.[TBody.SlotID]\n" + text, false);
- }
- result.SetBool(maid.body0.GetSlotLoaded(f_eSlot));
- }
- private void OldTJSFuncIsMaidClass(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@IsMaidClassがよばれました");
- this.TJSFuncIsJobMaid(tjs_param, result);
- }
- private void TJSFuncIsJobMaid(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(tjs_param.Length == 2, "IsJobMaid args count error.");
- NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger && tjs_param[1].type == TJSVariantRef.Type.tvtString, "error.");
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
- string uniqueName = tjs_param[1].AsString();
- JobClass.Data data = JobClass.GetData(uniqueName);
- if (maid.status.jobClass.Contains(data.id))
- {
- result.SetInteger(1);
- }
- else
- {
- result.SetInteger(0);
- }
- }
- private void OldTJSFuncGetMaidClassLevel(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@GetMaidClassLevelがよばれました");
- this.TJSFuncGetJobMaidLevel(tjs_param, result);
- }
- private void TJSFuncGetJobMaidLevel(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(tjs_param.Length == 2, "GetJobMaidLevel args count error.");
- NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger && tjs_param[1].type == TJSVariantRef.Type.tvtString, "error.");
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
- string uniqueName = tjs_param[1].AsString();
- JobClass.Data data = JobClass.GetData(uniqueName);
- if (maid.status.jobClass.Contains(data.id))
- {
- result.SetInteger(maid.status.jobClass.Get(data.id).level);
- }
- else
- {
- result.SetInteger(0);
- }
- }
- private void TJSFuncIsYotogiClass(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(tjs_param.Length == 2, "IsYotogiClass args count error.");
- NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger && tjs_param[1].type == TJSVariantRef.Type.tvtString, "error.");
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
- string uniqueName = tjs_param[1].AsString();
- YotogiClass.Data data = YotogiClass.GetData(uniqueName);
- if (maid.status.yotogiClass.Contains(data.id))
- {
- result.SetInteger(1);
- }
- else
- {
- result.SetInteger(0);
- }
- }
- private void TJSFuncGetYotogiClassLevel(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(tjs_param.Length == 2, "GetYotogiClassLevel args count error.");
- NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger && tjs_param[1].type == TJSVariantRef.Type.tvtString, "error.");
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
- string uniqueName = tjs_param[1].AsString();
- YotogiClass.Data data = YotogiClass.GetData(uniqueName);
- if (maid.status.yotogiClass.Contains(data.id))
- {
- result.SetInteger(maid.status.yotogiClass.Get(data.id).level);
- }
- else
- {
- result.SetInteger(0);
- }
- }
- private void TJSFuncGetNoonScuccessLevel(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(tjs_param.Length == 1, "TJSFuncGetNoonScuccessLevel args count error.");
- NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger, "error.");
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid maid = characterMgr.GetMaid(tjs_param[0].AsInteger());
- ScheduleData[] scheduleSlot = characterMgr.status.scheduleSlot;
- int integer = -1;
- for (int i = 0; i < scheduleSlot.Length; i++)
- {
- if (scheduleSlot[i] != null)
- {
- if (scheduleSlot[i].maid_guid == maid.status.guid)
- {
- integer = (int)scheduleSlot[i].noon_success_level;
- break;
- }
- }
- }
- result.SetInteger(integer);
- }
- private void TJSFuncIsMaid(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(tjs_param.Length == 1, "IsMaid args count error.");
- NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger, "error.");
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid maid = characterMgr.GetMaid(tjs_param[0].AsInteger());
- result.SetBool(maid != null);
- }
- private void TJSFuncIsOldPersonal(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(tjs_param.Length == 1, "IsOldPersonal args count error.");
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid maid = characterMgr.GetMaid(tjs_param[0].AsInteger());
- if (maid == null)
- {
- result.SetBool(false);
- }
- else
- {
- result.SetBool(maid.status.personal.oldPersonal);
- }
- }
- public void TJSFuncConGetSalonLoan(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetInteger(0);
- }
- public void TJSFuncConGetPhase(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetInteger(2);
- }
- public void TJSFuncGetDay(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
- result.SetInteger(status.days);
- }
- public void TJSFuncCreateStockMaidLoopData(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- this.stock_maid_loop_list.Clear();
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
- {
- this.stock_maid_loop_list.Add(characterMgr.GetStockMaid(i));
- }
- List<Maid> list = this.stock_maid_loop_list;
- if (ScriptManager.<>f__mg$cache0 == null)
- {
- ScriptManager.<>f__mg$cache0 = new Comparison<Maid>(CharacterSelectManager.SortMaidStandard);
- }
- list.Sort(ScriptManager.<>f__mg$cache0);
- if (result != null)
- {
- result.SetInteger(this.stock_maid_loop_list.Count);
- }
- }
- public void TJSFuncCreateCompetitiveShowLoopData(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- this.stock_maid_loop_list.Clear();
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- if (CompetitiveShowMgr.is_effect_ones)
- {
- for (int i = 0; i < CompetitiveShowMgr.check_maid_list.Count; i++)
- {
- this.stock_maid_loop_list.Add(CompetitiveShowMgr.check_maid_list[i]);
- }
- }
- else if (0 < CompetitiveShowMgr.check_maid_list.Count)
- {
- this.stock_maid_loop_list.Add(CompetitiveShowMgr.check_maid_list[0]);
- CompetitiveShowMgr.check_maid_list.RemoveAt(0);
- }
- if (result != null)
- {
- result.SetInteger(this.stock_maid_loop_list.Count);
- }
- }
- public void TJSFuncGetCompetitiveShowLoopCount(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result != null)
- {
- result.SetInteger(CompetitiveShowMgr.check_maid_list.Count);
- }
- }
- public void TJSFuncSetActiveSlotFromStockMaidLoopData(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- GameMain.Instance.ScriptMgr.StopMotionScript();
- NDebug.Assert(tjs_param.Length == 1, "SetActiveSlotFromStockMaidLoopData args count error.");
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid maid = this.stock_maid_loop_list[tjs_param[0].AsInteger()];
- maid.Visible = false;
- characterMgr.SetActiveMaid(maid, 0);
- }
- private void TJSFuncClearCallStack(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- this.ClearCallStack();
- }
- private void OldTJSFuncIsCommunicationChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@IsCommunicationCharaeがよばれました");
- if (result == null)
- {
- return;
- }
- result.SetBool(false);
- result.SetBool(0 < ScheduleAPI.CanCommunicationMaids(GameMain.Instance.CharacterMgr.status.isDaytime).Count);
- }
- private void TJSFuncSetCommunicationChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- bool isDaytime = GameMain.Instance.CharacterMgr.status.isDaytime;
- Maid communicationMaid = ScheduleAPI.GetCommunicationMaid(isDaytime);
- if (communicationMaid == null)
- {
- if (result != null)
- {
- result.SetBool(false);
- }
- return;
- }
- GameMain.Instance.CharacterMgr.SetActiveMaid(communicationMaid, 0);
- communicationMaid.Visible = true;
- ScheduleCSVData.ScheduleBase schedule = ScheduleAPI.GetSchedule(communicationMaid, isDaytime);
- if (schedule.type == ScheduleTaskCtrl.TaskType.Training)
- {
- ScheduleCSVData.Training training = (ScheduleCSVData.Training)schedule;
- if (training.trainingType == ScheduleCSVData.TrainingType.Trainee)
- {
- Maid maid;
- if (isDaytime)
- {
- maid = ScheduleAPI.GetNoonTrainerMaid();
- }
- else
- {
- maid = ScheduleAPI.GetNightTrainerMaid();
- }
- if (maid != null)
- {
- GameMain.Instance.CharacterMgr.SetActiveMaid(maid, 1);
- maid.Visible = true;
- }
- }
- if (training.trainingType == ScheduleCSVData.TrainingType.Trainer)
- {
- Maid maid2;
- if (isDaytime)
- {
- maid2 = ScheduleAPI.GetNoonTraineeMaid();
- }
- else
- {
- maid2 = ScheduleAPI.GetNightTraineeMaid();
- }
- if (maid2 != null)
- {
- GameMain.Instance.CharacterMgr.SetActiveMaid(maid2, 1);
- maid2.Visible = true;
- }
- }
- }
- if (result != null)
- {
- result.SetBool(true);
- }
- }
- private void TJSFuncSetRandomCommuChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- GameMain.Instance.ScriptMgr.StopMotionScript();
- Maid[] array = ScheduleAPI.CanCommunicationMaids(GameMain.Instance.CharacterMgr.status.isDaytime).ToArray();
- if (array.Length == 0)
- {
- GameMain.Instance.CharacterMgr.DeactivateMaid(0);
- return;
- }
- Maid maid = array[UnityEngine.Random.Range(0, array.Length)];
- NDebug.Assert(maid != null, "SetRandomCommuChara()\n選択されたメイドが空です");
- GameMain.Instance.CharacterMgr.SetActiveMaid(maid, 0);
- maid.Visible = true;
- }
- private void TJSFuncCreateYotogiCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- SceneCharacterSelect.CreateYotogiCharaList();
- }
- private void TJSFuncCreateVipCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- SceneCharacterSelect.CreateVipCharaList();
- }
- private void TJSFuncCreateFacilityCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- SceneCharacterSelect.CreateFacilityCharaList();
- }
- private void TJSFuncIsReceptionChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetBool(0 < ScheduleAPI.GetEntertainMaids().Count);
- }
- private void TJSFuncSetRandomReceptionChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- GameMain.Instance.ScriptMgr.StopMotionScript();
- Maid[] array = ScheduleAPI.GetEntertainMaids().ToArray();
- NDebug.Assert(0 < array.Length, "SetRandomReceptionChara()\nメイドリストが空です");
- Maid maid = array[UnityEngine.Random.Range(0, array.Length)];
- NDebug.Assert(maid != null, "SetRandomReceptionChara()\n選択されたメイドが空です");
- GameMain.Instance.CharacterMgr.SetActiveMaid(maid, 0);
- maid.Visible = true;
- }
- private void TJSFuncIsSelectChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetBool(SceneCharacterSelect.IsSelectChara());
- }
- private void TJSFuncGetDateYear(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetInteger(DateTime.Now.Year);
- }
- private void TJSFuncGetDateMonth(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetInteger(DateTime.Now.Month);
- }
- private void TJSFuncGetDateDay(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetInteger(DateTime.Now.Day);
- }
- private void TJSFuncUpdateMaidRanking(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- Maid.UpdateMaidRanking();
- }
- private void TJSFuncResetMaidRanking(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
- {
- Maid stockMaid = characterMgr.GetStockMaid(i);
- if (stockMaid != null)
- {
- stockMaid.status.popularRank = 0;
- stockMaid.status.evaluation = 0;
- stockMaid.status.sales = 0L;
- }
- }
- characterMgr.status.SetFlag("__ランキング日数", 0);
- }
- private void TJSFuncSetMaidRanking1st(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- GameMain.Instance.ScriptMgr.StopMotionScript();
- Maid maid = null;
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetStockMaidCount(); i++)
- {
- maid = GameMain.Instance.CharacterMgr.GetStockMaid(i);
- if (!(maid == null))
- {
- if (maid.status.popularRank == 1)
- {
- break;
- }
- }
- }
- if (maid == null)
- {
- maid = GameMain.Instance.CharacterMgr.GetStockMaid(0);
- }
- GameMain.Instance.CharacterMgr.SetActiveMaid(maid, 0);
- maid.Visible = true;
- }
- private void TJSFuncIsAvailableRanking(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetBool(GameMain.Instance.CharacterMgr.status.isAvailableRanking);
- }
- private void TJSFuncIsYotogiSubCharaSelect(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetBool(false);
- GameObject gameObject = GameObject.Find("UI Root/YotogiManager");
- if (gameObject == null)
- {
- return;
- }
- if (this.compatibilityMode || this.tjsLegacyMode)
- {
- YotogiOldManager component = gameObject.GetComponent<YotogiOldManager>();
- if (component == null)
- {
- return;
- }
- result.SetBool(component.IsCallShouldSubCharaSelect());
- }
- else
- {
- YotogiManager component2 = gameObject.GetComponent<YotogiManager>();
- if (component2 == null)
- {
- return;
- }
- result.SetBool(component2.IsCallShouldSubCharaSelect());
- }
- }
- private void TJSFuncGetYotogiSkillSpecialType(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- GameObject gameObject = GameObject.Find("UI Root/YotogiManager");
- if (result == null || gameObject == null)
- {
- return;
- }
- YotogiManager component = gameObject.GetComponent<YotogiManager>();
- if (component == null || component.play_skill_array == null || component.play_skill_array.Length == 0)
- {
- return;
- }
- result.SetString(component.play_skill_array[0].skill_pair.base_data.specialConditionType.ToString());
- }
- private void TJSFuncIsSelectedYotogiSkill(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(tjs_param.Length == 1, "IsSelectedYotogiSkill args count error.");
- GameObject gameObject = GameObject.Find("UI Root/YotogiManager");
- if (result == null || gameObject == null)
- {
- return;
- }
- YotogiManager component = gameObject.GetComponent<YotogiManager>();
- if (component == null || component.play_skill_array == null || component.play_skill_array.Length == 0)
- {
- return;
- }
- result.SetBool(false);
- int num = tjs_param[0].AsInteger();
- foreach (YotogiManager.PlayingSkillData playingSkillData in component.play_skill_array)
- {
- if (playingSkillData != null && playingSkillData.skill_pair != null && playingSkillData.skill_pair.skill_data != null)
- {
- if (playingSkillData.skill_pair.skill_data.data.id == num)
- {
- result.SetBool(true);
- break;
- }
- }
- }
- }
- private void TJSFuncIsExistentFile(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- if (this.compatibilityMode)
- {
- result.SetBool(false);
- }
- else
- {
- NDebug.Assert(1 == tjs_param.Length, "TJSFuncIsExistentFile args count error.");
- result.SetBool(this.file_system.IsExistentFile(tjs_param[0].AsString()));
- }
- }
- private void TJSFuncIsExistentFileLegacy(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(1 == tjs_param.Length, "IsExistentFileLegacy args count error.");
- result.SetBool(GameUty.FileSystemOld.IsExistentFile(tjs_param[0].AsString()));
- }
- private void TJSFuncCheckClearVIP(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(1 == tjs_param.Length, "CheckClearVIP args count error.");
- int key = tjs_param[0].AsInteger();
- ReadOnlyDictionary<int, NightWorkState> night_works_state_dic = GameMain.Instance.CharacterMgr.status.night_works_state_dic;
- bool @bool = false;
- if (night_works_state_dic.ContainsKey(key) && night_works_state_dic[key].finish)
- {
- @bool = true;
- }
- result.SetBool(@bool);
- }
- private void TJSFuncIsCBLVersion(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetBool(false);
- }
- private void OldTJSFuncGetRentalNPCName(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@GetRentalNPCNameがよばれました");
- if (result == null)
- {
- return;
- }
- result.SetString(string.Empty);
- }
- private void OldTJSFuncIsMarriage(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@IsMarriageがよばれました");
- if (result == null)
- {
- return;
- }
- NDebug.Assert(1 == tjs_param.Length, "TJSFuncIsMarriage args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- if (maid != null && maid.status.OldStatus != null)
- {
- result.SetBool(maid.status.OldStatus.isMarriage);
- }
- else
- {
- result.SetBool(false);
- }
- }
- private void OldTJSFuncIsNewWifeFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@IsNewWifeFlagがよばれました");
- if (result == null)
- {
- return;
- }
- NDebug.Assert(1 == tjs_param.Length, "TJSFuncIsMarriage args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- if (maid != null && maid.status.OldStatus != null)
- {
- result.SetBool(maid.status.OldStatus.isNewWife);
- }
- else
- {
- result.SetBool(false);
- }
- }
- private void TJSFuncIsMVPEvent(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
- if (!status.isAvailableRanking)
- {
- result.SetBool(false);
- }
- else if (status.GetFlag("__ランキング日数") % 7 == 0)
- {
- bool @bool = false;
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetStockMaidCount(); i++)
- {
- Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaid(i);
- if (!(stockMaid == null))
- {
- if (stockMaid.status.popularRank == 1)
- {
- @bool = true;
- break;
- }
- }
- }
- result.SetBool(@bool);
- }
- else
- {
- result.SetBool(false);
- }
- }
- private void TJSFuncSetMaidCondition(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "SetMaidCondition args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- string a = tjs_param[1].AsString();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- if (this.compatibilityMode || this.tjsLegacyMode)
- {
- if (a == "緊張")
- {
- maid.status.OldStatus.relation = MaidStatus.Old.Relation.Tonus;
- }
- else if (a == "お近づき")
- {
- maid.status.OldStatus.relation = MaidStatus.Old.Relation.Contact;
- }
- else if (a == "信頼")
- {
- maid.status.OldStatus.relation = MaidStatus.Old.Relation.Trust;
- }
- else if (a == "恋人")
- {
- maid.status.OldStatus.relation = MaidStatus.Old.Relation.Lover;
- }
- else if (a == "愛奴")
- {
- maid.status.OldStatus.relation = MaidStatus.Old.Relation.Slave;
- }
- else if (a == "酔い")
- {
- maid.status.OldStatus.condition = Condition.Drunk;
- }
- else if (a == "お仕置き")
- {
- maid.status.OldStatus.condition = Condition.Osioki;
- }
- else if (a == "酔い解除" || a == "お仕置き解除")
- {
- maid.status.OldStatus.condition = Condition.Null;
- }
- }
- else if (a == "お近づき")
- {
- maid.status.relation = MaidStatus.Relation.Contact;
- }
- else if (a == "信頼")
- {
- maid.status.relation = MaidStatus.Relation.Trust;
- }
- else if (a == "恋人")
- {
- maid.status.relation = MaidStatus.Relation.Lover;
- }
- }
- private void TJSFuncSetSeikeikenFront(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "SetSeikeikenFront args count error.");
- int num = tjs_param[0].AsInteger();
- bool seikeikenFront = tjs_param[1].AsBool();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(num);
- Seikeiken seikeiken = maid.status.seikeiken;
- maid.status.SetSeikeikenFront(seikeikenFront);
- if (num == 0 && maid.status.seikeiken != seikeiken)
- {
- if ((this.compatibilityMode || this.tjsLegacyMode) && YotogiOldManager.instans != null)
- {
- YotogiOldManager.instans.OnChangeSeikeiken();
- }
- else if (YotogiManager.instans != null)
- {
- YotogiManager.instans.OnChangeSeikeiken();
- }
- }
- }
- private void TJSFuncSetSeikeikenBack(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "SetSeikeikenBack args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- bool seikeikenBack = tjs_param[1].AsBool();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- maid.status.SetSeikeikenBack(seikeikenBack);
- }
- private void TJSFuncSetInitSeikeiken(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "SetInitSeikeiken args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- string text = tjs_param[1].AsString();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- try
- {
- Seikeiken initSeikeiken = (Seikeiken)Enum.Parse(typeof(Seikeiken), text);
- maid.status.initSeikeiken = initSeikeiken;
- }
- catch (ArgumentException)
- {
- Debug.Log("MaidStatus.Seikeiken\nenum parse error.[" + text + "]");
- }
- }
- private void TJSFuncSetNewItem(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "SetNewItem args count error.");
- if (this.compatibilityMode || this.tjsLegacyMode)
- {
- return;
- }
- string itemName = tjs_param[0].AsString();
- GameMain.Instance.CharacterMgr.status.AddHavePartsItem(itemName);
- }
- private void TJSFuncIsGameInShopItemPurchased(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "IsGameInShopItemPurchased args count error.");
- if (result == null)
- {
- return;
- }
- int num = tjs_param[0].AsInteger();
- PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
- if (!status.IsShopLineupItem(num))
- {
- result.SetBool(false);
- }
- result.SetBool(status.shopLineups.Get(num) == ShopItemStatus.Purchased);
- }
- private void TJSFuncSetContractType(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "SetContractType args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- string text = tjs_param[1].AsString();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- if (text == "育成中")
- {
- maid.status.contract = Contract.Trainee;
- }
- else if (text == "フリー")
- {
- maid.status.contract = Contract.Free;
- }
- else if (text == "専属")
- {
- maid.status.contract = Contract.Exclusive;
- }
- else
- {
- NDebug.Assert(text + "は不正です", false);
- }
- }
- private void TJSFuncSetFeature(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(3 == tjs_param.Length, "SetFeature args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- string uniqueName = tjs_param[1].AsString();
- bool flag = tjs_param[2].AsBool();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- Feature.Data data = Feature.GetData(uniqueName);
- maid.status.AddFeature(data);
- }
- private void TJSFuncSetPropensity(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(3 == tjs_param.Length, "SetPropensity args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- string uniqueName = tjs_param[1].AsString();
- bool flag = tjs_param[2].AsBool();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- Propensity.Data data = Propensity.GetData(uniqueName);
- maid.status.AddPropensity(data);
- }
- private void TJSFuncComSetSexualParam(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- }
- private void TJSFuncSetNewTrophy(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (this.compatibilityMode || this.tjsLegacyMode)
- {
- return;
- }
- NDebug.Assert(1 == tjs_param.Length, "SetNewTrophy args count error.");
- int trophyId = tjs_param[0].AsInteger();
- GameMain.Instance.CharacterMgr.status.AddHaveTrophy(trophyId);
- }
- private void TJSFuncCheckTrophyContractType(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (this.compatibilityMode || this.tjsLegacyMode)
- {
- return;
- }
- GameMain.Instance.CharacterMgr.status.CheckTrophyContractTypeAndrelation();
- }
- private void TJSFuncSetYotogiSelectStageName(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "SetYotogiSelectStageName args count error.");
- this.debug_yotogi_stage_ = tjs_param[0].AsString();
- }
- private void TJSFuncGetYotogiSelectStageName(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- if (this.compatibilityMode || this.tjsLegacyMode)
- {
- result.SetString(YotogiOldStageSelectManager.StageName);
- }
- else
- {
- result.SetString(YotogiStageSelectManager.SelectedStage.uniqueName);
- }
- }
- public void TJSFuncIsPluginPack(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(1 == tjs_param.Length, "IsPluginPack args count error.");
- if (this.compatibilityMode)
- {
- result.SetBool(false);
- }
- else
- {
- string text = tjs_param[0].AsString();
- if (!PluginData.Contains(text))
- {
- Debug.LogError("IsPluginPackで指定された[" + text + "]は設定されていないプラグイン名です");
- }
- result.SetBool(PluginData.IsEnabled(text));
- }
- }
- public void TJSFuncAddShopLineup(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "TJSFuncAddShopLineup args count error.");
- PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
- int num = tjs_param[0].AsInteger();
- if (!status.shopLineups.ContainsKey(num))
- {
- status.AddShopLineup(num);
- }
- }
- public void TJSFuncSetEventItemFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "SetEventItemFlag args count error.");
- PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
- bool flag = tjs_param[1].AsInteger() != 0;
- if (flag)
- {
- status.AddHaveItem(tjs_param[0].AsString());
- }
- else
- {
- status.RemoveHaveItem(tjs_param[0].AsString());
- }
- }
- public void TJSFuncIsEventItemFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error IsEventItemFlag", false);
- }
- NDebug.Assert(1 == tjs_param.Length, "IsEventItemFlag args count error.");
- PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
- result.SetBool(status.IsHaveItem(tjs_param[0].AsString()));
- }
- public void TJSFuncGetVRMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetVRMode", false);
- }
- result.SetInteger((int)GameMain.Instance.VRDeviceTypeID);
- }
- public void TJSFuncIsVRMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error IsVRMode", false);
- }
- result.SetInteger((!GameMain.Instance.VRMode) ? 0 : 1);
- }
- public void TJSFuncSetDanceData(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "TJSFuncAddShopLineup args count error.");
- string bgm_file_name = tjs_param[0].AsString();
- DanceMain.SelectDanceData = new DanceData
- {
- bgm_file_name = bgm_file_name,
- preset_name = new List<string>(),
- preset_name =
- {
- string.Empty
- }
- };
- DanceMain.KaraokeMode = true;
- RhythmAction_Mgr.KaraokeRecet();
- GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 0);
- }
- public void TJSFuncGetEventAdded(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetEventAdded", false);
- }
- result.SetBool(GameMain.Instance.ScenarioSelectMgr.IsEventAdded());
- }
- public void TJSFuncGetLockNTRPlayFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetLockNTRPlayFlag", false);
- }
- result.SetBool(GameMain.Instance.CharacterMgr.status.lockNTRPlay);
- }
- public void TJSFuncGetLockUserDraftMaid(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetLockUserDraftMaid", false);
- }
- result.SetBool(GameMain.Instance.CharacterMgr.status.lockUserDraftMaid);
- }
- public void TJSFuncIsComPlayer(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error IsComPlayer", false);
- }
- result.SetBool(!GameMain.Instance.CharacterMgr.status.isOldPlayer);
- }
- public void TJSFuncSetPlayerMoney(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "SetPlayerMoney args count error.");
- int num = tjs_param[0].AsInteger();
- GameMain.Instance.CharacterMgr.status.money = (long)num;
- }
- public void TJSFuncGetPlayerMoney(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetPlayerMoney", false);
- }
- int integer = (2147483647L >= GameMain.Instance.CharacterMgr.status.money) ? ((int)GameMain.Instance.CharacterMgr.status.money) : int.MaxValue;
- result.SetInteger(integer);
- }
- public void TJSFuncSetMaidLeader(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(2 == tjs_param.Length, "SetMaidLeader args count error.");
- int nMaidNo = tjs_param[0].AsInteger();
- bool leader = tjs_param[1].AsBool();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- if (maid != null)
- {
- maid.status.leader = leader;
- }
- }
- public void TJSFuncSetMaidCostumeFacility(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "UpdateMaidCostumeFacility args count error.");
- int num = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(num);
- NDebug.Assert(maid != null, string.Format("UpdateMaidCostumeFacility()\nメイド[{0}]番が見つかりませんでした。", num));
- ScheduleMgr.ScheduleTime scheduleTime = (!GameMain.Instance.CharacterMgr.status.isDaytime) ? ScheduleMgr.ScheduleTime.Night : ScheduleMgr.ScheduleTime.DayTime;
- Facility maidAssignedFacility = GameMain.Instance.FacilityMgr.GetMaidAssignedFacility(maid, scheduleTime);
- if (maidAssignedFacility != null)
- {
- Facility.CostumeType typeCostume = maidAssignedFacility.typeCostume;
- if (typeCostume == Facility.CostumeType.Edit)
- {
- maidAssignedFacility.UpdateMaidCostumeToEditCostume(maid, false);
- }
- else if (typeCostume == Facility.CostumeType.Default)
- {
- maidAssignedFacility.UpdateMaidCostumeToDefaultCostume(maid);
- }
- else if (typeCostume == Facility.CostumeType.Heroine)
- {
- MPN[] facilityCostumeEnableMPN = FacilityDataTable.GetFacilityCostumeEnableMPN();
- for (int i = 0; i < facilityCostumeEnableMPN.Length; i++)
- {
- maid.ResetProp(facilityCostumeEnableMPN[i], false);
- }
- }
- }
- else
- {
- NDebug.Warning(string.Format("UpdateMaidCostumeFacility()\nメイド[{0}]番は、現在施設の仕事を持っていません。", num));
- Debug.LogWarningFormat("UpdateMaidCostumeFacility()\nメイド[{0}]番は、現在施設の仕事を持っていません。", new object[]
- {
- num
- });
- }
- }
- public void TJSFuncResetMaidCostumeFacility(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "UpdateMaidCostumeFacility args count error.");
- int num = tjs_param[0].AsInteger();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(num);
- NDebug.Assert(maid != null, string.Format("UpdateMaidCostumeFacility()\nメイド[{0}]番が見つかりませんでした。", num));
- MPN[] facilityCostumeEnableMPN = FacilityDataTable.GetFacilityCostumeEnableMPN();
- for (int i = 0; i < facilityCostumeEnableMPN.Length; i++)
- {
- maid.ResetProp(facilityCostumeEnableMPN[i], false);
- }
- }
- public void TJSFuncCallTitleBar(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "CallTitleBar args count error.");
- GameObject gameObject = GameObject.Find("__SceneADV__");
- if (gameObject == null)
- {
- return;
- }
- SceneADV component = gameObject.GetComponent<SceneADV>();
- component.CallTitleBar(tjs_param[0].AsString());
- }
- public void TJSFuncSetCompatibilityMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 == tjs_param.Length, "SetCompatibilityMode args count error.");
- this.compatibilityMode = tjs_param[0].AsBool();
- Debug.Log("スクリプトモード変更 : 互換モード[" + ((!this.compatibilityMode) ? "×]" : "〇]"));
- KagScript kag = this.adv_kag.kag;
- this.compatibilityCallStackDepth = kag.callStackDepth;
- this.compatibilityRCallStackDepth = kag.r_callStackDepth;
- }
- public void TJSFuncIsBuildingFacility(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(result != null, "error IsBuildingFacility");
- NDebug.Assert(1 == tjs_param.Length, "IsBuildingFacility args count error.");
- string text = tjs_param[0].AsString();
- FacilityDataTable.FacilityDefaultData facilityDefaultData = FacilityDataTable.GetFacilityDefaultData(text, false);
- NDebug.Assert(facilityDefaultData != null, string.Format("{0} は存在しない情報です", text));
- if (!facilityDefaultData.isEnableData)
- {
- Debug.Log(text + " は有効ではありません");
- result.SetBool(false);
- }
- else
- {
- result.SetBool(GameMain.Instance.FacilityMgr.IsExistTypeFacility(facilityDefaultData.ID));
- }
- }
- public void TJSFuncIsBuildingFacilityUpward(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(result != null, "error IsBuildingFacilityUpward");
- NDebug.Assert(1 == tjs_param.Length, "IsBuildingFacilityUpward args count error.");
- string text = tjs_param[0].AsString();
- FacilityDataTable.FacilityDefaultData facilityDefaultData = FacilityDataTable.GetFacilityDefaultData(text, false);
- NDebug.Assert(facilityDefaultData != null, string.Format("{0} は存在しない情報です", text));
- if (!facilityDefaultData.isEnableData)
- {
- Debug.Log(text + " は有効ではありません");
- result.SetBool(false);
- }
- if (facilityDefaultData.isExistUpwardFacility)
- {
- result.SetBool(GameMain.Instance.FacilityMgr.IsExistTypeFacility(facilityDefaultData.upwardFacility.ID));
- }
- else
- {
- result.SetBool(false);
- }
- }
- public void TJSCheckDanceType(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(tjs_param.Length != 0, "CheckDanceType:引数が何も指定されてません");
- bool flag = false;
- foreach (TJSVariantRef tjsvariantRef in tjs_param)
- {
- flag |= (RhythmAction_Mgr.NowDance == (RhythmAction_Mgr.DanceType)Enum.Parse(typeof(RhythmAction_Mgr.DanceType), tjsvariantRef.AsString()));
- }
- result.SetBool(flag);
- }
- public void TJSSetMusicRelease(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(tjs_param.Length == 1, "SetMusicRelease:指定できる引数は1つまでです");
- VsDanceDataMgr.Instance.MusicRelese(tjs_param[0].AsInteger());
- }
- public void TJSSetVsSetting(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(tjs_param.Length == 1, "SetVsSetting:指定できる引数は1つまでです");
- VsDanceDataMgr.Instance.SelectSetting(tjs_param[0].AsInteger());
- }
- public void TJSNeedDanceResult(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- bool flag = true;
- flag &= (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.VS_Skip);
- flag &= (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.Touch);
- flag &= (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.View);
- flag &= (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.Encore);
- result.SetBool(flag);
- }
- public void TJSGetChallengeRank(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(tjs_param.Length > 0, "GetChallengeRank:引数が指定されてません");
- bool flag = false;
- foreach (TJSVariantRef tjsvariantRef in tjs_param)
- {
- flag |= (tjsvariantRef.AsString() == Result_Display.GetData("Rank"));
- }
- result.SetBool(flag);
- }
- public void TJSBjDayFirst(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- int days = GameMain.Instance.CharacterMgr.status.days;
- int flag = GameMain.Instance.CharacterMgr.status.GetFlag("BJ最終プレイ日");
- bool @bool = days != flag;
- foreach (TJSVariantRef tjsvariantRef in tjs_param)
- {
- if (tjsvariantRef.AsString() == "ブラックジャック終了")
- {
- GameMain.Instance.CharacterMgr.status.SetFlag("BJ最終プレイ日", days);
- break;
- }
- }
- result.SetBool(@bool);
- }
- public void TJSCasinoShopBuy(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(tjs_param.Length != 0, "CasinoShopBuy:引数が指定されてません");
- bool flag = false;
- foreach (TJSVariantRef tjsvariantRef in tjs_param)
- {
- int num = tjsvariantRef.AsInteger();
- flag = false;
- foreach (CasinoShopItem casinoShopItem in CasinoDataMgr.Instance.GetShopItem())
- {
- if (casinoShopItem.ID == num && casinoShopItem.IsSoldOut)
- {
- flag = true;
- break;
- }
- }
- if (!flag)
- {
- break;
- }
- }
- result.SetBool(flag);
- }
- public void TJSSetEventEndFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(tjs_param.Length == 3, "SetEventEndFlag:引数が3つ必要です");
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
- if (!maid)
- {
- maid = GameMain.Instance.CharacterMgr.GetStockMaid(tjs_param[0].AsInteger());
- if (!maid)
- {
- return;
- }
- }
- if (!GameMain.Instance.ScenarioSelectMgr.ExistScenario(tjs_param[1].AsInteger()))
- {
- Debug.LogErrorFormat("選択シナリオ:{0}は存在しません", new object[]
- {
- tjs_param[1].AsInteger()
- });
- return;
- }
- maid.status.SetEventEndFlag(tjs_param[1].AsInteger(), tjs_param[2].AsBool());
- }
- public void TJSFuncIsKasizukiGuest(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error IsKasizukiGuest", false);
- }
- ManDataType nowManType = (ManDataType)GameMain.Instance.KasizukiMgr.GetNowManType();
- result.SetBool(nowManType != ManDataType.主人公);
- }
- public void TJSFuncGetKasizukiSelectRoomName(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetKasizukiSelectRoomName", false);
- }
- RoomData.Data data = RoomData.GetData(GameMain.Instance.KasizukiMgr.GetSystemData<int>(SystemDataType.選択部屋));
- result.SetString(data.uniqueName);
- }
- public void TJSFuncGetKasizukiMaidLikability(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetKasizukiMaidLikability", false);
- }
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- ManDataType nowManType = (ManDataType)kasizukiMgr.GetNowManType();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
- int integer = -1;
- if (nowManType == ManDataType.主人公)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F本編, true);
- }
- else if (nowManType == ManDataType.傅き男1)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男1, true);
- }
- result.SetInteger(integer);
- }
- public void TJSFuncGetKasizukiMaidLikabilityName(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetKasizukiMaidLikabilityName", false);
- }
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- ManDataType nowManType = (ManDataType)kasizukiMgr.GetNowManType();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
- int likability = -1;
- if (nowManType == ManDataType.主人公)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F本編, true);
- }
- else if (nowManType == ManDataType.傅き男1)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男1, true);
- }
- string likabilityName = LikabilityReplace.GetLikabilityName(likability);
- result.SetString(likabilityName);
- }
- public void TJSFuncGetKasizukiMaidWorkCount(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetKasizukiMaidWorkCount", false);
- }
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
- int maidData = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.仕事回数, true);
- result.SetInteger(maidData);
- }
- public void TJSFuncGetKasizukiMaidWorkCountName(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetKasizukiMaidWorkCountName", false);
- }
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
- int maidData = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.仕事回数, true);
- string workCountName = WorkCountReplace.GetWorkCountName(maidData);
- result.SetString(workCountName);
- }
- public void TJSFuncGetKasizukiSystemFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- kasizukiMgr.TJSFuncGetKasizukiSystemFlag(tjs_param, result);
- }
- public void TJSFuncSetKasizukiSystemFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- kasizukiMgr.TJSFuncSetKasizukiSystemFlag(tjs_param, result);
- }
- public void TJSFuncAddKasizukiSystemFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- kasizukiMgr.TJSFuncAddKasizukiSystemFlag(tjs_param, result);
- }
- public void TJSFuncSetKasizukiPassFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- kasizukiMgr.TJSFuncSetKasizukiPassFlag(tjs_param, result);
- }
- public void TJSFuncGetKasizukiMaidFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- kasizukiMgr.TJSFuncGetKasizukiMaidFlag(tjs_param, result);
- }
- public void TJSFuncSetKasizukiMaidFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- kasizukiMgr.TJSFuncSetKasizukiMaidFlag(tjs_param, result);
- }
- public void TJSFuncIsKasizukiCorrectSenarioFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
- kasizukiMgr.TJSFuncIsKasizukiCorrectSenarioFlag(tjs_param, result);
- }
- public void TJSFuncIsVRKaraokeMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error IsVRKaraokeMode", false);
- }
- result.SetInteger((!SceneVRCommunication.Instance.KaraokeMode) ? 0 : 1);
- }
- public void TJSFuncGetRemainingDanceTime(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetRemainingDanceTime", false);
- }
- float num;
- if (RhythmAction_Mgr.Instance != null)
- {
- num = RhythmAction_Mgr.Instance.RemainingTime;
- }
- else
- {
- string message = "リズムアクションマネージャのインスタンスが見つかりません。-1を返します。";
- Debug.LogWarning(message);
- num = -0.001f;
- }
- result.SetInteger(Mathf.RoundToInt(num * 1000f));
- }
- public void OnReturnEvent(string fileName, int line)
- {
- if (this.compatibilityMode)
- {
- KagScript kag = this.adv_kag.kag;
- int num = kag.callStackDepth - 1;
- int r_callStackDepth = kag.r_callStackDepth;
- if (this.compatibilityCallStackDepth == num && this.compatibilityRCallStackDepth == r_callStackDepth)
- {
- this.compatibilityMode = false;
- }
- }
- }
- public void OnRReturnEvent(string fileName, string labelName)
- {
- if (this.compatibilityMode)
- {
- KagScript kag = this.adv_kag.kag;
- int callStackDepth = kag.callStackDepth;
- int num = kag.r_callStackDepth - 1;
- if (this.compatibilityCallStackDepth == callStackDepth && this.compatibilityRCallStackDepth == num)
- {
- this.compatibilityMode = false;
- }
- }
- }
- public void Dispose()
- {
- this.Dispose(true);
- GC.SuppressFinalize(this);
- }
- protected void Dispose(bool is_release_managed_code)
- {
- if (this.is_disposed_)
- {
- return;
- }
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
- {
- keyValuePair.Value.Dispose();
- }
- this.kag_mot_dic_.Clear();
- if (this.adv_kag_ != null)
- {
- this.adv_kag_.Dispose();
- }
- if (this.yotogi_kag_ != null)
- {
- this.yotogi_kag_.Dispose();
- }
- if (this.tmp_kag_ != null)
- {
- this.tmp_kag_.Dispose();
- }
- if (this.tjs_ != null)
- {
- this.tjs_.Dispose();
- }
- this.is_disposed_ = true;
- }
- public void Serialize(BinaryWriter binary)
- {
- binary.Write("CM3D2_SCRIPT");
- binary.Write(1130);
- this.adv_kag_.Serialize(binary);
- }
- public void Deserialize(BinaryReader binary)
- {
- this.compatibilityMode = false;
- string a = binary.ReadString();
- NDebug.Assert(a == "CM3D2_SCRIPT", "SCRIPTのヘッダーが不正です。");
- int num = binary.ReadInt32();
- this.adv_kag_.Deserialize(binary);
- this.yotogi_kag_.Dispose();
- this.yotogi_kag_ = new YotogiKagManager(this.tjs_, this);
- this.yotogi_kag_.Initialize();
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
- {
- keyValuePair.Value.Dispose();
- }
- this.kag_mot_dic_.Clear();
- MotionKagManager motionKagManager = new MotionKagManager(this.tjs_, this);
- motionKagManager.Initialize();
- motionKagManager.SetSloatNo(0);
- this.kag_mot_dic_.Add(0, motionKagManager);
- this.ExecScript("global.tf = new Dictionary();");
- }
- public bool compatibilityMode
- {
- get
- {
- return this.compatibilityMode_;
- }
- set
- {
- this.compatibilityMode_ = value;
- if (this.adv_kag_ != null && this.adv_kag_.kag != null)
- {
- this.adv_kag_.kag.SetFileSystem(this.file_system);
- }
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
- {
- keyValuePair.Value.kag.SetFileSystem(this.file_system);
- }
- if (this.yotogi_kag_ != null && this.yotogi_kag_.kag != null)
- {
- this.yotogi_kag_.kag.SetFileSystem(this.file_system);
- }
- if (GameMain.Instance.SoundMgr != null)
- {
- GameMain.Instance.SoundMgr.compatibilityMode = value;
- }
- this.StopMotionScript();
- }
- }
- public bool tjsLegacyMode
- {
- get
- {
- return DailyMgr.IsLegacy;
- }
- }
- public bool is_motion_all_prop_seq { get; set; }
- public Maid motion_all_prop_seq_maid { get; set; }
- public bool is_motion_blend { get; set; }
- public TJSScript tjs
- {
- get
- {
- return this.tjs_;
- }
- }
- public ADVKagManager adv_kag
- {
- get
- {
- return this.adv_kag_;
- }
- }
- public YotogiKagManager yotogi_kag
- {
- get
- {
- return this.yotogi_kag_;
- }
- }
- public BaseKagManager tmp_kag
- {
- get
- {
- return this.tmp_kag_;
- }
- }
- public Dictionary<int, MotionKagManager> kag_mot_dic
- {
- get
- {
- return this.kag_mot_dic_;
- }
- }
- public AFileSystemBase file_system
- {
- get
- {
- return (!this.compatibilityMode) ? GameUty.FileSystem : GameUty.FileSystemOld;
- }
- }
- private TJSScript tjs_;
- private Dictionary<int, MotionKagManager> kag_mot_dic_ = new Dictionary<int, MotionKagManager>();
- private ADVKagManager adv_kag_;
- private YotogiKagManager yotogi_kag_;
- private BaseKagManager tmp_kag_;
- private MessageWindowMgr message_mgr_;
- private bool is_disposed_;
- private string debug_yotogi_stage_;
- private bool compatibilityMode_;
- private List<Maid> stock_maid_loop_list = new List<Maid>();
- private int compatibilityCallStackDepth;
- private int compatibilityRCallStackDepth;
- [CompilerGenerated]
- private static Comparison<Maid> <>f__mg$cache0;
- }
|