Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Back CE support #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified 1.4/Assemblies/PickUpAndHaul.dll
Binary file not shown.
14 changes: 7 additions & 7 deletions Source/PickUpAndHaul/CompatHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ internal class CompatHelper
{
public static bool CeOverweight(Pawn pawn)
{
return false;
//var ceCompInventory = pawn.GetComp<CombatExtended.CompInventory>();
//return (ceCompInventory.currentWeight / ceCompInventory.capacityWeight) >= Settings.MaximumOccupiedCapacityToConsiderHauling;
//return false;
var ceCompInventory = pawn.GetComp<CombatExtended.CompInventory>();
return (ceCompInventory.currentWeight / ceCompInventory.capacityWeight) >= Settings.MaximumOccupiedCapacityToConsiderHauling;
}

public static int CanFitInInventory(Pawn pawn, Thing thing)
{
return thing.stackCount;
//pawn.GetComp<CombatExtended.CompInventory>().CanFitInInventory(thing, out var countToPickUp);
//return countToPickUp;
//return thing.stackCount;
pawn.GetComp<CombatExtended.CompInventory>().CanFitInInventory(thing, out var countToPickUp);
return countToPickUp;
}

internal static void UpdateInventory(Pawn pawn)
{
//pawn.GetComp<CombatExtended.CompInventory>().UpdateInventory();
pawn.GetComp<CombatExtended.CompInventory>().UpdateInventory();
}
}
8 changes: 4 additions & 4 deletions Source/PickUpAndHaul/PickUpAndHaul.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<Publicize Include="Assembly-CSharp" />
<!--<Reference Include="CombatExtended">
<HintPath>..\..\..\1631756268\Assemblies\CombatExtended.dll</HintPath>
<Private>False</Private>
</Reference>-->
<Reference Include="CombatExtended">
<HintPath>..\..\..\2890901044\Assemblies\CombatExtended.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="IHoldMultipleThings">
<HintPath>..\..\1.4\Assemblies\IHoldMultipleThings.dll</HintPath>
</Reference>
Expand Down