-
Notifications
You must be signed in to change notification settings - Fork 85
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
Chinese theme; Fallback theme; New signs #1523
Chinese theme; Fallback theme; New signs #1523
Conversation
…to Fallback theme
…res for all missing files
I am a Chinese speaker. |
I did a search for signs of different Chinese styles.
|
I do not plan to do themes for dialects right now. Although it is probably possible to make a theme to "patch" other theme and replace a couple signs only. P.S. Adding a second theme "China Generic" that will not have text on signs, only Stop 停. |
…"patches" Mainland Chinese
@kvakvs CI borked due to something in CI log
|
4970d1a
to
5f478a3
Compare
The original vehicle restriction icons are still in
|
3fbae74
to
39ac080
Compare
Only issue I've found so far while testing (not sure if due to this PR or not) is that when I have speed limit tool open, pressing Esc causes game Pause Menu to appear rather than exiting Speed Limit tool. EDIT: Other TM:PE tools do handle Esc properly, seems to only be Speed Limits tool that's affected. EDIT: Only just noticed comments above - will respond to those in a bit. |
I'm fine with most of the changes. However for passenger train I'd prefer to keep original icon (PR #31) as it's much simpler and easier to comprehend at a glance than a passenger carriage. The hi-res source can be obtained from Noun Project: https://thenounproject.com/icon/passenger-188591/ I think the blue background for "vehicle allowed" was better than the green as it has slightly better contrast with the white vehicle icon in foreground. Also, many countries use blue background with white vehicle foreground to indicate when lane is dedicated to certain vehicle type, and while not a direct facsimile of TM:PE vehicle restrictions I think it would still help to keep that style to aid user comprehension of the feature. |
…eme and SVG sources added
I found some more standard signs. Can be used as a reference. In addition, the Simplified Chinese of taxi is "出租车" instead of "出租車". "出租車" is Traditional Chinese. |
Ok, what about:
The cargo hook icon might be better suited to cargo harbours should we ever add support for ships (would be cool to have something BFS search algorithm for cargo harbours). |
You can't use BFS or any segment iterating algorithm if there are no segments 😂 I don't know the details but I'm pretty sure it works more or less like for airplanes when they leave airplane path while trying to land at airport - they move towards the target that looks more or less like Proportional navigation/homing missile algorithm |
Saved hooked cargo on the page side, for future use |
re: forklift - I found some |
I used this Wikipedia page to make the first version of the theme. But then some signs in TM:PE do not have standard signs in all countries, so i had to improvise.
Do we need special themes for those territories? I was choosing themes based on potential count of players.
This moment was unclear, i guess we're doing simplified rather than traditional. |
Got this for now. It is not exported or not used anywhere, just a proposed icon which vaguely matches our other vehicles by their wheel shape, so that they look nicely together. |
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.
I like the new style a lot. Very good work!
code lgtm
But as a comment on this: I had discussed with @krzychu124 also Planes, Cyclists and Pedestrian signs for future development (not only in TMPE, but as it will be something to manage in TMPE it would be nice to have same style for them too)... can you create them in same style? @kvakvs
The pictures are stored as SVG (that's a text file in Git), and you can edit using Inkscape (free software). |
@kvakvs I assume that white squares instead of some default speed limits for China_generic is a bug, right? Edit:
From the log Debug 602.7954460: Resource SignThemes.Kmph_China_Generic.0.png not found (not an error)
//...
Debug 603.1673537: Resource SignThemes.Fallback.0.png not found (not an error)
//...
Info 603.2467477: Road Sign theme changed to Kmph_China_Generic |
China Generic theme is BASED ON China, and then China is BASED ON Fallback theme, so white squares are a bug, but "loading error" is not a bug, because it would look 1 and 2 levels down in the base themes. Looks like |
Hmm, China (Mainland) works normally, so no idea why generic is not. Other than that no issues, looks good. Will do another test once fixed. |
…arent China Mainland theme
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.
Looks good, works in game without noticeable issues.
@@ -406,7 +409,8 @@ public VehicleRestrictionsTool(TrafficManagerTool mainTool) | |||
selectedSegmentInfo, | |||
selectedLaneIndex, | |||
selectedLaneInfo, | |||
VehicleRestrictionsMode.Configured); ; | |||
VehicleRestrictionsMode.Configured); | |||
; |
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.
Not needed (;
), I think 😅
/// Singleton which manages road signs themes dynamically loaded and freed as the user . | ||
/// The textures are loaded when OnLevelLoaded event is fired from the <see cref="Lifecycle.TMPELifecycle"/>. | ||
/// </summary> | ||
public class RoadSignThemeManager : AbstractCustomManager { |
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.
I would run some code cleanup e.g: Rider -> Code -> Rearrange code to organize things a bit because now everything is mixed. Some private fields don't follow naming convention (wrong case), some other could be readonly
etc.
Sometimes I feel like line width is too small (in general, not here), especially in places with nested if's or debug logs where formatter break lines like mad creating walls of text for half page so 90% of time you scroll to search for the actual code 😂
Oh, I found the newly released regulation document (GB 5768.2-2022). |
Wikipedia signs are 2009 (GB 5678-2009.) |
I have uploaded a pdf of the GB 5678.2-2022, it may be of some help. |
I will make a new task for updating signs, or maybe have China mainland and China Mainland 2022 themes, why not. |
Renames
RoadSignTheme<s>
renamed toRoadSignThemeManager
and extracted classRoadSignTheme
into a fileRoadDefaults
special theme (green speed limit signs) renamed toSpeedLimitDefaults
Changes
Kmph_China
road signs theme (source in SVG with fonts)Kmph_China_Generic
road signs theme based onKmph_China
and patches few signs by removing glyphs from them. Stop sign remains with a glyph.Fallback
theme which is used for vehicle restrictions, parking and priority signs as a default fallbacknull
if something fails to load.Need help: A chinese speaker to have a look, there are no road signs for Taxi and Emergency services, so i have translated them myself.(thanks to@lokpro
)