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

Function PickedUpObject

TombEngine/Game/pickup/pickup.cpp:153–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void PickedUpObject(GAME_OBJECT_ID objectID, std::optional<int> count)
154{
155 // See if the items fit into one of these easy groups.
156 if (!TryAddingWeapon(Lara, objectID) &&
157 !TryAddingAmmo(Lara, objectID, count) &&
158 !TryAddingKeyItem(Lara, objectID, count) &&
159 !TryAddingConsumable(Lara, objectID, count) &&
160 !TryAddMiscItem(Lara, objectID))
161 {
162 // Item isn't any of the above; do nothing.
163 }
164 else
165 {
166 SaveGame::Statistics.Level.Pickups++;
167 SaveGame::Statistics.Game.Pickups++;
168 }
169}
170
171void PickedUpObject(ItemInfo& item)
172{

Callers 5

PuzzleHoleFunction · 0.85
CollectCarriedItemsFunction · 0.85
CollectMultiplePickupsFunction · 0.85
DoPickupFunction · 0.85
GiveItemFunction · 0.85

Calls 5

TryAddingWeaponFunction · 0.85
TryAddingAmmoFunction · 0.85
TryAddingKeyItemFunction · 0.85
TryAddingConsumableFunction · 0.85
TryAddMiscItemFunction · 0.85

Tested by

no test coverage detected