mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-01-28 18:02:17 +00:00
* Update settings * Whitespace changes * Comment out merger hooks in gitattributes Corrupt maps would have to be resolved in repo before hooks could be updated * Revert "Whitespace changes" This reverts commitafbdd1d844. * Whitespace again minus example * Gitignore example changelog * Restore changelog merge setting * Keep older dmi hook attribute until hooks can be updated * update vscode settings too * Renormalize remaining * Revert "Gitignore example changelog" This reverts commitde22ad375d. * Attempt to normalize example.yml (and another file I guess) * Try again
31 lines
911 B
Plaintext
31 lines
911 B
Plaintext
// This is on the base /item so badmins can play with it by calling hide_identity().
|
|
/obj/item
|
|
var/datum/identification/identity = null
|
|
var/identity_type = /datum/identification
|
|
var/init_hide_identity = FALSE // Set to true to automatically obscure the object on initialization.
|
|
|
|
/obj/item/Initialize()
|
|
if(init_hide_identity)
|
|
identity = new identity_type(src)
|
|
return ..()
|
|
|
|
/obj/item/Destroy()
|
|
if(identity)
|
|
QDEL_NULL(identity)
|
|
return ..()
|
|
|
|
/obj/item/proc/hide_identity() // Mostly for admins to make things secret.
|
|
if(!identity)
|
|
identity = new identity_type(src)
|
|
else
|
|
identity.unidentify()
|
|
|
|
/obj/item/proc/identify(identity_type = IDENTITY_FULL, mob/user)
|
|
if(identity)
|
|
identity.identify(identity_type, user)
|
|
|
|
/obj/item/proc/is_identified(identity_type = IDENTITY_FULL)
|
|
if(!identity) // No identification datum means nothing to hide.
|
|
return TRUE
|
|
return identity_type & identity.identified
|