From 29fa8371f7f0ea986688079d03e70c54bb7cc5da Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 11 Sep 2024 10:22:58 -0500 Subject: [PATCH] imma finish this soon. --- code/controllers/subsystem/datacore.dm | 1 - code/game/data_huds.dm | 10 ++++++- .../game/objects/items/devices/ship_linker.dm | 29 ------------------- code/modules/clothing/glasses/hud.dm | 2 ++ .../mob/living/carbon/human/examine.dm | 7 ++--- code/modules/mob/living/carbon/human/human.dm | 18 +----------- shiptest.dme | 1 - 7 files changed, 14 insertions(+), 54 deletions(-) delete mode 100644 code/game/objects/items/devices/ship_linker.dm diff --git a/code/controllers/subsystem/datacore.dm b/code/controllers/subsystem/datacore.dm index 1faba8a2037f..177fe6157e24 100644 --- a/code/controllers/subsystem/datacore.dm +++ b/code/controllers/subsystem/datacore.dm @@ -12,7 +12,6 @@ SUBSYSTEM_DEF(datacore) DATACORE_RECORDS_OUTPOST, DATACORE_RECORDS_SECURITY, DATACORE_RECORDS_MEDICAL, - //DATACORE_RECORDS_LOCKED ) var/securityPrintCount = 0 diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 3d40562062ad..33a035e6d598 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -91,6 +91,14 @@ Medical HUD! Basic mode needs suit sensors on. //HELPERS +/mob/living/carbon/human/proc/get_datacore_key() + var/linked_datacore + var/obj/item/clothing/glasses/hud/glass_hud = user.get_item_by_slot(ITEM_SLOT_EYES) + if(glass_hud && glass_hud.linked_ship) + linked_datacore = glass_hud.linked_ship + return linked_datacore + + //called when a carbon changes virus /mob/living/carbon/proc/check_virus() var/threat @@ -272,7 +280,7 @@ Security HUDs! Basic mode shows only the job. holder.pixel_y = I.Height() - world.icon_size var/perpname = get_face_name(get_id_name("")) if(perpname) - var/datum/data/record/R = SSdatacore.get_record_by_name(perpname, DATACORE_RECORDS_SECURITY) + var/datum/data/record/R = SSdatacore.get_record_by_name(perpname, get_datacore_key()) if(R) switch(R.fields[DATACORE_CRIMINAL_STATUS]) if("*Arrest*") diff --git a/code/game/objects/items/devices/ship_linker.dm b/code/game/objects/items/devices/ship_linker.dm deleted file mode 100644 index 4a9cd67e7f20..000000000000 --- a/code/game/objects/items/devices/ship_linker.dm +++ /dev/null @@ -1,29 +0,0 @@ -/obj/item/ship_linker - name = "Ship Linker" - desc = "A dev tool for now" - icon = 'icons/obj/tools.dmi' - icon_state = "multitool" - var/datum/overmap/ship/controlled/linked_ship - -/obj/item/ship_linker/examine(mob/user) - . = ..() - if(linked_ship) - . += "Linked to: [linked_ship]" - -/obj/item/ship_linker/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock) - . = ..() - linked_ship = port.current_ship - -/obj/item/ship_linker/disconnect_from_shuttle(obj/docking_port/mobile/port) - . = ..() - linked_ship = null - -/obj/item/ship_linker/afterattack(atom/target, mob/user, proximity) - . = ..() - if(!proximity || !check_allowed_items(target)) - return - playsound(src, 'sound/weapons/empty.ogg', 30, TRUE) - if(do_after(user, 3 SECONDS, TRUE, src)) - target.connect_to_shuttle(linked_ship.shuttle_port, linked_ship.shuttle_port.docked, TRUE) - to_chat(user, span_notice("You link the [target] to the [linked_ship].")) - playsound(src, 'sound/weapons/empty.ogg', 30, TRUE) diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 1cc4080590fa..ecb913b1cda3 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -19,6 +19,8 @@ . = ..() if(linked_ship) . += "It is currently connected to [linked_ship] records." + else + . += "They could show additional information if linked to a helm." /obj/item/clothing/glasses/hud/afterattack(atom/target, mob/user, proximity_flag, click_parameters) . = ..() diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 041f6e602b27..fbaa427a076a 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -344,11 +344,8 @@ var/perpname = get_face_name(get_id_name("")) if(perpname && (HAS_TRAIT(user, TRAIT_SECURITY_HUD) || HAS_TRAIT(user, TRAIT_MEDICAL_HUD))) - var/obj/item/clothing/glasses/hud/glass_hud = user.get_item_by_slot(ITEM_SLOT_EYES) - var/linked_datacore = DATACORE_RECORDS_OUTPOST - if(glass_hud && glass_hud.linked_ship) - linked_datacore = glass_hud.linked_ship - var/datum/data/record/target_record = SSdatacore.get_record_by_name(perpname, linked_datacore) + var/linked_datacore = get_datacore_key() + var/datum/data/record/target_record = SSdatacore.get_record_by_name(perpname, get_datacore_key()) if(target_record) . += "
found record for datacore: [linked_datacore] " . += "Rank: [target_record.fields[DATACORE_RANK]] Name: [target_record.fields[DATACORE_NAME]]" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index adc6a663a4c5..b1309ba2971c 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -281,10 +281,7 @@ var/perpname = get_face_name(get_id_name("")) if(!HAS_TRAIT(human_or_ghost_user, TRAIT_SECURITY_HUD) && !HAS_TRAIT(human_or_ghost_user, TRAIT_MEDICAL_HUD)) return - var/obj/item/clothing/glasses/hud/glass_hud = human_or_ghost_user.get_item_by_slot(ITEM_SLOT_EYES) - var/linked_datacore = DATACORE_RECORDS_OUTPOST - if(glass_hud && glass_hud.linked_ship) - linked_datacore = glass_hud.linked_ship + var/linked_datacore = get_datacore_key() var/datum/data/record/target_record = SSdatacore.get_record_by_name(perpname, linked_datacore) if(href_list["photo_front"] || href_list["photo_side"]) if(!target_record) @@ -569,19 +566,6 @@ if(weaponcheck.Invoke(belt) || weaponcheck.Invoke(back)) //if a weapon is present in the belt or back slot threatcount += 2 //not enough to trigger look_for_perp() on it's own unless they also have criminal status. - //Check for arrest warrant - if(judgement_criteria & JUDGE_RECORDCHECK) - var/perpname = get_face_name(get_id_name()) - var/datum/data/record/target_record = SSdatacore.get_record_by_name(perpname, DATACORE_RECORDS_SECURITY) - if(target_record && target_record.fields[DATACORE_CRIMINAL_STATUS]) - switch(target_record.fields[DATACORE_CRIMINAL_STATUS]) - if("*Arrest*") - threatcount += 5 - if("Incarcerated") - threatcount += 2 - if("Paroled") - threatcount += 2 - //Check for dresscode violations if(istype(head, /obj/item/clothing/head/wizard) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/wizard)) threatcount += 2 diff --git a/shiptest.dme b/shiptest.dme index d603c16b06cc..ed252c636106 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1269,7 +1269,6 @@ #include "code\game\objects\items\devices\reverse_bear_trap.dm" #include "code\game\objects\items\devices\scanners.dm" #include "code\game\objects\items\devices\sensor_device.dm" -#include "code\game\objects\items\devices\ship_linker.dm" #include "code\game\objects\items\devices\spyglasses.dm" #include "code\game\objects\items\devices\swapper.dm" #include "code\game\objects\items\devices\taperecorder.dm"