12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488 |
- 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 PrivateMaidMode;
- using Schedule;
- using UnityEngine;
- using wf;
- public class ScriptManager : IDisposable
- {
- public static bool isGP001Mode
- {
- get
- {
- return GameMain.Instance.CMSystem.GetTmpGenericFlag("AddAllOffset_Ignore") != 0;
- }
- }
- 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.callName);
- }
- }
- 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.charaName.GetFullName(" "));
- }
- }
- }
- }
- 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("IsEquipTatoo", new TJSScript.FunctionCallBack(this.TJSFuncIsEquipTatoo));
- 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("CreateNewYotogiCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateNewYotogiCharaList));
- this.tjs_.AddFunction("CreateNewYotogiHaremPairCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateNewYotogiHaremPairCharaList));
- this.tjs_.AddFunction("CreateVipCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateVipCharaList));
- this.tjs_.AddFunction("CreateFacilityCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateFacilityCharaList));
- this.tjs_.AddFunction("CreateLifeModeCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateLifeModeCharaList));
- this.tjs_.AddFunction("BackupStoreCharaList", new TJSScript.FunctionCallBack(this.TJSFuncBackupStoreCharaList));
- this.tjs_.AddFunction("BackupReStoreCharaList", new TJSScript.FunctionCallBack(this.TJSFuncBackupReStoreCharaList));
- 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("LearningYotogiSkill", new TJSScript.FunctionCallBack(this.TJSFuncLearningYotogiSkill));
- 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));
- this.tjs_.AddFunction("GetYotogiCommandClickCount", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiCommandClickCount));
- this.tjs_.AddFunction("SetYotogiStage", new TJSScript.FunctionCallBack(this.TJSFuncSetYotogiStage));
- this.tjs_.AddFunction("GetGameMode", new TJSScript.FunctionCallBack(this.TJSFuncGetGameMode));
- this.tjs_.AddFunction("IsLifeMode", new TJSScript.FunctionCallBack(this.TJSFuncIsLifeMode));
- this.tjs_.AddFunction("IsPrivateModeMaid", new TJSScript.FunctionCallBack(this.TJSFuncIsPrivateModeMaid));
- this.tjs_.AddFunction("IsPrivateModeDayTalkEnabled", new TJSScript.FunctionCallBack(this.TJSFuncIsPrivateModeDayTalkEnabled));
- this.tjs_.AddFunction("IsPrivateModeNightTalkEnabled", new TJSScript.FunctionCallBack(this.TJSFuncIsPrivateModeNightTalkEnabled));
- this.tjs_.AddFunction("IsPrivateModeHEventEnabled", new TJSScript.FunctionCallBack(this.TJSFuncIsPrivateModeHEventEnabled));
- this.tjs_.AddFunction("SetPrivateModeMaid", new TJSScript.FunctionCallBack(this.TJSFuncSetPrivateModeMaid));
- this.tjs_.AddFunction("SetLockNTRPlay", new TJSScript.FunctionCallBack(this.TJSFuncSetLockNTRPlay));
- this.tjs_.AddFunction("IsEnabeldAdditionalRelation", new TJSScript.FunctionCallBack(this.TJSFuncIsEnabeldAdditionalRelation));
- 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.privatemode_touch_kag = new PrivateMaidTouchKagManager(this.tjs_, this);
- this.privatemode_touch_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.privatemode_touch_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.privatemode_touch_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, bool disable_diff_pos = false)
- {
- 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 (!ScriptManager.isGP001Mode && !disable_diff_pos && 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 TJSFuncIsEquipTatoo(TJSVariantRef[] param, TJSVariantRef result)
- {
- NDebug.Assert(1 == param.Length, "IsEquipTatoo args count error.");
- if (result == null)
- {
- return;
- }
- TJSVariantRef.Type[] array = new TJSVariantRef.Type[]
- {
- TJSVariantRef.Type.tvtInteger
- };
- 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();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
- MaidProp prop = maid.GetProp(MPN.acctatoo);
- result.SetBool(false);
- if (prop != null && prop.listSubProp != null)
- {
- foreach (SubProp subProp in prop.listSubProp)
- {
- if (subProp != null && !string.IsNullOrEmpty(subProp.strFileName))
- {
- result.SetBool(true);
- break;
- }
- }
- }
- }
- 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 || param.Length == 2 || 3 == param.Length, "GetMaidFlag args count error.");
- if (result == null)
- {
- return;
- }
- int nMaidNo = 0;
- string flagName = string.Empty;
- bool flag = false;
- if (param.Length == 3)
- {
- nMaidNo = param[0].AsInteger();
- flagName = param[1].AsString();
- if (param[2].AsBool())
- {
- flag = true;
- }
- }
- else 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) && !flag)
- {
- 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 == "追加関係")
- {
- result.SetString(EnumConvert.GetString(status.additionalRelation));
- }
- else if (a == "特殊関係")
- {
- result.SetString(EnumConvert.GetString(status.specialRelation));
- }
- 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;
- }
- if (this.compatibilityMode && !maid.boMAN)
- {
- maid.status.voiceGroup = VoiceGroup.Sub;
- }
- }
- 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 TJSFuncCreateNewYotogiCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- SceneCharacterSelect.CreateNewYotogiCharaList();
- }
- private void TJSFuncCreateNewYotogiHaremPairCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- SceneCharacterSelect.CreateNewYotogiHaremPairCharaList();
- }
- private void TJSFuncCreateVipCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- SceneCharacterSelect.CreateVipCharaList();
- }
- private void TJSFuncCreateFacilityCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- SceneCharacterSelect.CreateFacilityCharaList();
- }
- private void TJSFuncCreateLifeModeCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- SceneCharacterSelect.CreateLifeModeCharaList();
- }
- private void TJSFuncBackupStoreCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- SceneCharacterSelect.StoreCharaGuidStockList();
- }
- private void TJSFuncBackupReStoreCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- SceneCharacterSelect.ReStoreCharaGuidStockList();
- }
- 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 TJSFuncLearningYotogiSkill(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(tjs_param.Length == 2, "LearningYotogiSkill args count error.");
- NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger && tjs_param[1].type == TJSVariantRef.Type.tvtInteger, "error.");
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
- if (maid == null)
- {
- Debug.LogError("maid is null. LearningYotogiSkill");
- return;
- }
- int skillId = tjs_param[1].AsInteger();
- maid.status.yotogiSkill.Add(skillId);
- }
- 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;
- }
- else if (a == "警戒")
- {
- maid.status.additionalRelation = AdditionalRelation.Vigilance;
- }
- else if (a == "恋人+")
- {
- maid.status.additionalRelation = AdditionalRelation.LoverPlus;
- }
- else if (a == "Null")
- {
- maid.status.additionalRelation = AdditionalRelation.Null;
- }
- else if (a == "嫁")
- {
- maid.status.specialRelation = SpecialRelation.Married;
- }
- else if (a == "特殊関係解除")
- {
- maid.status.specialRelation = SpecialRelation.Null;
- }
- }
- 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);
- }
- if (status.shopLineups.ContainsKey(num))
- {
- result.SetBool(status.shopLineups.Get(num) == ShopItemStatus.Purchased);
- }
- else
- {
- result.SetBool(false);
- }
- }
- 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);
- }
- else if (nowManType == ManDataType.傅き男2)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男2, true);
- }
- else if (nowManType == ManDataType.傅き男3)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男3, true);
- }
- else if (nowManType == ManDataType.傅き男4)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男4, true);
- }
- else if (nowManType == ManDataType.傅き男5)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男5, true);
- }
- else if (nowManType == ManDataType.傅き男6)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男6, true);
- }
- else if (nowManType == ManDataType.傅き男7)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男7, true);
- }
- else if (nowManType == ManDataType.傅き男8)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男8, true);
- }
- else if (nowManType == ManDataType.傅き男9)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男9, true);
- }
- else if (nowManType == ManDataType.傅き男10)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男10, true);
- }
- else if (nowManType == ManDataType.傅き男11)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男11, true);
- }
- else if (nowManType == ManDataType.傅き男12)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男12, true);
- }
- else if (nowManType == ManDataType.傅き男13)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男13, true);
- }
- else if (nowManType == ManDataType.傅き男14)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男14, true);
- }
- else if (nowManType == ManDataType.傅き男15)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男15, true);
- }
- else if (nowManType == ManDataType.傅き男16)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男16, true);
- }
- else if (nowManType == ManDataType.傅き男17)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男17, true);
- }
- else if (nowManType == ManDataType.傅き男18)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男18, true);
- }
- else if (nowManType == ManDataType.傅き男19)
- {
- integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男19, 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);
- }
- else if (nowManType == ManDataType.傅き男2)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男2, true);
- }
- else if (nowManType == ManDataType.傅き男3)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男3, true);
- }
- else if (nowManType == ManDataType.傅き男4)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男4, true);
- }
- else if (nowManType == ManDataType.傅き男5)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男5, true);
- }
- else if (nowManType == ManDataType.傅き男6)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男6, true);
- }
- else if (nowManType == ManDataType.傅き男7)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男7, true);
- }
- else if (nowManType == ManDataType.傅き男8)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男8, true);
- }
- else if (nowManType == ManDataType.傅き男9)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男9, true);
- }
- else if (nowManType == ManDataType.傅き男10)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男10, true);
- }
- else if (nowManType == ManDataType.傅き男11)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男11, true);
- }
- else if (nowManType == ManDataType.傅き男12)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男12, true);
- }
- else if (nowManType == ManDataType.傅き男13)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男13, true);
- }
- else if (nowManType == ManDataType.傅き男14)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男14, true);
- }
- else if (nowManType == ManDataType.傅き男15)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男15, true);
- }
- else if (nowManType == ManDataType.傅き男16)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男16, true);
- }
- else if (nowManType == ManDataType.傅き男17)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男17, true);
- }
- else if (nowManType == ManDataType.傅き男18)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男18, true);
- }
- else if (nowManType == ManDataType.傅き男19)
- {
- likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男19, 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 TJSFuncGetGameMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- result.SetString(GameModeManager.nowGameMode.ToString());
- }
- public void TJSFuncIsLifeMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- result.SetBool(GameModeManager.nowGameMode == GameModeManager.Type.LifeMode);
- }
- public void TJSFuncIsPrivateModeMaid(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- NDebug.Assert(tjs_param.Length == 1, "IsPrivateModeMaid args count error.");
- NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger, "error.");
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
- result.SetBool(maid != null && maid == PrivateModeMgr.Instance.PrivateMaid);
- }
- public void TJSFuncIsPrivateModeDayTalkEnabled(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result != null)
- {
- result.SetBool(GameMain.Instance.CMSystem.SConfig.PrivateModeSettingDayTalkEnabled);
- }
- }
- public void TJSFuncIsPrivateModeNightTalkEnabled(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result != null)
- {
- result.SetBool(GameMain.Instance.CMSystem.SConfig.PrivateModeSettingNightTalkEnabled);
- }
- }
- public void TJSFuncIsPrivateModeHEventEnabled(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result != null)
- {
- result.SetBool(GameMain.Instance.CMSystem.SConfig.PrivateModeSettingHEventEnabled);
- }
- }
- public void TJSFuncSetPrivateModeMaid(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- Maid privateMaid = PrivateModeMgr.Instance.PrivateMaid;
- if (privateMaid == null)
- {
- if (result != null)
- {
- result.SetBool(false);
- }
- return;
- }
- int f_nActiveSlotNo = 0;
- if (tjs_param.Length > 0)
- {
- f_nActiveSlotNo = tjs_param[0].AsInteger();
- }
- GameMain.Instance.CharacterMgr.SetActiveMaid(privateMaid, f_nActiveSlotNo);
- privateMaid.Visible = true;
- if (result != null)
- {
- result.SetBool(true);
- }
- }
- public void TJSFuncSetLockNTRPlay(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(tjs_param.Length == 1, "SetLockNTRPlay:引数が1つ必要です");
- GameMain.Instance.CharacterMgr.status.lockNTRPlay = tjs_param[0].AsBool();
- }
- public void TJSFuncIsEnabeldAdditionalRelation(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- return;
- }
- result.SetBool(Product.enabeldAdditionalRelation);
- }
- 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 TJSFuncGetYotogiCommandClickCount(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- if (result == null)
- {
- NDebug.Assert("error GetYotogiCommandClickCount", false);
- }
- NDebug.Assert(tjs_param.Length == 2, "GetYotogiCommandClickCount:引数が2つ必要です");
- string text = tjs_param[0].AsString();
- bool flag = tjs_param[1].AsBool();
- result.SetInteger(0);
- if (YotogiManager.instans == null || YotogiManager.instans.play_mgr == null || string.IsNullOrEmpty(text))
- {
- return;
- }
- Dictionary<string, int> dictionary = (!flag) ? YotogiManager.instans.play_mgr.commandClickCountSingle : YotogiManager.instans.play_mgr.commandClickCountTotal;
- int integer = 0;
- dictionary.TryGetValue(text, out integer);
- result.SetInteger(integer);
- }
- public void TJSFuncSetYotogiStage(TJSVariantRef[] tjs_param, TJSVariantRef result)
- {
- NDebug.Assert(1 <= tjs_param.Length && tjs_param.Length <= 2, "SetYotogiStage:引数が1つ,もしくは2つである必要があります");
- YotogiStage.Data data = YotogiStage.GetData(tjs_param[0].AsString());
- bool isDayTime = GameMain.Instance.CharacterMgr.status.isDaytime;
- if (tjs_param.Length == 2)
- {
- isDayTime = tjs_param[1].AsBool();
- }
- YotogiStageSelectManager.SelectStage(data, isDayTime);
- }
- 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.privatemode_touch_kag != null)
- {
- this.privatemode_touch_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(1430);
- 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();
- this.privatemode_touch_kag.Dispose();
- this.privatemode_touch_kag = new PrivateMaidTouchKagManager(this.tjs_, this);
- this.privatemode_touch_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();");
- SubtitleMovieManager.DestroyGlobalInstance();
- }
- 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 PrivateMaidTouchKagManager privatemode_touch_kag { get; private set; }
- 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;
- }
|