-
Notifications
You must be signed in to change notification settings - Fork 257
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
Prevent file overrides #3257
Prevent file overrides #3257
Conversation
Is there a good reason behind nesting the base CE defs into a "CombatExtended" folder? |
This is to avoid potential filename collisions in the future. Filename collisions can create bugs that are hard to catch. For example, right now
Here are some maybe not immediately obvious pros:
|
@masakitenchi I think you have missed something. Before
<li IfModActive="Ludeon.Rimworld.Biotech">Biotech</li>
<li IfModActive="Ludeon.Rimworld.Anomaly">Anomaly</li>
After
<li IfModActive="Ludeon.Rimworld.Biotech">DLC/Biotech</li>
<li IfModActive="Ludeon.Rimworld.Anomaly">DLC/Anomaly</li> No collision. |
@dmitry-agapov That is exactly what I have said.
I need to clarify that "filename change" here refers to any change occurs in the full path after what's written in In some text editors (i.e. VSCode) it does skip empty folders so that you can look into the nesting folders with one click, but as Samuel said, it still adds an extra layer of complexity. So, my suggestion would be adding prefix or postfix to the file itself, rather than nesting them in an extra folder. |
Now i get it. I thought that you were saying that this kind of nesting
The rationale behind using a subdirectory approach is that it is less error prone. |
I think this PR has become irrelevant since #3330 was merged. So i'm closing it. |
Prevents
Anomaly\Patches\DamageDefs\Damages_Misc.xml
from overridingBiotech\Patches\DamageDefs\Damages_Misc.xml
when both DLC's are loaded, as well as guards against such issues in the future.