mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
Separates tabletop/wallmounted ID authorisation panels (#85124)
## About The Pull Request We have an ID authorisation panel machine used for things like red alert, where you need to swipe a card in two different places to validate it. _Normally_ this is mounted on a wall in an office, but sometimes it is on a table. We use the same machine code and sprite for both, This _mostly_ works but is going to become problematic after the Wallening. Resultingly, I've added a sprite and typepath for a desktop version.  Wow! (We need desktop buttons too now that I look at this, I hope the wallening branch already has that!) This sprite is secretly the wall-mounted version from the Wallening (made by Imaginos), but flipped upside down so it looks like it is on a table not a wall. Delightfully devious (and proposed by "Kok0nut" on discord). Also as a result of doing this, I've made wallmounted ID card auth devices _actually_ attach to the wall in terms of "If the wall goes, they go too". This may or may not be a good idea given that as far as I can tell they aren't constructible (and probably shouldn't be given that then you'd just activate both with one ID card all the time) but seems broadly sensible to me? ## Why It's Good For The Game Wallmounted devices should generally deconstruct when associated walls are destroyed. Tablemounted devices are going to need different visuals to the wall-mounted versions. ## Changelog 🆑 Jacquerel, Kok0nut, Imaginos image: Wall-mounted and Table-mounted ID card authorisation machines now use different sprites fix: Wall-mounted ID card authorisation devices will now be destroyed if their wall is destroyed /🆑
This commit is contained in:
@@ -9,7 +9,7 @@ GLOBAL_DATUM_INIT(keycard_events, /datum/events, new)
|
||||
/obj/machinery/keycard_auth
|
||||
name = "Keycard Authentication Device"
|
||||
desc = "This device is used to trigger station functions, which require more than one ID card to authenticate, or to give the Janitor access to a department."
|
||||
icon = 'icons/obj/machines/wallmounts.dmi'
|
||||
icon = 'icons/obj/machines/keycard_auth_table.dmi'
|
||||
icon_state = "auth_off"
|
||||
power_channel = AREA_USAGE_ENVIRON
|
||||
req_access = list(ACCESS_KEYCARD_AUTH)
|
||||
@@ -23,8 +23,6 @@ GLOBAL_DATUM_INIT(keycard_events, /datum/events, new)
|
||||
|
||||
COOLDOWN_DECLARE(access_grant_cooldown)
|
||||
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/keycard_auth, 26)
|
||||
|
||||
/obj/machinery/keycard_auth/Initialize(mapload)
|
||||
. = ..()
|
||||
activated = GLOB.keycard_events.addEvent("triggerEvent", CALLBACK(src, PROC_REF(triggerEvent)))
|
||||
@@ -158,6 +156,16 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/keycard_auth, 26)
|
||||
if(KEYCARD_BSA_UNLOCK)
|
||||
toggle_bluespace_artillery()
|
||||
|
||||
/// Subtype which is stuck to a wall
|
||||
/obj/machinery/keycard_auth/wall_mounted
|
||||
icon = 'icons/obj/machines/wallmounts.dmi'
|
||||
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/keycard_auth/wall_mounted, 26)
|
||||
|
||||
/obj/machinery/keycard_auth/wall_mounted/Initialize(mapload)
|
||||
. = ..()
|
||||
find_and_hang_on_wall()
|
||||
|
||||
GLOBAL_VAR_INIT(emergency_access, FALSE)
|
||||
/proc/make_maint_all_access()
|
||||
for(var/area/station/maintenance/area in GLOB.areas)
|
||||
|
||||
Reference in New Issue
Block a user