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

Tuning: fixed managedmats for meshes in addonpart bundles. #3157

Merged
merged 4 commits into from
Jun 1, 2024

Conversation

ohlidalp
Copy link
Member

Because we do material setup after we load meshes via OGRE, we need a placeholder for every managedmat - if not found, OGRE substitutes them with 'BaseWhite' which breaks subsequent processing.

Problem: placeholders were only created in the vehicle bundle's resource group, not in addonpart's bundle resource group.

Fix: create placeholders also for all addonpart bundles.

Because we do material setup _after_ we load meshes via OGRE, we need a placeholder for every managedmat - if not found, OGRE substitutes them with 'BaseWhite' which breaks subsequent processing.

Problem: placeholders were only created in the vehicle bundle's resource group, not in addonpart's bundle resource group.
(request may come from 'Browse all' button or script).
@ohlidalp
Copy link
Member Author

ohlidalp commented May 29, 2024

Additionally, I added an addonpart conflict check which always runs upon equipping an addonpart (because request may come from 'Browse all' button or script). Screenshot shows the dialog that appears if conflict is found - it's a bit crude but thorough.

obrazek

Also moved the code from CacheSystem.cpp to AddonPartFileFormat.cpp, into a new func `DoubleCheckForAddonpartConflict()`
Also extended the GUI_MessageBox.cpp to always reprint the dialog to RoR.log
@ohlidalp
Copy link
Member Author

ohlidalp commented May 30, 2024

Added 'OK' button to the conflicts doublecheck dialog.

obrazek

Also extended the GUI_MessageBox.cpp to always reprint the dialog to RoR.log

10:52:00: [RoR|MessageBox] Showing a message box
<MessageBox title> Cannot install addon part, conflicts were detected.
<MessageBox text> Requested addon part: 'Gavril MV4S - Lowered Race Suspension' (file 'MV4_lowered_race.addonpart').
Total conflicts: 8.

[1/8] 'Gavril MV4 - Rally Suspension' (file 'MV4_rally.addonpart') conflicts with 'addonpart_tweak_node' #119.
[2/8] 'Gavril MV4 - Rally Suspension' (file 'MV4_rally.addonpart') conflicts with 'addonpart_tweak_node' #120.
[3/8] 'Gavril MV4 - Rally Suspension' (file 'MV4_rally.addonpart') conflicts with 'addonpart_tweak_node' #121.
[4/8] 'Gavril MV4 - Rally Suspension' (file 'MV4_rally.addonpart') conflicts with 'addonpart_tweak_node' #122.
[5/8] 'Gavril MV4 - Rally Suspension' (file 'MV4_rally.addonpart') conflicts with 'addonpart_tweak_node' #135.
[6/8] 'Gavril MV4 - Rally Suspension' (file 'MV4_rally.addonpart') conflicts with 'addonpart_tweak_node' #136.
[7/8] 'Gavril MV4 - Rally Suspension' (file 'MV4_rally.addonpart') conflicts with 'addonpart_tweak_node' #137.
[8/8] 'Gavril MV4 - Rally Suspension' (file 'MV4_rally.addonpart') conflicts with 'addonpart_tweak_node' #138.'
<MessageBox button> 'OK' (MsgType: MSG_GUI_HIDE_MESSAGE_BOX_REQUESTED)

@ohlidalp ohlidalp merged commit d344614 into RigsOfRods:master Jun 1, 2024
2 checks passed
@ohlidalp ohlidalp deleted the Mike_managed-mat-tweaks branch June 1, 2024 17:12
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.

None yet

2 participants