1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Runtime.CompilerServices;
- using System.Text;
- using Kasizuki;
- using MaidStatus;
- using MaidStatus.CsvData;
- using MaidStatus.Old;
- using PlayerStatus;
- using Schedule;
- using UnityEngine;
- using wf;
- public class ScriptManager : IDisposable
- {
- public static 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("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("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.tmp_kag_ = new BaseKagManager(this.tjs_, this);
- this.tmp_kag_.Initialize();
- using (AFileBase afileBase = this.file_system.FileOpen("startup.tjs"))
- {
- this.tjs_.ExecScript(afileBase);
- }
- }
- ~ScriptManager()
- {
- this.Dispose(false);
- }
- public void ClearCallStack()
- {
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
- {
- keyValuePair.Value.kag.ClearCallStack();
- }
- this.adv_kag_.kag.ClearCallStack();
- this.yotogi_kag_.kag.ClearCallStack();
- this.tmp_kag_.kag.ClearCallStack();
- }
- public void Update()
- {
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
- {
- keyValuePair.Value.Update();
- }
- this.adv_kag_.Update();
- this.yotogi_kag_.Update();
- this.tmp_kag_.Update();
- }
- public void ExecScript(string exec_str, ref TJSVariant result)
- {
- this.tjs_.ExecScript(exec_str, ref result);
- }
- public void ExecScript(string exec_str)
- {
- this.tjs_.ExecScript(exec_str);
- }
- public void ExecScriptFile(string file_name, ref TJSVariant result)
- {
- using (AFileBase afileBase = this.file_system.FileOpen(file_name))
- {
- NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
- this.tjs_.ExecScript(afileBase, ref result);
- }
- }
- public void ExecScriptFile(string file_name)
- {
- using (AFileBase afileBase = this.file_system.FileOpen(file_name))
- {
- NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
- this.tjs_.ExecScript(afileBase);
- }
- }
- public void EvalScript(string eval_str, TJSVariant result)
- {
- this.tjs_.EvalScript(eval_str, result);
- }
- public void EvalScript(string eval_str)
- {
- this.tjs_.EvalScript(eval_str);
- }
- public void EvalScriptFile(string file_name, TJSVariant result)
- {
- using (AFileBase afileBase = this.file_system.FileOpen(file_name))
- {
- NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
- this.tjs_.EvalScript(afileBase, result);
- }
- }
- public void EvalScriptFile(string file_name)
- {
- using (AFileBase afileBase = this.file_system.FileOpen(file_name))
- {
- NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
- this.tjs_.EvalScript(afileBase);
- }
- }
- public void LoadAdvScenarioScript(string file_name, string label_name = "")
- {
- this.adv_kag_.enabled = true;
- this.adv_kag_.LoadScriptFile(file_name, label_name);
- }
- public void LoadYotogiScript(string file_name, string label_name = "")
- {
- this.yotogi_kag_.enabled = true;
- this.yotogi_kag_.LoadScriptFile(file_name, string.Empty);
- this.yotogi_kag_.Exec();
- }
- public void LoadTempScript(string file_name, string label_name = "")
- {
- this.tmp_kag_.enabled = true;
- this.tmp_kag_.LoadScriptFile(file_name, label_name);
- }
- public void LoadMotionScript(int sloat, bool is_next, string file_name, string label_name = "", string maid_guid = "", string man_guid = "", bool face_fix = false, bool valid_pos = true, 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 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 == "旧関係")
- {
- 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;
- }
- }
- 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 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.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(1320);
- this.adv_kag_.Serialize(binary);
- }
- public void Deserialize(BinaryReader binary)
- {
- this.compatibilityMode = false;
- string a = binary.ReadString();
- NDebug.Assert(a == "CM3D2_SCRIPT", "SCRIPTのヘッダーが不正です。");
- int num = binary.ReadInt32();
- this.adv_kag_.Deserialize(binary);
- this.yotogi_kag_.Dispose();
- this.yotogi_kag_ = new YotogiKagManager(this.tjs_, this);
- this.yotogi_kag_.Initialize();
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
- {
- keyValuePair.Value.Dispose();
- }
- this.kag_mot_dic_.Clear();
- MotionKagManager motionKagManager = new MotionKagManager(this.tjs_, this);
- motionKagManager.Initialize();
- motionKagManager.SetSloatNo(0);
- this.kag_mot_dic_.Add(0, motionKagManager);
- this.ExecScript("global.tf = new Dictionary();");
- 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 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;
- }
|