mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
allowed is now signals based instead of hardcoded slots (#94871)
## About The Pull Request ID cards/MMI mech access/simple mob access/pAIs now use signals instead of checking specific slots with mob checks. We do this through mob's ``get_access`` proc that collects all access a mob has with a collect_access signal. ## Why It's Good For The Game It looks cleaner and we no longer individually check `check_access` for every single item that may have access. It's cleaner to put it all together and check in one go with all the access we've got. This also makes it easier to add items that hold access that aren't necessarily IDs but you want to be able to open stuff with. ## Changelog 🆑 refactor: ID checking for access has been reworked, please make a bug report if anything that's supposed to grant access is not working. /🆑 --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
@@ -48,10 +48,9 @@
|
||||
|
||||
//Aquire access from the inserted ID card.
|
||||
if(!length(access))
|
||||
var/obj/item/card/id/D = computer?.stored_id?.GetID()
|
||||
if(!D)
|
||||
access = computer?.GetAccess()
|
||||
if(!length(access))
|
||||
return FALSE
|
||||
access = D.GetAccess()
|
||||
|
||||
if(paccess_to_check in access)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user