mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-20 13:50:46 +00:00
- Introduced `LOCK_SCENARIO_GUIDE.md` to provide a comprehensive reference for implementing locks in scenarios, detailing room and object lock configurations, lock types, and quick examples. - Added `LOCK_SYSTEM_ARCHITECTURE.md` to outline the data flow from scenario definition to server validation, including steps for scenario definition, server bootstrap filtering, client lock checks, and server validation processes. - Included security notes and references for various lockable object types and items related to the locking system.
3.3 KiB
3.3 KiB
Lock Scenario Guide
Quick reference for adding locks to scenarios.
Room Locks (Doors)
Add these properties to a room to lock all doors leading to it:
"server_room": {
"type": "room_servers",
"locked": true,
"lockType": "pin",
"requires": "1234",
"connections": { "south": "lobby" }
}
Object Locks (Containers)
Add these properties to lockable objects:
{
"type": "safe",
"name": "Wall Safe",
"locked": true,
"lockType": "password",
"requires": "secret123",
"contents": [{ "type": "key", "name": "Gold Key" }]
}
Lock Types Reference
key - Physical Key
"lockType": "key",
"requires": "office_key",
"keyPins": [45, 35, 25, 55] // Optional: for lockpicking
Player needs: type: "key" with matching key_id
lockpick - Lockpickable (No Key Exists)
"lockType": "key",
"requires": "nonexistent_key",
"difficulty": "hard"
Player needs: type: "lockpick"
pin - Numeric Code
"lockType": "pin",
"requires": "4829"
Player needs: Guess or find the code
password - Text Password
"lockType": "password",
"requires": "secret123",
"passwordHint": "My pet's name",
"showHint": true,
"showKeyboard": true
Player needs: Guess or find the password
rfid - Keycard
"lockType": "rfid",
"requires": ["server_keycard"]
Player needs: type: "keycard" with matching card_id OR cloned card in RFID cloner
biometric - Fingerprint
"lockType": "biometric",
"requires": "Dr Smith",
"biometricMatchThreshold": 0.5
Player needs: Collected fingerprint from that person
bluetooth - Device Proximity
"lockType": "bluetooth",
"requires": "00:11:22:33:44:55"
Player needs: type: "bluetooth_scanner" + scanned device
Items Reference
Keys
{
"type": "key",
"name": "Office Key",
"key_id": "office_key",
"keyPins": [45, 35, 25, 55],
"takeable": true
}
Keycards
{
"type": "keycard",
"name": "Server Keycard",
"card_id": "server_keycard",
"rfid_protocol": "EM4100",
"takeable": true
}
Lockpick
{
"type": "lockpick",
"name": "Lockpick Set",
"takeable": true
}
RFID Cloner
{
"type": "rfid_cloner",
"name": "RFID Flipper",
"saved_cards": [],
"takeable": true
}
Fingerprint Kit
{
"type": "fingerprint_kit",
"name": "Fingerprint Kit",
"takeable": true
}
Bluetooth Scanner
{
"type": "bluetooth_scanner",
"name": "Bluetooth Scanner",
"takeable": true
}
NPC RFID Cards (For Cloning)
{
"id": "guard",
"npcType": "person",
"rfidCard": {
"card_id": "master_keycard",
"rfid_protocol": "EM4100",
"name": "Master Keycard"
}
}
Lockable Object Types
These objects support locked, lockType, requires:
safe- Wall/floor safebriefcase/suitcase- Portable containerspc/laptop/tablet- Computing devicescloset/cabinet- Storage furniture
Quick Examples
PIN-locked room:
"vault": { "locked": true, "lockType": "pin", "requires": "9999" }
Key-locked safe:
{ "type": "safe", "locked": true, "lockType": "key", "requires": "safe_key" }
RFID door:
"server_room": { "locked": true, "lockType": "rfid", "requires": ["admin_card"] }