Skip to content

Commit

Permalink
v83
Browse files Browse the repository at this point in the history
  • Loading branch information
osamadeep committed Jan 19, 2023
1 parent 3a127e2 commit 3602096
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 43 deletions.
26 changes: 26 additions & 0 deletions nekoyume/Assets/_Scenes/Game.unity
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ GameObject:
- component: {fileID: 76870001}
- component: {fileID: 76870002}
- component: {fileID: 76869997}
- component: {fileID: 76870004}
m_Layer: 0
m_Name: Game
m_TagString: Untagged
Expand Down Expand Up @@ -463,6 +464,18 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &76870004
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 76869996}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f871e38c306970044a02b8f5a6ea0e44, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &98550335
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3057,6 +3070,7 @@ GameObject:
m_Component:
- component: {fileID: 1839423130}
- component: {fileID: 1839423131}
- component: {fileID: 1839423132}
m_Layer: 0
m_Name: Pandora
m_TagString: Untagged
Expand Down Expand Up @@ -3094,6 +3108,18 @@ MonoBehaviour:
Audiomixer: {fileID: 24100000, guid: f84234ca553c443c69f5457997eda065, type: 2}
CosmicSword: {fileID: 0}
CosmicIcon: {fileID: 0}
--- !u!114 &1839423132
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839423129}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a95fa5ce0aea2a4cb81bfd16e7cef42, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1933286906
GameObject:
m_ObjectHideFlags: 0
Expand Down
2 changes: 0 additions & 2 deletions nekoyume/Assets/_Scripts/Game/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,6 @@ private void InitializeAnalyzer()
isTrackable = false;
}



Analyzer = new Analyzer(
uniqueId,
rpcServerHost,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class PandoraMaster : MonoBehaviour

//Unsaved Reg Settings
public static string OriginalVersionId = "v100351";
public static string VersionId = "010082";
public static string VersionId = "010083";

//Pandora Database
public static PanDatabase PanDatabase;
Expand Down
18 changes: 9 additions & 9 deletions nekoyume/Assets/_Scripts/PandoraBox/Scripts/Prime/Premium.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public static void CRAFT_AutoCraftConsumable(AvatarState currentAvatarState, int
int missingParts = 999;
try //in case States.Instance.CurrentAvatarState.inventory not ready
{
missingParts = CRAFT_GetReplacedMaterials(materialMap).Count;
missingParts = CRAFT_GetReplacedMaterials(currentAvatarState,materialMap).Count;
}
catch
{
Expand All @@ -307,7 +307,7 @@ public static void CRAFT_AutoCraftConsumable(AvatarState currentAvatarState, int
{
RecipeId = consRow.Id,
Materials = materialMap,
ReplacedMaterials = CRAFT_GetReplacedMaterials(materialMap),
ReplacedMaterials = CRAFT_GetReplacedMaterials(currentAvatarState,materialMap),
};

ActionManager.Instance.CombinationConsumable(recipeInfo, slotIndex).Subscribe();
Expand Down Expand Up @@ -347,7 +347,7 @@ public static void CRAFT_AutoCraftEventConsumable(AvatarState currentAvatarState
int missingParts = 999;
try //in case States.Instance.CurrentAvatarState.inventory not ready
{
missingParts = CRAFT_GetReplacedMaterials(materialMap).Count;
missingParts = CRAFT_GetReplacedMaterials(currentAvatarState,materialMap).Count;
}
catch
{
Expand All @@ -374,7 +374,7 @@ public static void CRAFT_AutoCraftEventConsumable(AvatarState currentAvatarState
{
RecipeId = consRow.Id,
Materials = materialMap,
ReplacedMaterials = CRAFT_GetReplacedMaterials(materialMap),
ReplacedMaterials = CRAFT_GetReplacedMaterials(currentAvatarState,materialMap),
};
ActionManager.Instance.EventConsumableItemCrafts(RxProps.EventScheduleRowForRecipe.Value.Id,recipeInfo,slotIndex).Subscribe();
//analyze actions
Expand Down Expand Up @@ -428,7 +428,7 @@ public static async UniTask CRAFT_AutoCraftEquipment(AvatarState currentAvatarSt
int missingParts = 999;
try //in case States.Instance.CurrentAvatarState.inventory not ready
{
missingParts = CRAFT_IsEnoughMaterials(recipeRow.Id, subRecipeId);
missingParts = CRAFT_IsEnoughMaterials(currentAvatarState,recipeRow.Id, subRecipeId);
}
catch
{
Expand Down Expand Up @@ -496,7 +496,7 @@ public static async UniTask CRAFT_AutoCraftEquipment(AvatarState currentAvatarSt
}
catch { }
}
static int CRAFT_IsEnoughMaterials(int itemID, int itemSubID)
static int CRAFT_IsEnoughMaterials(AvatarState currentAvatarState, int itemID, int itemSubID)
{
var tableSheets = Game.TableSheets.Instance;
var itemSheet = tableSheets.EquipmentItemRecipeSheet;
Expand All @@ -511,12 +511,12 @@ static int CRAFT_IsEnoughMaterials(int itemID, int itemSubID)
foreach (var material in itemSub.Materials) // Add other materials
materialMap.Add(material.Id, material.Count);

return CRAFT_GetReplacedMaterials(materialMap).Count;
return CRAFT_GetReplacedMaterials(currentAvatarState,materialMap).Count;
}
static Dictionary<int, int> CRAFT_GetReplacedMaterials(Dictionary<int, int> required)
static Dictionary<int, int> CRAFT_GetReplacedMaterials(AvatarState currentAvatarState,Dictionary<int, int> required)
{
var replacedMaterialMap = new Dictionary<int, int>();
var inventory = States.Instance.CurrentAvatarState.inventory;
var inventory = currentAvatarState.inventory;

foreach (var (id, count) in required)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ void LoadSweep()
{
sweepOnImage.color = IsSweep ? Color.white : new Color(0.5f, 0.5f, 0.5f);
sweepOffImage.color = !IsSweep ? Color.white : new Color(0.5f, 0.5f, 0.5f);
sweepStageInput.transform.parent.gameObject.SetActive(IsSweep);
}

public void ChangeSweep(bool value)
Expand Down
43 changes: 13 additions & 30 deletions nekoyume/Assets/_Scripts/UI/Widget/Popup/ChronoSlotsPopup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,41 +47,24 @@ private void SubscribeBlockIndex(long blockIndex)

private void UpdateSlots(long blockIndex)
{
//if (!PandoraMaster.TryGetCustomAvatarStatesDone)
//{
// var states = States.Instance.AvatarStates;
// for (var i = 0; i < slots.Count; i++)
// {
// if (states != null && states.TryGetValue(i, out var state))
// {
// slots[i].gameObject.SetActive(true);
// slots[i].SetSlot(blockIndex, i, state);
// }
// else
// slots[i].gameObject.SetActive(false);
// }
//}
//else
var states = States.Instance.AvatarStates;
for (int i = 0; i < states.Count; i++)
{
var states = States.Instance.AvatarStates;
for (int i = 0; i < states.Count; i++)
if (slots.Count < i + 1) //add new slot
{
if (slots.Count < i + 1) //add new slot
{
var newSlot = Instantiate(slotPrefab, slots[0].transform.parent);
slots.Add(newSlot.GetComponent<ChronoSlot>());
}

if (States.Instance.AvatarStates.TryGetValue(i, out var state))
{
slots[i].gameObject.SetActive(true);
slots[i].SetSlot(blockIndex, i, state);
}
else
slots[i].gameObject.SetActive(false);
var newSlot = Instantiate(slotPrefab, slots[0].transform.parent);
slots.Add(newSlot.GetComponent<ChronoSlot>());
}

if (States.Instance.AvatarStates.TryGetValue(i, out var state))
{
slots[i].gameObject.SetActive(true);
slots[i].SetSlot(blockIndex, i, state);
}
else if (i != 0)
slots[i].gameObject.SetActive(false);
}

slots[0].transform.parent.GetComponent<RectTransform>().sizeDelta = new Vector2(550, 110 * States.Instance.AvatarStates.Count);

bool isNotify = false;
Expand Down
3 changes: 2 additions & 1 deletion nekoyume/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@ PlayerSettings:
--emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping
--emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping
--emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping
--emit-source-mapping'
--emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping
--emit-source-mapping --emit-source-mapping'
scriptingRuntimeVersion: 1
gcIncremental: 0
assemblyVersionValidation: 0
Expand Down

0 comments on commit 3602096

Please sign in to comment.