User Tools

Site Tools


secure_airlocks

This is an old revision of the document!


Draft page, the following code needs to be debugged. **DO NOT USE!**

Set the following props in the ship's parent room

You will need the database reference numbers for two exits: The DBREF# for the exit leading FROM the Airlock Room to your ship's EVA Prep Room goes in this prop:

@propset here=dbref:_reg/indoor:#<You go inside through this exit>

The DBREF# for the exit leading TO the Airlock Room from your ship's EVA Prep Room goes in this prop:

@propset here=dbref:_reg/outdoor:#<You go outside through this exit>

Copy and paste the following code inside your airlock room

@action Secure;security=here=tmp/exit1

@link $tmp/exit1=$nothing

@propset $tmp/exit1=str:/_/de:You can ^green^SECURE LOCK^normal^ or ^green^SECURE UNLOCK^normal^ the inner door leading into the rest of the ship – if you have clearance.

@propset $tmp/exit1=str:/_/fl:You do not have the security card needed to operate this control.

@propset $tmp/exit1=str:/_/ofl:tries to {if:{exec:_/secured?,entryway},unlock, lock} the security seal on the entryway, but doesn't have the security card for it.

@propset $tmp/exit1=str:/_/sc:{if:{&arg}, {if:{prop:{&arg},this}, {exec:{&arg},this}, {exec:_bad}},{exec:_bad}}

@propset $tmp/exit1=str:/_bad:(color:^gray^The valid commands are ^green^SECURE LOCK ^gray^and ^green^SECURE UNLOCK^gray^.}

@propset $tmp/exit1=str:/do_lock:{null:{store:1,_/secured?,$indoor}{store:1,_/secured?,$outdoor}}

@propset $tmp/exit1=str:/do_unlock:{null:{store:0,_/secured?,$indoor}{store:0,_/secured?,$outdoor}}

@propset $tmp/exit1=str:/lock:{if:{exec:_/secured?,$indoor},The entryway door already has a security seal., You lock the entryway door with a security seal.{exec:do_lock}{null:{otell:{name:me} locks the security seal on the entryway.}}}

@propset $tmp/exit1=str:/unlock:{if:{exec:_/secured?,$indoor},You remove the security seal and unlock the entryway door.{null:{otell:{name:me} unlocks the security seal on the entryway.}}{exec:do_unlock},The entryway door is already unlocked.}

Then step through the exit into your ship's EVA Prep Room, and copy/paste this code:

@action Secure;security=here=tmp/exit1

@link $tmp/exit1=$nothing

@propset $tmp/exit1=str:/_/de:You can ^green^SECURE LOCK^normal^ or ^green^SECURE UNLOCK^normal^ the airlock's inner door – if you have clearance.

@propset $tmp/exit1=str:/_/fl:You do not have the security card needed to operate this control.

@propset $tmp/exit1=str:/_/ofl:tries to {if:{exec:_/secured?,airlock},unlock,lock} the security seal on the airlock, but doesn't have the security card for it.

@propset $tmp/exit1=str:/_/sc:{if:{&arg},{if:{prop:{&arg},this},{exec:{&arg},this},{exec:_bad}},{exec:_bad}}

@propset $tmp/exit1=str:/_bad:{color:^gray^The valid commands are ^green^SECURE LOCK ^gray^and ^green^SECURE UNLOCK^gray^.}

@propset $tmp/exit1=str:/do_lock:{null:{store:1,_/secured?,$indoor}{store:1,_/secured?,$outdoor}}

@propset $tmp/exit1=str:/do_unlock:{null:{store:0,_/secured?,$indoor}{store:0,_/secured?,$outdoor}}

@propset $tmp/exit1=str:/lock:{if:{exec:_/secured?,$outdoor},The airlock door already has a security seal., You lock the airlock door with a security seal.{exec:do_lock}{null:{otell:{name:me} locks the security seal on the airlock.}}}

@propset $tmp/exit1=str:/unlock:{if:{exec:_secured?,outdoor},You remove the security seal and unlock the airlock door.{null:{otell:{name:me} unlocks the security seal on the airlock.}}{exec:do_unlock},The airlock door is already unlocked.}

Creating the security code

Once this is done, you can then use any kind of lock on the SECURE actions. You can lock them to specific people, or to key card objects, or to properties – just as you would any normal action – an only those who pass the lock test will be able to secure or release the door.

secure_airlocks.1307938622.txt.gz · Last modified: 2011/06/13 04:17 by hagalaz