Skip to content

Commit

Permalink
First 1.0 (exp) compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Jul 5, 2024
1 parent d6bd194 commit 6ba8db6
Show file tree
Hide file tree
Showing 11 changed files with 229 additions and 178 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:

steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Call 7D2D compiler action
uses: OCB7D2D/OcbModCompiler@master
with:
v7d2d: 'V1.0'
name: "OcbDensityHoe"
version: "${{ github.ref_name }}"
token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
40 changes: 20 additions & 20 deletions Config/items.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<configs patcher-version="4">

<!-- <setattribute xpath="/items/item[@name='meleeToolFarmT1IronHoe']/property[@name='CreativeMode']" name="value">Player</setattribute> -->

<modif condition="UndeadLegacy_CoreModule">
<include path="items.a20.xml"/>
<include path="items.a20.ulm.xml"/>
</modif>
<modelsif condition="DarknessFallsCore">
<!-- unlock item via iron tool schematics -->
<!-- include the main item -->
<include path="items.a21.xml"/>
<include path="items.a21.df.xml"/>
</modelsif>
<modelse>
<!-- include the main item -->
<include path="items.a21.xml"/>
</modelse>

</configs>
<configs patcher-version="4">

<!-- <setattribute xpath="/items/item[@name='meleeToolFarmT1IronHoe']/property[@name='CreativeMode']" name="value">Player</setattribute> -->

<modif condition="UndeadLegacy_CoreModule">
<modinc path="items.a20.xml"/>
<modinc path="items.a20.ulm.xml"/>
</modif>
<modelsif condition="DarknessFallsCore">
<!-- unlock item via iron tool schematics -->
<!-- include the main item -->
<modinc path="items.a21.xml"/>
<modinc path="items.a21.df.xml"/>
</modelsif>
<modelse>
<!-- include the main item -->
<modinc path="items.a21.xml"/>
</modelse>

</configs>
26 changes: 13 additions & 13 deletions Config/progression.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<configs patcher-version="4">

<modif condition="UndeadLegacy_CoreModule">
<!-- unlocks items via schematics only -->
</modif>
<modelsif condition="DarknessFallsCore">
<include path="progression.a21.df.xml"/>
</modelsif>
<modelse>
<include path="progression.a21.xml"/>
</modelse>

</configs>
<configs patcher-version="4">

<modif condition="UndeadLegacy_CoreModule">
<!-- unlocks items via schematics only -->
</modif>
<modelsif condition="DarknessFallsCore">
<modinc path="progression.a21.df.xml"/>
</modelsif>
<modelse>
<modinc path="progression.a21.xml"/>
</modelse>

</configs>
26 changes: 13 additions & 13 deletions Config/recipes.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<configs patcher-version="4">

<modif condition="UndeadLegacy_CoreModule">
<include path="recipes.a20.ulm.xml"/>
</modif>
<modelsif condition="DarknessFallsCore">
<include path="recipes.a21.df.xml"/>
</modelsif>
<modelse>
<include path="recipes.a21.xml"/>
</modelse>

</configs>
<configs patcher-version="4">

<modif condition="UndeadLegacy_CoreModule">
<modinc path="recipes.a20.ulm.xml"/>
</modif>
<modelsif condition="DarknessFallsCore">
<modinc path="recipes.a21.df.xml"/>
</modelsif>
<modelse>
<modinc path="recipes.a21.xml"/>
</modelse>

</configs>
2 changes: 1 addition & 1 deletion Config/traders.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<configs patcher-version="4">

<modif condition="UndeadLegacy_CoreModule">
<!-- <include path="traders.ulm.xml"/> -->
<!-- <modinc path="traders.ulm.xml"/> -->
</modif>
<modelsif condition="DarknessFallsCore">
<append xpath="/traders/trader_item_groups/trader_item_group[@name='tools']">
Expand Down
Binary file modified DensityHoe.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions Harmony/DensityHoe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static bool Prefix(
ref EntityAlive _player,
ref WorldRayHitInfo _hitInfo,
RenderDisplacedCube __instance,
ref Bounds ___myBounds,
ref Bounds ___localPos,
ref Vector3 ___multiDim,
ref float ___lastTimeFocusTransformMoved,
ref Transform ___transformFocusCubePrefab,
Expand Down Expand Up @@ -103,7 +103,7 @@ public static bool Prefix(

// Update some states, which are static for our use case
// We only target terrain blocks, so block size is fixed
___myBounds = new Bounds(new Vector3(0.5f, 0.5f, 0.5f), Vector3.one);
___localPos = new Bounds(new Vector3(0.5f, 0.5f, 0.5f), Vector3.one);
___multiDim = Vector3i.one; // Terrain blocks are never multi-dims?

// Note: disabled as too cheasy and doesn't always work (when not dense enough)
Expand Down
6 changes: 3 additions & 3 deletions Harmony/ItemActionDensityHoe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public override void ReadFrom(DynamicProperties _props)
base.ReadFrom(_props);
}

protected override void hitTarget(
public override void hitTarget(
ItemActionData action,
WorldRayHitInfo hitInfo,
bool isGrazingHit)
Expand All @@ -41,10 +41,10 @@ public override RenderCubeType GetFocusType(ItemActionData action) =>
public override ItemClass.EnumCrosshairType GetCrosshairType(ItemActionData action) =>
IsHitValid(action) ? ItemClass.EnumCrosshairType.Plus : base.GetCrosshairType(action);

protected override bool isShowOverlay(ItemActionData action) =>
public override bool isShowOverlay(ItemActionData action) =>
IsHitValid(action) || base.isShowOverlay(action);

protected override void getOverlayData(
public override void getOverlayData(
ItemActionData action,
out float _perc,
out string _text)
Expand Down
Loading

0 comments on commit 6ba8db6

Please sign in to comment.