forked from Mirrors/openclonk
add function to dynamite box to set stick count
parent
8ff9dd655d
commit
8d8ecb688c
|
@ -84,6 +84,16 @@ public func ChangeToIgniter()
|
|||
return true;
|
||||
}
|
||||
|
||||
public func SetDynamiteCount(int new_count)
|
||||
{
|
||||
count = BoundBy(new_count, 1, DYNA_MaxCount);
|
||||
UpdatePicture();
|
||||
// Update inventory if contained in a crew member.
|
||||
if (Contained())
|
||||
Contained()->~OnInventoryChange();
|
||||
return;
|
||||
}
|
||||
|
||||
private func UpdatePicture()
|
||||
{
|
||||
SetGraphics(Format("%d", 6 - count), DynamiteBox, 1, GFXOV_MODE_Picture);
|
||||
|
|
Loading…
Reference in New Issue