Skip to content

Commit

Permalink
1.0.70.1352
Browse files Browse the repository at this point in the history
  • Loading branch information
SphereII committed Sep 3, 2024
1 parent bf5f2bc commit 94923d1
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 364 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,28 @@ public static bool Prefix(XUiC_RecipeList __instance, ref List<ItemStack> _items
}
}


[HarmonyPatch(typeof(XUiM_PlayerInventory))]
[HarmonyPatch("GetItemCount")]
[HarmonyPatch(new[] { typeof(ItemValue) })]

public class GetItemCount
{
public static void Postfix(ref int __result,ItemValue _itemValue, EntityPlayerLocal ___localPlayer)
{
if (!Configuration.CheckFeatureStatus(AdvFeatureClass, Feature))
return ;

var count = 0;
var items = RemoteCraftingUtils.SearchNearbyContainers(___localPlayer, _itemValue);
foreach (var item in items)
count += item.count;

Debug.Log($"GetItemCount: {count}: Total: {__result}");
__result += count;

}
}
/// <summary>
/// Extends what is considered to be in the player's backpack / tool belt to include local containers.
/// </summary>
Expand Down Expand Up @@ -239,7 +261,10 @@ public static bool Prefix(XUiM_PlayerInventory __instance, IList<ItemStack> _ite
// Check if this feature is enabled.
if (!Configuration.CheckFeatureStatus(AdvFeatureClass, Feature))
return true;


// Sometimes RemovedItems is null, so let's just declare it
if (_removedItems == null)
_removedItems = new List<ItemStack>();
RemoteCraftingUtils.ConsumeItem(_itemStacks, ___localPlayer, _multiplier, _removedItems, ___backpack, ___toolbelt);
return false;
}
Expand Down
257 changes: 62 additions & 195 deletions Mods/0-SCore/Features/RemoteCrafting/Scripts/RemoteCraftingUtils.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ public class SwayUtilities {
public static bool CanSway(bool force = false) {
if (force)
return true;
if (GameManager.Instance.World == null) return true;
var player = GameManager.Instance.World.GetPrimaryPlayer();
if (player == null) return true;
if (!player.Buffs.HasCustomVar("$WeaponSway")) return true;
Expand Down
2 changes: 1 addition & 1 deletion Mods/0-SCore/ModInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<Description value="SCore Mod" />
<DisplayName value="0-SCore" />
<Website value="" />
<Version value="1.0.65.1554" />
<Version value="1.0.70.1352" />
</xml>
4 changes: 2 additions & 2 deletions Mods/0-SCore/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
// [assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("20.0.*")]

[assembly: AssemblyVersion("1.0.65.1554")]
[assembly: AssemblyFileVersion("1.0.65.1554")]
[assembly: AssemblyVersion("1.0.70.1352")]
[assembly: AssemblyFileVersion("1.0.70.1352")]
8 changes: 8 additions & 0 deletions Mods/0-SCore/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ Direct Download to the 0-SCore.zip available on gitlab mirror:
### Change Logs

[ Change Log ]
Version: 1.0.70.1352
[ Remote Crafting / Repair ]
- Fixed an issue where ItemActionEntryRepair wasn't detecting ingredients from an open container.
- Added checks for IsUserAccessing to check if the current user has a chest open, allowing them to pull resources from that container.

[ CanSway ]
- Fixed a null reference when exiting a game.

Version: 1.0.65.1554

[ No Changes to SCore, only Better Life ]
Expand Down
Binary file modified Mods/0-SCore/SCore.dll
Binary file not shown.
Binary file modified Mods/0-SCore/SCore.pdb
Binary file not shown.
10 changes: 5 additions & 5 deletions Mods/0-SCore/Scripts/Entities/EntityAliveSDX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1939,11 +1939,11 @@ public void Collect(int _playerId) {
if (entityPlayerLocal == null) return;
var uiforPlayer = LocalPlayerUI.GetUIForPlayer(entityPlayerLocal);
var itemStack = new ItemStack(GetItemValue(), 1);
foreach (var meta in itemStack.itemValue.Metadata)
{
Debug.Log($"Key: {meta.Key}");
Debug.Log($"Value: {meta.Value.GetValue()}");
}
// foreach (var meta in itemStack.itemValue.Metadata)
// {
// Debug.Log($"Key: {meta.Key}");
// Debug.Log($"Value: {meta.Value.GetValue()}");
// }

if (!uiforPlayer.xui.PlayerInventory.AddItem(itemStack))
{
Expand Down
144 changes: 0 additions & 144 deletions Mods/SphereII A Round World/Config/items.xml

This file was deleted.

16 changes: 0 additions & 16 deletions Mods/SphereII A Round World/Config/recipes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,6 @@
<ingredient name="resourceMechanicalParts" count="10"/>
<ingredient name="resourceElectricParts" count="10"/>
</recipe>
<!--
<recipe name="drinkJarCoffeeCold" count="1" craft_area="campfire" craft_tool="toolCookingPot" tags="perkMasterChef">
<ingredient name="drinkJarCoffee" count="1"/>
</recipe>
<recipe name="drinkJarBlackStrapCoffeeCold" count="1" craft_area="campfire" craft_tool="toolCookingPot" tags="perkMasterChef">
<ingredient name="drinkJarBlackStrapCoffee" count="1"/>
</recipe>

<recipe name="drinkJarGoldenRodTeaCold" count="1" craft_area="campfire" craft_tool="toolCookingPot" tags="perkMasterChef">
<ingredient name="drinkJarGoldenRodTea" count="1"/>
</recipe>
<recipe name="drinkJarRedTeaCold" count="1" craft_area="campfire" craft_tool="toolCookingPot" tags="perkMasterChef">
<ingredient name="drinkJarRedTea" count="1"/>
</recipe>
-->
</append>
</configs>

0 comments on commit 94923d1

Please sign in to comment.