Compare commits
5 Commits
v3.1.1
...
023602e364
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
023602e364 | ||
|
|
dde47af2d8 | ||
|
|
8d7d08b99e | ||
|
|
8262b70292 | ||
|
|
652693883b |
46
.gitea/workflows/dotnet.yml
Normal file
46
.gitea/workflows/dotnet.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Publish Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # 匹配 v 开头的标签,如 v1.0.0
|
||||
# 或者使用 '*' 匹配所有标签
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: http://MonBianG.lan:3000/action/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Setup .NET
|
||||
uses: http://MonBianG.lan:3000/action/setup-dotnet@v4.3.0
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --no-restore --configuration Release
|
||||
|
||||
# 使用 Gitea Release Action 创建 Release
|
||||
- name: Create Release
|
||||
uses: http://MonBianG.lan:3000/action/gitea-release-action@main
|
||||
with:
|
||||
# 使用推送的标签名作为版本号
|
||||
tag: ${{ github.ref_name }}
|
||||
# 自动从标签名生成 Release 标题
|
||||
name: Release ${{ github.ref_name }}
|
||||
# 使用提交信息或自定义发布说明
|
||||
body: |
|
||||
## Changes in ${{ github.ref_name }}
|
||||
|
||||
Auto-generated release for tag ${{ github.ref_name }}.
|
||||
# 上传构建产物
|
||||
files: |
|
||||
./bin/Release/net35/stick.plugins.*.dll
|
||||
# 是否为预发布版本(如果是 alpha/beta/rc 标签)
|
||||
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
|
||||
|
||||
20
Patches/LogLeverAngle.cs
Normal file
20
Patches/LogLeverAngle.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using HarmonyLib;
|
||||
using stick.plugins.playermanager;
|
||||
|
||||
using Steamworks;
|
||||
using UnityEngine;
|
||||
|
||||
[HarmonyPatch(typeof(HostLeverHandler), "Update")]
|
||||
class LogLeverAngle
|
||||
{
|
||||
static Vector3 lastForward = Vector3.zero;
|
||||
public static void PostFix()
|
||||
{
|
||||
Vector3 currentForward = PlayerManager.HostLeverHandler.lever.transform.forward;
|
||||
if (currentForward != lastForward)
|
||||
{
|
||||
Debug.Log("Current Lever Angle: " + currentForward);
|
||||
lastForward = currentForward;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user