From d9c2f8e016dd606185cb33e0420bb68f2fe77d7e Mon Sep 17 00:00:00 2001 From: Changelogs Date: Sat, 15 Jun 2024 01:15:31 +0000 Subject: [PATCH 1/5] Automatic changelog compile [ci skip] --- html/changelogs/AutoChangeLog-pr-6327.yml | 5 ----- html/changelogs/AutoChangeLog-pr-6374.yml | 4 ---- html/changelogs/AutoChangeLog-pr-6383.yml | 9 -------- html/changelogs/AutoChangeLog-pr-6396.yml | 4 ---- html/changelogs/AutoChangeLog-pr-6437.yml | 4 ---- html/changelogs/AutoChangeLog-pr-6440.yml | 4 ---- html/changelogs/AutoChangeLog-pr-6445.yml | 4 ---- html/changelogs/AutoChangeLog-pr-6446.yml | 4 ---- html/changelogs/AutoChangeLog-pr-6448.yml | 4 ---- html/changelogs/AutoChangeLog-pr-6451.yml | 4 ---- html/changelogs/archive/2024-06.yml | 26 +++++++++++++++++++++++ 11 files changed, 26 insertions(+), 46 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-6327.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6374.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6383.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6396.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6437.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6440.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6445.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6446.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6448.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-6451.yml diff --git a/html/changelogs/AutoChangeLog-pr-6327.yml b/html/changelogs/AutoChangeLog-pr-6327.yml deleted file mode 100644 index 60ce99f80c65..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6327.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "Comxy" -delete-after: True -changes: - - rscadd: "Adds W-Y branded sentries." - - imageadd: "Adds W-Y defenses sprites." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6374.yml b/html/changelogs/AutoChangeLog-pr-6374.yml deleted file mode 100644 index 8e7517420a2a..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6374.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "AndroBetel" -delete-after: True -changes: - - balance: "Pistol mag pouch now has 4 slots instead of 3." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6383.yml b/html/changelogs/AutoChangeLog-pr-6383.yml deleted file mode 100644 index fbae59970bbe..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6383.yml +++ /dev/null @@ -1,9 +0,0 @@ -author: "Zonespace, Zydras" -delete-after: True -changes: - - bugfix: "Vehicle elevator no longer incorrectly rotates vehicles" - - rscadd: "New ARC exterior and interior" - - balance: "ARC now fits 5 humans instead of 7" - - balance: "ARC now fits 4 xenos intead of 5" - - balance: "ARC's RE700 turret armor pen 10->15" - - balance: "On account of the smaller size, the ARC no longer has a nanomed." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6396.yml b/html/changelogs/AutoChangeLog-pr-6396.yml deleted file mode 100644 index 72102a2279a9..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6396.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "harryob" -delete-after: True -changes: - - bugfix: "the preview window in character setup now remains visible when looking at it as a ghost" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6437.yml b/html/changelogs/AutoChangeLog-pr-6437.yml deleted file mode 100644 index 45618bc2b382..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6437.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Zonespace27" -delete-after: True -changes: - - bugfix: "Pyro spec flamer should be linked to its tank more consistently." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6440.yml b/html/changelogs/AutoChangeLog-pr-6440.yml deleted file mode 100644 index 4f64202d853f..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6440.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Blundir" -delete-after: True -changes: - - imageadd: "resprite of spearhead cmb revolver" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6445.yml b/html/changelogs/AutoChangeLog-pr-6445.yml deleted file mode 100644 index 694311d57f85..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6445.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Drathek" -delete-after: True -changes: - - bugfix: "Fixed Queen Mother being unable to award a Queen" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6446.yml b/html/changelogs/AutoChangeLog-pr-6446.yml deleted file mode 100644 index 501a49639c3a..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6446.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Drathek" -delete-after: True -changes: - - rscadd: "Added preference for toggling the fax machine received sound as an observer" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6448.yml b/html/changelogs/AutoChangeLog-pr-6448.yml deleted file mode 100644 index 02a85debf028..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6448.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Zonespace27" -delete-after: True -changes: - - qol: "Added some missing objectives to the xenomorph - basic tutorial." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6451.yml b/html/changelogs/AutoChangeLog-pr-6451.yml deleted file mode 100644 index 2879e1dd9836..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6451.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "TheGamerdk" -delete-after: True -changes: - - bugfix: "Fixes small issue allowing medals to teleport" \ No newline at end of file diff --git a/html/changelogs/archive/2024-06.yml b/html/changelogs/archive/2024-06.yml index 88cb6d1c551f..f8a21c842287 100644 --- a/html/changelogs/archive/2024-06.yml +++ b/html/changelogs/archive/2024-06.yml @@ -108,3 +108,29 @@ - balance: all OB 10 -> 5 intel points, one shell and five fuel fira: - rscadd: Added a Tutorial for tending to the Requisitions Line +2024-06-15: + AndroBetel: + - balance: Pistol mag pouch now has 4 slots instead of 3. + Blundir: + - imageadd: resprite of spearhead cmb revolver + Comxy: + - rscadd: Adds W-Y branded sentries. + - imageadd: Adds W-Y defenses sprites. + Drathek: + - bugfix: Fixed Queen Mother being unable to award a Queen + - rscadd: Added preference for toggling the fax machine received sound as an observer + TheGamerdk: + - bugfix: Fixes small issue allowing medals to teleport + Zonespace, Zydras: + - bugfix: Vehicle elevator no longer incorrectly rotates vehicles + - rscadd: New ARC exterior and interior + - balance: ARC now fits 5 humans instead of 7 + - balance: ARC now fits 4 xenos intead of 5 + - balance: ARC's RE700 turret armor pen 10->15 + - balance: On account of the smaller size, the ARC no longer has a nanomed. + Zonespace27: + - bugfix: Pyro spec flamer should be linked to its tank more consistently. + - qol: Added some missing objectives to the xenomorph - basic tutorial. + harryob: + - bugfix: the preview window in character setup now remains visible when looking + at it as a ghost From 46cc54bc468929f6844a61efc61feb0e116e74f5 Mon Sep 17 00:00:00 2001 From: Drathek <76988376+Drulikar@users.noreply.github.com> Date: Sat, 15 Jun 2024 07:05:58 -0700 Subject: [PATCH 2/5] Fix lots of problems with wallets as ID (#6411) # About the pull request This PR refactors all wear_id usages in favor of get_idcard() so that wallets can be suitable ID cards. I have not exhaustively tested all the areas of code that had to altered for this though. # Explain why it's good for the game Fixes #6409 # Testing Photographs and Procedure
Screenshots & Videos ![image](https://github.com/cmss13-devs/cmss13/assets/76988376/366594a0-29e7-40e5-a2f0-ee29aa9ed627)
# Changelog :cl: Drathek fix: Fixed wallets as IDs breaking many things /:cl: --- code/datums/medal_awards.dm | 8 ++-- code/defines/procs/announcement.dm | 3 +- code/game/jobs/job/job.dm | 2 +- code/game/jobs/job/marine/squads.dm | 10 ++--- code/game/machinery/ARES/ARES_interface.dm | 4 +- .../machinery/ARES/ARES_interface_apollo.dm | 8 ++-- .../game/machinery/ARES/ARES_step_triggers.dm | 11 +++-- code/game/machinery/ARES/apollo_pda.dm | 8 ++-- .../machinery/computer/almayer_control.dm | 6 +-- .../game/machinery/computer/communications.dm | 12 +++--- .../computer/groundside_operations.dm | 19 +++++---- code/game/machinery/vending/cm_vending.dm | 17 ++++---- .../machinery/vending/vendor_types/dress.dm | 12 +++--- code/game/objects/items/devices/cictablet.dm | 7 ++-- .../objects/items/devices/portable_vendor.dm | 4 +- .../objects/items/devices/radio/headset.dm | 6 +-- code/game/objects/items/pamphlets.dm | 6 +-- code/game/objects/items/storage/backpack.dm | 2 +- code/game/objects/items/storage/firstaid.dm | 4 +- .../closets/secure/secure_closets.dm | 30 +++++++------- .../admin/player_panel/actions/punish.dm | 11 ++--- code/modules/admin/tabs/event_tab.dm | 4 +- code/modules/admin/verbs/debug.dm | 12 +++--- code/modules/admin/verbs/mob_verbs.dm | 23 ++++++----- code/modules/admin/verbs/select_equipment.dm | 18 ++++----- .../modules/cm_marines/equipment/kit_boxes.dm | 8 ++-- code/modules/cm_marines/overwatch.dm | 39 +++++++++--------- code/modules/cm_marines/radar.dm | 12 +++--- code/modules/economy/ATM.dm | 40 ++++++++++--------- code/modules/gear_presets/uscm.dm | 4 +- .../mob/living/carbon/human/human_defines.dm | 2 +- .../mob/living/carbon/human/update_icons.dm | 7 +++- code/modules/shuttle/computer.dm | 8 +++- 33 files changed, 190 insertions(+), 177 deletions(-) diff --git a/code/datums/medal_awards.dm b/code/datums/medal_awards.dm index fcaef38c884c..6949951b7b61 100644 --- a/code/datums/medal_awards.dm +++ b/code/datums/medal_awards.dm @@ -256,7 +256,7 @@ GLOBAL_LIST_INIT(human_medals, list(MARINE_CONDUCT_MEDAL, MARINE_BRONZE_HEART_ME return TRUE /proc/open_medal_panel(mob/living/carbon/human/user, obj/printer) - var/obj/item/card/id/card = user.wear_id + var/obj/item/card/id/card = user?.get_idcard() if(!card) to_chat(user, SPAN_WARNING("You must have an authenticated ID Card to award medals.")) return @@ -580,9 +580,9 @@ GLOBAL_DATUM_INIT(ic_medals_panel, /datum/ic_medal_panel, new) . = ..() if(.) return - var/mob/living/carbon/human/user = usr - var/obj/item/card/id/card = user.wear_id - if(!card) + var/mob/living/carbon/human/user = ui.user + var/obj/item/card/id/card = user?.get_idcard() + if(card) to_chat(user, SPAN_WARNING("You must have an authenticated ID Card to award medals.")) return diff --git a/code/defines/procs/announcement.dm b/code/defines/procs/announcement.dm index bad07104db22..250c81dfc3dc 100644 --- a/code/defines/procs/announcement.dm +++ b/code/defines/procs/announcement.dm @@ -44,7 +44,8 @@ continue // If they have iff AND a marine headset they will recieve announcements - if ((FACTION_MARINE in H.wear_id?.faction_group) && (istype(H.wear_l_ear, /obj/item/device/radio/headset/almayer) || istype(H.wear_r_ear, /obj/item/device/radio/headset/almayer))) + var/obj/item/card/id/card = H.get_idcard() + if ((FACTION_MARINE in card?.faction_group) && (istype(H.wear_l_ear, /obj/item/device/radio/headset/almayer) || istype(H.wear_r_ear, /obj/item/device/radio/headset/almayer))) continue if((H.faction != faction_to_display && !add_PMCs) || (H.faction != faction_to_display && add_PMCs && !(H.faction in FACTION_LIST_WY)) && !(faction_to_display in H.faction_group)) //faction checks diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 1a04c3cafeb5..d758e187ce70 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -176,7 +176,7 @@ var/datum/money_account/generated_account //Give them an account in the database. if(!(flags_startup_parameters & ROLE_NO_ACCOUNT)) - var/obj/item/card/id/card = account_user.wear_id + var/obj/item/card/id/card = account_user.get_idcard() var/user_has_preexisting_account = account_user.mind?.initial_account if(card && !user_has_preexisting_account) var/datum/paygrade/account_paygrade = GLOB.paygrades[card.paygrade] diff --git a/code/game/jobs/job/marine/squads.dm b/code/game/jobs/job/marine/squads.dm index 756369c8eb5b..3285e75e45c3 100644 --- a/code/game/jobs/job/marine/squads.dm +++ b/code/game/jobs/job/marine/squads.dm @@ -452,7 +452,7 @@ var/obj/item/card/id/C = ID if(!C) - C = M.wear_id + C = M.get_idcard() if(!C) C = M.get_active_hand() if(!istype(C)) @@ -554,7 +554,7 @@ return //not assigned to the correct squad var/obj/item/card/id/C = ID if(!istype(C)) - C = M.wear_id + C = M.get_idcard() if(!istype(C)) return FALSE //Abort, no ID found @@ -637,9 +637,9 @@ R.keys -= key qdel(key) R.recalculateChannels() - if(istype(old_lead.wear_id, /obj/item/card/id)) - var/obj/item/card/id/ID = old_lead.wear_id - ID.access -= ACCESS_MARINE_LEADER + var/obj/item/card/id/card = old_lead.get_idcard() + if(card) + card.access -= ACCESS_MARINE_LEADER REMOVE_TRAITS_IN(old_lead, TRAIT_SOURCE_SQUAD_LEADER) old_lead.hud_set_squad() old_lead.update_inv_head() //updating marine helmet leader overlays diff --git a/code/game/machinery/ARES/ARES_interface.dm b/code/game/machinery/ARES/ARES_interface.dm index 02695e2e6d4b..0316274774be 100644 --- a/code/game/machinery/ARES/ARES_interface.dm +++ b/code/game/machinery/ARES/ARES_interface.dm @@ -251,8 +251,8 @@ authentication = get_ares_access(idcard) last_login = idcard.registered_name else if(operator.wear_id) - idcard = operator.wear_id - if(istype(idcard)) + idcard = operator.get_idcard() + if(idcard) authentication = get_ares_access(idcard) last_login = idcard.registered_name else diff --git a/code/game/machinery/ARES/ARES_interface_apollo.dm b/code/game/machinery/ARES/ARES_interface_apollo.dm index 243ecdf1355f..93637f39d1a7 100644 --- a/code/game/machinery/ARES/ARES_interface_apollo.dm +++ b/code/game/machinery/ARES/ARES_interface_apollo.dm @@ -175,8 +175,8 @@ authentication = get_ares_access(idcard) last_login = idcard.registered_name else if(user.wear_id) - idcard = user.wear_id - if(istype(idcard)) + idcard = user.get_idcard() + if(idcard) authentication = get_ares_access(idcard) last_login = idcard.registered_name else @@ -317,8 +317,8 @@ if(istype(idcard)) has_id = TRUE else if(user.wear_id) - idcard = user.wear_id - if(istype(idcard)) + idcard = user.get_idcard() + if(idcard) has_id = TRUE if(!has_id) to_chat(user, SPAN_WARNING("You require an ID card to request an access ticket!")) diff --git a/code/game/machinery/ARES/ARES_step_triggers.dm b/code/game/machinery/ARES/ARES_step_triggers.dm index 2c6d605bcc9b..77a53200ddd3 100644 --- a/code/game/machinery/ARES/ARES_step_triggers.dm +++ b/code/game/machinery/ARES/ARES_step_triggers.dm @@ -33,9 +33,10 @@ return FALSE if(ishuman(passer)) var/mob/living/carbon/human/trespasser = passer - if(pass_accesses && (trespasser.wear_id)) + var/obj/item/card/id/card = trespasser.get_idcard() + if(pass_accesses && card) for(var/tag in pass_accesses) - if(tag in trespasser.wear_id.access) + if(tag in card.access) return FALSE Trigger(passer) return TRUE @@ -123,11 +124,9 @@ var/check_contents = TRUE if(ishuman(passer)) var/mob/living/carbon/human/human_passer = passer - idcard = human_passer.wear_id - if(istype(idcard)) + idcard = human_passer.get_idcard() + if(idcard) check_contents = FALSE - else - idcard = null if(istype(passer, /obj/item/card/id)) idcard = passer diff --git a/code/game/machinery/ARES/apollo_pda.dm b/code/game/machinery/ARES/apollo_pda.dm index 787b194ffb44..7b92b869daeb 100644 --- a/code/game/machinery/ARES/apollo_pda.dm +++ b/code/game/machinery/ARES/apollo_pda.dm @@ -198,8 +198,8 @@ authentication = get_ares_access(idcard) last_login = idcard.registered_name else if(user.wear_id) - idcard = user.wear_id - if(istype(idcard)) + idcard = user.get_idcard() + if(idcard) authentication = get_ares_access(idcard) last_login = idcard.registered_name else @@ -343,8 +343,8 @@ if(istype(idcard)) has_id = TRUE else if(user.wear_id) - idcard = user.wear_id - if(istype(idcard)) + idcard = user.get_idcard() + if(idcard) has_id = TRUE if(!has_id) to_chat(user, SPAN_WARNING("You require an ID card to request an access ticket!")) diff --git a/code/game/machinery/computer/almayer_control.dm b/code/game/machinery/computer/almayer_control.dm index 0090a6673961..8cd043e23998 100644 --- a/code/game/machinery/computer/almayer_control.dm +++ b/code/game/machinery/computer/almayer_control.dm @@ -139,7 +139,7 @@ var/obj/item/card/id/idcard = human_user.get_active_hand() var/bio_fail = FALSE if(!istype(idcard)) - idcard = human_user.wear_id + idcard = human_user.get_idcard() if(!istype(idcard)) bio_fail = TRUE else if(!idcard.check_biometrics(human_user)) @@ -198,8 +198,8 @@ var/obj/item/card/id/idcard = human_user.get_active_hand() var/bio_fail = FALSE if(!istype(idcard)) - idcard = human_user.wear_id - if(!istype(idcard)) + idcard = human_user.get_idcard() + if(!idcard) bio_fail = TRUE else if(!idcard.check_biometrics(human_user)) bio_fail = TRUE diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 6ed2a8c7be64..dec523ccc5b2 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -81,8 +81,8 @@ if(ACCESS_MARINE_SENIOR in I.access) authenticated = 2 else - I = C.wear_id - if(istype(I)) + I = C.get_idcard() + if(I) if(check_access(I)) authenticated = 1 if(ACCESS_MARINE_SENIOR in I.access) authenticated = 2 @@ -117,8 +117,8 @@ var/obj/item/card/id/idcard = human_user.get_active_hand() var/bio_fail = FALSE if(!istype(idcard)) - idcard = human_user.wear_id - if(!istype(idcard)) + idcard = human_user.get_idcard() + if(idcard) bio_fail = TRUE else if(!idcard.check_biometrics(human_user)) bio_fail = TRUE @@ -171,8 +171,8 @@ var/obj/item/card/id/idcard = human_user.get_active_hand() var/bio_fail = FALSE if(!istype(idcard)) - idcard = human_user.wear_id - if(!istype(idcard)) + idcard = human_user.get_idcard() + if(!idcard) bio_fail = TRUE else if(!idcard.check_biometrics(human_user)) bio_fail = TRUE diff --git a/code/game/machinery/computer/groundside_operations.dm b/code/game/machinery/computer/groundside_operations.dm index 6866905abc58..591c63a76bee 100644 --- a/code/game/machinery/computer/groundside_operations.dm +++ b/code/game/machinery/computer/groundside_operations.dm @@ -153,12 +153,11 @@ if(A) area_name = sanitize_area(A.name) + var/obj/item/card/id/card = H.get_idcard() if(H.job) role = H.job - else if(istype(H.wear_id, /obj/item/card/id)) //decapitated marine is mindless, - var/obj/item/card/id/ID = H.wear_id //we use their ID to get their role. - if(ID.rank) - role = ID.rank + else if(card?.rank) //decapitated marine is mindless, + role = card.rank switch(H.stat) if(CONSCIOUS) @@ -216,8 +215,8 @@ var/obj/item/card/id/idcard = human_user.get_active_hand() var/bio_fail = FALSE if(!istype(idcard)) - idcard = human_user.wear_id - if(!istype(idcard)) + idcard = human_user.get_idcard() + if(!idcard) bio_fail = TRUE else if(!idcard.check_biometrics(human_user)) bio_fail = TRUE @@ -244,8 +243,8 @@ var/signed = null if(ishuman(usr)) var/mob/living/carbon/human/H = usr - var/obj/item/card/id/id = H.wear_id - if(istype(id)) + var/obj/item/card/id/id = H.get_idcard() + if(id) var/paygrade = get_paygrades(id.paygrade, FALSE, H.gender) signed = "[paygrade] [id.registered_name]" @@ -322,8 +321,8 @@ var/obj/item/card/id/idcard = human_user.get_active_hand() var/bio_fail = FALSE if(!istype(idcard)) - idcard = human_user.wear_id - if(!istype(idcard)) + idcard = human_user.get_idcard() + if(!idcard) bio_fail = TRUE else if(!idcard.check_biometrics(human_user)) bio_fail = TRUE diff --git a/code/game/machinery/vending/cm_vending.dm b/code/game/machinery/vending/cm_vending.dm index 76a2b6df8e45..afce800b0af4 100644 --- a/code/game/machinery/vending/cm_vending.dm +++ b/code/game/machinery/vending/cm_vending.dm @@ -574,8 +574,8 @@ GLOBAL_LIST_EMPTY(vending_products) to_chat(user, SPAN_WARNING("That set is already taken.")) vend_fail() return FALSE - var/obj/item/card/id/ID = human_user.wear_id - if(!istype(ID) || !ID.check_biometrics(user)) + var/obj/item/card/id/card = human_user.get_idcard() + if(!card?.check_biometrics(user)) to_chat(user, SPAN_WARNING("You must be wearing your [SPAN_INFO("dog tags")] to select a specialization!")) return FALSE var/specialist_assignment @@ -604,8 +604,8 @@ GLOBAL_LIST_EMPTY(vending_products) to_chat(user, SPAN_WARNING("Something bad occurred with [src], tell a Dev.")) vend_fail() return FALSE - ID.set_assignment((human_user.assigned_squad ? (human_user.assigned_squad.name + " ") : "") + JOB_SQUAD_SPECIALIST + " ([specialist_assignment])") - GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), ID.assignment) + card.set_assignment((human_user.assigned_squad ? (human_user.assigned_squad.name + " ") : "") + JOB_SQUAD_SPECIALIST + " ([specialist_assignment])") + GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), card.assignment) GLOB.available_specialist_sets -= p_name else if(vendor_role.Find(JOB_SYNTH)) if(user.job != JOB_SYNTH) @@ -807,8 +807,8 @@ GLOBAL_LIST_EMPTY(vending_products) return FALSE var/mob/living/carbon/human/human_user = user - var/obj/item/card/id/idcard = human_user.wear_id - if(!istype(idcard)) + var/obj/item/card/id/idcard = human_user.get_idcard() + if(!idcard) if(display) to_chat(user, SPAN_WARNING("Access denied. No ID card detected")) vend_fail() @@ -1406,10 +1406,11 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list( if(vend_flags & VEND_UNIFORM_RANKS) if(insignas_override) var/obj/item/clothing/under/underclothes = new_item + var/obj/item/card/id/card = user.get_idcard() //Gives ranks to the ranked - if(istype(underclothes) && user.wear_id && user.wear_id.paygrade) - var/rankpath = get_rank_pins(user.wear_id.paygrade) + if(istype(underclothes) && card?.paygrade) + var/rankpath = get_rank_pins(card.paygrade) if(rankpath) var/obj/item/clothing/accessory/ranks/rank_insignia = new rankpath() var/obj/item/clothing/accessory/patch/uscmpatch = new() diff --git a/code/game/machinery/vending/vendor_types/dress.dm b/code/game/machinery/vending/vendor_types/dress.dm index d49361d912a0..68809c10003f 100644 --- a/code/game/machinery/vending/vendor_types/dress.dm +++ b/code/game/machinery/vending/vendor_types/dress.dm @@ -45,11 +45,11 @@ return var/mob/living/carbon/human/H = user - var/obj/item/card/id/id_card = H.wear_id + var/obj/item/card/id/id_card = H.get_idcard() var/list/role_specific_uniforms var/list/vended_items var/list/display_list = list() - if(istype(id_card)) + if(id_card) role_specific_uniforms = id_card.uniform_sets vended_items = id_card.vended_items for(var/category_type in GLOB.uniform_categories) @@ -83,9 +83,9 @@ /obj/structure/machinery/cm_vending/clothing/dress/ui_data(mob/user) var/mob/living/carbon/human/H = user - var/obj/item/card/id/id_card = H.wear_id + var/obj/item/card/id/id_card = H.get_idcard() var/list/vended_items - if(istype(id_card)) + if(id_card) vended_items = id_card.vended_items var/list/data = list() @@ -120,9 +120,9 @@ var/item_path = L[3] - var/obj/item/card/id/id_card = H.wear_id + var/obj/item/card/id/id_card = H.get_idcard() - if(!istype(id_card)) //not wearing an ID + if(!id_card) //not wearing an ID to_chat(H, SPAN_WARNING("Access denied. No ID card detected")) return diff --git a/code/game/objects/items/devices/cictablet.dm b/code/game/objects/items/devices/cictablet.dm index de03f1779f2b..597886a0cb85 100644 --- a/code/game/objects/items/devices/cictablet.dm +++ b/code/game/objects/items/devices/cictablet.dm @@ -46,7 +46,8 @@ /obj/item/device/cotablet/attack_self(mob/living/carbon/human/user as mob) ..() - if(src.allowed(user) && user.wear_id?.check_biometrics(user)) + var/obj/item/card/id/card = user.get_idcard() + if(allowed(user) && card?.check_biometrics(user)) tgui_interact(user) else to_chat(user, SPAN_DANGER("Access denied.")) @@ -109,8 +110,8 @@ var/signed = null if(ishuman(user)) var/mob/living/carbon/human/human_user = user - var/obj/item/card/id/id = human_user.wear_id - if(istype(id)) + var/obj/item/card/id/id = human_user.get_idcard() + if(id) var/paygrade = get_paygrades(id.paygrade, FALSE, human_user.gender) signed = "[paygrade] [id.registered_name]" diff --git a/code/game/objects/items/devices/portable_vendor.dm b/code/game/objects/items/devices/portable_vendor.dm index f45eeadee5b7..3dd8533a046d 100644 --- a/code/game/objects/items/devices/portable_vendor.dm +++ b/code/game/objects/items/devices/portable_vendor.dm @@ -58,8 +58,8 @@ to_chat(user, SPAN_WARNING("Access denied.")) return - var/obj/item/card/id/idcard = human_user.wear_id - if(!istype(idcard)) //not wearing an ID + var/obj/item/card/id/idcard = human_user.get_idcard() + if(!idcard) //not wearing an ID to_chat(human_user, SPAN_WARNING("Access denied. No ID card detected")) return diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 52f8bd76e894..b9b7e94d9ae5 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -414,10 +414,10 @@ var/mob/living/carbon/human/wearer = usr if(!istype(wearer)) return - var/obj/item/card/id/id_card = wearer.wear_id?.GetID() - if(!istype(id_card)) + var/obj/item/card/id/id_card = wearer.get_idcard() + if(!id_card) return - + var/datum/paygrade/paygrade_actual = GLOB.paygrades[id_card.paygrade] if(!paygrade_actual) return diff --git a/code/game/objects/items/pamphlets.dm b/code/game/objects/items/pamphlets.dm index 027ea796c73b..d8bbb2a01432 100644 --- a/code/game/objects/items/pamphlets.dm +++ b/code/game/objects/items/pamphlets.dm @@ -80,8 +80,8 @@ to_chat(user, SPAN_WARNING("Only squad riflemen can use this.")) return - var/obj/item/card/id/ID = user.wear_id - if(!istype(ID)) //not wearing an ID + var/obj/item/card/id/ID = user.get_idcard() + if(!ID) //not wearing an ID to_chat(user, SPAN_WARNING("You should wear your ID before doing this.")) return FALSE if(!ID.check_biometrics(user)) @@ -95,7 +95,7 @@ user.rank_fallback = "ass" user.hud_set_squad() - var/obj/item/card/id/ID = user.wear_id + var/obj/item/card/id/ID = user.get_idcard() ID.set_assignment((user.assigned_squad ? (user.assigned_squad.name + " ") : "") + "Spotter") GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), "Spotter") diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index 4882db3b83ea..baa91db19396 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -154,7 +154,7 @@ //Returns true if the user's id matches the lock's /obj/item/storage/backpack/proc/compare_id(mob/living/carbon/human/H) - var/obj/item/card/id/card = H.wear_id + var/obj/item/card/id/card = H.get_idcard() if(!card || locking_id.registered_name != card.registered_name) return FALSE else return TRUE diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index 314628bab9a3..f9f5983c925d 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -683,8 +683,8 @@ to_chat(user, SPAN_NOTICE("It must have some kind of ID lock...")) return FALSE - var/obj/item/card/id/idcard = human_user.wear_id - if(!istype(idcard)) //not wearing an ID + var/obj/item/card/id/idcard = human_user.get_idcard() + if(!idcard) //not wearing an ID to_chat(human_user, SPAN_NOTICE("It must have some kind of ID lock...")) return FALSE diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index e65d28e96f33..6391eeefb498 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -45,37 +45,37 @@ src.req_access += pick(get_access(ACCESS_LIST_MARINE_MAIN)) /obj/structure/closet/secure_closet/proc/togglelock(mob/living/user) - if(src.opened) + if(opened) to_chat(user, SPAN_NOTICE("Close the locker first.")) return - if(src.broken) + if(broken) to_chat(user, SPAN_WARNING("The locker appears to be broken.")) return if(user.loc == src) to_chat(user, SPAN_NOTICE("You can't reach the lock from inside.")) return - if(src.allowed(user)) + if(allowed(user)) if(slotlocked && ishuman(user)) - var/mob/living/carbon/human/H = user - if(H.wear_id) - var/obj/item/card/id/I = H.wear_id - if(I.claimedgear) + var/mob/living/carbon/human/human = user + var/obj/item/card/id/card = human.get_idcard() + if(card) + if(card.claimedgear) return switch(slotlocktype) if("engi") - if(H.job != "Squad Combat Technician") + if(human.job != "Squad Combat Technician") return // stop people giving medics engineer prep access or IDs somehow if("medic") - if(H.job != "Squad Hospital Corpsman") + if(human.job != "Squad Hospital Corpsman") return // same here - I.claimedgear = 1 // you only get one locker, all other roles have this set 1 by default - slotlocked = 0 // now permanently unlockable + card.claimedgear = TRUE // you only get one locker, all other roles have this set 1 by default + slotlocked = FALSE // now permanently unlockable else return // they have no ID on, fuck them. - src.locked = !src.locked - for(var/mob/O in viewers(user, 3)) - if((O.client && !( O.blinded ))) - to_chat(O, SPAN_NOTICE("The locker has been [locked ? null : "un"]locked by [user].")) + locked = !locked + for(var/mob/mob in viewers(user, 3)) + if((mob.client && !( mob.blinded ))) + to_chat(mob, SPAN_NOTICE("The locker has been [locked ? null : "un"]locked by [user].")) update_icon() else to_chat(user, SPAN_NOTICE("Access Denied")) diff --git a/code/modules/admin/player_panel/actions/punish.dm b/code/modules/admin/player_panel/actions/punish.dm index 1b7d313b6121..5d2298fc8fc2 100644 --- a/code/modules/admin/player_panel/actions/punish.dm +++ b/code/modules/admin/player_panel/actions/punish.dm @@ -267,11 +267,12 @@ GLOB.data_core.manifest_modify(new_name, WEAKREF(target_mob)) if(ishuman(target_mob)) var/mob/living/carbon/human/target_human = target_mob - if(target_human.wear_id && target_human.wear_id.registered_ref == WEAKREF(target_human)) - target_human.wear_id.name = "[target_human.real_name]'s ID Card" - target_human.wear_id.registered_name = "[target_human.real_name]" - if(target_human.wear_id.assignment) - target_human.wear_id.name += " ([target_human.wear_id.assignment])" + var/obj/item/card/id/card = target_human.get_idcard() + if(card?.registered_ref == WEAKREF(target_human)) + card.name = "[target_human.real_name]'s ID Card" + card.registered_name = "[target_human.real_name]" + if(card.assignment) + card.name += " ([card.assignment])" target_mob.client.prefs.real_name = new_name target_mob.client.prefs.save_character() diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index 656314469066..69395e6e69e9 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -499,8 +499,8 @@ if(random_names) var/random_name = "[lowertext(H.species.name)] ([rand(1, 999)])" H.change_real_name(H, random_name) - if(H.wear_id) - var/obj/item/card/id/card = H.wear_id + var/obj/item/card/id/card = H.get_idcard() + if(card) card.registered_name = H.real_name card.name = "[card.registered_name]'s ID Card ([card.assignment])" diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 60c2092d8dc3..83e12be9c574 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -200,14 +200,14 @@ return if (istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M - if (H.wear_id) - var/obj/item/card/id/id = H.wear_id + var/obj/item/card/id/id = H.get_idcard() + if(id) id.icon_state = "gold" - id:access = get_access(ACCESS_LIST_GLOBAL) + id.access = get_access(ACCESS_LIST_GLOBAL) else - var/obj/item/card/id/id = new/obj/item/card/id(M); + id = new(M) id.icon_state = "gold" - id:access = get_access(ACCESS_LIST_GLOBAL) + id.access = get_access(ACCESS_LIST_GLOBAL) id.registered_name = H.real_name id.registered_ref = WEAKREF(H) id.assignment = "Captain" @@ -266,7 +266,7 @@ var/datum/paygrade/account_paygrade = GLOB.paygrades[custom_paygrade] - var/obj/item/card/id/card = account_user.wear_id + var/obj/item/card/id/card = account_user.get_idcard() generated_account = create_account(account_user.real_name, starting_amount, account_paygrade) if(card) card.associated_account_number = generated_account.account_number diff --git a/code/modules/admin/verbs/mob_verbs.dm b/code/modules/admin/verbs/mob_verbs.dm index abb43461c2fe..3b4de192e78f 100644 --- a/code/modules/admin/verbs/mob_verbs.dm +++ b/code/modules/admin/verbs/mob_verbs.dm @@ -370,7 +370,7 @@ message_admins("[key_name(src)] changed hivenumber of [H] to [H.hivenumber].") -/client/proc/cmd_admin_change_their_name(mob/living/carbon/X) +/client/proc/cmd_admin_change_their_name(mob/living/carbon/carbon) set name = "Change Name" set category = null @@ -378,19 +378,20 @@ if(!newname) return - if(!X) + if(!carbon) to_chat(usr, "This mob no longer exists") return - var/old_name = X.name - X.change_real_name(X, newname) - if(istype(X, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = X - if(H.wear_id) - H.wear_id.name = "[H.real_name]'s ID Card" - H.wear_id.registered_name = "[H.real_name]" - if(H.wear_id.assignment) - H.wear_id.name += " ([H.wear_id.assignment])" + var/old_name = carbon.name + carbon.change_real_name(carbon, newname) + if(ishuman(carbon)) + var/mob/living/carbon/human/human = carbon + var/obj/item/card/id/card = human.get_idcard() + if(card) + card.name = "[human.real_name]'s ID Card" + card.registered_name = "[human.real_name]" + if(card.assignment) + card.name += " ([card.assignment])" message_admins("[key_name(src)] changed name of [old_name] to [newname].") diff --git a/code/modules/admin/verbs/select_equipment.dm b/code/modules/admin/verbs/select_equipment.dm index 7e78652c5c35..90269f70c1aa 100644 --- a/code/modules/admin/verbs/select_equipment.dm +++ b/code/modules/admin/verbs/select_equipment.dm @@ -10,15 +10,15 @@ var/newrank = tgui_input_list(usr, "Select new rank for [H]", "Change the mob's rank and skills", rank_list) if (!newrank) return - if(!H) + if(QDELETED(H)) return - var/obj/item/card/id/I = H.wear_id + var/obj/item/card/id/I = H.get_idcard() if(GLOB.RoleAuthority.roles_by_name[newrank]) var/datum/job/J = GLOB.RoleAuthority.roles_by_name[newrank] H.comm_title = J.get_comm_title() H.set_skills(J.get_skills()) - if(istype(I)) + if(I) I.access = J.get_access() I.rank = J.title I.assignment = J.disp_title @@ -48,7 +48,7 @@ if(!newskillset || newskillset == "Keep Skillset") return - if(!H) + if(QDELETED(H)) return var/datum/job/J = GLOB.RoleAuthority.roles_by_name[newskillset] @@ -58,25 +58,25 @@ var/newcommtitle = input("Write the custom title appearing on comms chat (e.g. Spc)", "Comms title") as null|text if(!newcommtitle) return - if(!H) + if(QDELETED(H)) return H.comm_title = newcommtitle - if(!istype(I) || I != H.wear_id) + if(!I || I != H.get_idcard()) to_chat(usr, "The mob has no id card, unable to modify ID and chat title.") else var/newchattitle = input("Write the custom title appearing in chat (e.g. SGT)", "Chat title") as null|text if(!newchattitle) return - if(!H || I != H.wear_id) + if(QDELETED(H) || I != H.get_idcard()) return I.paygrade = newchattitle var/IDtitle = input("Write the custom title on your ID (e.g. Squad Specialist)", "ID title") as null|text if(!IDtitle) return - if(!H || I != H.wear_id) + if(QDELETED(H) || I != H.get_idcard()) return I.rank = IDtitle @@ -92,7 +92,7 @@ if(!newskillset) return - if(!H) + if(QDELETED(H)) return var/datum/job/J = GLOB.RoleAuthority.roles_by_name[newskillset] diff --git a/code/modules/cm_marines/equipment/kit_boxes.dm b/code/modules/cm_marines/equipment/kit_boxes.dm index ebd9ca9dcbd9..149c68f2abda 100644 --- a/code/modules/cm_marines/equipment/kit_boxes.dm +++ b/code/modules/cm_marines/equipment/kit_boxes.dm @@ -257,8 +257,8 @@ if(!GLOB.available_specialist_kit_boxes[selection] || GLOB.available_specialist_kit_boxes[selection] <= 0) to_chat(user, SPAN_WARNING("No more kits of this type may be chosen!")) return FALSE - var/obj/item/card/id/ID = user.wear_id - if(!istype(ID) || ID.registered_ref != WEAKREF(user)) + var/obj/item/card/id/card = user.get_idcard() + if(!card || card.registered_ref != WEAKREF(user)) to_chat(user, SPAN_WARNING("You must be wearing your [SPAN_INFO("ID card")] or [SPAN_INFO("dog tags")] to select a specialization!")) return var/turf/T = get_turf(loc) @@ -297,8 +297,8 @@ user.skills.set_skill(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED) if(specialist_assignment) user.put_in_hands(spec_box) - ID.set_assignment((user.assigned_squad && squad_assignment_update ? (user.assigned_squad.name + " ") : "") + ID.assignment + " ([specialist_assignment])") - GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), ID.assignment) + card.set_assignment((user.assigned_squad && squad_assignment_update ? (user.assigned_squad.name + " ") : "") + card.assignment + " ([specialist_assignment])") + GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), card.assignment) return TRUE return FALSE diff --git a/code/modules/cm_marines/overwatch.dm b/code/modules/cm_marines/overwatch.dm index 8dfd1dc3f929..84a27622959a 100644 --- a/code/modules/cm_marines/overwatch.dm +++ b/code/modules/cm_marines/overwatch.dm @@ -184,13 +184,11 @@ if(is_ground_level(current_turf.z)) continue + var/obj/item/card/id/card = marine_human.get_idcard() if(marine_human.job) role = marine_human.job - else if(istype(marine_human.wear_id, /obj/item/card/id)) //decapitated marine is mindless, - var/obj/item/card/id/ID = marine_human.wear_id //we use their ID to get their role. - if(ID.rank) - role = ID.rank - + else if(card?.rank) //decapitated marine is mindless, + role = card.rank if(current_squad.squad_leader) if(marine_human == current_squad.squad_leader) @@ -249,15 +247,14 @@ if(JOB_SQUAD_SPECIALIST) spec_count++ if(marine_human) - if(istype(marine_human.wear_id, /obj/item/card/id)) //decapitated marine is mindless, - var/obj/item/card/id/ID = marine_human.wear_id //we use their ID to get their role. - if(ID.assignment) - if(specialist_type) - specialist_type = "MULTIPLE" - else - var/list/spec_type = splittext(ID.assignment, "(") - if(islist(spec_type) && (length(spec_type) > 1)) - specialist_type = splittext(spec_type[2], ")")[1] + var/obj/item/card/id/card = marine_human.get_idcard() + if(card?.assignment) //decapitated marine is mindless, + if(specialist_type) + specialist_type = "MULTIPLE" + else + var/list/spec_type = splittext(card.assignment, "(") + if(islist(spec_type) && (length(spec_type) > 1)) + specialist_type = splittext(spec_type[2], ")")[1] else if(!specialist_type) specialist_type = "UNKNOWN" if(mob_state != "Dead") @@ -589,9 +586,9 @@ if(sl_headset) sl_headset.keys += new /obj/item/device/encryptionkey/squadlead/acting(sl_headset) sl_headset.recalculateChannels() - if(istype(selected_sl.wear_id, /obj/item/card/id)) - var/obj/item/card/id/ID = selected_sl.wear_id - ID.access += ACCESS_MARINE_LEADER + var/obj/item/card/id/card = selected_sl.get_idcard() + if(card) + card.access += ACCESS_MARINE_LEADER selected_sl.hud_set_squad() selected_sl.update_inv_head() //updating marine helmet leader overlays selected_sl.update_inv_wear_suit() @@ -696,7 +693,8 @@ to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("[transfer_marine] is KIA.")]") return - if(!istype(transfer_marine.wear_id, /obj/item/card/id)) + var/obj/item/card/id/card = transfer_marine.get_idcard() + if(!card) to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("Transfer aborted. [transfer_marine] isn't wearing an ID.")]") return @@ -713,7 +711,8 @@ to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("[transfer_marine] is KIA.")]") return - if(!istype(transfer_marine.wear_id, /obj/item/card/id)) + card = transfer_marine.get_idcard() + if(!card) to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("Transfer aborted. [transfer_marine] isn't wearing an ID.")]") return @@ -726,7 +725,7 @@ to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("Transfer aborted. [new_squad] can't have another [transfer_marine.job].")]") return - . = transfer_marine_to_squad(transfer_marine, new_squad, old_squad) + . = transfer_marine_to_squad(transfer_marine, new_squad, old_squad, card) if(.) visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("[transfer_marine] has been transfered from squad '[old_squad]' to squad '[new_squad]'. Logging to enlistment file.")]") to_chat(transfer_marine, "[icon2html(src, transfer_marine)] \[Overwatch\]: You've been transfered to [new_squad]!") diff --git a/code/modules/cm_marines/radar.dm b/code/modules/cm_marines/radar.dm index 80b3bb7bcb0c..aa332d601395 100644 --- a/code/modules/cm_marines/radar.dm +++ b/code/modules/cm_marines/radar.dm @@ -205,12 +205,12 @@ continue var/crewmember_name = "Unknown" var/crewmember_rank = "Unknown" - if(humanoid.wear_id) - var/obj/item/card/id/ID = humanoid.wear_id.GetID() - if(ID?.registered_name) - crewmember_name = ID.registered_name - if(ID?.assignment) - crewmember_rank = ID.assignment + var/obj/item/card/id/card = humanoid.get_idcard() + if(card) + if(card.registered_name) + crewmember_name = card.registered_name + if(card.assignment) + crewmember_rank = card.assignment switch(humanoid.stat) if(CONSCIOUS) crewmember_name = "[crewmember_name] ([crewmember_rank]) (Conscious)" diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index f4aaf7c06560..e7ac5d767dab 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -428,26 +428,28 @@ log transactions //stolen wholesale and then edited a bit from newscasters, which are awesome and by Agouri /obj/structure/machinery/atm/proc/scan_user(mob/living/carbon/human/human_user as mob) + if(authenticated_account) + return + var/obj/item/card/id/card = human_user.get_idcard() + if(!card) + return + + authenticated_account = attempt_account_access(card.associated_account_number) if(!authenticated_account) - if(human_user.wear_id) - var/obj/item/card/id/I - if(istype(human_user.wear_id, /obj/item/card/id)) - I = human_user.wear_id - if(I) - authenticated_account = attempt_account_access(I.associated_account_number) - if(authenticated_account) - to_chat(human_user, SPAN_NOTICE("[icon2html(src, human_user)] Access granted. Welcome user '[authenticated_account.owner_name].'")) - - //create a transaction log entry - var/datum/transaction/T = new() - T.target_name = authenticated_account.owner_name - T.purpose = "Remote terminal access" - T.source_terminal = machine_id - T.date = GLOB.current_date_string - T.time = worldtime2text() - authenticated_account.transaction_log.Add(T) - - view_screen = NO_SCREEN + return + + to_chat(human_user, SPAN_NOTICE("[icon2html(src, human_user)] Access granted. Welcome user '[authenticated_account.owner_name].'")) + + //create a transaction log entry + var/datum/transaction/log = new() + log.target_name = authenticated_account.owner_name + log.purpose = "Remote terminal access" + log.source_terminal = machine_id + log.date = GLOB.current_date_string + log.time = worldtime2text() + authenticated_account.transaction_log.Add(log) + + view_screen = NO_SCREEN // put the currently held id on the ground or in the hand of the user /obj/structure/machinery/atm/proc/release_held_id(mob/living/carbon/human/human_user as mob) diff --git a/code/modules/gear_presets/uscm.dm b/code/modules/gear_presets/uscm.dm index eec3b6157877..b1a7fe48f9a9 100644 --- a/code/modules/gear_presets/uscm.dm +++ b/code/modules/gear_presets/uscm.dm @@ -35,13 +35,13 @@ if(!GLOB.data_core.manifest_modify(new_human.real_name, WEAKREF(new_human), assignment, rank)) GLOB.data_core.manifest_inject(new_human) - var/obj/item/card/id/ID = new_human.wear_id + var/obj/item/card/id/ID = new_human.get_idcard() var/datum/money_account/acct = create_account(new_human, rand(30, 50), GLOB.paygrades[ID.paygrade]) ID.associated_account_number = acct.account_number var/datum/squad/auto_squad = get_squad_by_name(auto_squad_name) if(auto_squad) - transfer_marine_to_squad(new_human, auto_squad, new_human.assigned_squad, new_human.wear_id) + transfer_marine_to_squad(new_human, auto_squad, new_human.assigned_squad, ID) if(!ert_squad && !auto_squad.active) auto_squad.engage_squad(FALSE) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 9eac835dccba..ec8083da0d46 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -60,7 +60,7 @@ var/obj/item/head = null var/obj/item/wear_l_ear = null var/obj/item/wear_r_ear = null - var/obj/item/card/id/wear_id = null + var/obj/item/wear_id = null var/obj/item/r_store = null var/obj/item/l_store = null var/obj/item/s_store = null diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 9a0cd177e885..dfb903368503 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -345,8 +345,11 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate, client.add_to_screen(wear_id) wear_id.screen_loc = hud_used.ui_datum.hud_slot_offset(wear_id, hud_used.ui_datum.ui_id) - if(!wear_id.pinned_on_uniform || (w_uniform && w_uniform.displays_id && !(w_uniform.flags_jumpsuit & UNIFORM_JACKET_REMOVED))) - var/image/id_overlay = wear_id.get_mob_overlay(src, WEAR_ID) + var/obj/item/card/id/card = get_idcard() + if(!card) + return + if(!card.pinned_on_uniform || (w_uniform && w_uniform.displays_id && !(w_uniform.flags_jumpsuit & UNIFORM_JACKET_REMOVED))) + var/image/id_overlay = card.get_mob_overlay(src, WEAR_ID) id_overlay.layer = -ID_LAYER overlays_standing[ID_LAYER] = id_overlay apply_overlay(ID_LAYER) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 2b3407fa9414..00dcd987f089 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -382,7 +382,13 @@ return var/mob/living/carbon/human/human_user = user - if(!(ACCESS_MARINE_SENIOR in human_user.wear_id?.access) && !(ACCESS_MARINE_DROPSHIP in human_user.wear_id?.access)) + var/obj/item/card/id/card = human_user.get_idcard() + + if(!card) + to_chat(user, SPAN_NOTICE("[src]'s screen says \"Unauthorized access. Please inform your supervisor\".")) + return + + if(!(ACCESS_MARINE_SENIOR in card.access) && !(ACCESS_MARINE_DROPSHIP in card.access)) to_chat(user, SPAN_NOTICE("[src]'s screen says \"Unauthorized access. Please inform your supervisor\".")) return From 48dd274cc8bfdf2e43961c83189a96f391031377 Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:10:30 +0100 Subject: [PATCH 3/5] Automatic changelog for PR #6411 [ci skip] --- html/changelogs/AutoChangeLog-pr-6411.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-6411.yml diff --git a/html/changelogs/AutoChangeLog-pr-6411.yml b/html/changelogs/AutoChangeLog-pr-6411.yml new file mode 100644 index 000000000000..bc5d177db4ba --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6411.yml @@ -0,0 +1,4 @@ +author: "Drathek" +delete-after: True +changes: + - bugfix: "Fixed wallets as IDs breaking many things" \ No newline at end of file From 64bdcc4404e8bfbbe57c741f92fe247382548cf6 Mon Sep 17 00:00:00 2001 From: Drathek <76988376+Drulikar@users.noreply.github.com> Date: Sat, 15 Jun 2024 07:06:22 -0700 Subject: [PATCH 4/5] Adds niche logs to revival attempts (#6465) # About the pull request This PR simply adds niche admin logs for defib attempts. # Explain why it's good for the game More logs. # Testing Photographs and Procedure
Screenshots & Videos ![image](https://github.com/cmss13-devs/cmss13/assets/76988376/ec8bbc5a-657a-4756-8b5a-e53e9ccd4d87)
# Changelog :cl: Drathek admin: Added niche logging for revival attempts /:cl: --- code/game/objects/items/devices/defibrillator.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/game/objects/items/devices/defibrillator.dm b/code/game/objects/items/devices/defibrillator.dm index 4a5ad7cc13ed..518fdb1a9591 100644 --- a/code/game/objects/items/devices/defibrillator.dm +++ b/code/game/objects/items/devices/defibrillator.dm @@ -199,8 +199,10 @@ playsound(get_turf(src), 'sound/items/defib_failed.ogg', 25, 0) if(heart && heart.organ_status >= ORGAN_BROKEN) user.visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Defibrillation failed. Patient's heart is too damaged. Immediate surgery is advised.")) + msg_admin_niche("[key_name_admin(user)] failed an attempt to revive [key_name_admin(H)] with [src] because of heart damage.") return user.visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Defibrillation failed. Patient's general condition does not allow reviving.")) + msg_admin_niche("[key_name_admin(user)] failed an attempt to revive [key_name_admin(H)] with [src].") return if(!H.client) //Freak case, no client at all. This is a braindead mob (like a colonist) @@ -227,6 +229,7 @@ break if(H.health > HEALTH_THRESHOLD_DEAD) user.visible_message(SPAN_NOTICE("[icon2html(src, viewers(src))] \The [src] beeps: Defibrillation successful.")) + msg_admin_niche("[key_name_admin(user)] successfully revived [key_name_admin(H)] with [src].") playsound(get_turf(src), 'sound/items/defib_success.ogg', 25, 0) user.track_life_saved(user.job) user.life_revives_total++ @@ -239,6 +242,7 @@ window_flash(H.client) else user.visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] buzzes: Defibrillation failed. Vital signs are too weak, repair damage and try again.")) //Freak case + msg_admin_niche("[key_name_admin(user)] failed an attempt to revive [key_name_admin(H)] with [src] because of weak vitals.") playsound(get_turf(src), 'sound/items/defib_failed.ogg', 25, 0) if(heart && prob(25)) heart.take_damage(rand(min_heart_damage_dealt, max_heart_damage_dealt), TRUE) // Make death and revival leave lasting consequences From d9812d9fe5baed574d3f2a87aa75dc8f9f134080 Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:17:44 +0100 Subject: [PATCH 5/5] Automatic changelog for PR #6465 [ci skip] --- html/changelogs/AutoChangeLog-pr-6465.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-6465.yml diff --git a/html/changelogs/AutoChangeLog-pr-6465.yml b/html/changelogs/AutoChangeLog-pr-6465.yml new file mode 100644 index 000000000000..585951e37493 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6465.yml @@ -0,0 +1,4 @@ +author: "Drathek" +delete-after: True +changes: + - admin: "Added niche logging for revival attempts" \ No newline at end of file