Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pattern Access Hatch #854

Merged
merged 10 commits into from
Mar 7, 2025
Merged

Add Pattern Access Hatch #854

merged 10 commits into from
Mar 7, 2025

Conversation

reobf
Copy link
Contributor

@reobf reobf commented Mar 6, 2025

This PR

Fix MegaCraftingCenter stop accepting patterns after save&load game.
This is caused by ActualPattern recorded in CraftingCPUCluster will be saved to disk by .getPattern().writeToNBT()
how ever ActualPattern return the original pattern.
Therefore, when CraftingCPUCluster read from disk, ActualPattern turns into regular pattern, and consider patterns in MegaCraftingCenter as a different one.

This PR create a new item called ItemActualPattern to properly serialize&deserialize ActualPattern.
And implement equals&hashcode for ActualPattern

修复梦魇合成中心在存档并加载游戏后,无法接受之前下单的样板
这是因为 CraftingCPUCluster 在保存游戏时会将记录的样板用 .getPattern().writeToNBT() 保存
但梦魇合成中心提供的 ActualPattern getPattern()返回的是原样板
因此重新加载存档后CraftingCPUCluster 中的 ActualPattern 会变成普通样板,并认为它们是不同的 从而拒绝发配

这个PR新建了一个物品ItemActualPattern 来正确序列化/反序列化化ActualPattern(玩家不会感知到这个物品 所以没有材质也没本地化)
并为ActualPattern实现了equals&hashcode

Reproduce/复现:
https://github.com/user-attachments/assets/83ebc687-08ba-4311-9d10-8bb45f14863c

After fix/修复后:
https://github.com/user-attachments/assets/ec760604-fd84-4424-9291-30fde3051086

Add Pattern Access Hatch

This is a dedicated hatch for Mega Crafting Center
Installed on Mega Crafting Center, connect to ME net to access internal patterns.
Then use a ME Terminal to qurey, add or remove patterns.

样板访问仓是梦魇合成中心的专用仓室
安装在梦魇合成中心上后能连接ME网络来访问梦魇合成中心的内部样板
然后使用ME终端就能查询/插入/移除样板

Usage/演示:
https://github.com/user-attachments/assets/8c880d9f-5c09-4443-91dc-04e7265e256a

Use ME Terminal to filter patterns/使用ME终端过滤样板
2025-03-06_13 29 34

没有加合成 因为我不确定这东西的平衡性

@reobf reobf marked this pull request as ready for review March 6, 2025 10:04
@Nxer
Copy link
Owner

Nxer commented Mar 6, 2025

存在问题,样板访问仓无法使用扳手右键交互。

  • 修改材质,六面相同;
  • 扳手右键调整方向方法完善。

@reobf
Copy link
Contributor Author

reobf commented Mar 7, 2025

可以用扳手转了

@Nxer Nxer merged commit 316a793 into Nxer:main Mar 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants