diff --git a/planet/Objects.ocd/HUD.ocd/CircleMenu.ocd/ContentsMenuController.ocd/Script.c b/planet/Objects.ocd/HUD.ocd/CircleMenu.ocd/ContentsMenuController.ocd/Script.c index 63028c612..bdc0f33b9 100644 --- a/planet/Objects.ocd/HUD.ocd/CircleMenu.ocd/ContentsMenuController.ocd/Script.c +++ b/planet/Objects.ocd/HUD.ocd/CircleMenu.ocd/ContentsMenuController.ocd/Script.c @@ -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) diff --git a/planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c b/planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c index ff221db6d..f5fda050e 100644 --- a/planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c +++ b/planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c @@ -584,6 +584,7 @@ public func OnCrewSelection(object clonk, bool deselect) ScheduleUpdateBackpack(); UpdateHealthTube(); UpdateBreathTube(); + OnCarryHeavyChange(clonk->~GetCarryHeavy()); } public func FxIntSearchInteractionObjectsEffect(string newname, object target) diff --git a/planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c b/planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c index 02ed812ba..3be3dc791 100644 --- a/planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c +++ b/planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c @@ -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; }