Cities: Skylines

Cities: Skylines

评价数不足
District Tool [BETA]
   
奖励
收藏
已收藏
取消收藏
Mod
文件大小
发表于
更新日期
614.526 KB
2022 年 12 月 17 日 下午 5:04
10 月 1 日 上午 8:20
5 项改动说明 ( 查看 )

订阅以下载
District Tool [BETA]

描述
This is a BETA release of District Tool. Please report any issues or localization errors in the discussion section to avoid losing them in the comment section.

District Tool provides a customize-able hotkey to enable network snapping for the District Brush. This allows much finer control over how you paint districts near networks.

Harmony conflict warning with ToggleIt:
These mods should be compatible. I haven't had any issues using them together, so this warning can be safely ignored. If you do have an issue, please report it.

Source Code[github.com] is available on github.

21 条留言
The Lord Drake  [作者] 10 月 30 日 上午 8:12 
Thanks for narrowing that down. ADS does indeed skip the Awake call on the DistrictOptionPanel. I'll have to see if there is a better way to replace that logic.

Lock can cause performance issues, but it should be reasonably safe in this context. I'll make a note to take a look at that as well though.
Finwickle 10 月 30 日 上午 7:41 
I got the following feedback from the creator of Game Anarchy:

Based on your log, this issue doesn't appear to be related to Game Anarchy, since Game Anarchy hasn't performed any code-level operations on District. From the log, the problem seems to arise during the patching phase. I took a quick look at the code for the District Tool mod and noticed that it applies a prefix patch to the lifecycle's Awake method — apparently skipping the original Awake method entirely. It seems the intention is to bind its own UI logic, but completely bypassing Awake is something that should be done with extreme caution. Additionally, it uses a “lock” inside OnGUI, which could potentially lead to performance issues.
Finwickle 10 月 30 日 上午 3:26 
Game and Harmony log can be found here: https://www.filemail.com/d/zszfiahubxpnguz
Finwickle 10 月 30 日 上午 3:10 
After a lot of reloading the game with different mod combinations, I found that the conflict is between this mod and Game Anarchy . With only those two mods (and Skyve + dependencies) I have the issue. With all my mods and this mod but without Game Anarchy I don't have an issue. With all my mods and Game Anarchy but without this mod I don't have an issue either.

No idea why they would conflict though.
The Lord Drake  [作者] 10 月 29 日 下午 5:56 
I'm sorry to hear you're having issues with it. Unfortunately that error doesn't provide any particularly helpful information. 145 is a lot of potential conflicts. If you feel like narrowing it down, I'd suggest looking at anything that modifies the game UI, specifically the bottom tray.
Any mod that just adds assets, like buildings, cars, etc, can be safely ignored.
Finwickle 10 月 29 日 下午 5:35 
I'm sorry to say that this mod is incompatible with my other mods. When I paint a specialized district, the district tool auto switches to regular district. Then when closing the menu, the tool stays active, making it impossible to select anything. I have 145 other mods active, so it's hard to figure out which one(s) causes this, and I've not (yet) tried to figure it out. It doesn't happen with only this mod and Toggle It, so not that one.

My log shows this error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
at GeneratedScrollPanel.GetOptionPanel (System.String templateName) [0x00000] in <filename unknown>:0
at GeneratedScrollPanel.ShowDistrictOptionPanel () [0x00000] in <filename unknown>:0
Finwickle 10 月 3 日 下午 2:26 
I've not seen an issue in game. Both District Tool and Toggle It seem to function fine. If I notice something odd, I will let you know. Thanks for the quick response!
The Lord Drake  [作者] 10 月 3 日 上午 9:40 
I've taken a look the patch ToggleIt is using, and done a quick test locally. There doesn't seem to be an actual conflict, I'm not seeing any issues with functionality in either mod when used together. I'll look into whether or not I can do something about that message to avoid confusion though.

If you do run into an issue though let me know.
Finwickle 10 月 2 日 上午 11:07 
I've created a Harmony Conflict Report from the Harmony settings in the main menu, and that tells me there might be a conflict with the Toggle It mod.

====================Start Harmony conflict report for Advanced District Snapping 0.4====================
Possible conflict with Toggle It! by methods:
--- DistrictTool.OnDisable
------ [POSTFIX] ToggleIt.DistrictToolOnDisablePatch.Postfix
====================End Harmony report====================
Finwickle 10 月 2 日 上午 11:01 
I'm back again. It seems your mod generates Harmony errors. I get a Harmony log on my desktop when using your mod. You can find this Harmony log and my game log here [www.filemail.com].

This is with many more mods (and assets) active, but those have been stable and without Harmony errors for me. I have not yet tried it without other mods.