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

Function TryRemovingKeyItem

TombEngine/Game/pickup/pickup_key_items.cpp:97–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97bool TryRemovingKeyItem(LaraInfo& lara, GAME_OBJECT_ID objectID, std::optional<int> amount)
98{
99 if(amount.has_value())
100 return TryModifyingKeyItem(lara, objectID, -amount.value(), ModificationType::Remove);
101 else
102 return TryModifyingKeyItem(lara, objectID, amount, ModificationType::Remove);
103}
104
105std::optional<int> GetKeyItemCount(LaraInfo& lara, GAME_OBJECT_ID objectID)
106{

Callers 1

Calls 3

TryModifyingKeyItemFunction · 0.85
has_valueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected