From c0333e8c947956d7381e116d5edfe841dce7a1d6 Mon Sep 17 00:00:00 2001 From: warior4356 Date: Sun, 11 Jul 2021 15:22:55 -0700 Subject: [PATCH 1/4] Adds blueprints and air analyzer to drones --- code/game/objects/items/blueprints.dm | 3 +++ code/modules/mob/living/silicon/robot/robot_modules.dm | 2 ++ 2 files changed, 5 insertions(+) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index a0ac1d735bc..be855a7cd28 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -340,4 +340,7 @@ desc = "A digital copy of the station blueprints stored in your memory." fluffnotice = "Intellectual Property of Nanotrasen. For use in engineering cyborgs only. Wipe from memory upon departure from the station." +/obj/item/areaeditor/blueprints/cyborg/drone + fluffnotice = "Intellectual Property of Nanotrasen. For use in maintence drones only. Wipe from memory upon storage." + /obj/item/areaeditor/blueprints/ce diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 4cda181ee4f..e3b366d4185 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -716,6 +716,8 @@ /obj/item/soap, /obj/item/t_scanner, /obj/item/rpd, + /obj/item/analyzer, + /obj/item/areaeditor/blueprints/cyborg/drone, /obj/item/stack/sheet/metal/cyborg, /obj/item/stack/rods/cyborg, /obj/item/stack/tile/plasteel/cyborg, From 612d7411b6890c0e91923e71c9ebcc346a0d866a Mon Sep 17 00:00:00 2001 From: warior4356 Date: Sun, 25 Jul 2021 02:38:16 -0700 Subject: [PATCH 2/4] Adds read only blueprints --- code/game/objects/items/blueprints.dm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index be855a7cd28..b880cf2f045 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -4,6 +4,7 @@ icon_state = "blueprints" attack_verb = list("attacked", "bapped", "hit") var/fluffnotice = "Nobody's gonna read this stuff!" + var/read_only = FALSE var/const/AREA_ERRNONE = 0 var/const/AREA_STATION = 1 @@ -39,7 +40,7 @@ if(..()) return if(href_list["create_area"]) - if(get_area_type()==AREA_SPACE) + if(get_area_type()==AREA_SPACE && !read_only) create_area() @@ -107,7 +108,8 @@ var/area/A = get_area() if(get_area_type() == AREA_STATION) . += "

According to [src], you are now in \"[sanitize(A.name)]\".

" - . += "

You may move an amendment to the drawing.

" + if(!read_only) + . += "

You may move an amendment to the drawing.

" if(!viewing) . += "

View structural data

" else @@ -122,7 +124,7 @@ /obj/item/areaeditor/blueprints/Topic(href, href_list) ..() if(href_list["edit_area"]) - if(get_area_type()!=AREA_STATION) + if(get_area_type() != AREA_STATION || read_only) // Never trust user input return edit_area() if(href_list["view_blueprints"]) @@ -189,6 +191,8 @@ /obj/item/areaeditor/proc/create_area() var/area_created = FALSE var/res = detect_room(get_turf(usr)) + if(read_only) // Sanity checks are good + return if(!istype(res,/list)) switch(res) if(ROOM_ERR_SPACE) @@ -237,6 +241,8 @@ var/area/A = get_area() var/prevname = "[sanitize(A.name)]" var/str = trim(stripped_input(usr,"New area name:", "Blueprint Editing", prevname, MAX_NAME_LEN)) + if(read_only) // Sanity checks are good + return if(!str || !length(str) || str==prevname) //cancel return if(length(str) > 50) @@ -342,5 +348,6 @@ /obj/item/areaeditor/blueprints/cyborg/drone fluffnotice = "Intellectual Property of Nanotrasen. For use in maintence drones only. Wipe from memory upon storage." + read_only = TRUE /obj/item/areaeditor/blueprints/ce From 0d05621ea2aad9635e118eea17c3760670565072 Mon Sep 17 00:00:00 2001 From: warior4356 Date: Sun, 25 Jul 2021 13:03:43 -0700 Subject: [PATCH 3/4] Added comment --- code/game/objects/items/blueprints.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index b880cf2f045..8a0afa2a953 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -40,7 +40,7 @@ if(..()) return if(href_list["create_area"]) - if(get_area_type()==AREA_SPACE && !read_only) + if(get_area_type()==AREA_SPACE && !read_only) // Never trust user input create_area() From fecd88b228182811273d06e60a86248e98a60ce9 Mon Sep 17 00:00:00 2001 From: warior4356 Date: Sat, 31 Jul 2021 16:32:23 -0700 Subject: [PATCH 4/4] Removes blueprints --- code/game/objects/items/blueprints.dm | 16 +++------------- .../mob/living/silicon/robot/robot_modules.dm | 1 - 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 8a0afa2a953..a0ac1d735bc 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -4,7 +4,6 @@ icon_state = "blueprints" attack_verb = list("attacked", "bapped", "hit") var/fluffnotice = "Nobody's gonna read this stuff!" - var/read_only = FALSE var/const/AREA_ERRNONE = 0 var/const/AREA_STATION = 1 @@ -40,7 +39,7 @@ if(..()) return if(href_list["create_area"]) - if(get_area_type()==AREA_SPACE && !read_only) // Never trust user input + if(get_area_type()==AREA_SPACE) create_area() @@ -108,8 +107,7 @@ var/area/A = get_area() if(get_area_type() == AREA_STATION) . += "

According to [src], you are now in \"[sanitize(A.name)]\".

" - if(!read_only) - . += "

You may move an amendment to the drawing.

" + . += "

You may move an amendment to the drawing.

" if(!viewing) . += "

View structural data

" else @@ -124,7 +122,7 @@ /obj/item/areaeditor/blueprints/Topic(href, href_list) ..() if(href_list["edit_area"]) - if(get_area_type() != AREA_STATION || read_only) // Never trust user input + if(get_area_type()!=AREA_STATION) return edit_area() if(href_list["view_blueprints"]) @@ -191,8 +189,6 @@ /obj/item/areaeditor/proc/create_area() var/area_created = FALSE var/res = detect_room(get_turf(usr)) - if(read_only) // Sanity checks are good - return if(!istype(res,/list)) switch(res) if(ROOM_ERR_SPACE) @@ -241,8 +237,6 @@ var/area/A = get_area() var/prevname = "[sanitize(A.name)]" var/str = trim(stripped_input(usr,"New area name:", "Blueprint Editing", prevname, MAX_NAME_LEN)) - if(read_only) // Sanity checks are good - return if(!str || !length(str) || str==prevname) //cancel return if(length(str) > 50) @@ -346,8 +340,4 @@ desc = "A digital copy of the station blueprints stored in your memory." fluffnotice = "Intellectual Property of Nanotrasen. For use in engineering cyborgs only. Wipe from memory upon departure from the station." -/obj/item/areaeditor/blueprints/cyborg/drone - fluffnotice = "Intellectual Property of Nanotrasen. For use in maintence drones only. Wipe from memory upon storage." - read_only = TRUE - /obj/item/areaeditor/blueprints/ce diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index e3b366d4185..73ad13885e9 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -717,7 +717,6 @@ /obj/item/t_scanner, /obj/item/rpd, /obj/item/analyzer, - /obj/item/areaeditor/blueprints/cyborg/drone, /obj/item/stack/sheet/metal/cyborg, /obj/item/stack/rods/cyborg, /obj/item/stack/tile/plasteel/cyborg,