Migrate data disks to the new attack chain. (#32235)

* Migrate data disks to the new attack chain.

* Call parent in activate_self()

* Migrate plant disks too.

* Call parent in activate_self() in gene_modder.dm.

* Prevent runtime on examine.

* Add fingerprints.
This commit is contained in:
Alan
2026-07-24 19:44:04 +00:00
committed by GitHub
parent fe04a981da
commit 9c8f096c97
2 changed files with 23 additions and 10 deletions
+8 -3
View File
@@ -6,11 +6,12 @@
pickup_sound = 'sound/items/handling/disk_pickup.ogg'
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL = 300, MAT_GLASS = 100)
new_attack_chain = TRUE
/obj/item/disk/data
name = "Cloning Data Disk"
var/datum/dna2_record/buf = null
var/read_only = FALSE //Well,it's still a floppy disk
var/read_only = FALSE // Well, it's still a floppy disk.
/obj/item/disk/data/proc/initialize_data()
buf = new
@@ -57,9 +58,13 @@
var/diskcolor = pick(0, 1, 2, 3, 4, 5)
icon_state = "datadisk[diskcolor]"
/obj/item/disk/data/attack_self__legacy__attackchain(mob/user)
/obj/item/disk/data/activate_self(mob/user)
if(..())
return ITEM_INTERACT_COMPLETE
read_only = !read_only
to_chat(user, "You flip the write-protect tab to [read_only ? "protected" : "unprotected"].")
add_fingerprint(user)
to_chat(user, SPAN_NOTICE("You flip the write-protect tab to [read_only ? "protected" : "unprotected"]."))
return ITEM_INTERACT_COMPLETE
/obj/item/disk/data/examine(mob/user)
. = ..()