Skip to content
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

Allow player control station cargo list #5175

Closed
DorpsGek opened this issue Apr 28, 2012 · 3 comments
Closed

Allow player control station cargo list #5175

DorpsGek opened this issue Apr 28, 2012 · 3 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

dadymax opened the ticket and wrote:

Detailed here: http://www.tt-forums.net/viewtopic.php?f=33&t=59590

Briefly: with this patch player have ability to stop getting selected cargo from around industries to this station and to start getting selected cargo before first vehicle arrive to station.
I write this patch in pursuance of "Accept/deny buttons in station's cargo list. (to start accepting cargo while no vehicle has arrived yet, or to deny acceptance after a vehicle had arrived once)" from Todo List ( http://wiki.openttd.org/Todo_list ).
From some trung there a setting in game that allow cargo flow to station without vehicle attive. but if station has several industry in catchment radius then all cargo types will flow to station. IMHO - this is bad thing. In this case player cannot split cargo types by different stations nearby.
With my patch feature request is closed and full control is in player hands.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5175
@DorpsGek
Copy link
Member Author

Alberth wrote:

Hi,

We've had a little discussion about your patch. There are two things that need
improvement. Unfortunately, it means a complete rewrite of the patch.

- The logic of accepting and not-accepting a cargo type should be separated
from 'speed', a cargo type always has a speed that gets updated, no matter
whether you accept a cargo type or not (look for
"_settings_game.order.selectgoods" in station_cmd.cpp, it's around line 3511).
- The current CTRL+click is way too obscure for users. Even I did not find all
settings, even though I knew which ones existed.

The former is mostly splitting various uses of variables into separate
variables (eg from the special case "last_speed == 0" to a speed variable and
an acceptance variable. The latter can be solved by making a GUI for cargo
acceptance (probably in the station window). Each cargo would have a 'accept',
'accept when there is demand' and 'do not accept' setting which can be set with
yellow [<][>] buttons, like in the advanced settings window. Being able to set
a default seems useful too.

Note that the TODO page has been extended with more detailed information too.

Details about your current patch:
In general a very nice patch, the code seems a bit lengthy at some places (the
end of CmdChangeStationAcceptance can be written much more compact), but there
are no real serious problems with the code style. Below are some suggestions to
watch out for.

- Use an english dictionary to check your comments. Good editors allow
spell-checking of comments too.

- Doxygen headers start with "/**" and have no empty line between the comment
and the function (see station_cmd.cpp)

- Descriptions like "+ * @param waitind Click happen in WaitingCargo list or
not." are wrong. Texts should explain meaning of a value to the function (for
example "if true, the function fails"), not how you get its value ("you
pressed a button")

- "} else {" should be written at one line.

- Watch out for trailing white space (in particular at otherwise completely
empty lines). Have the editor display them clearly so you can actually see
where they are.

- C-style comment must be on a line all by itself (that is, not behind any code).


This comment was imported from FlySpray: https://bugs.openttd.org/task/5175#comment11230

@DorpsGek
Copy link
Member Author

dadymax wrote:

Thanks for general accept idea.
And thanks for very detailed review and things to improve. I have very short coding skills but I want to improve.

Unfortunately on my work I now have task that needs knowing of C# not C++. But I try to do my best for this great game and great open project.

P.S. And I use online translator very often (:


This comment was imported from FlySpray: https://bugs.openttd.org/task/5175#comment11233

@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Won't implement

Mass closure of patch tickets with no commentary for >5 years. Goal is to reduce patch queue as an experiment to see if it aids faster reviewing and rejection/acceptance (it may not). If this offends you and the patch is maintained and compiles with current trunk, discuss with andythenorth in irc. (andythenorth has no ability to review patches but can re-open tickets).


This comment was imported from FlySpray: https://bugs.openttd.org/task/5175

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) wontfix patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant