-
Notifications
You must be signed in to change notification settings - Fork 164
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
Player general orders #5638
Merged
wookieejedi
merged 11 commits into
scp-fs2open:master
from
MjnMixael:player_general_orders
Oct 26, 2023
Merged
Player general orders #5638
wookieejedi
merged 11 commits into
scp-fs2open:master
from
MjnMixael:player_general_orders
Oct 26, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JohnAFernandez
added
general modding
A general feature or issue related to modding capabilities of FSO
Waiting for Stable
Marks a pull request that is to be merged after the next stable release, due to a release cycle
labels
Oct 1, 2023
BMagnu
requested changes
Oct 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs more const references!
Otherwise some small issues, but generally good to go.
Nice to see LuaAI being expanded in this direction!
JohnAFernandez
removed
the
Waiting for Stable
Marks a pull request that is to be merged after the next stable release, due to a release cycle
label
Oct 16, 2023
BMagnu
approved these changes
Oct 24, 2023
Will plan to merge later today |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature
A totally new sort of functionality
general modding
A general feature or issue related to modding capabilities of FSO
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here is player "general" orders. This new feature leverages LuaAI's foundation to be able to create new orders on the Comm Board that the player can select. These orders do not apply to a ship, however. They simply run arbitrary Lua script with an optional
target
parameter.Ai_helper.Ship
will always be nil here.You can define an order and set it to an arbitrary category that will show on the top-level Comm Board menu. Orders are then grouped by category.
General orders can be enabled or disabled. They are disabled by default on mission load. Disabled means they will not be visible at all on the Comm Board.
General orders can be valid or invalid. They are invalid by default on mission load. Invalid orders will be visible but greyed out on the Comm Board.
Mission file parsing and saving of default enabled/validated orders is included with this PR. A UI interface is planned and will look very similar to the Allowed Orders dialog in the Ship Editor. However I have a several PRs already that upgrade the Mission Specs dialog (where this will go) that I want to wait for a merge to avoid merge conflicts.
This does also come with sexps to enable/disable and validate/invalidate orders on the fly during a mission. That will suffice for now until I can get the UI dialog created.