forked from Mirrors/openclonk
Disallow interaction menu on hostile and neutral clonks
Stealing items in melees or taking quest items from NPCs is a bit odd.console-destruction
parent
4c56b41de0
commit
cd4e419aef
|
@ -545,3 +545,16 @@ public func SetMaxContentsCount(int new_count)
|
|||
this->~OnInventoryChange();
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Objects with inventory (i.e. clonks) do not allow taking out items by hostile clonks.
|
||||
Also do not allow for neutral, because that will affect NPCs */
|
||||
public func RejectInteractionMenu(object clonk, ...)
|
||||
{
|
||||
var msg = _inherited(clonk, ...);
|
||||
if (!msg)
|
||||
{
|
||||
if (GetOwner() == NO_OWNER || Hostile(GetOwner(), clonk->GetOwner()))
|
||||
return Format("$MsgNoInteraction$", GetName());
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
MsgNoInteraction=%s erlaubt keine Interaktion.
|
|
@ -0,0 +1 @@
|
|||
MsgNoInteraction=%s does not allow interaction.
|
Loading…
Reference in New Issue