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

Add option to skip units with 0TU #1438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions bin/common/Language/en-GB.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ en-GB:
STR_NOALIENPANICMESSAGES_DESC: "Don't show panic messages for aliens unless they are visible to the player."
STR_ALIENBLEEDING: "Alien bleeding"
STR_ALIENBLEEDING_DESC: "Allows fatal wounds to be inflicted on most aliens."
STR_SKIPOUTOFTIME: "Don't reselect units who are out of time"
STR_SKIPOUTOFTIME_DESC: "When the \"don't reselect unit\" button is pressed, skip units who have zero time units remaining."
STR_FIELDPROMOTIONS: "Field promotions"
STR_FIELDPROMOTIONS_DESC: "Only soldiers that were present at the mission site are eligible for promotion."
STR_MEETINGPOINT: "Predict UFO trajectory"
Expand Down
2 changes: 2 additions & 0 deletions bin/common/Language/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ en-US:
STR_NOALIENPANICMESSAGES_DESC: "Don't show panic messages for aliens unless they are visible to the player."
STR_ALIENBLEEDING: "Alien bleeding"
STR_ALIENBLEEDING_DESC: "Allows fatal wounds to be inflicted on most aliens."
STR_SKIPOUTOFTIME: "Don't reselect units who are out of time"
STR_SKIPOUTOFTIME_DESC: "When the \"don't reselect unit\" button is pressed, skip units who have zero time units remaining."
STR_FIELDPROMOTIONS: "Field promotions"
STR_FIELDPROMOTIONS_DESC: "Only soldiers that were present at the mission site are eligible for promotion."
STR_MEETINGPOINT: "Predict UFO trajectory"
Expand Down
1 change: 1 addition & 0 deletions src/Engine/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ void create()
_info.push_back(OptionInfo("skipNextTurnScreen", &skipNextTurnScreen, false, "STR_SKIPNEXTTURNSCREEN", "STR_BATTLESCAPE"));
_info.push_back(OptionInfo("noAlienPanicMessages", &noAlienPanicMessages, false, "STR_NOALIENPANICMESSAGES", "STR_BATTLESCAPE"));
_info.push_back(OptionInfo("alienBleeding", &alienBleeding, false, "STR_ALIENBLEEDING", "STR_BATTLESCAPE"));
_info.push_back(OptionInfo("skipOutOfTime", &skipOutOfTime, false, "STR_SKIPOUTOFTIME", "STR_BATTLESCAPE"));

// controls
_info.push_back(OptionInfo("keyOk", &keyOk, SDLK_RETURN, "STR_OK", "STR_GENERAL"));
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Options.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ OPT SDLKey keyGeoLeft, keyGeoRight, keyGeoUp, keyGeoDown, keyGeoZoomIn, keyGeoZo
OPT ScrollType battleEdgeScroll;
OPT PathPreview battleNewPreviewPath;
OPT int battleScrollSpeed, battleDragScrollButton, battleFireSpeed, battleXcomSpeed, battleAlienSpeed, battleExplosionHeight, battlescapeScale;
OPT bool traceAI, sneakyAI, battleInstantGrenade, battleNotifyDeath, battleTooltips, battleHairBleach, battleAutoEnd,
OPT bool traceAI, sneakyAI, battleInstantGrenade, battleNotifyDeath, battleTooltips, battleHairBleach, battleAutoEnd, skipOutOfTime,
strafe, forceFire, showMoreStatsInInventoryView, allowPsionicCapture, skipNextTurnScreen, disableAutoEquip, battleDragScrollInvert,
battleUFOExtenderAccuracy, battleConfirmFireMode, battleSmoothCamera, noAlienPanicMessages, alienBleeding;
OPT SDLKey keyBattleLeft, keyBattleRight, keyBattleUp, keyBattleDown, keyBattleLevelUp, keyBattleLevelDown, keyBattleCenterUnit, keyBattlePrevUnit, keyBattleNextUnit, keyBattleDeselectUnit,
Expand Down
2 changes: 1 addition & 1 deletion src/Savegame/BattleUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,7 @@ void BattleUnit::allowReselect()
*/
bool BattleUnit::reselectAllowed() const
{
return !_dontReselect;
return !_dontReselect && (!Options::skipOutOfTime || _tu != 0);
}

/**
Expand Down