Inventory now updates when an object is removed (Loam, Constructing stuff,...)

heavy-resources
Bernhard Bonigl 2012-03-21 21:55:34 +01:00
parent 7842d8c8e5
commit b6731b1dc8
2 changed files with 11 additions and 3 deletions

View File

@ -440,6 +440,14 @@ protected func Ejection(object obj)
_inherited(obj,...);
}
protected func ContentsDestruction()
{
// tell the Hud that something changed
this->~OnInventoryChange();
_inherited(...);
}
protected func RejectCollect(id objid, object obj)
{
// collection of that object magically disabled?

View File

@ -172,12 +172,12 @@ protected func OnInventoryHotkeyRelease(int slot)
return _inherited(slot, ...);
}
// when two items switch place
protected func OnInventoryChange(int old, int new)
// when something in the inventory changed
protected func OnInventoryChange()
{
if (HUDcontroller)
HUDcontroller->ScheduleUpdateBackpack();
return _inherited(old, new, ...);
return _inherited(...);
}
func Collection2()