diff --git a/planet/Objects.ocd/Clonk.ocd/Script.c b/planet/Objects.ocd/Clonk.ocd/Script.c index faa5be845..1b18c8930 100644 --- a/planet/Objects.ocd/Clonk.ocd/Script.c +++ b/planet/Objects.ocd/Clonk.ocd/Script.c @@ -282,6 +282,13 @@ public func RejectInteractionMenu(object to) return _inherited(to, ...); } +// You can not display the Clonk as a content entry in a building. +// Otherwise you can transfer a crew member to your inventory... +public func RejectInteractionMenuContentEntry(object menu_target, object container) +{ + return true; +} + public func GetSurroundingEntryMessage(object for_clonk) { if (!GetAlive()) return Format("{{Clonk_Grave}} %s", Clonk_Grave->GetInscriptionForClonk(this)); diff --git a/planet/Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c b/planet/Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c index eb6d12768..7a60833c8 100644 --- a/planet/Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c +++ b/planet/Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c @@ -837,6 +837,12 @@ func FxIntRefreshContentsMenuTimer(object target, effect, int time) var obj, i = 0; while (obj = effect.obj->Contents(i++)) { + // Ignore objects that do not want to be shown as contents + if (obj->~RejectInteractionMenuContentEntry(cursor, effect.obj)) + { + continue; + } + var symbol = obj; var extra_data = {slot = effect.slot, menu_index = effect.menu_index, objects = []};