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))
|
if (!AddContentsMenuItem(stack[0], menu, stack))
|
||||||
return;
|
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)
|
private func AddContentsMenuItem(object symbol, object menu, array stack)
|
||||||
|
|
|
@ -584,6 +584,7 @@ public func OnCrewSelection(object clonk, bool deselect)
|
||||||
ScheduleUpdateBackpack();
|
ScheduleUpdateBackpack();
|
||||||
UpdateHealthTube();
|
UpdateHealthTube();
|
||||||
UpdateBreathTube();
|
UpdateBreathTube();
|
||||||
|
OnCarryHeavyChange(clonk->~GetCarryHeavy());
|
||||||
}
|
}
|
||||||
|
|
||||||
public func FxIntSearchInteractionObjectsEffect(string newname, object target)
|
public func FxIntSearchInteractionObjectsEffect(string newname, object target)
|
||||||
|
|
|
@ -431,6 +431,8 @@ protected func Ejection(object obj)
|
||||||
for(var c = 0; c < ContentsCount(); ++c)
|
for(var c = 0; c < ContentsCount(); ++c)
|
||||||
{
|
{
|
||||||
var o = Contents(c);
|
var o = Contents(c);
|
||||||
|
if(o->~IsCarryHeavy())
|
||||||
|
continue;
|
||||||
if (GetItemPos(o) == nil)
|
if (GetItemPos(o) == nil)
|
||||||
{
|
{
|
||||||
// found it! Collect it properly
|
// found it! Collect it properly
|
||||||
|
@ -520,6 +522,9 @@ public func AllowTransfer(object obj)
|
||||||
if (ContentsCount() >= MaxContentsCount())
|
if (ContentsCount() >= MaxContentsCount())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if(carryheavy && obj->~IsCarryHeavy())
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,6 +551,7 @@ public func CarryHeavy(object target)
|
||||||
this->~OnCarryHeavyChange(carryheavy);
|
this->~OnCarryHeavyChange(carryheavy);
|
||||||
|
|
||||||
// Update attach stuff
|
// Update attach stuff
|
||||||
|
this->~OnHandFull();
|
||||||
//this->~UpdateAttach();
|
//this->~UpdateAttach();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -558,7 +564,7 @@ private func StopCarryHeavy()
|
||||||
|
|
||||||
carryheavy = nil;
|
carryheavy = nil;
|
||||||
this->~OnCarryHeavyChange(nil);
|
this->~OnCarryHeavyChange(nil);
|
||||||
this->~UpdateAttach();
|
this->~OnSlotEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public func GetCarryHeavy() { return carryheavy; }
|
public func GetCarryHeavy() { return carryheavy; }
|
||||||
|
|
Loading…
Reference in New Issue