12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301 |
- using System;
- using System.Collections.Generic;
- using MaidStatus;
- using Schedule;
- using UnityEngine;
- using wf;
- public static class FacilityDataTable
- {
- public static void Init()
- {
- FacilityDataTable.m_FacilityMaterialCategoryNameArray = new Dictionary<int, string>();
- FacilityDataTable.ReadCSV("facility_material_category.nei", delegate(CsvParser csv)
- {
- for (int i = 1; i < csv.max_cell_y; i++)
- {
- if (!csv.IsCellToExistData(0, i))
- {
- break;
- }
- int num = 0;
- int cellAsInteger = csv.GetCellAsInteger(num++, i);
- string cellAsString = csv.GetCellAsString(num++, i);
- FacilityDataTable.m_FacilityMaterialCategoryNameArray.Add(cellAsInteger, cellAsString);
- }
- });
- FacilityDataTable.m_FacilityParameterNameArray = new Dictionary<int, string>();
- FacilityDataTable.ReadCSV("facility_parameters.nei", delegate(CsvParser csv)
- {
- for (int i = 1; i < csv.max_cell_y; i++)
- {
- if (!csv.IsCellToExistData(0, i))
- {
- break;
- }
- int num = 0;
- int cellAsInteger = csv.GetCellAsInteger(num++, i);
- string cellAsString = csv.GetCellAsString(num++, i);
- FacilityDataTable.m_FacilityParameterNameArray.Add(cellAsInteger, cellAsString);
- }
- });
- FacilityDataTable.m_FacilityCostumeEnableMPN = new List<MPN>();
- FacilityDataTable.ReadCSV("facility_costume_mpn_enable_list.nei", delegate(CsvParser csv)
- {
- List<MPN> list = new List<MPN>();
- for (int i = 1; i < csv.max_cell_y; i++)
- {
- if (!csv.IsCellToExistData(0, i))
- {
- break;
- }
- string cellAsString = csv.GetCellAsString(0, i);
- MPN item = MPN.null_mpn;
- try
- {
- item = (MPN)Enum.Parse(typeof(MPN), cellAsString);
- }
- catch (Exception e)
- {
- NDebug.AssertParseError("MPN", e);
- }
- FacilityDataTable.m_FacilityCostumeEnableMPN.Add(item);
- }
- });
- FacilityDataTable.m_FacilityDefaultCostumeArray = new Dictionary<int, Dictionary<MPN, KeyValuePair<bool, string>>>();
- FacilityDataTable.m_FacilityDefaultCostumeThumbnailArray = new Dictionary<int, string>();
- FacilityDataTable.ReadCSV("facility_default_costume.nei", delegate(CsvParser csv)
- {
- int i = 1;
- int j = 4;
- while (i < csv.max_cell_x)
- {
- Dictionary<MPN, KeyValuePair<bool, string>> dictionary = new Dictionary<MPN, KeyValuePair<bool, string>>();
- int cellAsInteger = csv.GetCellAsInteger(i, 3);
- for (j = 4; j < csv.max_cell_y; j++)
- {
- if (!csv.IsCellToExistData(0, j))
- {
- break;
- }
- string cellAsString = csv.GetCellAsString(0, j);
- string text = csv.GetCellAsString(i, j);
- MPN mpn = MPN.null_mpn;
- try
- {
- mpn = (MPN)Enum.Parse(typeof(MPN), cellAsString);
- }
- catch (Exception ex)
- {
- FacilityDataTable.m_FacilityDefaultCostumeThumbnailArray.Add(cellAsInteger, text);
- break;
- }
- bool key = !string.IsNullOrEmpty(text);
- if (!string.IsNullOrEmpty(text) && text.ToLower() != "del")
- {
- text += ".menu";
- }
- else if (!CM3.dicDelItem.TryGetValue(mpn, out text))
- {
- Debug.LogWarningFormat("[FacilityDataTable]MPN[{0}]のDelPropの取得に失敗しました", new object[]
- {
- mpn
- });
- }
- dictionary.Add(mpn, new KeyValuePair<bool, string>(key, text));
- }
- FacilityDataTable.m_FacilityDefaultCostumeArray.Add(cellAsInteger, dictionary);
- i++;
- }
- });
- FacilityDataTable.m_FacilityBusinessTypeDataArray = new Dictionary<int, FacilityDataTable.BusinessTypeData>();
- FacilityDataTable.ReadCSVBusinessTypeData();
- FacilityDataTable.m_FacilityDefaultDataArray = new Dictionary<int, FacilityDataTable.FacilityDefaultData>();
- FacilityDataTable.m_FacilityRecipeDataArray = new Dictionary<int, FacilityDataTable.FacilityRecipeData>();
- FacilityDataTable.m_FacilityMaterialDataArray = new Dictionary<int, FacilityDataTable.FacilityMaterialData>();
- FacilityDataTable.ReadCSVFacilityDefaultData();
- FacilityDataTable.ReadCSVFacilityPowerUpData();
- FacilityDataTable.ReadCSVFacilityMaterialData();
- }
- private static CsvParser GetCSV(string name)
- {
- if (!GameUty.FileSystem.IsExistentFile(name))
- {
- Debug.LogWarning(string.Format("[FacilityDataTable]csv「{0}」が見つからない", name));
- return null;
- }
- AFileBase file = GameUty.FileSystem.FileOpen(name);
- CsvParser csvParser = new CsvParser();
- if (!csvParser.Open(file))
- {
- Debug.LogError(string.Format("[FacilityDataTable]csv「{0}」を開くのに失敗", name));
- }
- return csvParser;
- }
- private static void ReadCSV(string fileName, Action<CsvParser> callback)
- {
- using (AFileBase afileBase = GameUty.FileSystem.FileOpen(fileName))
- {
- using (CsvParser csvParser = new CsvParser())
- {
- bool condition = csvParser.Open(afileBase);
- NDebug.Assert(condition, fileName + "\nopen failed.");
- callback(csvParser);
- }
- }
- }
- private static void ReadCSVFacilityDefaultData()
- {
- CsvParser csv = FacilityDataTable.GetCSV("facility_power_up.nei");
- Dictionary<int, int[]> dictionary = new Dictionary<int, int[]>();
- for (int i = 1; i < csv.max_cell_y; i++)
- {
- int cell_x = 0;
- int cellAsInteger = csv.GetCellAsInteger(cell_x++, i);
- string text = string.Empty;
- int[] array = null;
- if (csv.IsCellToExistData(cell_x, i))
- {
- text = csv.GetCellAsString(cell_x++, i);
- }
- if (!string.IsNullOrEmpty(text))
- {
- string[] array2 = text.Split(new char[]
- {
- ','
- });
- array = new int[array2.Length];
- for (int j = 0; j < array.Length; j++)
- {
- array[j] = int.Parse(array2[j]);
- }
- }
- dictionary.Add(cellAsInteger, array);
- }
- Dictionary<int, List<int>> dictionary2 = new Dictionary<int, List<int>>();
- CsvParser csv2 = FacilityDataTable.GetCSV("facility_level_table.nei");
- for (int k = 1; k < csv2.max_cell_y; k++)
- {
- int num = 0;
- if (!csv2.IsCellToExistData(0, k))
- {
- break;
- }
- int cellAsInteger2 = csv2.GetCellAsInteger(num++, k);
- num++;
- List<int> list = new List<int>();
- for (int l = 0; l < 5; l++)
- {
- if (csv2.IsCellToExistData(num, k))
- {
- list.Add(csv2.GetCellAsInteger(num, k));
- }
- else
- {
- list.Add(l * 100);
- }
- num++;
- }
- dictionary2.Add(cellAsInteger2, list);
- }
- HashSet<int> enableList = new HashSet<int>();
- string[] array3 = new string[]
- {
- "facility_enabled_list"
- };
- foreach (string fileName in array3)
- {
- CsvCommonIdManager.ReadEnabledIdList(GameUty.FileSystem, GameUty.PathList, fileName, ref enableList);
- }
- CsvParser csv3 = FacilityDataTable.GetCSV("facility.nei");
- for (int n = 1; n < csv3.max_cell_y; n++)
- {
- if (!csv3.IsCellToExistData(0, n))
- {
- break;
- }
- FacilityDataTable.FacilityDefaultData facilityDefaultData = new FacilityDataTable.FacilityDefaultData(csv3, dictionary, dictionary2, enableList, n);
- FacilityDataTable.m_FacilityDefaultDataArray.Add(facilityDefaultData.ID, facilityDefaultData);
- }
- }
- private static void ReadCSVFacilityPowerUpData()
- {
- CsvParser csv = FacilityDataTable.GetCSV("facility_power_up_list.nei");
- for (int i = 1; i < csv.max_cell_y; i++)
- {
- if (!csv.IsCellToExistData(0, i))
- {
- break;
- }
- FacilityDataTable.FacilityRecipeData facilityRecipeData = new FacilityDataTable.FacilityRecipeData(csv, i);
- FacilityDataTable.m_FacilityRecipeDataArray.Add(facilityRecipeData.ID, facilityRecipeData);
- }
- }
- private static void ReadCSVFacilityMaterialData()
- {
- CsvParser csv = FacilityDataTable.GetCSV("facility_material.nei");
- for (int i = 1; i < csv.max_cell_y; i++)
- {
- if (!csv.IsCellToExistData(0, i))
- {
- break;
- }
- FacilityDataTable.FacilityMaterialData facilityMaterialData = new FacilityDataTable.FacilityMaterialData(csv, i);
- FacilityDataTable.m_FacilityMaterialDataArray.Add(facilityMaterialData.ID, facilityMaterialData);
- }
- }
- private static void ReadCSVBusinessTypeData()
- {
- CsvParser csv = FacilityDataTable.GetCSV("facility_business_type.nei");
- for (int i = 1; i < csv.max_cell_y; i++)
- {
- if (!csv.IsCellToExistData(0, i))
- {
- break;
- }
- FacilityDataTable.BusinessTypeData businessTypeData = new FacilityDataTable.BusinessTypeData(csv, i);
- FacilityDataTable.m_FacilityBusinessTypeDataArray.Add(businessTypeData.ID, businessTypeData);
- }
- }
- public static FacilityDataTable.FacilityDefaultData GetFacilityDefaultData(int facilityTypeID, bool enableDataOnly = true)
- {
- if (FacilityDataTable.m_FacilityDefaultDataArray == null)
- {
- Debug.LogError("[FacilityDataTable]施設の基本情報の配列が未初期化です");
- return null;
- }
- if (!FacilityDataTable.m_FacilityDefaultDataArray.ContainsKey(facilityTypeID))
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID[{0}]は存在しないデータです", facilityTypeID));
- return null;
- }
- if (enableDataOnly && !FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID].isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID[{0}]は有効ではありません", facilityTypeID));
- return null;
- }
- return FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID];
- }
- public static int GetFacilityTypeID(string facilityName)
- {
- FacilityDataTable.FacilityDefaultData facilityDefaultData = FacilityDataTable.GetFacilityDefaultData(facilityName, true);
- if (facilityDefaultData != null)
- {
- return facilityDefaultData.ID;
- }
- return -1;
- }
- public static FacilityDataTable.FacilityDefaultData GetFacilityDefaultData(string facilityDefaultName, bool enableDataOnly = true)
- {
- if (FacilityDataTable.m_FacilityDefaultDataArray == null)
- {
- NDebug.Assert("[FacilityDataTable]施設の基本情報の配列が未初期化です", false);
- return null;
- }
- foreach (KeyValuePair<int, FacilityDataTable.FacilityDefaultData> keyValuePair in FacilityDataTable.m_FacilityDefaultDataArray)
- {
- if (!(keyValuePair.Value.name != facilityDefaultName))
- {
- if (enableDataOnly && !keyValuePair.Value.isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設名[{0}]は有効ではありません", facilityDefaultName));
- return null;
- }
- return keyValuePair.Value;
- }
- }
- Debug.LogWarning(string.Format("施設名[{0}]は存在しないデータです", facilityDefaultName));
- return null;
- }
- public static Dictionary<int, ScheduleCSVData.Work> GetAllWorkData(bool enableDataOnly = true)
- {
- if (FacilityDataTable.m_FacilityDefaultDataArray == null)
- {
- Debug.LogError("[FacilityDataTable]施設の基本情報の配列が未初期化です");
- return null;
- }
- Dictionary<int, ScheduleCSVData.Work> dictionary = new Dictionary<int, ScheduleCSVData.Work>();
- List<FacilityDataTable.FacilityDefaultData> list = new List<FacilityDataTable.FacilityDefaultData>(FacilityDataTable.m_FacilityDefaultDataArray.Values);
- for (int i = 0; i < list.Count; i++)
- {
- if (!enableDataOnly || list[i].isEnableData)
- {
- if (list[i].workData != null)
- {
- if (list[i].workData.id > 0)
- {
- if (dictionary.ContainsKey(list[i].workData.id))
- {
- NDebug.Assert("[営業施設と強化素材.xlsx]施設のスケジュールID" + list[i].workData.id + "が重複しています", false);
- return null;
- }
- dictionary.Add(list[i].workData.id, list[i].workData);
- }
- }
- }
- }
- return dictionary;
- }
- public static FacilityDataTable.FacilityRecipeData GetFacilityRecipeData(int recipeID)
- {
- if (FacilityDataTable.m_FacilityRecipeDataArray == null)
- {
- Debug.LogError("[FacilityDataTable]施設強化レシピの基本情報の配列が未初期化です");
- return null;
- }
- if (!FacilityDataTable.m_FacilityRecipeDataArray.ContainsKey(recipeID))
- {
- Debug.LogFormat("[FacilityDataTable]施設強化レシピID[{0}]は存在しないデータです", new object[]
- {
- recipeID
- });
- return null;
- }
- return FacilityDataTable.m_FacilityRecipeDataArray[recipeID];
- }
- public static Facility.FacilityStatus GetFacilityStatus(int facilityTypeID, bool enableDataOnly = true)
- {
- if (FacilityDataTable.m_FacilityDefaultDataArray == null)
- {
- Debug.LogError("[FacilityDataTable]施設の基本情報の配列が未初期化です");
- return null;
- }
- if (!FacilityDataTable.m_FacilityDefaultDataArray.ContainsKey(facilityTypeID))
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID[{0}]は存在しないデータです", facilityTypeID));
- return null;
- }
- FacilityDataTable.FacilityDefaultData facilityDefaultData = FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID];
- if (enableDataOnly && !facilityDefaultData.isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID[{0}]は有効ではありません", facilityTypeID));
- return null;
- }
- return new Facility.FacilityStatus
- {
- name = facilityDefaultData.name,
- termName = facilityDefaultData.termName,
- typeID = facilityDefaultData.ID,
- parameter = new Facility.FacilityParameter(facilityDefaultData.income, facilityDefaultData.valuation, facilityDefaultData.experienceValue)
- };
- }
- public static Facility.PowerUpRecipe GetFacilityPowerUpRecipe(int recipeID)
- {
- if (FacilityDataTable.m_FacilityRecipeDataArray == null)
- {
- Debug.LogError("[FacilityDataTable]強化レシピ情報の配列が未初期化です");
- return null;
- }
- if (!FacilityDataTable.m_FacilityRecipeDataArray.ContainsKey(recipeID))
- {
- Debug.Log(string.Format("[FacilityDataTable]施設強化レシピID[{0}]は存在しないデータです", recipeID));
- return null;
- }
- FacilityDataTable.FacilityRecipeData facilityRecipeData = FacilityDataTable.m_FacilityRecipeDataArray[recipeID];
- return new Facility.PowerUpRecipe
- {
- id = facilityRecipeData.ID,
- materialCategoryIDArray = facilityRecipeData.materialIDArray,
- name = facilityRecipeData.name,
- parameter = new Facility.FacilityParameter(facilityRecipeData.income, facilityRecipeData.valuation, facilityRecipeData.experienceValue)
- };
- }
- public static Facility.PowerUpMaterial GetFacilityPowerUpMaterial(int materialID)
- {
- if (FacilityDataTable.m_FacilityMaterialDataArray == null)
- {
- Debug.LogError("[FacilityDataTable]強化素材の情報の配列が未初期化です");
- return null;
- }
- if (!FacilityDataTable.m_FacilityMaterialDataArray.ContainsKey(materialID))
- {
- Debug.Log(string.Format("[FacilityDataTable]強化素材ID[{0}]は存在しないデータです", materialID));
- return null;
- }
- FacilityDataTable.FacilityMaterialData facilityMaterialData = FacilityDataTable.m_FacilityMaterialDataArray[materialID];
- return new Facility.PowerUpMaterial
- {
- id = facilityMaterialData.ID,
- categoryID = facilityMaterialData.categoryID,
- name = facilityMaterialData.name,
- parameter = new Facility.FacilityParameter(facilityMaterialData.income, facilityMaterialData.valuation, facilityMaterialData.experienceValue)
- };
- }
- public static Facility.PowerUpMaterial GetFacilityPowerUpMaterial(string materialName)
- {
- if (FacilityDataTable.m_FacilityMaterialDataArray == null)
- {
- Debug.LogError("[FacilityDataTable]強化素材の情報の配列が未初期化です");
- return null;
- }
- foreach (KeyValuePair<int, FacilityDataTable.FacilityMaterialData> keyValuePair in FacilityDataTable.m_FacilityMaterialDataArray)
- {
- if (!(keyValuePair.Value.name != materialName))
- {
- return FacilityDataTable.GetFacilityPowerUpMaterial(keyValuePair.Value.ID);
- }
- }
- NDebug.Warning(string.Format("強化素材「{0}」の情報は存在しません", materialName));
- return null;
- }
- public static int GetFacilityPowerUpMaterialID(string materialName)
- {
- Facility.PowerUpMaterial facilityPowerUpMaterial = FacilityDataTable.GetFacilityPowerUpMaterial(materialName);
- if (facilityPowerUpMaterial != null)
- {
- return facilityPowerUpMaterial.id;
- }
- return -1;
- }
- public static Facility.FacilityStatus[] GetFacilityStatusArray(bool enableDataOnly = true)
- {
- if (FacilityDataTable.m_FacilityDefaultDataArray == null)
- {
- Debug.LogError("[FacilityDataTable]施設の基本情報の配列が未初期化です");
- return null;
- }
- List<Facility.FacilityStatus> list = new List<Facility.FacilityStatus>();
- List<FacilityDataTable.FacilityDefaultData> list2 = new List<FacilityDataTable.FacilityDefaultData>(FacilityDataTable.m_FacilityDefaultDataArray.Values);
- for (int i = 0; i < list2.Count; i++)
- {
- if (!enableDataOnly || list2[i].isEnableData)
- {
- list.Add(FacilityDataTable.GetFacilityStatus(list2[i].ID, true));
- }
- }
- return list.ToArray();
- }
- public static int[] GetFacilityPowerUpMaterialIDArray()
- {
- if (FacilityDataTable.m_FacilityMaterialDataArray == null)
- {
- Debug.LogError("[FacilityDataTable]施設の強化素材情報の配列が未初期化です");
- return null;
- }
- List<int> list = new List<int>(FacilityDataTable.m_FacilityMaterialDataArray.Keys);
- return list.ToArray();
- }
- public static Facility.PowerUpRecipe[] GetFacilityPowerUpRecipeArray()
- {
- if (FacilityDataTable.m_FacilityRecipeDataArray == null)
- {
- Debug.LogError("[FacilityDataTable]施設強化レシピ情報の配列が未初期化です");
- return null;
- }
- List<Facility.PowerUpRecipe> list = new List<Facility.PowerUpRecipe>();
- List<FacilityDataTable.FacilityRecipeData> list2 = new List<FacilityDataTable.FacilityRecipeData>(FacilityDataTable.m_FacilityRecipeDataArray.Values);
- for (int i = 0; i < list2.Count; i++)
- {
- list.Add(FacilityDataTable.GetFacilityPowerUpRecipe(list2[i].ID));
- }
- return list.ToArray();
- }
- public static bool IsExistFacilityData(int facilityTypeID, bool enableDataOnly = true)
- {
- return FacilityDataTable.m_FacilityDefaultDataArray.ContainsKey(facilityTypeID) && (!enableDataOnly || FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID].isEnableData);
- }
- public static bool IsExistPowerUpMaterial(int materialID)
- {
- return FacilityDataTable.m_FacilityMaterialDataArray.ContainsKey(materialID);
- }
- public static Facility.PowerUpMaterial[] GetFacilityPowerUpMaterialArray(int materialCategoryID)
- {
- List<Facility.PowerUpMaterial> list = new List<Facility.PowerUpMaterial>();
- List<FacilityDataTable.FacilityMaterialData> list2 = new List<FacilityDataTable.FacilityMaterialData>(FacilityDataTable.m_FacilityMaterialDataArray.Values);
- for (int i = 0; i < list2.Count; i++)
- {
- if (list2[i].categoryID == materialCategoryID)
- {
- list.Add(FacilityDataTable.GetFacilityPowerUpMaterial(list2[i].ID));
- }
- }
- return list.ToArray();
- }
- public static int GetFacilityPowerUpMaterialCount()
- {
- return FacilityDataTable.m_FacilityMaterialDataArray.Count;
- }
- public static bool IsExistFacilityPowerUpRecipe(int facilityTypeID, bool enableDataOnly = true)
- {
- if (!FacilityDataTable.m_FacilityDefaultDataArray.ContainsKey(facilityTypeID))
- {
- Debug.LogWarning(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは存在しない", facilityTypeID));
- return false;
- }
- if (enableDataOnly && !FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID].isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは有効ではありません", facilityTypeID));
- return false;
- }
- FacilityDataTable.FacilityDefaultData facilityDefaultData = FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID];
- return facilityDefaultData.powerUpRecipeIDArray != null;
- }
- public static int[] GetFacilityPowerUpRecipeIDArray(int facilityTypeID, bool enableDataOnly = true)
- {
- if (!FacilityDataTable.m_FacilityDefaultDataArray.ContainsKey(facilityTypeID))
- {
- Debug.LogWarning(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは存在しない", facilityTypeID));
- return null;
- }
- if (enableDataOnly && !FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID].isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは有効ではありません", facilityTypeID));
- return null;
- }
- return FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID].powerUpRecipeIDArray;
- }
- public static string GetFacilityPowerUpMaterialCategoryName(int categoryID)
- {
- if (!FacilityDataTable.m_FacilityMaterialCategoryNameArray.ContainsKey(categoryID))
- {
- Debug.LogWarning(string.Format("[FacilityDataTable]素材カテゴリID「{0}」のデータは存在しない", categoryID));
- return null;
- }
- return FacilityDataTable.m_FacilityMaterialCategoryNameArray[categoryID];
- }
- public static int[] GetFacilityPowerUpMaterialCategoryIDArray()
- {
- List<int> list = new List<int>(FacilityDataTable.m_FacilityMaterialCategoryNameArray.Keys);
- return list.ToArray();
- }
- public static string GetFacilityParameterName(int parameterID)
- {
- if (!FacilityDataTable.m_FacilityParameterNameArray.ContainsKey(parameterID))
- {
- Debug.LogWarning(string.Format("[FacilityDataTable]施設パラメータID「{0}」のデータは存在しない", parameterID));
- return null;
- }
- return FacilityDataTable.m_FacilityParameterNameArray[parameterID];
- }
- public static bool GetFacilityCanBeUsedBusiness(int facilityID, bool enableDataOnly = true)
- {
- if (!FacilityDataTable.m_FacilityDefaultDataArray.ContainsKey(facilityID))
- {
- Debug.LogWarning(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは存在しない", facilityID));
- return false;
- }
- if (enableDataOnly && !FacilityDataTable.m_FacilityDefaultDataArray[facilityID].isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは有効ではありません", facilityID));
- return false;
- }
- return FacilityDataTable.m_FacilityDefaultDataArray[facilityID].isBusiness;
- }
- public static bool GetFacilityCanBeDestroy(int facilityID, bool enableDataOnly = true)
- {
- if (!FacilityDataTable.m_FacilityDefaultDataArray.ContainsKey(facilityID))
- {
- Debug.LogWarning(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは存在しない", facilityID));
- return false;
- }
- if (enableDataOnly && !FacilityDataTable.m_FacilityDefaultDataArray[facilityID].isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは有効ではありません", facilityID));
- return false;
- }
- return FacilityDataTable.m_FacilityDefaultDataArray[facilityID].isRemoval;
- }
- public static bool GetFacilityDefaultPlacement(int facilityID, bool enableDataOnly = true)
- {
- if (!FacilityDataTable.m_FacilityDefaultDataArray.ContainsKey(facilityID))
- {
- Debug.LogWarning(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは存在しない", facilityID));
- return false;
- }
- if (enableDataOnly && !FacilityDataTable.m_FacilityDefaultDataArray[facilityID].isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは有効ではありません", facilityID));
- return false;
- }
- return FacilityDataTable.m_FacilityDefaultDataArray[facilityID].isDefaultPlace;
- }
- public static int GetFacilityDefaultCost(int facilityID, bool enableDataOnly = true)
- {
- if (!FacilityDataTable.m_FacilityDefaultDataArray.ContainsKey(facilityID))
- {
- Debug.LogWarning(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは存在しない", facilityID));
- return 0;
- }
- if (enableDataOnly && !FacilityDataTable.m_FacilityDefaultDataArray[facilityID].isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは有効ではありません", facilityID));
- return 0;
- }
- return FacilityDataTable.m_FacilityDefaultDataArray[facilityID].cost;
- }
- public static Sprite GetFacilityThumbnail(int facilityTypeID, bool enableDataOnly = true)
- {
- if (!FacilityDataTable.m_FacilityDefaultDataArray.ContainsKey(facilityTypeID))
- {
- Debug.LogWarning(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは存在しない", facilityTypeID));
- return null;
- }
- if (FacilityDataTable.m_FacilityThumbnailCacheDic == null)
- {
- FacilityDataTable.m_FacilityThumbnailCacheDic = new Dictionary<int, Sprite>();
- }
- Sprite sprite;
- if (FacilityDataTable.m_FacilityThumbnailCacheDic.TryGetValue(facilityTypeID, out sprite))
- {
- return sprite;
- }
- FacilityDataTable.FacilityDefaultData facilityDefaultData = FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID];
- if (enableDataOnly && !facilityDefaultData.isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは有効ではありません", facilityTypeID));
- return null;
- }
- string text = facilityDefaultData.imageThumbnailName + ".tex";
- if (string.IsNullOrEmpty(text))
- {
- Debug.Log(string.Format("施設の種類ID[{0}]にはサムネイル画像情報がありません", facilityTypeID));
- return null;
- }
- if (!GameUty.FileSystem.IsExistentFile(text))
- {
- Debug.Log(string.Format("施設『{0}』のサムネイル画像「{1}」が見つかりませんでした", facilityDefaultData.name, text));
- return null;
- }
- Texture2D tex = ImportCM.CreateTexture(text);
- sprite = uGUIUtility.CreateSprite(tex);
- FacilityDataTable.m_FacilityThumbnailCacheDic.Add(facilityTypeID, sprite);
- return sprite;
- }
- public static Dictionary<MPN, KeyValuePair<bool, string>> GetFacilityDefaultCostume(int facilityTypeID, bool enableDataOnly = true)
- {
- if (!FacilityDataTable.m_FacilityDefaultCostumeArray.ContainsKey(facilityTypeID))
- {
- return null;
- }
- if (enableDataOnly && !FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID].isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは有効ではありません", facilityTypeID));
- return null;
- }
- Dictionary<MPN, KeyValuePair<bool, string>> dictionary = FacilityDataTable.m_FacilityDefaultCostumeArray[facilityTypeID];
- MPN[] facilityCostumeEnableMPN = FacilityDataTable.GetFacilityCostumeEnableMPN();
- Dictionary<MPN, KeyValuePair<bool, string>> dictionary2 = new Dictionary<MPN, KeyValuePair<bool, string>>();
- foreach (MPN key in facilityCostumeEnableMPN)
- {
- if (dictionary.ContainsKey(key))
- {
- dictionary2.Add(key, dictionary[key]);
- }
- }
- return dictionary2;
- }
- public static string GetFacilityDefaultCostumeThumbnailName(int facilityTypeID, bool enableDataOnly = true)
- {
- if (!FacilityDataTable.m_FacilityDefaultCostumeThumbnailArray.ContainsKey(facilityTypeID))
- {
- return null;
- }
- if (enableDataOnly && !FacilityDataTable.m_FacilityDefaultDataArray[facilityTypeID].isEnableData)
- {
- Debug.Log(string.Format("[FacilityDataTable]施設の種類ID「{0}」のデータは有効ではありません", facilityTypeID));
- return null;
- }
- return FacilityDataTable.m_FacilityDefaultCostumeThumbnailArray[facilityTypeID];
- }
- public static MPN[] GetFacilityCostumeEnableMPN()
- {
- return FacilityDataTable.m_FacilityCostumeEnableMPN.ToArray();
- }
- public static bool IsEnableFacilityCostumeMPN(MPN mpn)
- {
- return FacilityDataTable.m_FacilityCostumeEnableMPN.Contains(mpn);
- }
- public static int[] GetFacilityBusinessTypeIDArray(bool isExclusionEmptyData = true)
- {
- List<int> list = null;
- if (isExclusionEmptyData)
- {
- list = new List<int>();
- foreach (KeyValuePair<int, FacilityDataTable.BusinessTypeData> keyValuePair in FacilityDataTable.m_FacilityBusinessTypeDataArray)
- {
- if (keyValuePair.Key != 9999)
- {
- list.Add(keyValuePair.Key);
- }
- }
- }
- else
- {
- list = new List<int>(FacilityDataTable.m_FacilityBusinessTypeDataArray.Keys);
- }
- return list.ToArray();
- }
- public static FacilityDataTable.BusinessTypeData[] GetFacilityBusinessTypeDataArray(bool isExclusionEmptyData = true)
- {
- List<FacilityDataTable.BusinessTypeData> list = null;
- if (isExclusionEmptyData)
- {
- list = new List<FacilityDataTable.BusinessTypeData>();
- foreach (KeyValuePair<int, FacilityDataTable.BusinessTypeData> keyValuePair in FacilityDataTable.m_FacilityBusinessTypeDataArray)
- {
- if (keyValuePair.Key != 9999)
- {
- list.Add(keyValuePair.Value);
- }
- }
- }
- else
- {
- list = new List<FacilityDataTable.BusinessTypeData>(FacilityDataTable.m_FacilityBusinessTypeDataArray.Values);
- }
- return list.ToArray();
- }
- public static FacilityDataTable.BusinessTypeData GetFacilityBusinessTypeData(int businessTypeID)
- {
- if (!FacilityDataTable.m_FacilityBusinessTypeDataArray.ContainsKey(businessTypeID))
- {
- Debug.LogWarningFormat("[FacilityDataTable]事業の種類ID「{0}」に対応する情報がありません", new object[]
- {
- businessTypeID
- });
- return null;
- }
- return FacilityDataTable.m_FacilityBusinessTypeDataArray[businessTypeID];
- }
- public static bool IsExistFacilityBusinessTypeData(int businessTypeID)
- {
- return FacilityDataTable.m_FacilityBusinessTypeDataArray.ContainsKey(businessTypeID);
- }
- public static FacilityDataTable.BusinessTypeData GetFacilityBusinessTypeData(string businessName)
- {
- foreach (KeyValuePair<int, FacilityDataTable.BusinessTypeData> keyValuePair in FacilityDataTable.m_FacilityBusinessTypeDataArray)
- {
- if (!(keyValuePair.Value.name != businessName))
- {
- return keyValuePair.Value;
- }
- }
- Debug.LogWarningFormat("[FacilityDataTable]事業の名前「{0}」に対応する情報がありません", new object[]
- {
- businessName
- });
- return null;
- }
- private static Dictionary<int, FacilityDataTable.FacilityDefaultData> m_FacilityDefaultDataArray;
- private static Dictionary<int, FacilityDataTable.FacilityRecipeData> m_FacilityRecipeDataArray;
- private static Dictionary<int, FacilityDataTable.FacilityMaterialData> m_FacilityMaterialDataArray;
- private static Dictionary<int, FacilityDataTable.BusinessTypeData> m_FacilityBusinessTypeDataArray;
- private static Dictionary<int, string> m_FacilityMaterialCategoryNameArray;
- private static Dictionary<int, string> m_FacilityParameterNameArray;
- private static Dictionary<int, Dictionary<MPN, KeyValuePair<bool, string>>> m_FacilityDefaultCostumeArray;
- private static Dictionary<int, string> m_FacilityDefaultCostumeThumbnailArray;
- private static List<MPN> m_FacilityCostumeEnableMPN;
- private static Dictionary<int, Sprite> m_FacilityThumbnailCacheDic = new Dictionary<int, Sprite>();
- public enum BusinessType
- {
- 接待系 = 100,
- 営業系 = 200,
- アイドル系 = 300,
- 無し = 9999
- }
- public class FacilityDefaultData
- {
- public FacilityDefaultData(CsvParser csv, Dictionary<int, int[]> recipeIDArray, Dictionary<int, List<int>> levelTableList, HashSet<int> enableList, int y)
- {
- int num = 0;
- this.ID = csv.GetCellAsInteger(num++, y);
- int cellAsInteger = csv.GetCellAsInteger(num++, y);
- this.name = csv.GetCellAsString(num++, y);
- csv.GetCellAsString(num++, y);
- this.businessTypeName = csv.GetCellAsString(num++, y);
- this.businessTypeID = FacilityDataTable.GetFacilityBusinessTypeData(this.businessTypeName).ID;
- this.upwardFacilityID = csv.GetCellAsInteger(num++, y);
- this.fileName = csv.GetCellAsString(num++, y);
- this.fileNameNight = csv.GetCellAsString(num++, y);
- this.rank = csv.GetCellAsInteger(num++, y);
- string cellAsString = csv.GetCellAsString(num++, y);
- this.cost = csv.GetCellAsInteger(num++, y);
- this.income = csv.GetCellAsInteger(num++, y);
- this.valuation = csv.GetCellAsInteger(num++, y);
- this.experienceValue = csv.GetCellAsInteger(num++, y);
- this.isBusiness = (csv.GetCellAsString(num++, y) == "〇");
- this.isDefaultPlace = (csv.GetCellAsString(num++, y) == "〇");
- this.isRemoval = (csv.GetCellAsString(num++, y) == "〇");
- string cellAsString2 = csv.GetCellAsString(num++, y);
- this.imageThumbnailName = csv.GetCellAsString(num++, y);
- string cellAsString3 = csv.GetCellAsString(num++, y);
- this.minMaidCount = csv.GetCellAsInteger(num++, y);
- this.maxMaidCount = csv.GetCellAsInteger(num++, y);
- this.heroineMagnification = csv.GetCellAsInteger(num++, y);
- string cellAsString4 = csv.GetCellAsString(num++, y);
- this.isEnableData = enableList.Contains(this.ID);
- if (string.IsNullOrEmpty(cellAsString2))
- {
- this.isEnableNTR = true;
- this.isOnlyNTR = false;
- }
- else if (cellAsString2 == "×")
- {
- this.isEnableNTR = false;
- this.isOnlyNTR = false;
- }
- else if (cellAsString2 == "〇" || cellAsString2 == "○")
- {
- this.isEnableNTR = true;
- this.isOnlyNTR = true;
- }
- if (recipeIDArray.ContainsKey(this.ID))
- {
- this.powerUpRecipeIDArray = recipeIDArray[this.ID];
- }
- else
- {
- this.powerUpRecipeIDArray = null;
- }
- string[] array = cellAsString.Split(new char[]
- {
- ','
- });
- this.staffRankArray = new int[4];
- for (int i = 0; i < this.staffRankArray.Length; i++)
- {
- try
- {
- int.TryParse(array[i], out this.staffRankArray[i]);
- }
- catch (Exception ex)
- {
- this.staffRankArray[i] = 0;
- }
- }
- if (levelTableList.ContainsKey(this.ID))
- {
- this.levelTable = levelTableList[this.ID];
- }
- else
- {
- this.levelTable = new List<int>();
- this.levelTable.Add(0);
- this.levelTable.Add(100);
- this.levelTable.Add(200);
- this.levelTable.Add(300);
- this.levelTable.Add(400);
- }
- try
- {
- this.businessType = (FacilityDataTable.BusinessType)Enum.Parse(typeof(FacilityDataTable.BusinessType), this.businessTypeName);
- }
- catch (Exception e)
- {
- NDebug.AssertParseError("BusinessType", e);
- }
- if (cellAsInteger < 0)
- {
- return;
- }
- this.workData = new ScheduleCSVData.Work();
- this.workData.type = ScheduleTaskCtrl.TaskType.Work;
- this.workData.id = cellAsInteger;
- this.workData.name = csv.GetCellAsString(num++, y);
- this.workData.icon = cellAsString3;
- string cellAsString5 = csv.GetCellAsString(num++, y);
- if (!string.IsNullOrEmpty(cellAsString5) && Enum.IsDefined(typeof(ScheduleCSVData.TrainingType), cellAsString5))
- {
- this.workData.trainingType = (ScheduleCSVData.TrainingType)Enum.Parse(typeof(ScheduleCSVData.TrainingType), cellAsString5, false);
- }
- this.workData.study_rate = csv.GetCellAsInteger(num++, y);
- this.workData.reception = csv.GetCellAsInteger(num++, y);
- this.workData.care = csv.GetCellAsInteger(num++, y);
- this.workData.lovely = csv.GetCellAsInteger(num++, y);
- this.workData.elegance = csv.GetCellAsInteger(num++, y);
- this.workData.charm = csv.GetCellAsInteger(num++, y);
- this.workData.teach_rate = csv.GetCellAsInteger(num++, y);
- this.workData.cooking = csv.GetCellAsInteger(num++, y);
- this.workData.vocal = csv.GetCellAsInteger(num++, y);
- this.workData.dance = csv.GetCellAsInteger(num++, y);
- this.workData.appealPoint = csv.GetCellAsInteger(num++, y);
- this.workData.exp = csv.GetCellAsInteger(num++, y);
- this.workData.income = csv.GetCellAsInteger(num++, y);
- this.workData.cmdExp = csv.GetCellAsInteger(num++, y);
- string cellAsString6 = csv.GetCellAsString(num++, y);
- this.workData.condContract = new List<Contract>();
- string[] array2 = cellAsString6.Split(new char[]
- {
- '|'
- }, StringSplitOptions.RemoveEmptyEntries);
- for (int j = 0; j < array2.Length; j++)
- {
- if (Enum.IsDefined(typeof(Contract), array2[j]))
- {
- this.workData.condContract.Add((Contract)Enum.Parse(typeof(Contract), array2[j], false));
- }
- }
- string cellAsString7 = csv.GetCellAsString(num++, y);
- this.workData.condMaidClass = new List<int>();
- string[] array3 = cellAsString7.Split(new char[]
- {
- '&'
- }, StringSplitOptions.RemoveEmptyEntries);
- for (int k = 0; k < array3.Length; k++)
- {
- int id = JobClass.GetData(array3[k]).id;
- this.workData.condMaidClass.Add(id);
- }
- this.workData.needEventItemIdList = new List<int>();
- if (csv.GetCellAsString(num, 0) == "必要状態")
- {
- this.workData.needMaidStatus = csv.GetCellAsString(num++, y);
- string cellAsString8 = csv.GetCellAsString(num++, y);
- if (!string.IsNullOrEmpty(cellAsString8))
- {
- string[] array4 = cellAsString8.Split(new char[]
- {
- '|'
- });
- foreach (string s in array4)
- {
- this.workData.needEventItemIdList.Add(int.Parse(s));
- }
- }
- }
- if (num < csv.max_cell_x)
- {
- string cellAsString9 = csv.GetCellAsString(num, y);
- if (cellAsString9 != null)
- {
- if (!(cellAsString9 == "表示"))
- {
- if (cellAsString9 == "非表示")
- {
- this.workData.disableIfRentalMaid = true;
- }
- }
- else
- {
- this.workData.visibleIfRentalMaid = true;
- }
- }
- }
- num++;
- this.workData.condPackage = new List<string>();
- if (this.workData.id > 0)
- {
- this.workData.categoryID = 52;
- }
- this.workData.facility = this;
- }
- public bool isExistUpwardFacility
- {
- get
- {
- return FacilityDataTable.IsExistFacilityData(this.upwardFacilityID, true);
- }
- }
- public FacilityDataTable.FacilityDefaultData upwardFacility
- {
- get
- {
- if (!this.isExistUpwardFacility)
- {
- return null;
- }
- return FacilityDataTable.GetFacilityDefaultData(this.upwardFacilityID, true);
- }
- }
- public string termName
- {
- get
- {
- return "SceneFacilityManagement/施設名/" + this.name;
- }
- }
- public const string termRootText = "SceneFacilityManagement/";
- public readonly int ID;
- public readonly string name;
- public readonly string businessTypeName;
- public readonly int businessTypeID;
- public readonly FacilityDataTable.BusinessType businessType;
- public readonly string fileName;
- public readonly string fileNameNight;
- public readonly int cost;
- public readonly int income;
- public readonly int valuation;
- public readonly int experienceValue;
- public readonly bool isBusiness;
- public readonly bool isDefaultPlace;
- public readonly bool isRemoval;
- public readonly string imageThumbnailName;
- public readonly int[] powerUpRecipeIDArray;
- public readonly int minMaidCount;
- public readonly int maxMaidCount;
- public readonly int heroineMagnification;
- public readonly int rank;
- public readonly int[] staffRankArray;
- public readonly List<int> levelTable;
- public readonly ScheduleCSVData.Work workData;
- public readonly bool isEnableNTR;
- public readonly bool isOnlyNTR;
- public readonly bool isEnableData;
- private readonly int upwardFacilityID;
- }
- public class FacilityRecipeData
- {
- public FacilityRecipeData(CsvParser csv, int y)
- {
- int num = 0;
- this.ID = csv.GetCellAsInteger(num++, y);
- this.name = csv.GetCellAsString(num++, y);
- string cellAsString = csv.GetCellAsString(num++, y);
- this.conditions = new string[FacilityDataTable.FacilityRecipeData.CONDITIONS_NUM];
- for (int i = 0; i < FacilityDataTable.FacilityRecipeData.CONDITIONS_NUM; i++)
- {
- this.conditions[i] = csv.GetCellAsString(num++, y);
- }
- this.salonGrade = csv.GetCellAsInteger(num++, y);
- string cellAsString2 = csv.GetCellAsString(num++, y);
- if (!string.IsNullOrEmpty(cellAsString2))
- {
- string[] array = cellAsString2.Split(new char[]
- {
- ','
- });
- ParametersPack.StatusType key = ParametersPack.NameToStatusType(array[0]);
- this.statusType = new KeyValuePair<ParametersPack.StatusType, int>(key, int.Parse(array[1]));
- }
- this.income = csv.GetCellAsInteger(num++, y);
- this.valuation = csv.GetCellAsInteger(num++, y);
- this.experienceValue = csv.GetCellAsInteger(num++, y);
- if (!string.IsNullOrEmpty(cellAsString))
- {
- string[] array2 = cellAsString.Split(new char[]
- {
- ','
- });
- this.materialIDArray = new int[array2.Length];
- for (int j = 0; j < array2.Length; j++)
- {
- this.materialIDArray[j] = int.Parse(array2[j]);
- }
- }
- else
- {
- this.materialIDArray = null;
- }
- }
- public bool IsSatisfyTheConditions()
- {
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
- bool flag = true;
- flag &= (this.salonGrade <= GameMain.Instance.CharacterMgr.status.clubGrade);
- if (maid != null && this.statusType.Value > 0)
- {
- flag &= (this.statusType.Value <= FacilityDataTable.FacilityRecipeData.GetMaidStatusValue(maid, this.statusType.Key.ToString()));
- }
- else
- {
- Debug.LogWarning("メイド0番が見つかりません");
- }
- return flag;
- }
- private static int GetMaidStatusValue(Maid maid, string name)
- {
- switch (name)
- {
- case "接待":
- return maid.status.reception;
- case "お世話":
- return maid.status.care;
- case "可憐":
- return maid.status.lovely;
- case "気品":
- return maid.status.elegance;
- case "魅惑":
- return maid.status.charm;
- case "料理":
- return maid.status.cooking;
- case "ボーカル":
- return maid.status.vocal;
- case "ダンス":
- return maid.status.dance;
- case "アピールポイント":
- return maid.status.appealPoint;
- case "淫欲":
- return maid.status.inyoku;
- case "M性":
- return maid.status.mvalue;
- case "変態":
- return maid.status.hentai;
- case "奉仕":
- return maid.status.housi;
- case "指導":
- return maid.status.teachRate;
- case "経験人数":
- return maid.status.sexPlayNumberOfPeople;
- case "人気ランク":
- return maid.status.popularRank;
- case "評価":
- return maid.status.evaluation;
- }
- Debug.LogWarning("メイドパラメータ名" + name + "に対応する処理は未定義でした");
- return 9999;
- }
- public static readonly int CONDITIONS_NUM = 4;
- public readonly int ID;
- public readonly string name;
- public readonly int[] materialIDArray;
- public readonly int income;
- public readonly int valuation;
- public readonly int experienceValue;
- public readonly string[] conditions;
- public readonly int salonGrade;
- public readonly KeyValuePair<ParametersPack.StatusType, int> statusType;
- }
- public class FacilityMaterialData
- {
- public FacilityMaterialData(CsvParser csv, int y)
- {
- int num = 0;
- this.ID = csv.GetCellAsInteger(num++, y);
- this.name = csv.GetCellAsString(num++, y);
- this.categoryID = csv.GetCellAsInteger(num++, y);
- this.income = csv.GetCellAsInteger(num++, y);
- this.valuation = csv.GetCellAsInteger(num++, y);
- this.experienceValue = csv.GetCellAsInteger(num++, y);
- }
- public readonly int ID;
- public readonly string name;
- public readonly int categoryID;
- public readonly int income;
- public readonly int valuation;
- public readonly int experienceValue;
- }
- public class BusinessTypeData
- {
- public BusinessTypeData(CsvParser csv, int y)
- {
- int num = 0;
- this.ID = csv.GetCellAsInteger(num++, y);
- this.name = csv.GetCellAsString(num++, y);
- this.fileName = csv.GetCellAsString(num++, y);
- this.description = csv.GetCellAsString(num++, y);
- this.conditions = new string[FacilityDataTable.BusinessTypeData.CONDITIONS_NUM];
- for (int i = 0; i < FacilityDataTable.BusinessTypeData.CONDITIONS_NUM; i++)
- {
- this.conditions[i] = csv.GetCellAsString(num++, y);
- }
- }
- public static readonly int CONDITIONS_NUM = 2;
- public readonly int ID;
- public readonly string name;
- public readonly string fileName;
- public readonly string description;
- public readonly string[] conditions;
- }
- }
|