都市開放修正
This commit is contained in:
parent
0bb77d1b3f
commit
b1df88aea8
|
@ -94,10 +94,12 @@ public class HeaderManager : MonoBehaviour
|
||||||
var cityDataList = SpreadsheetDataManager.Instance.GetBaseDataList<CityData>(Const.CityDataSheet);
|
var cityDataList = SpreadsheetDataManager.Instance.GetBaseDataList<CityData>(Const.CityDataSheet);
|
||||||
GameDataObserver.Instance.HeartObserver.Subscribe(x =>
|
GameDataObserver.Instance.HeartObserver.Subscribe(x =>
|
||||||
{
|
{
|
||||||
|
var latestCityId = GameDataUtils.GetLatestCityId();
|
||||||
var unlockList = GameDataManager.GameData.CityGameDataDict.Keys.ToList();
|
var unlockList = GameDataManager.GameData.CityGameDataDict.Keys.ToList();
|
||||||
unlockList.Add(Const.DefaultCityId);
|
unlockList.Add(Const.DefaultCityId);
|
||||||
if (cityDataList.FirstOrDefault(data => !unlockList.Contains(data.id)) is not { } newCityData) return;
|
if (cityDataList.FirstOrDefault(data => !unlockList.Contains(data.id)) is not { } newCityData) return;
|
||||||
if (ItemConditionUtils.GetScriptList(newCityData.id, ItemCondition.CityUnlock, x).FirstOrDefault() is not { } conditionData) return;
|
if (ItemConditionUtils.GetScriptList(latestCityId, ItemCondition.CityUnlock).FirstOrDefault() is not { } conditionData) return;
|
||||||
|
if (conditionData.needValue > x) return;
|
||||||
if (UnityEngine.SceneManagement.SceneManager.sceneCount != 1) return;
|
if (UnityEngine.SceneManagement.SceneManager.sceneCount != 1) return;
|
||||||
// 都市開放処理
|
// 都市開放処理
|
||||||
GameDataUtils.CreateCityData(newCityData.id);
|
GameDataUtils.CreateCityData(newCityData.id);
|
||||||
|
|
Loading…
Reference in New Issue