Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Diff fixes #7126

Merged
merged 3 commits into from
Apr 23, 2021
Merged

Diff fixes #7126

merged 3 commits into from
Apr 23, 2021

Conversation

schwiti6190
Copy link
Contributor

@schwiti6190 schwiti6190 commented Apr 23, 2021

- small action event improvements.
- added a global setting to disable action event texts.
- fixes #7051, #6810, #6611
@schwiti6190 schwiti6190 requested a review from pvaiko April 23, 2021 11:33
---Needs the action event text to be visible?
---@param table actionEventData from the config xml
function ActionEventsLoaderUtil.isActionEventTextVisible(actionEventData)
return courseplay.globalSettings.showActionEventsTexts:get() or actionEventData.textVisibilityNeeded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would textAlwaysVisible describe textVisibilityNeeded better what it is for?

base.lua Outdated
---Post init function, as not all giants variables are
---set correctly at the first courseplay:setAIDriver() call.
self.cp.driver:postInit()
self.cp.firstRun = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing, if firstRun is true, I'd think it is the first run, but the opposite seems to be the case. I'd recommend renaming it to postInitDone or something more descriptive.

@@ -16,6 +16,7 @@
isDisabledCallbackFunc: is used to disable a action event after a action event refresh or on load.
callbackState: isDisabledCallbackFunc parameter, this is an int!
text: is the action event text, by default it returns courseplay:loc(name), where 'name' is the previous defined action event name.
textVisibilityNeeded: Is disabling action event text forbidden ? (default: false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very confusing description (maybe it is due to my age :) but disabling forbidden is false is just too much boolean logic for me...

@schwiti6190 schwiti6190 requested a review from pvaiko April 23, 2021 12:33
@schwiti6190 schwiti6190 merged commit fe97f76 into master Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants