Skip to content

Commit baeac0d

Browse files
committed
Merge pull request OpenXcom#1 from SupSuper/master
sync
2 parents fe44678 + 8c6eafc commit baeac0d

20 files changed

Lines changed: 245 additions & 81 deletions

bin/data/Language/en-GB.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,7 @@ en-GB:
11131113
STR_CENTER_ON_ENEMY_10: "Centre on Enemy 10"
11141114
STR_CREATE_INVENTORY_TEMPLATE: "Create inventory template"
11151115
STR_APPLY_INVENTORY_TEMPLATE: "Apply inventory template"
1116+
STR_CLEAR_INVENTORY: "Clear inventory"
11161117
STR_GROUNDED: "GROUND"
11171118
STR_LIVING_QUARTERS_PLURAL: "Living Quarters"
11181119
STR_LIST_ITEM: "ITEM"

bin/data/Language/en-US.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,7 @@ en-US:
11131113
STR_CENTER_ON_ENEMY_10: "Center on Enemy 10"
11141114
STR_CREATE_INVENTORY_TEMPLATE: "Create inventory template"
11151115
STR_APPLY_INVENTORY_TEMPLATE: "Apply inventory template"
1116+
STR_CLEAR_INVENTORY: "Clear inventory"
11161117
STR_GROUNDED: "GROUND"
11171118
STR_LIVING_QUARTERS_PLURAL: "Living Quarters"
11181119
STR_LIST_ITEM: "ITEM"

bin/data/Resources/UI/invcopy.png

26 Bytes
Loading
32 Bytes
Loading

bin/data/Resources/UI/invpaste.png

23 Bytes
Loading
32 Bytes
Loading

src/Basescape/ManufactureState.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,16 @@ void ManufactureState::fillProductionList()
208208
else if ((*iter)->getAssignedEngineers() > 0)
209209
{
210210
int timeLeft = (*iter)->getAmountTotal() * (*iter)->getRules()->getManufactureTime() - (*iter)->getTimeSpent();
211-
timeLeft /= (*iter)->getAssignedEngineers();
212-
float dayLeft = timeLeft / 24.0f;
213-
int hours = (dayLeft - static_cast<int>(dayLeft)) * 24;
214-
s4 << static_cast<int>(dayLeft) << "/" << hours;
211+
int numEffectiveEngineers = (*iter)->getAssignedEngineers();
212+
if (!Options::canManufactureMoreItemsPerHour)
213+
{
214+
numEffectiveEngineers = std::min(numEffectiveEngineers, (*iter)->getRules()->getManufactureTime());
215+
}
216+
// ensure we round up since it takes an entire hour to manufacture any part of that hour's capacity
217+
int hoursLeft = (timeLeft + numEffectiveEngineers - 1) / numEffectiveEngineers;
218+
int daysLeft = hoursLeft / 24;
219+
int hours = hoursLeft % 24;
220+
s4 << daysLeft << "/" << hours;
215221
}
216222
else
217223
{

src/Basescape/ResearchInfoState.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void ResearchInfoState::buildUi()
7878
_txtMore = new Text(110, 17, 85, 100);
7979
_txtLess = new Text(110, 17, 85, 120);
8080
_btnCancel = new TextButton(90, 16, 61, 145);
81-
_btnOk = new TextButton(83, 16, 169, 145);
81+
_btnOk = new TextButton(90, 16, 169, 145);
8282

8383
_btnMore = new ArrowButton(ARROW_BIG_UP, 13, 14, 195, 100);
8484
_btnLess = new ArrowButton(ARROW_BIG_DOWN, 13, 14, 195, 120);

src/Basescape/SoldierInfoState.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ void SoldierInfoState::init()
473473
_barThrowing->setValue2(std::min(withArmor.throwing, initial->throwing));
474474

475475
std::wostringstream ss8;
476-
ss8 << current->melee;
476+
ss8 << withArmor.melee;
477477
_numMelee->setText(ss8.str());
478478
_barMelee->setMax(current->melee);
479479
_barMelee->setValue(withArmor.melee);

src/Battlescape/Inventory.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,13 +757,15 @@ void Inventory::mouseClick(Action *action, State *state)
757757
{
758758
_warning->showMessage(_game->getLanguage()->getString("STR_GRENADE_IS_ACTIVATED"));
759759
item->setFuseTimer(0);
760+
arrangeGround(false);
760761
}
761762
else _game->pushState(new PrimeGrenadeState(0, true, item));
762763
}
763764
else
764765
{
765766
_warning->showMessage(_game->getLanguage()->getString("STR_GRENADE_IS_DEACTIVATED"));
766767
item->setFuseTimer(-1); // Unprime the grenade
768+
arrangeGround(false);
767769
}
768770
}
769771
}

0 commit comments

Comments
 (0)