Workshop v2 Integration#190
Conversation
this is ignored if in tools mode. also added toggle for this.
| const buckets = CampaignAPI.GetAllCampaignBuckets(); | ||
| if (!AddonManager.advancedMode && buckets.some((v: CampaignBucket) => v.addon_id === this.index)) { | ||
| this.panel.visible = false; | ||
| } |
There was a problem hiding this comment.
Does this imply for every addon we request every campaign bucket and check if the current addon has a bucket?
I think this might scale poorly? Maybe we need an API for this? or to do all the matching once in one location?
There was a problem hiding this comment.
It won't scale very well so we probably do need a C++ API for this because I don't see any other way to check this in JS-land. Scales even worse because it will do this every time the page is opened :D
| if (campaign && campaign.bucket.addon_id === addon) { | ||
| const p = $.CreatePanel('Panel', this.addonContainer, 'ContentDivider'); | ||
| p.AddClass('addons__divider'); | ||
| p.AddClass('fancy-orange-noborder'); | ||
| p.AddClass('addons__divider__orange'); | ||
| $.CreatePanel('Label', p, 'ContentDividerText', { | ||
| text: '[HC] The following addons are required by in-game content.', | ||
| class: 'horizontal-align-center text-weight-bold' | ||
| }); | ||
| } |
There was a problem hiding this comment.
ah clever. just putting campaign + all below as required. nice idea. i was curious how you were doing it
ozxybox
left a comment
There was a problem hiding this comment.
LGTM! Awesome work! Just maybe make sure the event that got changed still works and good to merge
No description provided.