From 70cc32824b47e142f3b2a4af6f6336b41c00f71d Mon Sep 17 00:00:00 2001 From: AffectedArc07 Date: Thu, 23 Jul 2020 11:33:24 +0100 Subject: [PATCH 1/2] Adds book DRM --- code/modules/library/lib_machines.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 8fa7629863e..67c034e6039 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -150,6 +150,10 @@ GLOBAL_LIST_INIT(library_section_names, list("Any", "Fiction", "Non-Fiction", "A power_change() return if(istype(I, /obj/item/book)) + // NT with those pesky DRM schemes + if(istype(I, /obj/item/book/manual)) + atom_say("NT copyrighted material detected. Scanner is unable to copy book to memory.") + return FALSE user.drop_item() I.forceMove(src) return 1 From 1c1b4fa8c7733b98702fe4f0706000d8abf2ad72 Mon Sep 17 00:00:00 2001 From: AffectedArc07 Date: Thu, 23 Jul 2020 12:42:28 +0100 Subject: [PATCH 2/2] Makes book DRM apply to printed books --- code/game/objects/items/weapons/manuals.dm | 1 + code/modules/library/computers/checkout.dm | 1 + code/modules/library/lib_items.dm | 2 ++ code/modules/library/lib_machines.dm | 5 +++-- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index d91bb29ff76..bab2ff02fbb 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -5,6 +5,7 @@ icon = 'icons/obj/library.dmi' due_date = 0 // Game time in 1/10th seconds unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified + has_drm = TRUE // No reuploading. Piracy is a crime /obj/item/book/manual/engineering_construction diff --git a/code/modules/library/computers/checkout.dm b/code/modules/library/computers/checkout.dm index f9aae71b2a5..934234f645e 100644 --- a/code/modules/library/computers/checkout.dm +++ b/code/modules/library/computers/checkout.dm @@ -463,4 +463,5 @@ B.author = newbook.author B.dat = newbook.content B.icon_state = "book[rand(1,16)]" + B.has_drm = TRUE visible_message("[src]'s printer hums as it produces a completely bound book. How did it do that?") diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index a7dd148b51a..e74625c8715 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -151,6 +151,8 @@ var/carved = 0 // Has the book been hollowed out for use as a secret storage item? var/forbidden = 0 // Prevent ordering of this book. (0=no, 1=yes, 2=emag only) var/obj/item/store // What's in the book? + /// Book DRM. If this var is TRUE, it cannot be scanned and re-uploaded + var/has_drm = FALSE /obj/item/book/attack_self(var/mob/user as mob) if(carved) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 67c034e6039..0c23a0c5800 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -151,8 +151,9 @@ GLOBAL_LIST_INIT(library_section_names, list("Any", "Fiction", "Non-Fiction", "A return if(istype(I, /obj/item/book)) // NT with those pesky DRM schemes - if(istype(I, /obj/item/book/manual)) - atom_say("NT copyrighted material detected. Scanner is unable to copy book to memory.") + var/obj/item/book/B = I + if(B.has_drm) + atom_say("Copyrighted material detected. Scanner is unable to copy book to memory.") return FALSE user.drop_item() I.forceMove(src)