MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / SetInventoryCount

Function SetInventoryCount

TombEngine/Game/pickup/pickup.cpp:139–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137short RPickups[16];
138
139bool SetInventoryCount(GAME_OBJECT_ID objectID, int count)
140{
141 if (!TryModifyWeapon(Lara, objectID, count, ModificationType::Set) &&
142 !TryModifyingAmmo(Lara, objectID, count, ModificationType::Set) &&
143 !TryModifyingKeyItem(Lara, objectID, count, ModificationType::Set) &&
144 !TryModifyingConsumable(Lara, objectID, count, ModificationType::Set) &&
145 !TryModifyMiscCount(Lara, objectID, count, ModificationType::Set))
146 {
147 return false;
148 }
149
150 return true;
151}
152
153void PickedUpObject(GAME_OBJECT_ID objectID, std::optional<int> count)
154{

Callers 1

SetItemCountFunction · 0.85

Calls 5

TryModifyWeaponFunction · 0.85
TryModifyingAmmoFunction · 0.85
TryModifyingKeyItemFunction · 0.85
TryModifyingConsumableFunction · 0.85
TryModifyMiscCountFunction · 0.85

Tested by

no test coverage detected