Comments (5)
I wonder if this is viable as a solution:
[campaign]
#ifdef MULTIPLAYER
id=Campaign_ID_MP
abbrev="Campaign_MP"
#else
id=Campaign_ID_SP
abbrev="Campaign"
#endif
type=hybrid
[/campaign]
from wesnoth.
That's pretty much what they said they did as a workaround. That should not be necessary. Also we should move away from more reliance on the preprocessor.
from wesnoth.
I made a bit different way
#define MY_CAMPAIGN TYPE ABBR
[campaign]
id=my_campaign_{TYPE}
type={TYPE}
abbrev={ABBR}
...
[/campaign]
#enddef
{MY_CAMPAIGN sp "ABBR"}
{MY_CAMPAIGN mp "ABBR MP"}
the workaround by knyghtmare seems much less reliable to me. It feels suspicious that a campaign will define itself differently depending on the preprocessor's state.
Maybe we can add an optional parameter abbrev_mp to the [campaign] tag that will apply if it's a hybrid campaign run in MP
from wesnoth.
I think adding a fixed string like the "MP" you mentioned after the abbreviation is enough. If someone wants an entirely different abbreviation then they can make multiple campaigns like you showed. I don't think abbrev_mp is desirable.
from wesnoth.
I thought at first hardcoding the "MP" prefix isn't desirable but prolly it makes sense. As you say, people may define two distinct non-hybrid campaigns if they want to
from wesnoth.
Related Issues (20)
- In MP games with Plan Mod enabled Undo doesn't work for the first action of a turn even if no fog/shroud update
- Class invariants of attack_type and attack_type::specials_context_t HOT 3
- wesnoth.sync.evaluate_single HOT 23
- Improve wesnoth.interface.select_unit() HOT 3
- API missing from emmylua HOT 3
- Single-unit attribute to prevent dismissing from recall list HOT 2
- Ability to override victory/defeat message HOT 3
- Make tiles, units, items, ... searchable in the map and scenario editor HOT 1
- EI: In S11 Captured, Some Players Didn't Notice the Intended Movement Location for Dacyn HOT 1
- Hotkey "<" displays error in context menu HOT 1
- Event triggered by [harm_unit] HOT 9
- Event triggered by healing HOT 11
- 1.19.0: test suite fails in `SDL2_AUDIO_SUPPORT` unit HOT 6
- 1.19.0: compile time warnings with GCC-14 HOT 7
- EI: In S11 Captured, The Player Can Acquire the Ring of Invisibility Item Before Triggering the Breakout HOT 2
- EI: In S12 Evacuation, When the AI Retreats, AI Units Will Still Attack Instead of Retreating if They Won't Take Retaliation Damage HOT 3
- [harm_unit] "alignment" key uses the harm-ee's ToD, not the harm-er
- Change the stats of the Naga Guardian and High Guardian to make the βabsorbβ ability usable
- Slow pathfinding for Silver Mage/Teleport on huge maps HOT 3
- Dialogs disappear instantly fairly frequently with 1.18 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wesnoth.