View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002920 | FSSCP | Pilot data | public | 2013-09-19 06:41 | 2014-06-14 09:41 |
Reporter | Goober5000 | Assigned To | niffiwan | ||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.7.1 | ||||
Target Version | 3.7.2 | ||||
Summary | 0002920: Pilot file code can't handle localization for intel entries | ||||
Description | I made the same error when coding up tech-add-intel, but the problem created for pilot files is much more complicated. The problem is that intel entry names are translatable strings, whereas normally names that serve as lookup keys aren't. This is because if you translate the key, obviously it's not going to be good anymore as a lookup entry. Since the intel names are always going to be translated, the solution is to also translate the lookup keys so that what you look up is the same as what is in the table. The preloader for tech-add-intel-xstr does this. The pilot file code should handle this the same way. ...Actually, the pilot code may already do this. All it does is save keys that are visible in the tech db, right? So that means it saves translated keys. As long as the pilot doesn't switch languages, it may not be a problem. What about adding in a safeguard to prevent the pilot from switching languages? :) | ||||
Tags | No tags attached. | ||||
related to | 0002919 | resolved | Goober5000 | Tech-add-intel can't handle localization for intel entries |
|
I'm thinking of: a) storing the pilots language in the .plr b) when leaving the start screen or the barracks; generate an error if the pilots language doesn't match the current FSO language, and don't let the player proceed Changing the techroom intel entries to work like ships (i.e. change the lookup keys to an array/vector index) would probably be a fair bit of work. I may have a look just to see how much work anyway. |
|
This seems to do the job in my testing. A pilot created with the language set to German can no longer be selected in the initial selection screen. Nor will the barracks allow this pilot to be selected when exiting the barracks. Review and comments welcome! https://github.com/niffiwan/fs2open.github.com/commit/e0377cd7ec454ea7438f5b9819f090d01cc60380 |
|
Have commented (to the extent I can) on the Github issue. |
|
Thanks to Echelon9, MageKing17 & Zacam for their reviews. Added commend explaining the reason for the PLR version bump. |
|
Fix committed to trunk@10817. |
fs2open: trunk r10817 2014-06-14 05:59 Ported: N/A Details Diff |
Fix mantis 2920: prevent pilots switching languages In other words, a pilot can only be used in the same language it was created with. Checks both the initial selection screen and in the barracks. Also fixes issue with PLR version being ignored in pilotfile::verify() |
Affected Issues 0002920 |
|
mod - /trunk/fs2_open/code/menuui/playermenu.h | Diff File | ||
mod - /trunk/fs2_open/code/playerman/managepilot.cpp | Diff File | ||
mod - /trunk/fs2_open/code/playerman/player.h | Diff File | ||
mod - /trunk/fs2_open/code/localization/localize.cpp | Diff File | ||
mod - /trunk/fs2_open/code/menuui/barracks.cpp | Diff File | ||
mod - /trunk/fs2_open/code/menuui/playermenu.cpp | Diff File | ||
mod - /trunk/fs2_open/code/pilotfile/pilotfile.h | Diff File | ||
mod - /trunk/fs2_open/code/pilotfile/pilotfile_convert.h | Diff File | ||
mod - /trunk/fs2_open/code/pilotfile/plr.cpp | Diff File | ||
mod - /trunk/fs2_open/code/pilotfile/plr_convert.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-09-19 06:41 | Goober5000 | New Issue | |
2013-09-19 06:41 | Goober5000 | Status | new => assigned |
2013-09-19 06:41 | Goober5000 | Assigned To | => niffiwan |
2013-09-19 06:41 | Goober5000 | Relationship added | related to 0002919 |
2013-09-27 01:57 | niffiwan | Note Added: 0015294 | |
2014-05-15 08:38 | niffiwan | Note Added: 0015748 | |
2014-05-15 08:38 | niffiwan | Status | assigned => code review |
2014-06-14 07:36 | Echelon9 | Note Added: 0015864 | |
2014-06-14 09:41 | niffiwan | Note Added: 0015867 | |
2014-06-14 09:41 | niffiwan | Changeset attached | => fs2open trunk r10817 |
2014-06-14 09:41 | niffiwan | Note Added: 0015868 | |
2014-06-14 09:41 | niffiwan | Status | code review => resolved |
2014-06-14 09:41 | niffiwan | Resolution | open => fixed |