Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions src/xrGame/actor_communication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,15 @@ bool CActor::OnReceiveInfo(shared_str info_id) const

void CActor::OnDisableInfo(shared_str info_id) const
{
const bool wasPresent = HasInfo(info_id);

CInventoryOwner::OnDisableInfo(info_id);

if (wasPresent)
{
callback(GameObject::eInventoryInfoRemoved)(lua_game_object(), info_id.c_str());
}

if (!CurrentGameUI())
return;

Expand Down
2 changes: 2 additions & 0 deletions src/xrGame/game_object_space.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ enum ECallbackType : u32
eControllerAttitudeChange,

// X-Ray Extensions:
eInventoryInfoRemoved,

eKeyPress = 123,
eKeyRelease = 124,
eKeyHold = 125,
Expand Down
1 change: 1 addition & 0 deletions src/xrGame/script_game_object_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ void CScriptGameObject::script_register(lua_State* luaState)
value("patrol_path_in_point", int(GameObject::ePatrolPathInPoint)),
value("inventory_pda", int(GameObject::eInventoryPda)),
value("inventory_info", int(GameObject::eInventoryInfo)),
value("inventory_info_removed", int(GameObject::eInventoryInfoRemoved)),
value("article_info", int(GameObject::eArticleInfo)),
value("task_state", int(GameObject::eTaskStateChange)),
value("map_location_added", int(GameObject::eMapLocationAdded)),
Expand Down
Loading