forked from Mirrors/openclonk
Inventory now updates when an object is removed (Loam, Constructing stuff,...)
parent
7842d8c8e5
commit
b6731b1dc8
|
@ -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?
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue