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><b>Locking it with</b> <ahref=16_A.html><imgborder=0src=inform:/doc_images/Beneath.png></a>, Unlocking it with <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>Locking <fontcolor="#000080">something</font> with <fontcolor="#000080">something</font></b><aname=Lock></a> (<i>past tense</i> locked it with)<br>
<p>Locking is the act of
using an object such as a key to ensure that something such as a door or
container cannot be opened unless first unlocked. (Only closed things can be
locked.)<br><br>Locking can be performed on any kind of thing which provides the either/or
properties lockable, locked, openable and open. The 'can't lock 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 lock 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">"lock [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 locking something with</i> <fontcolor="#800000">can't lock without a lock rule</font> <ahref="javascript:pasteCode('can[=0x0027=]t lock without a lock rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The can[=0x0027=]t lock without a lock rule is not listed in the check locking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i> <ahref="#"onclick="showResp('extra1000166', 'plus1000166'); return false;"><imgborder=0id="plus1000166"src=inform:/doc_images/responses.png></a> 1</p>
<divid="extra1000166"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] lock."</span> <ahref="javascript:pasteCode('can[=0x0027=]t lock without a lock rule response (A)')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i> <ahref="javascript:pasteCode('can[=0x0027=]t lock 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 locking something with</i> <fontcolor="#800000">can't lock what's already locked rule</font> <ahref="javascript:pasteCode('can[=0x0027=]t lock what[=0x0027=]s already locked rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The can[=0x0027=]t lock what[=0x0027=]s already locked rule is not listed in the check locking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i> <ahref="#"onclick="showResp('extra1000167', 'plus1000167'); return false;"><imgborder=0id="plus1000167"src=inform:/doc_images/responses.png></a> 1</p>
<divid="extra1000167"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] locked at the [if story tense is present
<pclass="hangingin2">check <i>an actor locking something with</i> <fontcolor="#800000">can't lock what's open rule</font> <ahref="javascript:pasteCode('can[=0x0027=]t lock what[=0x0027=]s open rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The can[=0x0027=]t lock what[=0x0027=]s open rule is not listed in the check locking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i> <ahref="#"onclick="showResp('extra1000168', 'plus1000168'); return false;"><imgborder=0id="plus1000168"src=inform:/doc_images/responses.png></a> 1</p>
<divid="extra1000168"style="display: none;"><pclass="in2"> <spanstyle="color: #ffffff; font-family: 'Courier New', Courier, monospace; background-color: #8080ff;"> A </span><spanstyle="color: #000066;">"First [we] [would have] to close [the noun]."</span> <ahref="javascript:pasteCode('can[=0x0027=]t lock what[=0x0027=]s open rule response (A)')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i> <ahref="javascript:pasteCode('can[=0x0027=]t lock what[=0x0027=]s open 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 locking something with</i> <fontcolor="#800000">can't lock without the correct key rule</font> <ahref="javascript:pasteCode('can[=0x0027=]t lock without the correct key rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The can[=0x0027=]t lock without the correct key rule is not listed in the check locking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i> <ahref="#"onclick="showResp('extra1000169', 'plus1000169'); return false;"><imgborder=0id="plus1000169"src=inform:/doc_images/responses.png></a> 1</p>
<divid="extra1000169"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 lock without the correct key rule response (A)')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i> <ahref="javascript:pasteCode('can[=0x0027=]t lock 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 locking something with</i> <fontcolor="#800000">standard locking rule</font> <ahref="javascript:pasteCode('standard locking rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The standard locking rule is not listed in the carry out locking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i></p>
<br><pclass="hangingin2">report <i>an actor locking something with</i> <fontcolor="#800000">standard report locking rule</font> <ahref="javascript:pasteCode('standard report locking rule')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>name</i><ahref="javascript:pasteCode('The standard report locking rule is not listed in the report locking it with rulebook.[=0x000A=]')"><imgborder=0src=inform:/doc_images/paste.png></a> <i>unlist</i> <ahref="#"onclick="showResp('extra1000171', 'plus1000171'); return false;"><imgborder=0id="plus1000171"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> 6</p>