[Breaking Changes] RitsuLib 0.6.0: framework overhaul - #108
Draft
BAKAOLC wants to merge 13 commits into
Draft
Conversation
Split common services, reusable UI and settings into shared assemblies while keeping game integration in per-version runtimes. Load and register complete module sets, validate their manifests and hashes, and preserve existing public types through compatibility forwarding. Expose reusable collapsible sections, action menus, sliders, drag handles, layout containers, control factories and theme layout values with bilingual API documentation. Replace the Godot build and export pipeline with standard .NET Debug and Release configurations. Isolate outputs by configuration and game API version, and update local builds, deployment, NuGet packaging, bundles, CI and release scripts together. Provide a single MSBuild import for local assembly references and document the complete runtime directory layout and assembly-enumeration migration requirements. Apply repository formatting and resolve the resulting code inspections.
Add ResourcePack for reading arbitrary ZIP files and directories by relative path, with lazy ZIP handle reuse, serialized reads and explicit disposal. Integrate resource packs with I18N through a public factory and document ownership and failure behavior. Move bundled images, translations and themes out of assemblies into a shared asset tree. Deploy loose resources for Debug and assets.zip for Release, NuGet and compatibility bundles while preserving existing image paths and localization entry points. Add resource-only packaging and update deployment targets and contributor documentation. Validate formatting and inspections, all four compatibility targets, package deployment and resource loading in the game.
Replace settings file dialogs with reusable file, folder, multi-file and save pickers using library controls. Preserve navigation, favorites, recent folders, filters, sorting, grid and list views, folder creation and overwrite confirmation. Hide files in directory-selection mode. Apply shared scrollbar, tooltip, input-menu, hover and focus styles, with themed split grips and localized control hints. Add controller navigation, touch scrolling and selection, input-specific hints, modal input isolation and focus restoration across nested dialogs. Persist favorites, recent folders, display preferences and per-purpose starting directories locally. Load thumbnails through Windows Shell, macOS Quick Look and available Linux desktop services, with bounded background work, image-decoding fallback and an in-memory cache. Add localized labels, icons and bilingual public API documentation. Validate formatting and both inspection paths, all four compatibility builds and full bundle packaging. Exercise file selection, filtering, theme refresh, visible tooltips, save paths, persistence, controller and touch input, nested dialogs, ownership and Windows thumbnails in the game.
Forward errors from the existing Godot logger into authorized diagnostics requests, retaining engine locations and available script backtraces without synthesizing exceptions. Preserve resource and node paths while redacting local absolute paths. Apply applicant filters, bounded queues and fields, recent-error deduplication, rate limits and recursion protection. Keep capture callbacks lightweight and queue errors without waiting for network delivery. Remove the game-log mirroring switch so local and multiplayer desynchronization diagnostics share the same log buffer independently of the viewer. Update consent descriptions and document the engine-error filter context. Validate both inspection paths, all four compatibility targets and complete bundle packaging. Exercise actual engine failures, consent changes, filters, path redaction, concurrent errors, slow HTTP delivery and shutdown in the game.
Engage scrolling only after a height tolerance, snap steps from the actual scroll position, and ease edge scale so top and bottom entries stay reachable.
Reapply edge scaling for the previous and new reticle targets on ShowReticles, HideReticles, and HideDecorations so buttons in the edge zone no longer stay shrunk or full-sized until the next scroll.
Unify full, incremental and overlay refreshes so card textures, materials and layout overrides apply consistently. Restore current model resources when overrides are removed, preserve third-party replacements and clear state before pooled views are reused. Coalesce runtime refreshes on later frames, preserve unrestricted requests when filters are added, and handle reentrant requests and nodes removed by predicates. Retain card Beta portrait preloads when character overrides replace only the main portrait. Preserve public API signatures. Validate formatting, both inspection paths, all four compatibility targets and complete bundle packaging, with 542 engine checks passing in both Debug and Release.
Use native multi-assembly discovery when module association succeeds, retaining the cached reflection bridge for older hosts and association failures. Reuse complete static assembly scans and merged type arrays while retrying partial loads and rescanning dynamic assemblies. Keep lifecycle snapshots when assembly membership is unchanged, and invalidate them when assemblies change or contain dynamically generated types. Validate both inspection paths, all four compatibility targets and complete bundle packaging. Pass 24 runtime checks in Debug and Release; warmed native and fallback reads allocate no managed memory.
Bind pile input actions to visible controls, suspend opening beneath blocking screens, and remove owned bindings on exit. Apply the same visibility and opening behavior to extra hands, clear stale pointer presses, and keep empty piles out of custom open callbacks. Initialize upgrade controls with valid scene ownership, explicit label sizing and matching hit areas. Fit sorting controls to the available width, reflect the configured initial order, and suspend underlying controls during card inspection. Copy and validate hotkey and sorting configuration and clarify the bilingual input-action contract without changing public signatures. Validate formatting, both inspection paths and all four compatibility targets, including normal packaging and installation. Pass 45 targeted configuration and headless engine checks.
Add outward forecasts from current HP and inward overlays from maximum HP, with clipping and deterministic layering. Bridge all four directions to current BaseLib and retain local rendering for older versions without duplicate overlays. Support concrete generic target types and methods through GenericTypes, and preserve ignored members with InteropIgnore. Process property accessors once to prevent duplicate binding and honor accessor-level exclusions. Preserve the default collapsed state of mirrored BaseLib settings. Add bilingual public API documentation while retaining existing signatures. Validate formatting, both inspection paths and all four compatibility targets, including normal packaging and installation. Pass 81 targeted configuration, interop and headless engine checks.
Run creature and merchant animation routing at an explicit early priority instead of deferring BaseLib through an ordering dependency. Preserve the existing order between BaseLib and character mods while retaining precedence for visuals managed by RitsuLib. Prevent Cloud and Tifa custom actions from being replaced by default attacks and avoid restarting strike animations on repeated hits. Validate the normal build and installation, formatting and both inspection paths. Reproduce the old behavior with the published Cloud and Tifa DLLs and pass 12 targeted engine checks covering custom animations, repeated hits, hurt playback and opted-in RitsuLib visuals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
本次更新调整了运行时目录、程序集分布和资源打包方式。请安装完整包;手动引用 DLL、通过反射枚举程序集类型,或使用调整过的 UI API 的 Mod,需要检查并适配。
Summary / 概要
为 RitsuLib 0.6.0 重整模块与资源布局,让多个游戏兼容版本共用公共代码、通用 UI、设置和资源,减少重复打包。新增主题文件选择器、通用资源读取 API 和 Godot 引擎错误诊断采集,同时完善 BaseLib 互通、泛型互操作、自定义牌堆及角色动画兼容。
What changed / 变更点
shared/;兼容入口和游戏集成放入compat/<API版本>/。根 DLL 根据游戏版本加载对应模块组合。RitsuFileDialog,替换设置中的原生文件弹窗,支持文件、文件夹、多选和保存模式,使用库内控件及主题,支持手柄、触屏、悬停提示和嵌套弹窗。收藏夹、最近目录、显示偏好和上次目录可跨重启保存;文件夹模式只显示目录,文件模式按所选类型筛选。缩略图优先使用系统能力,图像解码作为回退。assets/。Debug 部署散装目录,Release、NuGet 和多版本 Bundle 使用共用的assets.zip。ResourcePack,支持任意 ZIP 或目录的字节读取、文本读取和文件枚举,复用 ZIP 句柄并支持显式释放;新增I18N.FromResourcePack。InteropTargetAttribute.GenericTypes,通过具体类型的非泛型存根绑定封闭泛型目标类型和方法;新增InteropIgnoreAttribute排除辅助成员,修复属性访问器重复绑定及忽略标注失效。Test plan / 测试计划
Notes / 备注
shared/、compat/、模块清单和资源包,不能只替换根 DLL。RitsuLib.References.props导入所需程序集。单版本目录会自动选择唯一目标;引用多版本 Bundle 时需设置RitsuLibReferenceTarget。单独引用compat/中的兼容入口 DLL 不足以提供全部编译依赖。assets/目录整体优先于assets.zip。切换到 ZIP 部署时需移除旧散装目录;替换已打开的 ZIP 前应释放对应ResourcePack,游戏安装包应在关闭游戏后替换。