@@ -244,7 +244,7 @@ void ManufactureInfoState::setAssignedEngineer()
244244 s3 << L" >\x01 " << _production->getAssignedEngineers ();
245245 _txtAllocated->setText (s3.str ());
246246 std::wstringstream s4;
247- s4 << L" >\x01 " << _production->getAmountRemaining ();
247+ s4 << L" >\x01 " << _production->getAmountTotal ();
248248 _txtTodo->setText (s4.str ());
249249}
250250
@@ -353,18 +353,18 @@ void ManufactureInfoState::moreUnitClick(Action * action)
353353 {
354354 // TODO: virtual infinite value for produce & sell automatically
355355 // now it just raises the value to 999 or max-available-hangars on crafts
356- int more = _production->getAmountRemaining ();
356+ int more = _production->getAmountTotal ();
357357 if (_production->getRules ()->getCategory () == " STR_CRAFT" )
358358 {
359359 if (_base->getAvailableHangars () - _base->getUsedHangars () > 0 )
360360 {
361- _production->setAmountRemaining (std::max (more,_base->getAvailableHangars () - _base->getUsedHangars ()));
361+ _production->setAmountTotal (std::max (more,_base->getAvailableHangars () - _base->getUsedHangars ()));
362362 setAssignedEngineer ();
363363 }
364364 }
365365 else
366366 {
367- _production->setAmountRemaining (std::max (more,999 ));
367+ _production->setAmountTotal (std::max (more,999 ));
368368 setAssignedEngineer ();
369369 }
370370 }
@@ -396,10 +396,10 @@ void ManufactureInfoState::lessUnitClick(Action * action)
396396{
397397 if (action->getDetails ()->button .button == SDL_BUTTON_RIGHT )
398398 {
399- int less = _production->getAmountRemaining ();
399+ int less = _production->getAmountTotal ();
400400 if (less > (_production->getAmountProduced () + 1 ))
401401 {
402- _production->setAmountRemaining (_production->getAmountProduced () + 1 );
402+ _production->setAmountTotal (_production->getAmountProduced () + 1 );
403403 setAssignedEngineer ();
404404 }
405405 }
@@ -440,15 +440,15 @@ void ManufactureInfoState::onLessEngineer()
440440 */
441441void ManufactureInfoState::onMoreUnit ()
442442{
443- int more = _production->getAmountRemaining ();
443+ int more = _production->getAmountTotal ();
444444 if (_production->getRules ()->getCategory () == " STR_CRAFT" && _base->getAvailableHangars () - _base->getUsedHangars () == 0 )
445445 {
446446 _timerMoreUnit->stop ();
447447 _game->pushState (new ErrorMessageState (_game, " STR_NO_FREE_HANGARS_FOR_CRAFT_PRODUCTION" , Palette::blockOffset (15 )+1 , " BACK17.SCR" , 6 ));
448448 }
449449 else
450450 {
451- _production->setAmountRemaining (++more);
451+ _production->setAmountTotal (++more);
452452 setAssignedEngineer ();
453453 }
454454}
@@ -458,10 +458,10 @@ void ManufactureInfoState::onMoreUnit()
458458 */
459459void ManufactureInfoState::onLessUnit ()
460460{
461- int less = _production->getAmountRemaining ();
461+ int less = _production->getAmountTotal ();
462462 if (less > (_production->getAmountProduced () + 1 ))
463463 {
464- _production->setAmountRemaining (--less);
464+ _production->setAmountTotal (--less);
465465 setAssignedEngineer ();
466466 }
467467}
0 commit comments