-
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
support for guide manager #653
support for guide manager #653
Conversation
used default guide delay values
Awesome enhancement! Is it possible to replace the globe icon on that panel with the TMPE logo?
|
@aubergine10
It gives user impression that TMPE is legit! Icon can be easily tweeted in GuideWrapper.cs I thought about using TMPE logo but I just Ended up using the same icon that was used by tutorial. A big chunk of this code is a RIP-off from tutorial actually. I'll have a look into it. Should I change tutorial icon too? |
If you use that traffic light as a small icon, user won't distinguish between a random traffic light and TM:PE. Maybe find a way to include text "TM:PE" into that reduced logo. |
Yup, might as well :) Will make it much more obvious the advisor relates to TM:PE (espeically with the "TM:PE " prefix mentioned below).
The panel title text (both guide and advisor panels) could be automatically prefixed with string "TM:PE " (no need to include in localisation text as it's same for every language). |
@aubergine10 @kvakvs each tool also can have icon of its own (a bit more coding required) |
Differnet icons for different tools would be cool. Maybe we should put that on hold until kvakvs finishes #656? It would be good to have the icons for each tool centrally defined, or defined on the tool class, so if we change an icon we don't need to update multiple classes? |
Not sure if this is right place for this, but users are getting confused by the "Quick-setup is not supported" warning - it doesn't tell them why it's not supported. (From vague memory it's something to do with consecutive one-way roads at a junction?) Could it be changed to "The road layout at this junction is not currently supported by quick setup, sorry." Also, "TL Script" title is a bit vague, maybe just "Timed Traffic Lights" |
TL abbreviation wasn't meant for the player. Its for the developer to quickly recognize that TL=some traffic lights are involved. |
@aubergine10 @kvakvs should I modify it to 'timed script' or 'timed traffic light'? In any case this should not block merge. this has to go into crowdin. |
Yes please write in full, and check whether Crowdin already has a string for Timed TL. |
changed to |
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.
LGTM 👍
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 suggest rethinking guide handling because it looks a bit hacky.
PRO-TIP:
use Singleton<SimulationManager>.instance.AddAction
to run async task on simulation thread
in this case it could be:
Singleton<SimulationManager>.instance.AddAction(delegate()
{
Singleton<GuideManager>.instance.Activate(guide, activationInfo);
});
guide
isGenericGuide
,activationInfo
isnew GenericGuide.GenericActivationInfo(/*GuideInfo instance*/)
There's a couple of other things that could merit using the guide instead of error dialog, both on Toggle Traffic Lights tool:
|
@aubergine10
Who doesn't love a IN YOUR FACE obstructing red colored panel to punish him for mistakes? lol EDIT: oh no that means I need to add more translation keys. @aubergine10 can you please do the honors? |
please don't ask me to document self explanatory code |
Of course you're right with this one. |
@aubergine10
|
@krzychu124 this issue has been resolved. |
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.
Other than that little name consistency issue, looks great now.
I thought you'll choose field and Lookup property from master
branch instead yours 🙂
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 very good now 👍
fixes #593
I created base support for guide manager. A big chunk of this code is a rip-off from tutorials.
Usage instructions
EDIT: guide message will show after a couple of failed tries. just like the original games. when deactivated it will not activate for a while. the activation delay can be tweaked in
GuideWrapper.cs
Usage Occurrences
I replaced several usages of ShowError() with ActivateGuide(). except for
MainTool.ShowError(T("Dialog.Text:Node has timed TL script"));
and a couple of other TL script related ones. I decided to use Error panel rather than Guide panel in this case because I though its important. No strong feelings though, if you think I should use guide let me know.Technical matters
Guide manager cannot be activated from anywhere but
ToolBase.SimulationStep()
. This is why I dispatch the guide action to the be handled by override ofToolBase.SimulationStep()
. Also I added A LogError message in case stack did not containSimulationStep
on activationCrowding:
Can someone please help me make these modifications?DONE
If Crowding key does not exist, the string key is shown as guide message.
Testing:
Screenshots:
proof that adding the Crowding keys will display the desired message: