-
-
Notifications
You must be signed in to change notification settings - Fork 143
Add Passengers/Occupants Cameo Display #2272
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
Open
CZHczhABCZ
wants to merge
35
commits into
Phobos-developers:develop
Choose a base branch
from
CZHczhABCZ:feat-unit-passengers-display
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+576
−1
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
5e17992
feat: add Unit Passengers Display
CZHczhABCZ 1f1f0db
feat: add Unit Passengers Display
CZHczhABCZ acf66e8
docs: refine documentation formatting per review
CZHczhABCZ f8694e2
fix: address review feedback
CZHczhABCZ 929925e
docs: update CSF fallback text and shorten Whats-New entry
CZHczhABCZ 833bc82
[doc] Correct the writing of Changelog
DeathFishAtEase 7e442ae
docs: move unit passengers display entry from Breaking changes to Cha…
CZHczhABCZ 4853568
fix: add FootClass cast guard for buildings and RA2MD.INI config
CZHczhABCZ 42d0d0b
Revert "docs: move unit passengers display entry from Breaking change…
CZHczhABCZ db52a4f
feat: add CameoPalette support for unit passenger display
CZHczhABCZ 92365a5
style: fix code placement and formatting per review
CZHczhABCZ ee05b3a
style: add blank lines between unrelated declarations and calls
CZHczhABCZ 074849c
style: fix whitespace in Rules/Body.cpp
CZHczhABCZ c2314d0
Merge upstream/develop into feat-unit-passengers-display
CZHczhABCZ 801330c
refactor: rename UnitPassengers to Passengers, add global PerRow/Bott…
CZHczhABCZ 04e0649
docs: rename Icons to Cameos, merge CSF messages, fix dirty diff in R…
CZHczhABCZ 35a61cd
docs: split Toggle Passengers into standard format, add CSF message d…
CZHczhABCZ 2b7b980
refactor: rename Passengers.Enable to ShowPassengers.Enable, move fie…
CZHczhABCZ 0900197
Fix ShowPassengers logic priority and CameoPalette INI reading order
CZHczhABCZ a2bf97b
Rename CSF labels to PassengerCameoDisplay, fix icon layout order
CZHczhABCZ 6cf1934
Fix passenger cameo layout: correct X (left-to-right) and Y (top-to-b…
CZHczhABCZ 7820299
feat: add Show Cameo display feature with CustomPalette support
CZHczhABCZ a01c29a
fix: address review feedback - simplify docs, fix English comments, f…
CZHczhABCZ 424ce73
fix: reverse draw order for buildings so that OverlapPrimary works co…
CZHczhABCZ 2a35501
fix: address second round review - placement and formatting
CZHczhABCZ a956050
fix: micro-review - move Toggle Cameos after Deselect, clean up Whats…
CZHczhABCZ 54f9776
fix: update changelog entry name and anchor to Show Cameo
CZHczhABCZ d00b4f5
docs: fix Occupier INI tag reference in Show Cameo section
CZHczhABCZ e8f1a88
Merge upstream/develop: resolve conflict in Whats-New.md
CZHczhABCZ e19bb92
fix: reorder ShowCameo entry after upstream DiscardOn entry in Whats-…
CZHczhABCZ 2518c80
Merge branch 'feat-passengers-cameo-display' into feat-unit-passenger…
CZHczhABCZ 5fad5fc
fix: remove duplicate DiscardOn entry, place ShowCameo at end
CZHczhABCZ 3e4230a
docs: use cameo.pal instead of CAMEO_PAL for readability
CZHczhABCZ fa96886
Merge branch 'feat-passengers-cameo-display' into feat-unit-passenger…
CZHczhABCZ 6c9ed24
feat: add ShowCameo.CustomPCX support for custom PCX cameo icons
CZHczhABCZ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Submodule YRpp
updated
8 files
| +0 −2 | BeaconManagerClass.h | |
| +0 −12 | EventClass.h | |
| +0 −16 | IPXManagerClass.h | |
| +0 −44 | SessionClass.h | |
| +0 −4 | UI.h | |
| +0 −7 | Unsorted.h | |
| +1 −4 | WWMouseClass.h | |
| +0 −3 | WinsockInterfaceClass.h |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| #include "ToggleCameos.h" | ||
|
|
||
| #include <Utilities/GeneralUtils.h> | ||
| #include <Ext/Rules/Body.h> | ||
| #include <MessageListClass.h> | ||
| #include <HouseClass.h> | ||
|
|
||
| const char* ToggleCameosCommandClass::GetName() const | ||
| { | ||
| return "Toggle Cameos"; | ||
| } | ||
|
|
||
| const wchar_t* ToggleCameosCommandClass::GetUIName() const | ||
| { | ||
| return GeneralUtils::LoadStringUnlessMissing("TXT_SHOWCAMEO", L"Toggle Cameos"); | ||
| } | ||
|
|
||
| const wchar_t* ToggleCameosCommandClass::GetUICategory() const | ||
| { | ||
| return CATEGORY_INTERFACE; | ||
| } | ||
|
|
||
| const wchar_t* ToggleCameosCommandClass::GetUIDescription() const | ||
| { | ||
| return GeneralUtils::LoadStringUnlessMissing("TXT_SHOWCAMEO_DESC", L"Show/hide cameo display."); | ||
| } | ||
|
|
||
| void ToggleCameosCommandClass::Execute(WWKey eInput) const | ||
| { | ||
| // Ignore hotkey in permanent mode | ||
| if (RulesExt::Global()->ShowCameo) | ||
| return; | ||
|
|
||
| // Ignore hotkey if toggleable is off | ||
| if (!RulesExt::Global()->ShowCameo_Toggleable) | ||
| return; | ||
|
|
||
| Phobos::Config::ShowCameo_Enable = !Phobos::Config::ShowCameo_Enable; | ||
|
|
||
| auto PrintMessage = [](const wchar_t* pMessage) | ||
| { | ||
| MessageListClass::Instance.PrintMessage( | ||
| pMessage, | ||
| RulesClass::Instance->MessageDelay, | ||
| HouseClass::CurrentPlayer->ColorSchemeIndex, | ||
| true | ||
| ); | ||
| }; | ||
|
|
||
| if (Phobos::Config::ShowCameo_Enable) | ||
| PrintMessage(GeneralUtils::LoadStringUnlessMissing("MSG:ShowCameoEnabled", L"Cameos Display: Enabled")); | ||
| else | ||
| PrintMessage(GeneralUtils::LoadStringUnlessMissing("MSG:ShowCameoDisabled", L"Cameos Display: Disabled")); | ||
| } |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #pragma once | ||
|
|
||
| #include "Commands.h" | ||
|
|
||
| class ToggleCameosCommandClass : public CommandClass | ||
| { | ||
| public: | ||
| virtual const char* GetName() const override; | ||
| virtual const wchar_t* GetUIName() const override; | ||
| virtual const wchar_t* GetUICategory() const override; | ||
| virtual const wchar_t* GetUIDescription() const override; | ||
| virtual void Execute(WWKey eInput) const override; | ||
| }; |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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.
No CustomPCX?
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.
Oh wow, that makes sense... I forgot again. Something like a banner, hmm — yes, we do need support for custom PCX.
But WAIT…
The purpose of custom shapes is simply to expand the ways mods can display passengers or occupants. For example, an SHK could show a lightning bolt icon or animation, and a YURI could show a small mind-control icon or animation... So just custom SHP support might already be sufficient for these needs. As for custom PCX, I haven't yet figured out how it could be used.
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.
Any difference with the CameoPCX?
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.
It has been added…But I haven't tested whether it works properly (I think it should).