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,...);
|
_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?
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue