mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-03-22 08:43:24 +08:00
UXAssist v1.5.6 and CheatEnabler v2.4.3, with package target fix
This commit is contained in:
14
AGENTS.md
14
AGENTS.md
@@ -17,7 +17,7 @@ This repository is a collection of **BepInEx mods** for the game **Dyson Sphere
|
||||
- **Patching Library:** HarmonyLib (runtime IL patching via `[HarmonyPatch]` attributes)
|
||||
- **Build System:** Visual Studio solution (`DSP_Mods.sln`), SDK-style `.csproj` per mod
|
||||
- **Package Manager:** NuGet (standard feed + BepInEx dev feed)
|
||||
- **Packaging:** PowerShell `Compress-Archive` in post-build produces Thunderstore-ready `.zip` files
|
||||
- **Packaging:** `ZipMod` MSBuild target (explicit, not post-build) produces Thunderstore-ready `.zip` files via `powershell.exe Compress-Archive`
|
||||
- **Game DLL references:** `AssemblyFromGame/Assembly-CSharp.dll` and `UnityEngine.UI.dll`
|
||||
- **Notable dependencies:** DSPModSave, NebulaMultiplayer API, CommonAPI, NLua, obs-websocket-dotnet, Mono.Cecil
|
||||
|
||||
@@ -71,7 +71,7 @@ DSP_Mods/
|
||||
Common properties and references are factored into two root-level files that MSBuild automatically imports for every project:
|
||||
|
||||
- **`Directory.Build.props`** — shared `PropertyGroup` defaults (`TargetFramework`, `AllowUnsafeBlocks`, `LangVersion`, `RestoreAdditionalProjectSources`) and shared `ItemGroup`s (BepInEx packages, game DLL references, `Microsoft.NETFramework.ReferenceAssemblies`).
|
||||
- **`Directory.Build.targets`** — defines the `UpdateGameDlls`, `Pack`, and `CopyToParentPackage` targets (see below).
|
||||
- **`Directory.Build.targets`** — defines the `UpdateGameDlls`, `ZipMod`, and `CopyToParentPackage` targets (see below).
|
||||
- **`UpdateGameDlls.ps1`** — PowerShell script invoked by the `UpdateGameDlls` target; locates the DSP installation via Steam registry and `libraryfolders.vdf`, compares DLL timestamps, and re-publicizes stale DLLs using `assembly-publicizer`.
|
||||
|
||||
Individual `.csproj` files only declare what is unique to that project (GUID, version, extra packages, embedded resources).
|
||||
@@ -103,10 +103,12 @@ Packaging is a **separate, explicit build target** — it does not run on every
|
||||
|
||||
To produce a Thunderstore-ready zip:
|
||||
```
|
||||
dotnet build -t:Pack -c Release
|
||||
dotnet build -t:ZipMod -c Release
|
||||
```
|
||||
|
||||
The `Pack` target (defined in `Directory.Build.targets`) uses pure MSBuild tasks (`MakeDir`, `Copy`, `Delete`) plus `powershell.exe -NoProfile -Command` for `Compress-Archive`. Calling `powershell.exe` as an explicit executable path works correctly from any shell environment (cmd, PowerShell, bash/WSL).
|
||||
The `ZipMod` target (defined in `Directory.Build.targets`) uses pure MSBuild tasks (`MakeDir`, `Copy`, `Delete`) plus `powershell.exe -NoProfile -Command` for `Compress-Archive`. Calling `powershell.exe` as an explicit executable path works correctly from any shell environment (cmd, PowerShell, bash/WSL).
|
||||
|
||||
> Note: the target is named `ZipMod` rather than `Pack` because `Pack` is a reserved target name in the .NET SDK (used for NuGet packaging) and would be silently intercepted.
|
||||
|
||||
**Per-project packaging properties** (set in the project's `PropertyGroup`):
|
||||
|
||||
@@ -116,11 +118,11 @@ The `Pack` target (defined in `Directory.Build.targets`) uses pure MSBuild tasks
|
||||
| `PackUsePluginsLayout` | `false` | Use `plugins/` + `patchers/` folder layout (Dustbin, LabOpt) |
|
||||
| `PackPreloaderTargetDir` | *(empty)* | Preloader projects: destination folder for `CopyToParentPackage` |
|
||||
|
||||
**Preloader projects** (DustbinPreloader, LabOptPreloader) use `CopyToParentPackage` instead of `Pack`:
|
||||
**Preloader projects** (DustbinPreloader, LabOptPreloader) use `CopyToParentPackage` instead of `ZipMod`:
|
||||
```
|
||||
dotnet build -t:CopyToParentPackage -c Release
|
||||
```
|
||||
This copies the preloader DLL into the sibling main mod's `package/patchers/` directory, ready to be zipped by the main mod's `Pack` target.
|
||||
This copies the preloader DLL into the sibling main mod's `package/patchers/` directory, ready to be zipped by the main mod's `ZipMod` target.
|
||||
|
||||
## Key Architectural Patterns
|
||||
|
||||
|
||||
@@ -3,6 +3,16 @@
|
||||
|
||||
## Changlog
|
||||
|
||||
* 2.4.3
|
||||
* `Duplicate shells from that with highest production`: Fix crash on using with frameless shells.
|
||||
* `Keep max production shells and remove others`: Fix wrong behaviour when left count > 1.
|
||||
* `Quick absorb`: Fix ant issue that it is not working while `Skip absorption period` is enabled.
|
||||
* `Finish build immediately`: Fixed an issue where prebuilt buildings were not constructed immediately when the building quantity became sufficient.
|
||||
* New option for `Belt signal item generation`: `Use proliferators for raws/intermediates and finished products`
|
||||
* Following items use extra products: `Titanium Alloy`, `Prism`, `Frame Material`, `Proliferator Mk.II`, `Proliferator Mk.III`, `Magnetic Coil`, `Electric Motor`, `Electromagnetic Turbine`, `Super-magnetic Ring`, `Circuit Board`, `Thruster`, `Reinforced Thruster`, `Plasma Exciter`, `Particle Broadband`, `Graviton Lens`, `Quantum Chip`, `Annihilation Constraint Sphere`, `Deuteron Fuel Rod`, `Space Warper`, `Dyson Sphere Component`, `Small Carrier Rocket`, `Electromagnetic Matrix`, `Structure Matrix`, `Information Matrix`, `Gravity Matrix`, `Universe Matrix`
|
||||
* Following items does not use proliferators: `Casimir Crystal`, `Energy Matrix`
|
||||
* Other items use speed up production.
|
||||
* Fix some other minor bugs found by LLM AI.
|
||||
* 2.4.2
|
||||
* Fix critical bugs:
|
||||
* Dyson Power is not updated actively when `Skip bullet period` or `Skip absorption period` is enabled and no rocket is in fire.
|
||||
@@ -175,6 +185,16 @@
|
||||
|
||||
## 更新日志
|
||||
|
||||
* 2.4.3
|
||||
* `从发电量最高的壳复制戴森壳`:修复在无框壳体时可能崩溃的问题。
|
||||
* `保留发电量最高的戴森壳并移除其他戴森壳`:修复当剩余壳体数量大于1时的异常行为。
|
||||
* `快速吸收`:修复开启`跳过吸收阶段`时不生效的问题。
|
||||
* `立即完成建造`:修复建筑数量补足时,之前预建造状态的建筑未能立即完成的问题。
|
||||
* `传送带信号物品生成`新增选项:`原料/中间品和成品使用增产剂`
|
||||
* 以下物品会使用额外产出:`钛合金`、`棱镜`、`框架材料`、`增产剂 Mk.II`、`增产剂 Mk.III`、`磁线圈`、`电动机`、`电磁涡轮`、`超级磁场环`、`电路板`、`推进器`、`加力推进器`、`电浆激发器`、`粒子宽带`、`引力透镜`、`量子芯片`、`湮灭约束球`、`氘燃料棒`、`空间翘曲器`、`戴森球组件`、`小型运载火箭`、`电磁矩阵`、`结构矩阵`、`信息矩阵`、`引力矩阵`、`宇宙矩阵`
|
||||
* 以下物品不使用增产剂:`卡西米尔晶体`、`能量矩阵`
|
||||
* 其他物品使用加速生产
|
||||
* 修复一些由 LLM AI 发现的其他小问题。
|
||||
* 2.4.2
|
||||
* 修复了严重的系列BUG:
|
||||
* 在启用`跳过子弹阶段`或`跳过吸收阶段`并且没有火箭发射时,戴森球的发电量未实时更新
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<BepInExPluginGuid>org.soardev.cheatenabler</BepInExPluginGuid>
|
||||
<Description>DSP MOD - CheatEnabler</Description>
|
||||
<Version>2.4.2</Version>
|
||||
<Version>2.4.3</Version>
|
||||
<PackageId>CheatEnabler</PackageId>
|
||||
<RootNamespace>CheatEnabler</RootNamespace>
|
||||
<PackHasChangelog>true</PackHasChangelog>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "CheatEnabler",
|
||||
"version_number": "2.4.2",
|
||||
"version_number": "2.4.3",
|
||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler",
|
||||
"description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测",
|
||||
"dependencies": [
|
||||
|
||||
@@ -21,98 +21,66 @@
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
Pack target: assembles a Thunderstore-ready zip under package/.
|
||||
Run explicitly with: dotnet build -t:Pack -c Release
|
||||
ZipMod target: assembles a Thunderstore-ready zip under package/.
|
||||
Run explicitly with: dotnet build -t:ZipMod -c Release
|
||||
It does NOT run automatically on every build.
|
||||
|
||||
Per-project customisation properties (set before this file is imported):
|
||||
"Pack" is reserved by the .NET SDK for NuGet packaging, so this target
|
||||
uses the name "ZipMod" to avoid conflict.
|
||||
|
||||
Per-project customisation properties (set in the project's PropertyGroup):
|
||||
PackHasChangelog – set to 'true' to include CHANGELOG.md in the zip
|
||||
PackUsePluginsLayout – set to 'true' for the plugins/patchers folder layout
|
||||
(used by Dustbin and LabOpt)
|
||||
|
||||
Simple layout zips:
|
||||
<AssemblyName>.dll icon.png manifest.json README.md [CHANGELOG.md]
|
||||
plugins/patchers layout zips:
|
||||
plugins/ patchers/ icon.png manifest.json README.md [CHANGELOG.md]
|
||||
-->
|
||||
|
||||
<!-- ── Simple layout ──────────────────────────────────────────────────────
|
||||
Zips: <ProjectName>.dll icon.png manifest.json README.md
|
||||
(+ CHANGELOG.md when PackHasChangelog=true)
|
||||
Output: package/<ProjectName>-<Version>.zip
|
||||
──────────────────────────────────────────────────────────────────────── -->
|
||||
<Target Name="Pack" Condition="'$(Configuration)' == 'Release' and '$(PackUsePluginsLayout)' != 'true'">
|
||||
<Target Name="ZipMod" DependsOnTargets="Build" Condition="'$(PackPreloaderTargetDir)' == ''">
|
||||
<PropertyGroup>
|
||||
<_PackageDir>$(MSBuildProjectDirectory)\package</_PackageDir>
|
||||
<_StagingDir>$(MSBuildProjectDirectory)\obj\pack-staging</_StagingDir>
|
||||
<_ZipPath>$(_PackageDir)\$(ProjectName)-$(Version).zip</_ZipPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Collect files to include -->
|
||||
<ItemGroup>
|
||||
<_PackFiles Include="$(TargetPath)" />
|
||||
<_PackFiles Include="$(_PackageDir)\icon.png" />
|
||||
<_PackFiles Include="$(_PackageDir)\manifest.json" />
|
||||
<_PackFiles Include="$(MSBuildProjectDirectory)\README.md" />
|
||||
<_PackFiles Include="$(MSBuildProjectDirectory)\CHANGELOG.md" Condition="'$(PackHasChangelog)' == 'true'" />
|
||||
</ItemGroup>
|
||||
<!-- ── plugins/patchers layout: copy DLL into package/plugins/ first ── -->
|
||||
<MakeDir Directories="$(_PackageDir)\plugins"
|
||||
Condition="'$(PackUsePluginsLayout)' == 'true'" />
|
||||
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(_PackageDir)\plugins"
|
||||
Condition="'$(PackUsePluginsLayout)' == 'true'" />
|
||||
|
||||
<!-- Prepare staging directory -->
|
||||
<RemoveDir Directories="$(_StagingDir)" />
|
||||
<MakeDir Directories="$(_StagingDir)" />
|
||||
<Copy SourceFiles="@(_PackFiles)" DestinationFolder="$(_StagingDir)" />
|
||||
|
||||
<!-- Delete previous zip if present -->
|
||||
<Delete Files="$(_ZipPath)" Condition="Exists('$(_ZipPath)')" />
|
||||
|
||||
<!-- Create zip using powershell.exe (explicit executable – works from any shell) -->
|
||||
<Exec Command="powershell.exe -NoProfile -Command "Compress-Archive -Path '$(_StagingDir)\*' -DestinationPath '$(_ZipPath)'"" />
|
||||
|
||||
<!-- Clean up staging directory -->
|
||||
<RemoveDir Directories="$(_StagingDir)" />
|
||||
|
||||
<Message Text="Pack: created $(_ZipPath)" Importance="high" />
|
||||
</Target>
|
||||
|
||||
<!-- ── plugins/patchers layout ───────────────────────────────────────────
|
||||
Used by mods that ship a preloader alongside the main plugin.
|
||||
The preloader project copies its DLL into package/patchers/ as part
|
||||
of its own Pack target (or a dedicated CopyToParentPackage target).
|
||||
This target zips:
|
||||
patchers/ plugins/ icon.png manifest.json README.md
|
||||
(+ CHANGELOG.md when PackHasChangelog=true)
|
||||
Output: package/<ProjectName>-<Version>.zip
|
||||
──────────────────────────────────────────────────────────────────────── -->
|
||||
<Target Name="Pack" Condition="'$(Configuration)' == 'Release' and '$(PackUsePluginsLayout)' == 'true'">
|
||||
<PropertyGroup>
|
||||
<_PackageDir>$(MSBuildProjectDirectory)\package</_PackageDir>
|
||||
<_StagingDir>$(MSBuildProjectDirectory)\obj\pack-staging</_StagingDir>
|
||||
<_ZipPath>$(_PackageDir)\$(ProjectName)-$(Version).zip</_ZipPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Copy main plugin DLL into package/plugins/ -->
|
||||
<MakeDir Directories="$(_PackageDir)\plugins" />
|
||||
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(_PackageDir)\plugins" />
|
||||
|
||||
<!-- Collect loose files for the staging root -->
|
||||
<!-- Collect loose root files (common to both layouts) -->
|
||||
<ItemGroup>
|
||||
<_PackRootFiles Include="$(_PackageDir)\icon.png" />
|
||||
<_PackRootFiles Include="$(_PackageDir)\manifest.json" />
|
||||
<_PackRootFiles Include="$(MSBuildProjectDirectory)\README.md" />
|
||||
<_PackRootFiles Include="$(MSBuildProjectDirectory)\CHANGELOG.md" Condition="'$(PackHasChangelog)' == 'true'" />
|
||||
<_PackRootFiles Include="$(MSBuildProjectDirectory)\CHANGELOG.md"
|
||||
Condition="'$(PackHasChangelog)' == 'true'" />
|
||||
<!-- Simple layout: also include the DLL itself at the root -->
|
||||
<_PackRootFiles Include="$(TargetPath)"
|
||||
Condition="'$(PackUsePluginsLayout)' != 'true'" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Prepare staging directory -->
|
||||
<RemoveDir Directories="$(_StagingDir)" />
|
||||
<MakeDir Directories="$(_StagingDir)" />
|
||||
|
||||
<!-- Copy loose root files -->
|
||||
<!-- Copy loose root files into staging root -->
|
||||
<Copy SourceFiles="@(_PackRootFiles)" DestinationFolder="$(_StagingDir)" />
|
||||
|
||||
<!-- Copy plugins/ and patchers/ sub-folders (preserve structure) -->
|
||||
<ItemGroup>
|
||||
<!-- plugins/patchers layout: copy sub-folders into staging (preserve structure) -->
|
||||
<ItemGroup Condition="'$(PackUsePluginsLayout)' == 'true'">
|
||||
<_PluginFiles Include="$(_PackageDir)\plugins\**\*" />
|
||||
<_PatcherFiles Include="$(_PackageDir)\patchers\**\*" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(_PluginFiles)"
|
||||
DestinationFiles="@(_PluginFiles->'$(_StagingDir)\plugins\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
DestinationFiles="@(_PluginFiles->'$(_StagingDir)\plugins\%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
Condition="'$(PackUsePluginsLayout)' == 'true'" />
|
||||
<Copy SourceFiles="@(_PatcherFiles)"
|
||||
DestinationFiles="@(_PatcherFiles->'$(_StagingDir)\patchers\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
DestinationFiles="@(_PatcherFiles->'$(_StagingDir)\patchers\%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
Condition="'$(PackUsePluginsLayout)' == 'true'" />
|
||||
|
||||
<!-- Delete previous zip if present -->
|
||||
<Delete Files="$(_ZipPath)" Condition="Exists('$(_ZipPath)')" />
|
||||
@@ -123,7 +91,7 @@
|
||||
<!-- Clean up staging directory -->
|
||||
<RemoveDir Directories="$(_StagingDir)" />
|
||||
|
||||
<Message Text="Pack: created $(_ZipPath)" Importance="high" />
|
||||
<Message Text="ZipMod: created $(_ZipPath)" Importance="high" />
|
||||
</Target>
|
||||
|
||||
<!-- ── Preloader helper target ────────────────────────────────────────────
|
||||
@@ -132,8 +100,8 @@
|
||||
Set PackPreloaderTargetDir in the preloader's csproj, e.g.:
|
||||
<PackPreloaderTargetDir>..\Dustbin\package\patchers</PackPreloaderTargetDir>
|
||||
──────────────────────────────────────────────────────────────────────── -->
|
||||
<Target Name="CopyToParentPackage"
|
||||
Condition="'$(Configuration)' == 'Release' and '$(PackPreloaderTargetDir)' != ''">
|
||||
<Target Name="CopyToParentPackage" DependsOnTargets="Build"
|
||||
Condition="'$(PackPreloaderTargetDir)' != ''">
|
||||
<MakeDir Directories="$(PackPreloaderTargetDir)" />
|
||||
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(PackPreloaderTargetDir)" />
|
||||
<Message Text="CopyToParentPackage: copied $(TargetFileName) to $(PackPreloaderTargetDir)" Importance="high" />
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
## Changlog
|
||||
|
||||
* 1.5.6
|
||||
* `Initialize This Planet`: Fix known crashes and infinite loop.
|
||||
* `Show recent milkyway upload results`: Fix an issue that it only shows earliest results but latest ones.
|
||||
* Fix some other minor bugs found by LLM AI.
|
||||
* 1.5.5
|
||||
* `Initialize This Planet`:
|
||||
* Fix crash issue.
|
||||
@@ -391,6 +395,10 @@
|
||||
|
||||
## 更新日志
|
||||
|
||||
* 1.5.6
|
||||
* `初始化本行星`:修复已知的崩溃和无限循环问题。
|
||||
* `显示最近银河系上传结果`:修复仅显示最早上传结果而非最新结果的问题。
|
||||
* 修复一些由 LLM AI 发现的其他小问题。
|
||||
* 1.5.5
|
||||
* `初始化本行星`:
|
||||
* 修复崩溃问题。
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
|
||||
<Description>DSP MOD - UXAssist</Description>
|
||||
<Version>1.5.5</Version>
|
||||
<Version>1.5.6</Version>
|
||||
<PackageId>UXAssist</PackageId>
|
||||
<RootNamespace>UXAssist</RootNamespace>
|
||||
<PackHasChangelog>true</PackHasChangelog>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "UXAssist",
|
||||
"version_number": "1.5.5",
|
||||
"version_number": "1.5.6",
|
||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
|
||||
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
|
||||
"dependencies": [
|
||||
|
||||
Reference in New Issue
Block a user