You are viewing a potentially older version of this package.
View all versions.
HalfGridSnap
Allows you to snap coordinates to half-grid points. 允许你进行对半格点的坐标进行吸附。
| Date uploaded | 5 months ago |
| Version | 1.0.0 |
| Download link | maeT-HalfGridSnap-1.0.0.zip |
| Downloads | 72 |
| Dependency string | maeT-HalfGridSnap-1.0.0 |
This mod requires the following mods to function
CommonAPI-CommonAPI
A modding library for Dyson Sphere Program. Currently is under development.
Preferred version: 1.6.7README
HalfGridSnap
允许将坐标吸附到“半格点”。本插件通过 Harmony Transpiler 替换游戏中 PlanetGrid 的硬编码常量,从而改变网格吸附间距,实现半格点吸附效果。
主要功能
- 将
PlanetGrid中的硬编码常量5.0f替换为10.0f,改变吸附间距以实现半格点行为。
安装
- 直接拷贝输出的 DLL 到
BepInEx/plugins或者通过模组管理器导入 Output 目录下的 zip 压缩包进行安装。
从源码构建
- 使用支持 .NET Standard 2.1 的 SDK / Visual Studio(例如 Visual Studio 2026)。
- 恢复 NuGet 包或手动引用 BepInEx 与 HarmonyLib 的程序集(项目中应已有引用)。
- 编辑项目 .csproj 里面的 GameDir 为你的实际游戏目录。
- 在解决方案中选择 Release/Debug,生成项目:
- Visual Studio:打开解决方案 -> 右键项目 -> 生成。
实现说明(开发者)
- 关键实现位于
PlanetGridPatch.cs:- 使用
HarmonyTranspiler遍历 IL 指令,查找ldc.r4 5.0,并将其替换为ldc.r4 10.0。 - 这样修改后,
PlanetGrid的吸附行为会以新的常量进行计算,从而实现期望的吸附效果。
- 使用
CHANGELOG
English
Changelog
All notable changes will be documented here. Follows common Semantic Versioning and release note format.
[1.1.0] - February 28, 2026
Added
- Added runtime toggle switch: Registered default hotkey
~viaCustomKeyBindSystem, supports in-game customization and is localizable.
[1.0.0] - February 26, 2026
Added
- Initial release: Implemented "Half-Grid" grid snapping functionality (HalfGridSnap).
中文
更改日志
所有重大更新将记录在此。遵循常见的语义化版本和发布说明格式。
[1.1.0] - 二月 28, 2026
已添加
- 在运行时添加切换开关:通过
CustomKeyBindSystem注册默认快捷键~,支持在游戏内自定义并可本地化。
[1.0.0] - 二月 26, 2026
已添加
- 初始发布:实现“半格点”网格吸附功能(HalfGridSnap)。