Conversation
This re-introduces the possibilty of resetting/regenerating station names automatically by using an empty station name. Previously, our reimplementation (C++ code) inadvertently removed this option.
bb1e9ce to
7f96528
Compare
7f96528 to
e71c515
Compare
e71c515 to
d60e9c4
Compare
|
Updated the PR to remove the commits implementing |
| // If an empty string is given, generate one instead. | ||
| if (strlen(renameStringBuffer) == 0) | ||
| { | ||
| // Bailing out early? |
There was a problem hiding this comment.
why is this a question. It is bailing out early as we are not applying but everything is fine.
There was a problem hiding this comment.
Because we're still 'asking' at that point, by means of the if block. It's just my comment style. We can change it, if you like.
| if (callingWidget != Common::widx::caption) | ||
| return; | ||
|
|
||
| if (strlen(input) == 0) |
There was a problem hiding this comment.
Is it safe to do the game command with an empty string? Guess its just outputting memory that is ignored. Perhaps we should add a comment.
There was a problem hiding this comment.
If the input string is empty, a name will be generated instead.
duncanspumpkin
left a comment
There was a problem hiding this comment.
All looks fine. I wonder if we could reduce duplication though.
…ature/mac-docker * 'master' of https://github.com/OpenLoco/OpenLoco: (536 commits) Mention code style in readme (OpenLoco#1047) Remove redundant rotate function (OpenLoco#1046) Link up implemented function (OpenLoco#1043) Fix use of constants for coord limits (OpenLoco#1037) validCoords: remove template parameter and name type (OpenLoco#1033) Add coordinate validation to tile loops with offsets (OpenLoco#1031) Implement ChangeCompanyColour game command (OpenLoco#1029) Implement colour picker dropdowns (OpenLoco#1028) Implement StationManager::generateNewStationName (OpenLoco#1020) Station rename command (OpenLoco#984) Fix access to embedded object name (OpenLoco#1022) Reduce inclusion of StringIds.h in header files (OpenLoco#985) Implement the station name background paint (OpenLoco#1023) Force alignment on TileManager::createAnimation hook Merge duplicated flags and use accessors (OpenLoco#1025) Remove use of global stringformatbuffer where not required (OpenLoco#1024) Refactor calls to tryCreateInitialMovementSound (OpenLoco#1018) Turn widget draw functions into Widget struct member functions (OpenLoco#1012) Allow filtering the vehicle list by station or cargo (OpenLoco#997) Restore game command table alignment ...
No description provided.