# HG changeset patch # User KarstenBock@gmx.net # Date 1317643937 -7200 # Node ID 26e65f27dbd703ba3bcc2ece4738df5bc71d7f3e # Parent 8bb84164e6a267cfa36e366bec394c149db4170e "Open" will now not be shown in the context menu when the lockable is locked. "Lock" will not not be shown in the context menu when the lockable is open. diff -r 8bb84164e6a2 -r 26e65f27dbd7 gamescenecontroller.py --- a/gamescenecontroller.py Mon Oct 03 13:05:23 2011 +0200 +++ b/gamescenecontroller.py Mon Oct 03 14:12:17 2011 +0200 @@ -467,10 +467,11 @@ if obj.lockable: if obj.lockable.closed: - actions.append(["Open", "Open", - player.fifeagent.behaviour.approach, - [obj_pos.x, obj_pos.y], - OpenAction(self, obj)]) + if not obj.lockable.locked: + actions.append(["Open", "Open", + player.fifeagent.behaviour.approach, + [obj_pos.x, obj_pos.y], + OpenAction(self, obj)]) else: actions.append(["Close", "Close", player.fifeagent.behaviour.approach, @@ -482,10 +483,11 @@ [obj_pos.x, obj_pos.y], UnlockAction(self, obj)]) else: - actions.append(["Lock", "Lock", - player.fifeagent.behaviour.approach, - [obj_pos.x, obj_pos.y], - LockAction(self, obj)]) + if obj.lockable.closed: + actions.append(["Lock", "Lock", + player.fifeagent.behaviour.approach, + [obj_pos.x, obj_pos.y], + LockAction(self, obj)]) if obj.container: if obj.characterstats: #TODO: This is reserved for a possible "Steal" action.