locked_to_account 
locks a crate so only the person (or department) who bought it can open it
Vars | |
| buyer_account | the bank account that bought this crate. whoevers ID matches this account (or department) can open it |
|---|---|
| deny_cooldown | cooldown so the "denied" buzz so sound doesnt spam if someone keeps trying really hard |
Procs | |
| InheritComponent | if AddComponent is called again on this crate, update buyer_account instead of making a duplicate |
| on_emag | emag skips this whole check and goes straight to remove_lock |
| on_examine | adds a note to the examine text saying its account-locked |
| on_pre_open | runs when someone tries to open the crate, checks their ID against buyer_account |
| remove_lock | unlocks the crate and removes this component |
Var Details
buyer_account 
the bank account that bought this crate. whoevers ID matches this account (or department) can open it
deny_cooldown 
cooldown so the "denied" buzz so sound doesnt spam if someone keeps trying really hard
Proc Details
InheritComponent
if AddComponent is called again on this crate, update buyer_account instead of making a duplicate
on_emag
emag skips this whole check and goes straight to remove_lock
on_examine
adds a note to the examine text saying its account-locked
on_pre_open
runs when someone tries to open the crate, checks their ID against buyer_account
- force: if TRUE, the open bypasses this lock entirely (e.g. admin or code-forced opens)
remove_lock
unlocks the crate and removes this component