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,...); _inherited(obj,...);
} }
protected func ContentsDestruction()
{
// tell the Hud that something changed
this->~OnInventoryChange();
_inherited(...);
}
protected func RejectCollect(id objid, object obj) protected func RejectCollect(id objid, object obj)
{ {
// collection of that object magically disabled? // collection of that object magically disabled?

View File

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