Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2eda756
feat: add underlying code to support separation of item mass and volu…
FlufflesTheMicrosaur Jan 15, 2026
3318238
feat: 105767: add engine options to control default legacy conversion…
FlufflesTheMicrosaur Jan 15, 2026
473f233
feat: 105767: support legacy conversion of pre-API59 ships and cargo …
FlufflesTheMicrosaur Jan 15, 2026
4072f9c
chore: 10575: update barrels of water with the correct volumes to get…
FlufflesTheMicrosaur Jan 15, 2026
d28c5a3
Feat: 105767: add option to specify density for things with known den…
FlufflesTheMicrosaur Jan 15, 2026
47efb04
chore: 105767: update some documentation and the rpg ship stat viewer
FlufflesTheMicrosaur Jan 15, 2026
fa6700b
feat: 105767: convert armor mass classes over to a size limited syste…
FlufflesTheMicrosaur Jan 15, 2026
35c3cda
chore: basic update to cargo display
FlufflesTheMicrosaur Jan 15, 2026
6c01507
feat: 105924: add proper composition of metric numbers for both unit …
FlufflesTheMicrosaur Jan 15, 2026
dfee7d6
fix: 105924: remove testing placeholders, switch to actual names
FlufflesTheMicrosaur Jan 15, 2026
e0685de
Merge branch 'feature/105924-metric_number_formatting' into feature/1…
FlufflesTheMicrosaur Jan 15, 2026
47c9816
feat: 105927: add metric formatting to fmtNumber (metric, metricFull,…
FlufflesTheMicrosaur Jan 15, 2026
35500dd
chore: 105927: add docs
FlufflesTheMicrosaur Jan 15, 2026
8828413
fix: 105924: properly pad decimals
FlufflesTheMicrosaur Jan 16, 2026
345e2a1
feat: 105927: add options and ret structs for metric formatting
FlufflesTheMicrosaur Jan 16, 2026
5811c66
feat: 105927: add options and ret structs for metric formatting
FlufflesTheMicrosaur Jan 16, 2026
2fecb6d
Merge branch 'feature/105924-metric_number_formatting' into feature/1…
FlufflesTheMicrosaur Jan 16, 2026
f8665fa
feat: 105924: refactor to use options and ret struct instead of indiv…
FlufflesTheMicrosaur Jan 16, 2026
3d890cb
Merge branch 'feature/105924-metric_number_formatting' into feature/1…
FlufflesTheMicrosaur Jan 16, 2026
7d2a3f0
fix: 105924: fix updated dynamic decimal logic
FlufflesTheMicrosaur Jan 16, 2026
94ca2e9
Merge branch 'feature/105924-metric_number_formatting' into feature/1…
FlufflesTheMicrosaur Jan 16, 2026
2c09d17
feat: 105927: add optional options struct for ComposeNumber (currentl…
FlufflesTheMicrosaur Jan 16, 2026
807dd79
chore: 105767: update station code for autolooting to volume
FlufflesTheMicrosaur Jan 16, 2026
60d66e7
feat: 105767: add size range support to item criteria for both >=@a s…
FlufflesTheMicrosaur Jan 16, 2026
a7efcdd
chore: 105767: more updates to ui, also some updates to balancestats
FlufflesTheMicrosaur Jan 17, 2026
1fc54b9
chore: 105767: switch to using CBM (real shipping industry name for C…
FlufflesTheMicrosaur Jan 17, 2026
1aa1d1f
Merge branch 'feature/105767-cubic_meters_cargo' of https://github.co…
FlufflesTheMicrosaur Jan 17, 2026
30c48ec
chore: 105767: more conversions of m^3 to CBM
FlufflesTheMicrosaur Jan 17, 2026
052128b
chore: 105767: more updates from tons to CBM, update a number of comm…
FlufflesTheMicrosaur Jan 17, 2026
e4757a2
chore: 105767: comment updates
FlufflesTheMicrosaur Jan 17, 2026
2caedf4
feat: 105767: (itmGetVolume ...) for getting size of an item in CBM
FlufflesTheMicrosaur Jan 18, 2026
bf6fb40
Merge remote-tracking branch 'origin/feature/105927-fmtNumber_metric'…
FlufflesTheMicrosaur Jan 18, 2026
b6ef0ed
feat: 105767: add CBM formatting to ComposeNumber and fmtNumber
FlufflesTheMicrosaur Jan 18, 2026
6afda32
chore: 105767: update more UI to use new fmtNumber CBM format types
FlufflesTheMicrosaur Jan 18, 2026
a9f750c
Fix: 105767: fix strToDouble using atof which is horrifically out of …
FlufflesTheMicrosaur Jan 18, 2026
c2eec28
chore: 105767: update reading armor size vals to fixed version of str…
FlufflesTheMicrosaur Jan 18, 2026
3470e83
chore: 105767: remove the explicit size from the armor reference stri…
FlufflesTheMicrosaur Jan 18, 2026
93d0c0b
Feat: 105767: update some functions and documentation, update ArmorCl…
FlufflesTheMicrosaur Jan 18, 2026
b4bbcfb
Fix: 105978: fix strToDouble using atof
FlufflesTheMicrosaur Jan 18, 2026
f1139cf
Merge remote-tracking branch 'origin/fix/105978-strToDouble' into fea…
FlufflesTheMicrosaur Jan 18, 2026
881bd39
chore: 105767: update docs
FlufflesTheMicrosaur Jan 18, 2026
aac96fc
chore: update ship cargo properties
FlufflesTheMicrosaur Jan 19, 2026
72a9702
chore: 105767: further property updates, simplify api slightly
FlufflesTheMicrosaur Jan 19, 2026
7acd8de
chore: 105767: remove deprecated use for cargoSpaceFree/UsedKg
FlufflesTheMicrosaur Jan 19, 2026
90ad5b2
chore: 105767: more renames and deprecations for getting item/cargo v…
FlufflesTheMicrosaur Jan 19, 2026
a5b6b8d
chore: 105767: update a missing part to the UI in a legacy dockscreen
FlufflesTheMicrosaur Jan 19, 2026
85ce954
feat: 105767: ensure deprecated compatibility functions continue usin…
FlufflesTheMicrosaur Jan 19, 2026
c0b2a79
feat: 105767: more cargo mass info on the UI
FlufflesTheMicrosaur Jan 19, 2026
204f636
fix: 105767: fix some conditionals so they are more robust against sl…
FlufflesTheMicrosaur Jan 19, 2026
93a16b8
fix: 105767: old int-only multiplication being used on volume (which …
FlufflesTheMicrosaur Jan 19, 2026
9df6fc5
feat: 105767: implement charges
FlufflesTheMicrosaur Jan 19, 2026
249a556
Merge remote-tracking branch 'origin/integration/API59' into feature/…
FlufflesTheMicrosaur Jan 19, 2026
0ef6973
Merge branch 'feature/105927-fmtNumber_metric' into feature/105767-cu…
FlufflesTheMicrosaur Jan 19, 2026
8992173
Merge remote-tracking branch 'origin/integration/API59' into feature/…
FlufflesTheMicrosaur Jan 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mammoth/Include/TSE.h
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,7 @@ class CSpaceObject
void AddEffect (IEffectPainter *pPainter, int xOffset, int yOffset, int iTick = 0, int iRotation = 0);
void CalcInsideBarrier (void);
Metric CalculateItemMass (Metric *retrCargoMass = NULL) const;
Metric CalculateItemVolume (Metric *retrCargoVolume = NULL) const;
bool CanFireOnObjHelper (CSpaceObject *pObj) const;
void ClearCannotBeHit (void) { m_fCannotBeHit = false; }
void ClearInDamageCode (void) { m_fInDamage = false; }
Expand Down
7 changes: 7 additions & 0 deletions Mammoth/Include/TSEAdventureDesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class CEngineOptions
Metric GetDamageMethodAdjStationHullArmor (EDamageMethod iMethod) const { return GetDamageMethodAdj(m_DamageMethodStationAdj.Hull.Armor, iMethod); };
Metric GetDamageMethodMinDamage () const { return m_rDamageMethodAdjMinDamage; }
EDamageMethodSystem GetDamageMethodSystem () const { return m_iDamageMethodSystem; }
Metric GetItemDefaultDensity () const { return m_rDefaultItemDensity; }
Metric GetItemXMLMassToVolumeRatio () const { return m_rDefaultItemMassToVolume; }
const CMiningDamageLevelDesc* GetMiningMaxOreLevels () const { return &m_MiningDamageMaxOreLevels; }
const CDamageAdjDesc* GetShieldDamageAdj (int iLevel) const { if (iLevel < 1 || iLevel > MAX_ITEM_LEVEL) throw CException(ERR_FAIL); return &m_ShieldDamageAdj[iLevel - 1]; }
Metric GetShieldIdlePowerRatio () const { return m_rDefaultShieldIdlePowerRatio; }
Expand Down Expand Up @@ -169,6 +171,11 @@ class CEngineOptions
int m_iDefaultInteraction = -1;
int m_iDefaultShotHP = -1;

// Default item legacy mass-volume conversions

Metric m_rDefaultItemDensity = 1.0;
Metric m_rDefaultItemMassToVolume = 1.0;

// Default power consumption

Metric m_rDefaultShieldIdlePowerRatio = 0.125;
Expand Down
2 changes: 1 addition & 1 deletion Mammoth/Include/TSEArmor.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class CArmorClass
int CalcBalance (const CArmorItem &ArmorItem) const { CArmorItem::SBalance Balance; return CalcBalance(ArmorItem, Balance); }
Metric CalcBalanceDamageAdj (const CArmorItem &ArmorItem, const SScalableStats &Stats) const;
Metric CalcBalanceDamageEffectAdj (const CArmorItem &ArmorItem, const SScalableStats &Stats) const;
Metric CalcBalanceMass (const CArmorItem &ArmorItem, const SScalableStats &Stats, Metric *retrStdMass) const;
Metric CalcBalanceSize (const CArmorItem &ArmorItem, const SScalableStats &Stats, Metric *retrStdSize) const;
Metric CalcBalancePower (const CArmorItem &ArmorItem, const SScalableStats &Stats) const;
Metric CalcBalanceRegen (const CArmorItem &ArmorItem, const SScalableStats &Stats) const;
Metric CalcBalanceRepair (const CArmorItem &ArmorItem, const SScalableStats &Stats) const;
Expand Down
10 changes: 5 additions & 5 deletions Mammoth/Include/TSEDesign.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ class CDesignType
size_t GetAllocMemoryUsage (void) const;
DWORD GetAPIVersion (void) const { return m_dwVersion; }
const CAchievementDataBlock &GetAchievementDefinitions () const { return (m_pExtra ? m_pExtra->Achievements : CAchievementDataBlock::Null()); }
const CArmorMassDefinitions &GetArmorMassDefinitions (void) const { return (m_pExtra ? m_pExtra->ArmorDefinitions : CArmorMassDefinitions::Null); }
const CArmorClassDefinitions &GetArmorMassDefinitions (void) const { return (m_pExtra ? m_pExtra->ArmorDefinitions : CArmorClassDefinitions::Null); }
const CString &GetAttributes (void) const { return m_sAttributes; }
TArray<CString> GetDataKeys (const EDesignDataTypes iDataType );
CString GetDataField (const CString &sField) const { CString sValue; FindDataField(sField, &sValue); return sValue; }
Expand Down Expand Up @@ -489,7 +489,7 @@ class CDesignType
CAttributeDataBlock InitGlobalData; // Initial global data
CLanguageDataBlock Language; // Language data
CXMLElement *pLocalScreens = NULL; // Local dock screen
CArmorMassDefinitions ArmorDefinitions; // Armor mass definitions
CArmorClassDefinitions ArmorDefinitions; // Armor mass definitions
CDisplayAttributeDefinitions DisplayAttribs; // Display attribute definitions
CItemEncounterDefinitions ItemEncounterDefinitions; // Item encounter definitions
CAchievementDataBlock Achievements; // Achievements defined by this type
Expand Down Expand Up @@ -1451,8 +1451,8 @@ class CDesignCollection
CAdventureDesc &GetAdventureDesc (void) { return (m_pAdventureDesc ? *m_pAdventureDesc : m_EmptyAdventure); }
DWORD GetAdventureUNID (void) const { return (m_pAdventureExtension ? m_pAdventureExtension->GetUNID() : 0); }
DWORD GetAPIVersion (void) const { return m_dwMinAPIVersion; }
CArmorMassDefinitions &GetArmorMassDefinitions (void) { return m_ArmorDefinitions; }
const CArmorMassDefinitions &GetArmorMassDefinitions (void) const { return m_ArmorDefinitions; }
CArmorClassDefinitions &GetArmorMassDefinitions (void) { return m_ArmorDefinitions; }
const CArmorClassDefinitions &GetArmorMassDefinitions (void) const { return m_ArmorDefinitions; }
int GetCount (void) const { return m_AllTypes.GetCount(); }
int GetCount (DesignTypes iType) const { return m_ByType[iType].GetCount(); }
const CDisplayAttributeDefinitions &GetDisplayAttributes (void) const { return m_DisplayAttribs; }
Expand Down Expand Up @@ -1517,7 +1517,7 @@ class CDesignCollection
CAdventureDesc *m_pAdventureDesc = NULL;
TSortMap<CString, const CEconomyType *> m_EconomyIndex;
CAchievementDefinitions m_AchievementDefinitions;
CArmorMassDefinitions m_ArmorDefinitions;
CArmorClassDefinitions m_ArmorDefinitions;
CDisplayAttributeDefinitions m_DisplayAttribs;
CItemEncounterDefinitions m_ItemEncounterDefinitions;
CGlobalEventCache *m_EventsCache[evtCount];
Expand Down
43 changes: 43 additions & 0 deletions Mammoth/Include/TSEEngineDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,49 @@
#define PROPERTY_CORE_HIDE_RADIATION_IMMUNE CONSTLIT("core.hideRadiationImmune")
#define PROPERTY_CORE_HIDE_SHATTER_IMMUNE CONSTLIT("core.hideShatterImmune")

// core.item.xmlMassToRealVolume
//
// Adventure Property: Evaluated at bind time. This property exists for adventures
// that balance cargo/mass divergently from pre-2.0 Stars of the Pilgrim, but still
// wish to convert items from old mods/extensions.
// This is relevant because in legacy Stars of the Pilgrim, cargo holds assumed items
// have a density much less than water, so the max mass of the cargo holds was divided
// by approximately 4. This computation converts the xml mass
// from kg to tons BEFORE applying this ratio.
//
// Notice: if this is not the inverse of core.item.defaultDensity, you will need to
// update your armor mass classes accordingly or switch to using armor size classes
// Notice: it is strongly recommended to switch to armor size classes instead of
// using the legacy armor mass classes
//
// Example values:
// 1.0 = volume is set to the mass provided in the XML
// 1.5 = volume is set to 1.5x the mass provided in the XML
//
// Default: 1.0
//
#define PROPERTY_CORE_ITEM_LEGACY_MASS_TO_VOLUME CONSTLIT("core.item.xmlMassToRealVolume")

// core.item.defaultDensity
//
// Adventure Property: Evaluated at bind time. This property allows adventures to
// assume a specific density for items that do not provide a volume. This calculation
// Is applied after core.item.legacyMassToValue to compute the actual mass the item
// should be converted to in this adventure.
//
// Notice: if this is not the inverse of core.item.defaultDensity, you will need to
// update your armor mass classes accordingly or switch to using armor size classes
// Notice: it is strongly recommended to switch to armor size classes instead of
// using the legacy armor mass classes
//
// Example values:
// 1.0 = mass is set to the computed volume (equal density to water)
// 0.125 = mass is set to one quarter the computed volume
//
// Default: 1.0
//
#define PROPERTY_CORE_ITEM_DEFAULT_DENSITY CONSTLIT("core.item.defaultDensity")

// core.item.shield.idlePowerAdj
//
// Adventure Property: Evaluated at bind time. This property controls the
Expand Down
42 changes: 24 additions & 18 deletions Mammoth/Include/TSEItemDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class CItemCriteria
bool MatchesItemCategory (const CItemType &ItemType) const;
bool MatchesLauncherMissilesOnly (void) const { return m_bLauncherMissileOnly; }
bool MatchesLevel (int iLevel) const { return m_LevelRange.Matches(iLevel); }
bool MatchesSize (Metric rSize) const { return m_SizeRange.Matches(rSize); }
bool MatchesMass (int iMassKg) const { return m_MassRange.Matches(iMassKg); }
bool MatchesNotInstalledOnly (void) const { return m_bNotInstalledOnly; }
bool MatchesPrice (CurrencyValue iValue) const { return m_PriceRange.Matches((int)iValue); }
Expand Down Expand Up @@ -110,8 +111,10 @@ class CItemCriteria

CIntegerRangeCriteria m_LevelRange; // Only items of this level
CIntegerRangeCriteria m_PriceRange; // Only items of this price
CDoubleRangeCriteria m_SizeRange; // Only items of this volume (in cubic meters (CBM))
CIntegerRangeCriteria m_MassRange; // Only items of this mass (in kg)
CIntegerRangeCriteria m_RepairLevelRange; // Only items of this repair level


CString m_sLookup; // Look up a shared criteria
ICCItemPtr m_pFilter; // Filter returns Nil for excluded items
Expand Down Expand Up @@ -316,48 +319,51 @@ class CDisplayAttributeDefinitions
TArray<SItemEntry> m_ItemAttribs;
};

class CArmorMassDefinitions
class CArmorClassDefinitions
{
public:
void Append (const CArmorMassDefinitions &Src);
void Append (const CArmorClassDefinitions &Src);
void DeleteAll (void) { m_Definitions.DeleteAll(); InvalidateIDIndex(); }
bool FindPreviousMassClass (const CString &sID, CString *retsPrevID = NULL, int *retiPrevMass = NULL) const;
bool FindPreviousArmorClass (const CString &sID, CString *retsPrevID = NULL, Metric *retrPrevSize = NULL) const;
Metric GetFrequencyMax (const CString &sID) const;
const CString &GetMassClassID (const CItem &Item) const;
const CString &GetMassClassLabel (const CString &sID) const;
int GetMassClassMass (const CString &sID) const;
const CString &GetArmorClassID (const CItem &Item) const;
const CString &GetArmorClassLabel (const CString &sID) const;
Metric GetArmorClassSize (const CString &sID) const;
ALERROR InitFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc);
bool IsEmpty (void) const { return (m_Definitions.GetCount() == 0); }
void OnBindArmor (SDesignLoadCtx &Ctx, const CItem &Item, CString *retsMassClass = NULL);
void OnBindArmor (SDesignLoadCtx &Ctx, const CItem &Item, CString *retsArmorClass = NULL);
void OnInitDone (void);

static const CArmorMassDefinitions Null;
static const CArmorClassDefinitions Null;

private:

struct SArmorMassEntry
struct SArmorClassEntry
{
CString sDefinition; // Index to m_Definitions

CString sID; // Required ID
int iMaxMass = 0; // Maximum mass (kg)
Metric rMaxSize = 0; // Maximum size (cubic meters (CBM))
CString sText; // Text to display on item
CString sTextShort; // Text to display in size-constrained UIs

int iCount = 0; // Number of armor types for this mass
int iCount = 0; // Number of armor types for this class
};

struct SArmorMassDefinition
struct SArmorClassDefinition
{
CItemCriteria Criteria; // Criteria for armor
TSortMap<int, SArmorMassEntry> Classes;
TSortMap<int, SArmorClassEntry> Classes;
TSortMap<CString, int> Ids;
};

const SArmorMassEntry *FindMassEntry (const CItem &Item) const { return const_cast<CArmorMassDefinitions *>(this)->FindMassEntryActual(Item); }
SArmorMassEntry *FindMassEntryActual (const CItem &Item);
void InvalidateIDIndex (void) { m_ByID.DeleteAll(); }
const SArmorClassEntry *FindClassEntry (const CItem &Item) const { return const_cast<CArmorClassDefinitions *>(this)->FindClassEntryActual(Item); }
SArmorClassEntry *FindClassEntryActual (const CItem &Item);
void InvalidateIDIndex () { m_ByID.DeleteAll(); }
void CleanupDefinitions () { m_Definitions.DeleteAll(); }

TSortMap<CString, SArmorMassDefinition> m_Definitions;
TSortMap<CString, SArmorMassEntry *> m_ByID;
TSortMap<CString, SArmorClassDefinition> m_Definitions;
TSortMap<CString, SArmorClassEntry *> m_ByID;
};

// CItemEncounterDefinitions --------------------------------------------------
Expand Down
48 changes: 32 additions & 16 deletions Mammoth/Include/TSEItemInlines.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "TSEItems.h"
// TSEItemInlines.h
//
// Inline functions for various item classes.
Expand Down Expand Up @@ -27,6 +28,16 @@ inline const CObjectImageArray &CItem::GetImage (void) const
return (m_pItemType ? m_pItemType->GetImage() : CObjectImageArray::Null());
}

// GetVolume
//
// Get the volume in cubic meters for a single instance of this item
//
inline Metric CItem::GetVolume() const
{
CItemCtx ItemCtx(*this);
return m_pItemType->GetVolume(ItemCtx);
}

inline bool CItem::HasAttribute (const CString &sAttrib) const
{
return (m_pItemType ? m_pItemType->HasLiteralAttribute(sAttrib): false);
Expand Down Expand Up @@ -71,12 +82,12 @@ inline bool CDifferentiatedItem::AccumulateEnhancementDisplayAttributes (TArray<
return m_Item.AccumulateEnhancementDisplayAttributes(retList);
}

inline ItemCategories CDifferentiatedItem::GetCategory (void) const
inline ItemCategories CDifferentiatedItem::GetCategory () const
{
return m_Item.GetCategory();
}

inline int CDifferentiatedItem::GetCharges (void) const
inline int CDifferentiatedItem::GetCharges () const
{
return m_Item.GetCharges();
}
Expand All @@ -87,7 +98,7 @@ inline CCurrencyAndValue CDifferentiatedItem::GetCurrencyAndValue (bool bActual)
return GetType().GetCurrencyAndValue(ItemCtx, bActual);
}

inline const CEconomyType &CDifferentiatedItem::GetCurrencyType (void) const
inline const CEconomyType &CDifferentiatedItem::GetCurrencyType () const
{
const CEconomyType *pCurrency = GetType().GetCurrencyType();
if (pCurrency)
Expand All @@ -96,22 +107,27 @@ inline const CEconomyType &CDifferentiatedItem::GetCurrencyType (void) const
return GetType().GetUniverse().GetCreditCurrency();
}

inline const CObjectImageArray &CDifferentiatedItem::GetImage (void) const
inline const CObjectImageArray &CDifferentiatedItem::GetImage () const
{
return m_Item.GetImage();
}

inline int CDifferentiatedItem::GetLevel (void) const
inline int CDifferentiatedItem::GetLevel () const
{
return m_Item.GetLevel();
}

inline int CDifferentiatedItem::GetMassKg (void) const
inline int CDifferentiatedItem::GetMassKg () const
{
return m_Item.GetMassKg();
}

inline int CDifferentiatedItem::GetMinLevel (void) const
inline Metric CDifferentiatedItem::GetVolume () const
{
return m_Item.GetVolume();
}

inline int CDifferentiatedItem::GetMinLevel () const
{
return GetType().GetMinLevel();
}
Expand Down Expand Up @@ -139,17 +155,17 @@ inline ICCItemPtr CDifferentiatedItem::GetPropertyKeys () const
return m_Item.GetItemPropertyKeys(CCX, ItemCtx, false);
}

inline int CDifferentiatedItem::GetVariantNumber (void) const
inline int CDifferentiatedItem::GetVariantNumber () const
{
return m_Item.GetVariantNumber();
}

inline const CItemType &CDifferentiatedItem::GetType (void) const
inline const CItemType &CDifferentiatedItem::GetType () const
{
return *m_Item.GetType();
}

inline CItemType &CDifferentiatedItem::GetType (void)
inline CItemType &CDifferentiatedItem::GetType ()
{
return *m_Item.GetType();
}
Expand All @@ -159,22 +175,22 @@ inline bool CDifferentiatedItem::IsDamaged (int *retiDamagedHP) const
return m_Item.IsDamaged(retiDamagedHP);
}

inline bool CDifferentiatedItem::IsDisrupted (void) const
inline bool CDifferentiatedItem::IsDisrupted () const
{
return m_Item.IsDisrupted();
}

inline bool CDifferentiatedItem::IsEnhanced (void) const
inline bool CDifferentiatedItem::IsEnhanced () const
{
return m_Item.IsEnhanced();
}

inline bool CDifferentiatedItem::IsLauncher (void) const
inline bool CDifferentiatedItem::IsLauncher () const
{
return m_Item.IsLauncher();
}

inline bool CDifferentiatedItem::IsWeapon (void) const
inline bool CDifferentiatedItem::IsWeapon () const
{
return m_Item.IsWeapon();
}
Expand All @@ -191,12 +207,12 @@ inline int CArmorClass::GetInstallCost (const CArmorItem &ArmorItem) const
const SScalableStats &Stats = GetScaledStats(ArmorItem); return (int)m_pItemType->GetCurrencyType()->Exchange(Stats.InstallCost);
}

inline CString CArmorClass::GetName (void) const
inline CString CArmorClass::GetName () const
{
return m_pItemType->GetNounPhrase();
}

inline DWORD CArmorClass::GetUNID (void)
inline DWORD CArmorClass::GetUNID ()
{
return m_pItemType->GetUNID();
}
Expand Down
3 changes: 3 additions & 0 deletions Mammoth/Include/TSEItemType.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class CItemType : public CDesignType
bool GetUseDesc (SUseDesc *retDesc = NULL) const;
int GetValue (CItemCtx &Ctx, bool bActual = false) const { return (int)GetCurrencyAndValue(Ctx, bActual).GetValue(); }
int GetValueBonusPerCharge (void) const { return m_iExtraValuePerCharge; }
Metric GetVolume (CItemCtx &Ctx) const;
CWeaponFireDesc *GetWeaponFireDesc (CItemCtx &Ctx, CString *retsError = NULL) const;
bool HasOnRefuelCode (void) const { return FindEventHandlerItemType(evtOnRefuel); }
bool HasOnInstallCode (void) const { return FindEventHandlerItemType(evtOnInstall); }
Expand Down Expand Up @@ -195,6 +196,7 @@ class CItemType : public CDesignType
int m_iMaxLevel; // Max level, for scalable items
CCurrencyAndValue m_iValue; // Value in some currency
int m_iMass; // Mass in kilograms
Metric m_rVolume; // Volume in Cubic meters
FrequencyTypes m_Frequency; // Frequency
DiceRange m_NumberAppearing; // Number appearing

Expand All @@ -207,6 +209,7 @@ class CItemType : public CDesignType

int m_iExtraMassPerCharge; // Extra mass per charge (in kilos)
int m_iExtraValuePerCharge; // Extra value per charge (may be negative)
Metric m_rExtraVolumePerCharge; // Extra volume per charge (in cubic meters)

// Components
IItemGenerator *m_pComponents; // Table to generate item components (may be NULL)
Expand Down
Loading