Fix 'id in pda' pref (#17806)

This commit is contained in:
Ling
2023-02-09 00:44:11 +01:00
committed by GitHub
parent 44decca884
commit c223e28c9d
3 changed files with 5 additions and 1 deletions

View File

@@ -31,3 +31,6 @@
savefile_key = "id_in_pda"
savefile_identifier = PREFERENCE_PLAYER
default_value = FALSE
/datum/preference/toggle/id_in_pda/apply_to_human(mob/living/carbon/human/target, value)
target.id_in_pda = value

View File

@@ -316,7 +316,7 @@
var/obj/item/modular_computer/PDA = new pda_type()
if(istype(PDA))
if (H.client?.prefs.read_preference(/datum/preference/toggle/id_in_pda))
if (H.id_in_pda)
PDA.InsertID(C)
H.equip_to_slot_if_possible(PDA, SLOT_WEAR_ID)
else // just in case you hate change

View File

@@ -35,6 +35,7 @@
var/socks = "Nude" //Which socks the player wants
var/backbag = DBACKPACK //Which backpack type the player has chosen.
var/jumpsuit_style = PREF_SUIT //suit/skirt
var/id_in_pda = FALSE //Whether the player wants their ID to start in their PDA
//Equipment slots
var/obj/item/clothing/wear_suit = null