FS#1060 - Vehicles console commands
Attached to Project:
OpenTTD
Opened by Bilbo (bilbo) - Friday, 20 July 2007, 01:42 GMT
Last edited by Patric Stout (TrueBrain) - Saturday, 28 July 2007, 18:02 GMT
Opened by Bilbo (bilbo) - Friday, 20 July 2007, 01:42 GMT
Last edited by Patric Stout (TrueBrain) - Saturday, 28 July 2007, 18:02 GMT
|
DetailsI have created a patch that will add train (and also plane, ship and road vehicles) console commands.
These commands allow mass-manipulations with vehicles that would be tedious to do with the gui (for example "send all planes with max. speed <500 km/h to depot" or "sell two wagons for all trains with more than 12 wagons") It adds command "train" in console, with several subcommands for trains, similarly "road" for road vehicles, "plane" or "aircraft" for aircrafts and "ship" for ships. Also command "vehicle" that will do the command on all appropriate vehicles of any type For full manual to all commands, see the wiki page I have created for this: https://wiki.openttd.org/index.php/Vehicle_console_commands I think it is enough stable to be candidate for inclusion in trunk. Patch does not break savegame or multiplayer compatibility. Attached is the patch for 10634. Link to forum thread: https://www.tt-forums.net/viewtopic.php?f=33&t=32964 |
This task depends upon
Closed by Patric Stout (TrueBrain)
Saturday, 03 November 2007, 23:51 GMT
Reason for closing: Won't implement
Additional comments about closing: Patch Rejected.
Saturday, 03 November 2007, 23:51 GMT
Reason for closing: Won't implement
Additional comments about closing: Patch Rejected.
But, for all clearness, I want to underline that I love the idea of your patch. Maybe it should in fact be a nice GUI... ;)
Well, I'll look at it once squirrel arrives to trunk...
strtoull will convert to long long (which is always 64bits)
Money is 64bits.
So I think strtoull is correct.
I found this:
http://msdn2.microsoft.com/en-us/library/85zk715d(VS.80).aspx
seems _strtoui64 does the same as strtoull, so perhaps add in some header something like this:
#ifdef MSVC
#define strtoull _strtoui64
#endif
Unfortunately, I have no MSVC (only GCC), so I can't try it.
#define strtoull _strtoui64 ///< required for MSVC
#endif
Is the correct way to do it :)