A single action in detail.<br><i>About the action rulebooks <ahref=inform:/doc178.html><imgborder=0src=inform:/doc_images/help.png></a></i></p>
</td>
</tr></table>
<hr><b>Standard actions which change the state of things</b><br>Locking it with <ahref=16_A.html><imgborder=0src=inform:/doc_images/Beneath.png></a>, <b>Unlocking it with</b> <ahref=17_A.html><imgborder=0src=inform:/doc_images/Beneath.png></a>, Switching on <ahref=18_A.html><imgborder=0src=inform:/doc_images/Beneath.png></a>, Switching off <ahref=19_A.html><imgborder=0src=inform:/doc_images/Beneath.png></a>, Opening <ahref=20_A.html><imgborder=0src=inform:/doc_images/Beneath.png></a>, Closing <ahref=21_A.html><imgborder=0src=inform:/doc_images/Beneath.png></a>, Wearing <ahref=22_A.html><imgborder=0src=inform:/doc_images/Beneath.png></a>, Taking off <ahref=23_A.html><imgborder=0src=inform:/doc_images/Beneath.png></a><p><hr><p><b>Unlocking <fontcolor="#000080">something</font> with <fontcolor="#000080">something</font></b><aname=Unlock></a> (<i>past tense</i> unlocked it with)<br>
<p>Unlocking undoes the
effect of locking, and renders the noun openable again provided that the
actor is carrying the right key (which must be the second noun).<br><br>Unlocking can be performed on any kind of thing which provides the either/or
properties lockable, locked, openable and open. The 'can't unlock without a lock
rule' tests to see if the noun both provides the lockable property, and if
it is in fact lockable: it is then assumed that the other properties can
safely be checked. In the Standard Rules, the container and door kinds both
satisfy these requirements.<br><br>We can create a new kind on which opening, closing, locking and unlocking
will work thus: 'A briefcase is a kind of thing. A briefcase can be openable.
A briefcase can be open. A briefcase can be lockable. A briefcase can be
locked. A briefcase is usually openable, lockable, open and unlocked.'<br><br>Inform checks whether the key fits using the 'can't unlock without the correct
key rule'. To satisfy this, the actor must be directly holding the second
noun, and it must be the current value of the 'matching key' property for
the noun. (This property is seldom referred to directly because it is
automatically set by assertions like 'The silver key unlocks the wicket
gate.')<br><br>The Standard Rules provide locking and unlocking actions at a fairly basic
level: they can be much enhanced using the extension Locksmith by Emily
Short, which is included with all distributions of Inform.<p><hr><p><b>Typed commands leading to this action</b><p>
<pclass="hangingin2">"open/unwrap/uncover [something] with [something preferably held]"</p><pclass="hangingin2">"unlock [something] with [something preferably held]"</p><p><b>Rules controlling this action</b></p><p>
<pclass="hangingin2">instead of <i>doing something to the cables</i> <ahref="source:story.ni#line53"><imgborder=0src=inform:/doc_images/Reveal.png></a></p>
<br><pclass="hangingin2">check <i>an actor unlocking something with</i> <fontcolor="#800000">can't unlock without a lock rule</font> <ahref="javascript:pasteCode('can[=0x0027=]t unlock without a lock rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The can[=0x0027=]t unlock without a lock rule is not listed in the check unlocking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i> <ahref="#"onclick="showResp('extra1000172', 'plus1000172'); return false;"><imgborder=0id="plus1000172"src=inform:/doc_images/responses.png></a> 1</p>
<divid="extra1000172"style="display: none;"><pclass="in2"> <spanstyle="color: #ffffff; font-family: 'Courier New', Courier, monospace; background-color: #8080ff;"> A </span><spanstyle="color: #000066;">"[regarding the noun][Those] [don't] seem to be something [we] [can] unlock."</span> <ahref="javascript:pasteCode('can[=0x0027=]t unlock without a lock rule response (A)')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i> <ahref="javascript:pasteCode('can[=0x0027=]t unlock without a lock rule response (A) is [=0x0022=]New text.[=0x0022=].')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>set</i></div>
<pclass="hangingin2">check <i>an actor unlocking something with</i> <fontcolor="#800000">can't unlock what's already unlocked rule</font> <ahref="javascript:pasteCode('can[=0x0027=]t unlock what[=0x0027=]s already unlocked rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The can[=0x0027=]t unlock what[=0x0027=]s already unlocked rule is not listed in the check unlocking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i> <ahref="#"onclick="showResp('extra1000173', 'plus1000173'); return false;"><imgborder=0id="plus1000173"src=inform:/doc_images/responses.png></a> 1</p>
<divid="extra1000173"style="display: none;"><pclass="in2"> <spanstyle="color: #ffffff; font-family: 'Courier New', Courier, monospace; background-color: #8080ff;"> A </span><spanstyle="color: #000066;">"[regarding the noun][They're] unlocked at the [if story tense is present
<pclass="hangingin2">check <i>an actor unlocking something with</i> <fontcolor="#800000">can't unlock without the correct key rule</font> <ahref="javascript:pasteCode('can[=0x0027=]t unlock without the correct key rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The can[=0x0027=]t unlock without the correct key rule is not listed in the check unlocking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i> <ahref="#"onclick="showResp('extra1000174', 'plus1000174'); return false;"><imgborder=0id="plus1000174"src=inform:/doc_images/responses.png></a> 1</p>
<divid="extra1000174"style="display: none;"><pclass="in2"> <spanstyle="color: #ffffff; font-family: 'Courier New', Courier, monospace; background-color: #8080ff;"> A </span><spanstyle="color: #000066;">"[regarding the second noun][Those] [don't] seem to fit the lock."</span> <ahref="javascript:pasteCode('can[=0x0027=]t unlock without the correct key rule response (A)')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i> <ahref="javascript:pasteCode('can[=0x0027=]t unlock without the correct key rule response (A) is [=0x0022=]New text.[=0x0022=].')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>set</i></div>
<br><pclass="hangingin2">carry out <i>an actor unlocking something with</i> <fontcolor="#800000">standard unlocking rule</font> <ahref="javascript:pasteCode('standard unlocking rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The standard unlocking rule is not listed in the carry out unlocking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i></p>
<br><pclass="hangingin2">report <i>an actor unlocking something with</i> <fontcolor="#800000">standard report unlocking rule</font> <ahref="javascript:pasteCode('standard report unlocking rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The standard report unlocking rule is not listed in the report unlocking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i> <ahref="#"onclick="showResp('extra1000176', 'plus1000176'); return false;"><imgborder=0id="plus1000176"src=inform:/doc_images/responses.png></a> 2</p>
<br>Click on the speech-bubble icons to see the responses, or here to see all of them: <ahref="#"onclick="showAllResp(); return false;"><imgborder=0src=inform:/doc_images/responses.png></a> 5</p>