Skip to content

Commit

Permalink
Add missing metas and script fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoburatto committed Sep 2, 2023
1 parent 3d47030 commit ce1d75a
Show file tree
Hide file tree
Showing 17 changed files with 80 additions and 17 deletions.
8 changes: 8 additions & 0 deletions Assets/Scripts/External/FishNet.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Scripts/External/FishNet/CodeGenerating.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Scripts/External/FishNet/Runtime.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Scripts/External/FishNet/Runtime/Transporting.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private void ClothedBodyPartsOnChange(SyncListOperation op, int index,
Item newItem = newData._clothToDisplay;
if (!newBodyPart.TryGetComponent(out SkinnedMeshRenderer renderer))
{
Punpun.Warning(this, $"no skinned mesh renderer on game object {newBodyPart}, can't display cloth");
Log.Warning(this, $"no skinned mesh renderer on game object {newBodyPart}, can't display cloth");
return;
}
newBodyPart.gameObject.SetActive(true);
Expand Down Expand Up @@ -130,13 +130,12 @@ private void AddCloth(Item item)

ClothType itemClothType = cloth.Type;
ClothedBodyPart[] clothedBodyParts = GetComponentsInChildren<ClothedBodyPart>(true);
ClothedBodyPart bodypart = clothedBodyParts.
Where(x => x.Type == itemClothType).First();
ClothedBodyPart bodypart = clothedBodyParts.First(x => x.Type == itemClothType);

NetworkObject NetworkedBodyPart = bodypart.gameObject.GetComponent<NetworkObject>();
if (NetworkedBodyPart != null)
NetworkObject networkedBodyPart = bodypart.gameObject.GetComponent<NetworkObject>();
if (networkedBodyPart != null)
{
_clothedBodyParts.Add(new ClothDisplayData(NetworkedBodyPart, item));
_clothedBodyParts.Add(new ClothDisplayData(networkedBodyPart, item));
}
}

Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/SS3D/Systems/Inventory/Containers/Hands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ public void CmdSetActiveHand(AttachedContainer selectedContainer)

if (hand == selectedContainer)
{
Punpun.Warning(this, "Hand already selected");
Log.Warning(this, "Hand already selected");
return;
}

if (!HandContainers.Contains(selectedContainer))
{
Punpun.Warning(this, "no hand with the passed container in parameter");
Log.Warning(this, "no hand with the passed container in parameter");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private void SetUpContainers()
foreach (var container in attachedContainers)
{
AddContainer(container);
Punpun.Information(this, "Adding {container} container to inventory", Logs.Generic, container);
Log.Information(this, "Adding {container} container to inventory", Logs.Generic, container);
}
}

Expand Down Expand Up @@ -431,7 +431,7 @@ private void HandleTryRemoveContainerOnItemDetached(object sender, Item item)
if (ContainersOnPlayer.Contains(container))
{
RemoveContainer(container);
Punpun.Warning(this, $"invoke {container} removed");
Log.Warning(this, $"invoke {container} removed");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private void HandleInventoryContainerAdded(AttachedContainer container)
break;

default:
Punpun.Error(this, $"Unknown or missing container type {container.Type} for this container {container}");
Log.Error(this, $"Unknown or missing container type {container.Type} for this container {container}");
slot = null;
break;
}
Expand Down Expand Up @@ -244,7 +244,7 @@ private int PlaceHorizontalLayoutSlot(ContainerType type)
return i;
}
}
Punpun.Warning(this, "returning slot position 0, should not reach this point");
Log.Warning(this, "returning slot position 0, should not reach this point");
return 0;
}

Expand Down Expand Up @@ -290,7 +290,7 @@ private int LastIndexSlotOfType(ContainerType type)
}
if (slotOfType == null)
{
Punpun.Warning(this, "no slots of type " + type.ToString() + ", returning index 0 ");
Log.Warning(this, "no slots of type " + type.ToString() + ", returning index 0 ");
return 0;
}
else
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private void LoadItemPrefabs()
}
else
{
Punpun.Error(this, $"gameobject {itemObject} doesn't have any item component");
Log.Error(this, $"gameobject {itemObject} doesn't have any item component");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void OnDrop(PointerEventData eventData)
ItemDisplay display = drag.GetComponent<ItemDisplay>();
if (display == null)
{
Punpun.Warning(this, "dragging on null display");
Log.Warning(this, "dragging on null display");
return;
}

Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/SS3D/Systems/Screens/GameScreens.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static bool TryGet<T>(ScreenType screenType, [CanBeNull] out T screen) wh
string message = $"No screen of type {screenType} found.";

// ReSharper disable once Unity.PerformanceCriticalCodeInvocation
Punpun.Error(typeof(GameScreens), message, Logs.Important, typeof(T).Name);
Log.Error(typeof(GameScreens), message, Logs.Important, typeof(T).Name);

screen = null;
return false;
Expand All @@ -69,7 +69,7 @@ public static void SwitchTo(ScreenType screenToSwitchTo)
LastScreen = ActiveScreen;
ActiveScreen = screenToSwitchTo;

Punpun.Information(typeof(GameScreens), $"Switching game screen to {screenToSwitchTo}");
Log.Information(typeof(GameScreens), $"Switching game screen to {screenToSwitchTo}");

foreach (KeyValuePair<ScreenType,GameScreen> screenEntry in Screens)
{
Expand Down

0 comments on commit ce1d75a

Please sign in to comment.