diff --git a/Mods/vcmi/config/vcmi/english.json b/Mods/vcmi/config/vcmi/english.json index f996609a8..fc00410a3 100644 --- a/Mods/vcmi/config/vcmi/english.json +++ b/Mods/vcmi/config/vcmi/english.json @@ -136,6 +136,8 @@ "vcmi.adventureOptions.leftButtonDrag.help" : "{Left Click Drag Map}\n\nWhen enabled, moving mouse with left button pressed will drag adventure map view.", "vcmi.adventureOptions.smoothDragging.hover" : "Smooth Map Dragging", "vcmi.adventureOptions.smoothDragging.help" : "{Smooth Map Dragging}\n\nWhen enabled, map dragging has a modern run out effect.", + "vcmi.adventureOptions.skipAdventureMapAnimations.hover" : "Skip fading effects", + "vcmi.adventureOptions.skipAdventureMapAnimations.help" : "{Skip fading effects}\n\nWhen enabled, Skips object fadeout and similar effects (resource collection, ship embark etc). Makes UI more reactive in some cases at the expense of aesthetics. Especially useful in PvP games. For maximum movement speed skipping is active regardless of this setting.", "vcmi.adventureOptions.mapScrollSpeed1.hover": "", "vcmi.adventureOptions.mapScrollSpeed5.hover": "", "vcmi.adventureOptions.mapScrollSpeed6.hover": "", diff --git a/client/mapView/MapViewController.cpp b/client/mapView/MapViewController.cpp index d710dc6d2..5a0a4d873 100644 --- a/client/mapView/MapViewController.cpp +++ b/client/mapView/MapViewController.cpp @@ -269,6 +269,9 @@ void MapViewController::afterRender() bool MapViewController::isEventInstant(const CGObjectInstance * obj, const PlayerColor & initiator) { + if(settings["gameTweaks"]["skipAdventureMapAnimations"].Bool()) + return true; + if (!isEventVisible(obj, initiator)) return true; diff --git a/client/windows/settings/AdventureOptionsTab.cpp b/client/windows/settings/AdventureOptionsTab.cpp index 67e7adbd4..7fdb9b911 100644 --- a/client/windows/settings/AdventureOptionsTab.cpp +++ b/client/windows/settings/AdventureOptionsTab.cpp @@ -130,6 +130,10 @@ AdventureOptionsTab::AdventureOptionsTab() { return setBoolSetting("adventure", "smoothDragging", value); }); + addCallback("skipAdventureMapAnimationsChanged", [](bool value) + { + return setBoolSetting("gameTweaks", "skipAdventureMapAnimations", value); + }); build(config); std::shared_ptr playerHeroSpeedToggle = widget("heroMovementSpeedPicker"); @@ -172,4 +176,7 @@ AdventureOptionsTab::AdventureOptionsTab() std::shared_ptr smoothDraggingCheckbox = widget("smoothDraggingCheckbox"); if (smoothDraggingCheckbox) smoothDraggingCheckbox->setSelected(settings["adventure"]["smoothDragging"].Bool()); + + std::shared_ptr skipAdventureMapAnimationsCheckbox = widget("skipAdventureMapAnimationsCheckbox"); + skipAdventureMapAnimationsCheckbox->setSelected(settings["gameTweaks"]["skipAdventureMapAnimations"].Bool()); } diff --git a/config/schemas/settings.json b/config/schemas/settings.json index 667cff080..87f61a70d 100644 --- a/config/schemas/settings.json +++ b/config/schemas/settings.json @@ -582,7 +582,8 @@ "infoBarPick", "skipBattleIntroMusic", "infoBarCreatureManagement", - "enableLargeSpellbook" + "enableLargeSpellbook", + "skipAdventureMapAnimations" ], "properties" : { "showGrid" : { @@ -620,6 +621,10 @@ "enableLargeSpellbook" : { "type": "boolean", "default": true + }, + "skipAdventureMapAnimations": { + "type": "boolean", + "default": false } } } diff --git a/config/widgets/settings/adventureOptionsTab.json b/config/widgets/settings/adventureOptionsTab.json index 96731dd4c..02a748960 100644 --- a/config/widgets/settings/adventureOptionsTab.json +++ b/config/widgets/settings/adventureOptionsTab.json @@ -279,7 +279,7 @@ "callback": "mapScrollSpeedChanged" }, -/////////////////////////////////////// Right section - Original H3 options +/////////////////////////////////////// Right section - Original H3 options + some custom { "type" : "verticalLayout", "customType" : "labelDescription", @@ -294,6 +294,9 @@ }, { "text": "core.genrltxt.574" // quick combat + }, + { + "text": "vcmi.adventureOptions.showGrid.hover" } ] }, @@ -305,7 +308,7 @@ [ { "name": "showMovePathPlaceholder", - "type": "checkboxFake", + "type": "checkboxFake" }, { "name": "heroReminderCheckbox", @@ -317,6 +320,11 @@ "help": "core.help.362", "callback": "quickCombatChanged" }, + { + "name": "showGridCheckbox", + "help": "vcmi.adventureOptions.showGrid", + "callback": "showGridChanged" + } ] }, /////////////////////////////////////// Bottom section - VCMI Options @@ -333,7 +341,7 @@ "text": "vcmi.adventureOptions.forceMovementInfo.hover" }, { - "text": "vcmi.adventureOptions.showGrid.hover" + "text": "vcmi.adventureOptions.skipAdventureMapAnimations.hover" }, { "text": "vcmi.adventureOptions.infoBarPick.hover" @@ -370,9 +378,9 @@ "callback": "forceMovementInfoChanged" }, { - "name": "showGridCheckbox", - "help": "vcmi.adventureOptions.showGrid", - "callback": "showGridChanged" + "name": "skipAdventureMapAnimationsCheckbox", + "help": "vcmi.adventureOptions.skipAdventureMapAnimations", + "callback": "skipAdventureMapAnimationsChanged" }, { "name": "infoBarPickCheckbox",