Skip to content

Commit

Permalink
Changed maxItems default to 999999
Browse files Browse the repository at this point in the history
  • Loading branch information
MeridianOXC committed Jan 1, 2024
1 parent 82036b3 commit 776d618
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Basescape/CraftEquipmentState.cpp
Expand Up @@ -874,7 +874,7 @@ void CraftEquipmentState::moveRightByValue(int change, bool suppressErrors)
}
else
{
if (c->getRules()->getMaxItems() > 0 && _totalItems + change > c->getRules()->getMaxItems())
if (_totalItems + change > c->getRules()->getMaxItems())
{
if (!suppressErrors)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/RuleCraft.cpp
Expand Up @@ -40,7 +40,7 @@ RuleCraft::RuleCraft(const std::string &type, int listOrder) :
_monthlyBuyLimit(0), _costBuy(0), _costRent(0), _costSell(0), _repairRate(1), _refuelRate(1),
_transferTime(24), _score(0), _battlescapeTerrainData(0), _maxSkinIndex(0),
_keepCraftAfterFailedMission(false), _allowLanding(true), _spacecraft(false), _notifyWhenRefueled(false), _autoPatrol(false), _undetectable(false),
_listOrder(listOrder), _maxItems(0), _maxAltitude(-1), _defaultAltitude("STR_VERY_LOW"), _maxStorageSpace(0.0), _stats(),
_listOrder(listOrder), _maxItems(999999), _maxAltitude(-1), _defaultAltitude("STR_VERY_LOW"), _maxStorageSpace(0.0), _stats(),
_shieldRechargeAtBase(1000),
_mapVisible(true), _forceShowInMonthlyCosts(false), _useAllStartTiles(false)
{
Expand Down
6 changes: 5 additions & 1 deletion src/Mod/RuleCraft.h
Expand Up @@ -38,7 +38,11 @@ class ScriptParserBase;
*/
struct RuleCraftStats
{
int fuelMax, damageMax, speedMax, accel, radarRange, radarChance, sightRange, hitBonus, avoidBonus, powerBonus, armor, shieldCapacity, shieldRecharge, shieldRechargeInGeoscape, shieldBleedThrough, soldiers, vehicles;
int fuelMax, damageMax, speedMax, accel;
int radarRange, radarChance, sightRange;
int hitBonus, avoidBonus, powerBonus, armor;
int shieldCapacity, shieldRecharge, shieldRechargeInGeoscape, shieldBleedThrough;
int soldiers, vehicles;

/// Default constructor.
RuleCraftStats() :
Expand Down
2 changes: 1 addition & 1 deletion src/Ufopaedia/StatsForNerdsState.cpp
Expand Up @@ -3218,7 +3218,7 @@ void StatsForNerdsState::initCraftList()
addInteger(ss, craftRule->getMaxSoldiers(), "maxSoldiers", -1);
addInteger(ss, craftRule->getMaxVehicles(), "maxVehicles", -1);

addInteger(ss, craftRule->getMaxItems(), "maxItems");
addInteger(ss, craftRule->getMaxItems(), "maxItems", 999999);
addDouble(ss, craftRule->getMaxStorageSpace(), "maxStorageSpace");

addInteger(ss, craftRule->getMaxAltitude(), "maxAltitude", -1);
Expand Down

0 comments on commit 776d618

Please sign in to comment.