Ignore repeated script related orders.
Reduces perf impact when a script calls one of the order functions. Especially if dealing with fast timers.
Doxygen comments are preserved. Fixes #316
Co-authored-by: perim <perim@users.noreply.github.com>
Remove morale checks and run away code for campaign.
Libcampaign has had this feature for a long while now. Co-authored-by: perim <perim@users.noreply.github.com>
Remove asVtolReturnPos from the source.
It's unused and libcampaign orders VTOLs to retreat now.
For convenience, save MP server IP/hostname to config and propose this the next time.
Add frontend and CLI options to continue from last saved game
Many modern games present a quick shortcut to continue playing using the last saved game. Also add a new CLI option --continue.
Add JavaScript port of Nexus AI.
A fairly close conversion of the classic Nexus AI ported to JavaScript.
Set tutorial mode to false when about to init games.
Otherwise the game will think it's still in the tutorial mode, should one visit it, then to another game mode.
On victory, offer shortcut to quit.
Co-authored-by: topimiettinen <topimiettinen@users.noreply.github.com>
Autohost from JSON settings file.
Co-authored-by: EuPhobos <EuPhobos@users.noreply.github.com>
Fix division by zero in addAiChooser() if there is just one AI.
Co-authored-by: kreuvf <kreuvf@users.noreply.github.com>
Use also maps with different tech level
In addition to maps with exact match to tech level requested, add maps where only the tech level is different, if a more specific map has not been added. This lets us drop many maps which differ only by -T1/T2/T3 prefix.
Add new level T4 with all research completed
Let challenge ini files also specify the tech level.
More consistent layout for loading and challenge selection
Center vertically the blue area of Load Campaign/Skirmish Game menus for more pleasant look in 640x480 resolution. Use the same large font for Challenges banner label as for Load Game.
In case a map had JSON format ini file (for example Fishnets has this but SK-Rush doesn't have), the old tech level in the map was overriding user selected tech level. Remove old code.
Option to enforce structure limits
As a new option, remove structures which exceed structure limits. This allows use of full bases while still making meaningful limits.
Disable useless structures and research
If structure limits are enforced and VTOLs are disabled, disable also AA structures and related research. This improves the AIs in no-VTOL games. Likewise, disable useless research for no-cyborg, no-lassat and no-satlink games. Closes #510.
Fix unexplored minimap tile color in campaign.
Uses the regular GUI blue box color to match with releases before 3.1.
Modern games often have a way to save and load the game quickly without prompting using function keys. Reassign Toggle Radar (F7) to shift-F7 and Toggle Console (F8) to shift-F8, then use F7 for Quick Save and F8 for Quick Load.
Improve console message display.
- Adds " (Ally)" for team chat, or, " (Global)" for everything else when displaying messages locally. - Messages from self stay white instead of turning yellow when enabling friend/foe radar colors.
Increase map zoom minimum distance configuration option.
Up to 1600. Small map zoom settings could make the camera get way too close to terrain or other surrounding objects near the start position.
Increase Bunker Buster ROF in multiplayer.
* Bunker Buster reloads in 8 seconds instead of 20 seconds. * VTOL Bunker Buster can fire two rounds before rearming. Closes ticket:4861.
Fix derrick assignment in Melting
6-player map melting had a player 0 derrick assigned to player 4. Closes #507.
Let user change most options during the game play
Allow the user to modify most graphics, video and mouse options as well as key mappings when playing.
The pump sound depends on the current animation of the derrick. This was presumably forgotten about and wasn't reimplemented after commit af9c913 (see display3d.cpp diffs). Turns up the sound volume a tiny bit, and, makes it a "oneshot" sound. Closes ticket:4766.
Modern games often save the game automatically every now and then, so let's do that!