Age | Commit message (Collapse) | Author |
|
std::map instead our sorted linked list (#9057)
* Codechange: Use std::string in console commands and aliases registration
* Codechange: Use std::map to register console commands
* Codechange: Use std::map to register console aliases
* Cleanup: Remove now unused function
|
|
changing it using the console/settings
|
|
One also looks for a company, the other doesn't. There were more
uses of the latter than the first, leaving very weird code all
over the place.
|
|
from the console (#9022)
|
|
This means if you execute a script from a script from a script, ..
for more than 10 times, it bails out now. This should be sufficient
for even the most complex scripts.
|
|
Example:
exec other.script
echo hello
The "echo" was never executed.
|
|
Basically, modal windows had their own thread-locking for what
drawing was possible. This is a bit nonsense now we have a
game-thread. And it makes much more sense to do things like
NewGRFScan and GenerateWorld in the game-thread, and not in a
thread next to the game-thread.
This commit changes that: it removes the threads for NewGRFScan
and GenerateWorld, and just runs the code in the game-thread.
On regular intervals it allows the draw-thread to do a tick,
which gives a much smoother look and feel.
It does slow down NewGRFScan and GenerateWorld ever so slightly
as it spends more time on drawing. But the slowdown is not
measureable on my machines (with 700+ NewGRFs / 4kx4k map and
a Debug build).
Running without a game-thread means NewGRFScan and GenerateWorld
are now blocking.
|
|
|
|
|
|
Reworked how the screenshot command works while keeping it backwards
compatible. It can now more freely understand arguments, and has
the ability to make SC_DEFAULTZOOM screenshots.
|
|
* Fix: Missing or needed spaces
* Codechange: Remove space
* Codechange: Remove space
* Codechange: More missing spaces
* Codechange: Missing spaces
* Codechange: Remove space
* Codechange: Remove space
|
|
|
|
|
|
|
|
The current "restart" command is now called "reload", as that is
what it does.
The old "restart" command is now called "restart", as that is what
it did.
As this has not been in any official release yet, this shouldn't
harm any kitten.
|
|
|
|
|
|
You can do: "startai myai.3", which starts version 3 of "myai".
This is very useful for testing save/load code between different
versions of your AI.
However, when using this syntax, the AI got saved as "myai.3" as
name of the AI, instead of "myai". This caused several problems,
like indicating to the user the AI could not be found, but still
load the AI. But in all cases, the AI never got the chance to
load the saved data, making the whole reason this exists pointless.
By splitting the name and version already in the console command,
the code becomes simpler and AIs started this way now follow the
normal flow after initialization.
|
|
The intention of this function was that you could download
everything after a filter was applied; but this never really
took off. Instead, a select few people used this functionality
to download every available package on BaNaNaS. This is not in
the spirit of this service. Additionally, these few people were
good for 70% of the consumed bandwidth of BaNaNaS.
|
|
Bug introduced via commit ab711e6942
|
|
|
|
|
|
This commit adds the missing feature of allowing the server owner to
provide a reason for kicking/banning a client, which the client sees in
a pop-up window after being kicked. The implementation extends the
network protocol by adding a new network action called
NETWORK_ACTION_KICKED that is capable of having an error string, unlike
the other network error packages. Additionally, the kick function
broadcasts a message to all clients about the kicked client and the
reason for the kick.
|
|
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
|
|
|
|
|
|
|
|
|
|
Add `getsysdate` console command to display system's local time, which is might be useful to check current time in script logging.
|
|
|
|
|
|
instead of an AutoFreeSmallVector.
|
|
|
|
|
|
|
|
|
|
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.
Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.
A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.
With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.
All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
|
|
|
|
|
|
Frame rate and various game loop/graphics timing measurements and graphs. Accessible via the Help menu, and can print some stats in the console via the fps command.
|
|
and be more verbose
|
|
properly
|
|
SaveLoadOperation to avoid nameclash with windows compiler toolkit.
|
|
of _file_to_saveload.
|
|
DetailedFileType.
|
|
FiosType with it.
|
|
most of SaveLoadDialogMode
|
|
|
|
and move both to FileList.
|
|
file list.
|