forked from Mirrors/openclonk
Fixd UI-Updates with CarryHeavy on Clonk-Selection
Added CarryHeavy to the Contentsmenufloating-point
parent
0dda1f59f5
commit
0bac82bcc3
|
@ -197,6 +197,10 @@ private func PutContentsIntoMenu(object menu, object container)
|
|||
if (!AddContentsMenuItem(stack[0], menu, stack))
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: find an extra-entry or something like that for this.
|
||||
if(container->~IsCarryingHeavy())
|
||||
AddContentsMenuItem(container->GetCarryHeavy(), menu);
|
||||
}
|
||||
|
||||
private func AddContentsMenuItem(object symbol, object menu, array stack)
|
||||
|
|
|
@ -584,6 +584,7 @@ public func OnCrewSelection(object clonk, bool deselect)
|
|||
ScheduleUpdateBackpack();
|
||||
UpdateHealthTube();
|
||||
UpdateBreathTube();
|
||||
OnCarryHeavyChange(clonk->~GetCarryHeavy());
|
||||
}
|
||||
|
||||
public func FxIntSearchInteractionObjectsEffect(string newname, object target)
|
||||
|
|
|
@ -431,6 +431,8 @@ protected func Ejection(object obj)
|
|||
for(var c = 0; c < ContentsCount(); ++c)
|
||||
{
|
||||
var o = Contents(c);
|
||||
if(o->~IsCarryHeavy())
|
||||
continue;
|
||||
if (GetItemPos(o) == nil)
|
||||
{
|
||||
// found it! Collect it properly
|
||||
|
@ -520,6 +522,9 @@ public func AllowTransfer(object obj)
|
|||
if (ContentsCount() >= MaxContentsCount())
|
||||
return false;
|
||||
|
||||
if(carryheavy && obj->~IsCarryHeavy())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -546,6 +551,7 @@ public func CarryHeavy(object target)
|
|||
this->~OnCarryHeavyChange(carryheavy);
|
||||
|
||||
// Update attach stuff
|
||||
this->~OnHandFull();
|
||||
//this->~UpdateAttach();
|
||||
|
||||
return true;
|
||||
|
@ -558,7 +564,7 @@ private func StopCarryHeavy()
|
|||
|
||||
carryheavy = nil;
|
||||
this->~OnCarryHeavyChange(nil);
|
||||
this->~UpdateAttach();
|
||||
this->~OnSlotEmpty();
|
||||
}
|
||||
|
||||
public func GetCarryHeavy() { return carryheavy; }
|
||||
|
|
Loading…
Reference in New Issue