mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Prevents you from putting yourself in the DNA vault multiple times (#93905)
## About The Pull Request You can't put more than one of the same dna in the vault, because the probe checks when it scans you that your dna isn't in the probe's storage or the vault's storage. But it doesn't check other probes, so multiple probes can have the same dna, and can all upload the same dna to the vault for duplicate DNA. This PR adds a check when you upload to a vault that throws out dna already in the vault before it's counted. ## Why It's Good For The Game Duplicate DNA is clearly not intentional ## Changelog 🆑 fix: You can no longer duplicate DNA for the DNA vault objective by scanning yourself on several probes at once. /🆑
This commit is contained in:
@@ -54,6 +54,9 @@
|
||||
|
||||
/obj/item/dna_probe/proc/try_upload_dna(obj/machinery/dna_vault/target, mob/user)
|
||||
var/uploaded = 0
|
||||
stored_dna_plants -= target.plant_dna
|
||||
stored_dna_human -= target.human_dna
|
||||
stored_dna_animal -= target.animal_dna
|
||||
var/plant_dna_length = length(stored_dna_plants)
|
||||
var/human_dna_length = length(stored_dna_human)
|
||||
var/animal_dna_length = length(stored_dna_animal)
|
||||
|
||||
Reference in New Issue
Block a user