From 6e1551bcb686d7f7cd53ad2dd60b47b7f7ace384 Mon Sep 17 00:00:00 2001 From: Cameron Lennox Date: Sun, 28 Dec 2025 08:22:07 -0500 Subject: [PATCH] Makes DNA locking chips not work if you have no DNA (#18905) * Makes DNA locking chips not work if you have no DNA * Makes artifact gun casings delete on use --- code/modules/projectiles/dnalocking.dm | 30 +++++++++++-------- .../finds/Weapons/archeo_guns.dm | 1 + 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/code/modules/projectiles/dnalocking.dm b/code/modules/projectiles/dnalocking.dm index 11085e8703b..01858eae7d5 100644 --- a/code/modules/projectiles/dnalocking.dm +++ b/code/modules/projectiles/dnalocking.dm @@ -13,6 +13,7 @@ var/exploding = 0 /obj/item/dnalockingchip/Destroy(force, ...) + stored_dna.Cut() . = ..() /obj/item/gun/proc/get_dna(mob/user) @@ -21,17 +22,22 @@ if(attached_lock.stored_dna && (M.dna.unique_enzymes in attached_lock.stored_dna)) to_chat(M, span_warning("\The [src] buzzes and displays a symbol showing the gun already contains your DNA.")) - return 0 + return FALSE + else if(ishuman(M)) + var/mob/living/carbon/human/human = user + if(human.species.flags & NO_DNA) + to_chat(human, span_warning("\The [src] buzzes and displays an NO DNA DETECTED symbol.")) + return FALSE else attached_lock.stored_dna += M.dna.unique_enzymes to_chat(M, span_notice("\The [src] pings and a needle flicks out from the grip, taking a DNA sample from you.")) if(!attached_lock.controller_dna) attached_lock.controller_dna = M.dna.unique_enzymes to_chat(M, span_notice("\The [src] processes the dna sample and pings, acknowledging you as the primary controller.")) - return 1 + return TRUE else to_chat(M, span_warning("\The [src] buzzes and displays a locked symbol. It is not allowing DNA samples at this time.")) - return 0 + return FALSE /obj/item/gun/verb/give_dna() set name = "Give DNA" @@ -44,18 +50,18 @@ if(!attached_lock.controller_lock) if(!authorized_user(M)) to_chat(M, span_warning("\The [src] buzzes and displays an invalid user symbol.")) - return 0 + return FALSE else attached_lock.stored_dna -= user.dna.unique_enzymes to_chat(M, span_notice("\The [src] beeps and clears the DNA it has stored.")) if(M.dna.unique_enzymes == attached_lock.controller_dna) to_chat(M, span_notice("\The [src] beeps and removes you as the primary controller.")) if(attached_lock.controller_lock) - attached_lock.controller_lock = 0 - return 1 + attached_lock.controller_lock = FALSE + return TRUE else to_chat(M, span_warning("\The [src] buzzes and displays a locked symbol. It is not allowing DNA modifcation at this time.")) - return 0 + return FALSE /obj/item/gun/verb/remove_dna() set name = "Remove DNA" @@ -67,10 +73,10 @@ var/mob/living/M = user if(authorized_user(M) && user.dna.unique_enzymes == attached_lock.controller_dna) if(!attached_lock.controller_lock) - attached_lock.controller_lock = 1 + attached_lock.controller_lock = TRUE to_chat(M, span_notice("\The [src] beeps and displays a locked symbol, informing you it will no longer allow DNA samples.")) else - attached_lock.controller_lock = 0 + attached_lock.controller_lock = FALSE to_chat(M, span_notice("\The [src] beeps and displays an unlocked symbol, informing you it will now allow DNA samples.")) else to_chat(M, span_warning("\The [src] buzzes and displays an invalid user symbol.")) @@ -83,7 +89,7 @@ /obj/item/gun/proc/authorized_user(mob/user) if(!attached_lock.stored_dna || !attached_lock.stored_dna.len) - return 1 + return TRUE if(!(user.dna.unique_enzymes in attached_lock.stored_dna)) - return 0 - return 1 + return FALSE + return TRUE diff --git a/code/modules/xenoarcheaology/finds/Weapons/archeo_guns.dm b/code/modules/xenoarcheaology/finds/Weapons/archeo_guns.dm index dd3b1ec24fe..bf825bbbdd2 100644 --- a/code/modules/xenoarcheaology/finds/Weapons/archeo_guns.dm +++ b/code/modules/xenoarcheaology/finds/Weapons/archeo_guns.dm @@ -34,6 +34,7 @@ drop_sound = 'sound/items/drop/ring.ogg' pickup_sound = 'sound/items/pickup/ring.ogg' projectile_type = /obj/item/projectile/bullet/cap //Just a placeholder. Doesn't actually matter what this is. All that matters is what the projecttile_type of our BB is. + caseless = TRUE /obj/item/ammo_casing/artifact/Initialize(mapload) //These should ONLY ever be in artifact weapons. If you spawn outside of artifact weapons, it'll have a riot foam dart inside of it as the bullet. . = ..()