Compare commits

5 Commits

Author SHA1 Message Date
56670cb0ba Manula wirte file tag
Some checks failed
Tests / Evaluate Tests on ubuntu-latest (push) Has been cancelled
Spellcheck / Spellcheck (push) Has been cancelled
2026-08-07 14:12:57 -04:00
14ad27fa99 t2
All checks were successful
Spellcheck / Spellcheck (push) Successful in 14s
Tests / Evaluate Tests on ubuntu-latest (push) Successful in 1m13s
2026-08-07 13:48:04 -04:00
1e8d33e436 needs package:?
Some checks failed
Spellcheck / Spellcheck (push) Successful in 14s
Tests / Evaluate Tests on ubuntu-latest (push) Failing after 31s
2026-08-07 13:44:58 -04:00
c5d5a0da61 Update SJKScripts
Some checks failed
Spellcheck / Spellcheck (push) Successful in 18s
Tests / Evaluate Tests on ubuntu-latest (push) Failing after 38s
2026-08-07 13:40:27 -04:00
fa5bc913a4 Added Methods to help with checking ray with a plane. 2026-07-05 13:48:32 -04:00
5 changed files with 32 additions and 13 deletions

View File

@@ -33,13 +33,13 @@ jobs:
DOTNET_NOLOGO: true DOTNET_NOLOGO: true
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v7
with: with:
token: ${{ secrets.GH_BASIC }} token: ${{ secrets.GH_BASIC }}
lfs: true lfs: true
submodules: 'recursive' submodules: 'recursive'
fetch-depth: 0 # So we can get all tags. fetch-depth: 0 # So we can get all tags.
fetch-tags: true # fetch-tags: true
- name: Read Current Project Version - name: Read Current Project Version
id: current-version id: current-version
@@ -66,12 +66,15 @@ jobs:
global-json-file: global.json global-json-file: global.json
# Write version to file so .NET will build correct version. # Write version to file so .NET will build correct version.
- name: Write Version to File - name: Write Version to File
uses: jacobtomlinson/gha-find-replace@v3 run: |
with: sed -i 's/0\.0\.0-devbuild/${{ steps.next-version.outputs.version }}/g' \
find: "0.0.0-devbuild" GodotHelper/GodotHelper.csproj
replace: ${{ steps.next-version.outputs.version }} # uses: jacobtomlinson/gha-find-replace@v3
regex: false # with:
include: GodotHelper/GodotHelper.csproj # find: "0.0.0-devbuild"
# replace: ${{ steps.next-version.outputs.version }}
# regex: false
# include: GodotHelper/GodotHelper.csproj
- name: Build - name: Build
working-directory: GodotHelper working-directory: GodotHelper
@@ -89,7 +92,7 @@ jobs:
# run: | # run: |
# version="${{ steps.next-version.outputs.version }}" # version="${{ steps.next-version.outputs.version }}"
# curl -X POST "http://192.168.1.4:3000/api/packages/Ronnie/GodotHelpers/releases" \ # curl -X POST "https://gitea.superjrking.com/api/packages/Ronnie/GodotHelpers/releases" \
# -H "Authorization: token ${{ secrets.GH_BASIC }}" \ # -H "Authorization: token ${{ secrets.GH_BASIC }}" \
# -H "Content-Type: application/json" \ # -H "Content-Type: application/json" \
# -d "{ # -d "{
@@ -100,7 +103,7 @@ jobs:
- name: Publish to Nuget - name: Publish to Nuget
run: | run: |
dotnet nuget push "${{ steps.package-path.outputs.package }}" \ dotnet nuget push "${{ steps.package-path.outputs.package }}" \
--source "http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" \ --source "https://gitea.superjrking.com/api/packages/Ronnie/nuget/index.json" \
--allow-insecure-connections \ --allow-insecure-connections \
--api-key "${{ secrets.NUGET_KEY }}" \ --api-key "${{ secrets.NUGET_KEY }}" \
--skip-duplicate --skip-duplicate

View File

@@ -48,7 +48,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="GodotSharp" Version="4.6.2" /> <PackageReference Include="GodotSharp" Version="4.6.2" />
<PackageReference Include="SjkScripts" Version="1.0.17" /> <PackageReference Include="SjkScripts" Version="1.0.19" />
<!-- [1.2.3,2.3.4] use range of versions --> <!-- [1.2.3,2.3.4] use range of versions -->
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -0,0 +1,14 @@
namespace GodotHelpers;
using Godot;
public static partial class SJKMath
{
public static Vector3? MouseToPlane(this Plane plane, Camera3D viewCamera, Vector2? mousePos = null)
{
var from = viewCamera.ProjectRayOrigin( mousePos ?? viewCamera.GetViewport().GetMousePosition());
var normal = viewCamera.ProjectRayNormal(mousePos ?? viewCamera.GetViewport().GetMousePosition());
return plane.IntersectsRay(from, normal);
}
public static Vector3? MouseToGroundPlane(this Camera3D viewCamera, Vector2? mousePos = null, float offset = 0) =>
(Plane.PlaneXZ with { D = offset }).MouseToPlane(viewCamera, mousePos);
}

View File

@@ -3,7 +3,7 @@ namespace GodotHelpers;
using System; using System;
using System.Linq; using System.Linq;
using Godot; using Godot;
using SJK.Functional;
public static class MyNodeExtensions public static class MyNodeExtensions
{ {
@@ -41,6 +41,7 @@ public static class MyNodeExtensions
var result = self.GetNodeAndResource(path); var result = self.GetNodeAndResource(path);
return ((Node)(GodotObject)result[0], (Resource)(GodotObject)result[1], (NodePath)result[2]); return ((Node)(GodotObject)result[0], (Resource)(GodotObject)result[1], (NodePath)result[2]);
} }
public static void QueueFreeChildren(this Node node) => node.GetChildren().ToList().ForEach(item => item.QueueFree()); public static void QueueFreeChildren(this Node node) => node.GetChildren().ToList().ForEach(item => item.QueueFree());
public static void QueueFreeChildren(this Node node, Func<Node, bool> predicate) => node.GetChildren().Where(predicate).ToList().ForEach(item => item.QueueFree()); public static void QueueFreeChildren(this Node node, Func<Node, bool> predicate) => node.GetChildren().Where(predicate).ToList().ForEach(item => item.QueueFree());
} }

View File

@@ -2,7 +2,8 @@
<configuration> <configuration>
<packageSources> <packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="gitea" value="http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" allowInsecureConnections="True" /> <add key="coverlet" value="https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json" />
<add key="gitea" value="https://gitea.superjrking.com/api/packages/Ronnie/nuget/index.json"/>
</packageSources> </packageSources>
<packageSourceCredentials> <packageSourceCredentials>
<gitea> <gitea>