Space Engineers

Space Engineers

Not enough ratings
Secure Door- Code Write
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
1.477 KB
10 Jun, 2016 @ 2:49am
1 Change Note ( view )

Subscribe to download
Secure Door- Code Write

Description
A world demonstrating the script in action can be found here

**REQUIRES** Secure Door- Code Read to function


Optional Secure Door- Code Reset [pastebin.com] but highly recommended
Provides an easy and reliable way to reset the generated codes before generating a new set of codes.

DESCRIPTION:

These pair of scripts (Secure Door: Code Write/Read) will allow you to restrict access to a section to only those that know the code to the secured section. This works regardless of faction affiliation and ownership. For example, if you were to have a guest from your faction visit your station but you didn't want your guest to be able to enter your private quarters, you would secure your private quarters using the Secure Door scripts.

The master list of codes is randomly generated and written on a specified (default tag [CODE]) text panel/lcd screen using the Code Write program. Be sure to hide this in a secure location such as the Bridge/CIC!

QUICK USER HOW TO:
1. Receive code for the secure area from administrator
2. Press "T" onto the input panel for the secure room to quickly access the private text for code input
3. Enter code
4. Press Esc (or press OK)
5. Door will momentarily enable and open
6. Door will close and disable

HARDWARE SET UP:

Code Generation:
Programming block containing Secure Door- Code Write (one per ship/station)

Programming block containing Secure Door- Code Reset (one per ship/station)

Timer Block 1 (Reset)- Triggers Code Reset program with default argument and Timer Block 2 (trigger this block when you need new codes)

Timer Block 2 (Generate Code)- Triggers Code Write program with default argument

LCD/Text Panel (at least one per ship/station)- name must contain [CODE] (this displays generated code)

Code Reading:

Programming block containing Secure Door- Code Read (one per secure room)

Looping Timer Block (2 second delay)- Set to run every Code Read program and then start itself again

Text Panel leading into the room- name must contain "roomName[IN]" (can have multiple per room)

Text Panel leading out of the room: name must "roomName[OUT]" (can have multiple per room)

Door locking the room: name must contain "roomName[SECURE]" (can have multiple per room)

PROGRAM SET UP:
highly recommend editing using notepad++

Programming block Secure Door- Code Write
under the REQUIRED SETTINGS declare the rooms that you want secured. Place each room name in quotations and DO NOT use spaces. Separate each entry with a comma. These names will be the roomName used in the naming tags for the doors/text panels,

Programming block Secure Door- Code Read
one per secured room.
under the REQUIRED SETTINGS, match the roomName from the Code Write program.

TIPS/OTHER INFO:

You can set the number of digits the codes will be under the OPTIONAL SETTINGS of the Code Write program.
You can set backdoor access codes for each room in the Code Read Program. Change backdoorEnabled to True and set the backdoorCode. Useful for quick unrestricted access for the captain!

special thanks to plaYer2k, Pingger, and phoenixcorp13 on the KSH forums for their patience in helping me learn to code