+\r
+(defaction open (obj)\r
+ "You cannot open this")\r
+\r
+(defmethod open ((obj container))\r
+ (unless (has obj :container) (return-from open (call-next-method)))\r
+ (if (has obj :closed)\r
+ (if (hasnt obj :locked)\r
+ (progn \r
+ (give obj :~closed)\r
+ (when (run-action-after obj)\r
+ (format nil "You open ~a." (the-name obj))))\r
+ "It's locked.")\r
+ (format nil "~a is already open." (the-name obj))))\r
+\r
+(defmethod close ((obj container))\r
+ (unless (has obj :container) (return-from closed (call-next-method)))\r
+ (if (hasnt obj :closed)\r
+ (progn \r
+ (give obj :closed)\r
+ (when (run-action-after obj)\r
+ (format nil "You close ~a." (the-name obj))))\r
+ (format nil "~a is already closed." (the-name obj))))\r