From 629bc3fd642c0fed90a36de97840f6f3caedb56a Mon Sep 17 00:00:00 2001 From: Geeves Date: Fri, 24 Apr 2020 02:11:38 +0200 Subject: [PATCH] Modular Computer Quickfix (#8735) --- code/modules/mob/living/carbon/human/human.dm | 32 ++++++------------- .../computers/subtypes/dev_wristbound.dm | 3 +- .../file_system/programs/app_presets.dm | 2 +- .../file_system/programs/command/card.dm | 2 +- .../file_system/programs/command/comm.dm | 2 +- html/changelogs/geeves-modular_comp_fixes.yml | 10 ++++++ 6 files changed, 24 insertions(+), 27 deletions(-) create mode 100644 html/changelogs/geeves-modular_comp_fixes.yml diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 4a71a702119..d1f1c16abcf 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -433,35 +433,21 @@ //gets assignment from ID or ID inside PDA or PDA itself //Useful when player do something with computers -/mob/living/carbon/human/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job") - var/obj/item/device/pda/pda = wear_id - if (istype(pda)) - if (pda.id) - return pda.id.assignment - else - return pda.ownjob +/mob/living/carbon/human/proc/get_assignment(var/if_no_id = "No ID", var/if_no_job = "No Job") + var/obj/item/card/id/I = GetIdCard() + if(istype(I)) + return I.assignment ? I.assignment : if_no_job else - var/obj/item/card/id/id = get_idcard() - if(id) - return id.assignment ? id.assignment : if_no_job - else - return if_no_id + return if_no_id //gets name from ID or ID inside PDA or PDA itself //Useful when player do something with computers /mob/living/carbon/human/proc/get_authentification_name(var/if_no_id = "Unknown") - var/obj/item/device/pda/pda = wear_id - if (istype(pda)) - if (pda.id) - return pda.id.registered_name - else - return pda.owner + var/obj/item/card/id/I = GetIdCard() + if(istype(I)) + return I.registered_name else - var/obj/item/card/id/id = get_idcard() - if(id) - return id.registered_name - else - return if_no_id + return if_no_id //repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere /mob/living/carbon/human/proc/get_visible_name() diff --git a/code/modules/modular_computers/computers/subtypes/dev_wristbound.dm b/code/modules/modular_computers/computers/subtypes/dev_wristbound.dm index 85284a594db..eaa3a84d074 100644 --- a/code/modules/modular_computers/computers/subtypes/dev_wristbound.dm +++ b/code/modules/modular_computers/computers/subtypes/dev_wristbound.dm @@ -8,6 +8,7 @@ icon_state_screensaver = "standby" hardware_flag = PROGRAM_WRISTBOUND slot_flags = SLOT_GLOVES|SLOT_ID + can_reset = TRUE max_hardware_size = 1 w_class = ITEMSIZE_NORMAL light_strength = 1 @@ -21,7 +22,7 @@ /obj/item/modular_computer/wristbound/attack_hand(mob/user) if(ishuman(user)) var/mob/living/carbon/human/H = user - if(H.gloves == src) + if(H.gloves == src || H.wear_id == src) return attack_self(user) ..() diff --git a/code/modules/modular_computers/file_system/programs/app_presets.dm b/code/modules/modular_computers/file_system/programs/app_presets.dm index 74b7986f98f..7dc97de1a82 100644 --- a/code/modules/modular_computers/file_system/programs/app_presets.dm +++ b/code/modules/modular_computers/file_system/programs/app_presets.dm @@ -119,7 +119,7 @@ description = "Contains the most common research programs and command software." available = FALSE -/datum/modular_computer_app_presets/research/return_install_programs() +/datum/modular_computer_app_presets/research/rd/return_install_programs() var/list/_prg_list = list( new /datum/computer_file/program/filemanager(), new /datum/computer_file/program/chatclient(), diff --git a/code/modules/modular_computers/file_system/programs/command/card.dm b/code/modules/modular_computers/file_system/programs/command/card.dm index 317719c2035..dbcfe2d8f2b 100644 --- a/code/modules/modular_computers/file_system/programs/command/card.dm +++ b/code/modules/modular_computers/file_system/programs/command/card.dm @@ -1,6 +1,6 @@ /datum/computer_file/program/card_mod filename = "cardmod" - filedesc = "ID card modification program" + filedesc = "ID Card Modification Program" nanomodule_path = /datum/nano_module/program/card_mod program_icon_state = "id" extended_desc = "Program for programming employee ID cards to access parts of the station." diff --git a/code/modules/modular_computers/file_system/programs/command/comm.dm b/code/modules/modular_computers/file_system/programs/command/comm.dm index a650b7884e6..9a35d535fad 100644 --- a/code/modules/modular_computers/file_system/programs/command/comm.dm +++ b/code/modules/modular_computers/file_system/programs/command/comm.dm @@ -6,7 +6,7 @@ /datum/computer_file/program/comm filename = "comm" - filedesc = "Command and communications program." + filedesc = "Command and Communications Program" program_icon_state = "comm" nanomodule_path = /datum/nano_module/program/comm extended_desc = "Used to command and control the station. Can relay long-range communications." diff --git a/html/changelogs/geeves-modular_comp_fixes.yml b/html/changelogs/geeves-modular_comp_fixes.yml new file mode 100644 index 00000000000..7414483c4bc --- /dev/null +++ b/html/changelogs/geeves-modular_comp_fixes.yml @@ -0,0 +1,10 @@ +author: Geeves + +delete-after: True + +changes: + - bugfix: "Wristbound clicking is now more consistant when it's in the ID slot." + - bugfix: "Suit sensors now get your ID when it's in your glove slot, your ID slot, or in your hands." + - bugfix: "Command programs are now named better." + - bugfix: "Wristbound computers can now be reset by the Tech Support card." + - bugfix: "Research computers no longer get RD programs." \ No newline at end of file