From 52ab5abb0c206145181e3375144e6862b8b99fe9 Mon Sep 17 00:00:00 2001 From: Ty-Omaha Date: Wed, 12 Sep 2018 02:15:15 -0400 Subject: [PATCH 1/4] canvas removal --- code/game/objects/structures/artstuff.dm | 9 +++++++++ code/modules/research/designs/autolathe_designs.dm | 2 ++ 2 files changed, 11 insertions(+) diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 4d02555eac5..cc31699766d 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -72,6 +72,15 @@ var/global/list/globalBlankCanvases[AMT_OF_CANVASES] icon_state = "23x23" whichGlobalBackup = 4 +//HEY YOU +//ARE YOU READING THE CODE FOR CANVASES? +//ARE YOU AWARE THEY CRASH HALF THE SERVER WHEN SOMEONE DRAWS ON THEM... +//...AND NOBODY CAN FIGURE OUT WHY? +//THEN GO ON BRAVE TRAVELER +//TRY TO FIX THEM AND REMOVE THIS CODE +/obj/item/canvas/Initialize() + ..() + return INITIALIZE_HINT_QDEL //Delete on creation //Find the right size blank canvas /obj/item/canvas/proc/getGlobalBackup() diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index cbc6ad98582..f7ab0abbcb9 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -856,6 +856,7 @@ build_path = /obj/item/videocam category = list("initial", "Miscellaneous") +/* THESE ARE BROKEN AND CRASH EVERYONE. SEE code/game/objects/structures/artstuff.dm /datum/design/canvas name = "11px by 11px Canvas" id = "canvas" @@ -887,6 +888,7 @@ materials = list(MAT_METAL = 100) build_path = /obj/item/canvas/twentythreeXtwentythree category = list("initial", "Miscellaneous") +*/ /datum/design/logic_board name = "Logic Circuit" From 28acdb1e560720c624031d0824f87e75df93299d Mon Sep 17 00:00:00 2001 From: Ty-Omaha Date: Wed, 12 Sep 2018 02:40:32 -0400 Subject: [PATCH 2/4] removes canvases 2 fully removes it as per tiger's critique --- .../items/stacks/sheets/sheet_types.dm | 1 - code/game/objects/structures/artstuff.dm | 145 ------------------ code/modules/paperwork/frames.dm | 2 - 3 files changed, 148 deletions(-) delete mode 100644 code/game/objects/structures/artstuff.dm diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 5ef40ee25e8..36a9f4a6a87 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -170,7 +170,6 @@ var/global/list/datum/stack_recipe/wood_recipes = list( new /datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), new /datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), - new /datum/stack_recipe("easel", /obj/structure/easel, 3, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), new /datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50), new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10), diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm deleted file mode 100644 index cc31699766d..00000000000 --- a/code/game/objects/structures/artstuff.dm +++ /dev/null @@ -1,145 +0,0 @@ -/////////// -// EASEL // -/////////// - -/obj/structure/easel - name = "easel" - desc = "only for the finest of art!" - icon = 'icons/obj/artstuff.dmi' - icon_state = "easel" - density = 1 - burn_state = FLAMMABLE - burntime = 15 - var/obj/item/canvas/painting = null - -/obj/structure/easel/Destroy() - QDEL_NULL(painting) - return ..() - -//Adding canvases -/obj/structure/easel/attackby(var/obj/item/I, var/mob/user, params) - if(istype(I, /obj/item/canvas)) - var/obj/item/canvas/C = I - user.unEquip(C) - painting = C - C.loc = get_turf(src) - C.layer = layer+0.1 - user.visible_message("[user] puts \the [C] on \the [src].","You place \the [C] on \the [src].") - return - - ..() - - -//Stick to the easel like glue -/obj/structure/easel/Move() - var/turf/T = get_turf(src) - ..() - if(painting && painting.loc == T) //Only move if it's near us. - painting.loc = get_turf(src) - else - painting = null - - -////////////// -// CANVASES // -////////////// - -#define AMT_OF_CANVASES 4 //Keep this up to date or shit will break. - -//To safe memory on making /icons we cache the blanks.. -var/global/list/globalBlankCanvases[AMT_OF_CANVASES] - -/obj/item/canvas - name = "11px by 11px canvas" - desc = "Draw out your soul on this canvas! Only crayons can draw on it. Examine it to focus on the canvas." - icon = 'icons/obj/artstuff.dmi' - icon_state = "11x11" - burn_state = FLAMMABLE - var/whichGlobalBackup = 1 //List index - -/obj/item/canvas/nineteenXnineteen - name = "19px by 19px canvas" - icon_state = "19x19" - whichGlobalBackup = 2 - -/obj/item/canvas/twentythreeXnineteen - name = "23px by 19px canvas" - icon_state = "23x19" - whichGlobalBackup = 3 - -/obj/item/canvas/twentythreeXtwentythree - name = "23px by 23px canvas" - icon_state = "23x23" - whichGlobalBackup = 4 - -//HEY YOU -//ARE YOU READING THE CODE FOR CANVASES? -//ARE YOU AWARE THEY CRASH HALF THE SERVER WHEN SOMEONE DRAWS ON THEM... -//...AND NOBODY CAN FIGURE OUT WHY? -//THEN GO ON BRAVE TRAVELER -//TRY TO FIX THEM AND REMOVE THIS CODE -/obj/item/canvas/Initialize() - ..() - return INITIALIZE_HINT_QDEL //Delete on creation - -//Find the right size blank canvas -/obj/item/canvas/proc/getGlobalBackup() - . = null - if(globalBlankCanvases[whichGlobalBackup]) - . = globalBlankCanvases[whichGlobalBackup] - else - var/icon/I = icon(initial(icon),initial(icon_state)) - globalBlankCanvases[whichGlobalBackup] = I - . = I - - - -//One pixel increments -/obj/item/canvas/attackby(var/obj/item/I, var/mob/user, params) - //Click info - var/list/click_params = params2list(params) - var/pixX = text2num(click_params["icon-x"]) - var/pixY = text2num(click_params["icon-y"]) - - //Should always be true, otherwise you didn't click the object, but let's check because SS13~ - if(!click_params || !click_params["icon-x"] || !click_params["icon-y"]) - return - - var/icon/masterpiece = icon(icon,icon_state) - //Cleaning one pixel with a soap or rag - if(istype(I, /obj/item/soap) || istype(I, /obj/item/reagent_containers/glass/rag)) - //Pixel info created only when needed - var/thePix = masterpiece.GetPixel(pixX,pixY) - var/icon/Ico = getGlobalBackup() - if(!Ico) - qdel(masterpiece) - return - - var/theOriginalPix = Ico.GetPixel(pixX,pixY) - if(thePix != theOriginalPix) //colour changed - DrawPixelOn(theOriginalPix,pixX,pixY) - qdel(masterpiece) - return 1 - - //Drawing one pixel with a crayon - if(istype(I, /obj/item/toy/crayon)) - var/obj/item/toy/crayon/C = I - var/pix = masterpiece.GetPixel(pixX, pixY) - if(pix && pix != C.colour) // if the located pixel isn't blank (null)) - DrawPixelOn(C.colour, pixX, pixY) - qdel(masterpiece) - return 1 - - ..() - -//Clean the whole canvas -/obj/item/canvas/attack_self(var/mob/user) - if(!user) - return - var/icon/blank = getGlobalBackup() - if(blank) - //it's basically a giant etch-a-sketch - icon = blank - user.visible_message("[user] cleans the canvas.","You clean the canvas.") - -#undef AMT_OF_CANVASES \ No newline at end of file diff --git a/code/modules/paperwork/frames.dm b/code/modules/paperwork/frames.dm index c0455b872b2..9faffbcf8f5 100644 --- a/code/modules/paperwork/frames.dm +++ b/code/modules/paperwork/frames.dm @@ -35,8 +35,6 @@ icon_state = "[icon_base]-photo" else if(istype(displayed, /obj/structure/sign/poster)) icon_state = "[icon_base]-[(displayed.icon_state in wide_posters) ? "wposter" : "poster"]" - else if(istype(displayed, /obj/item/canvas)) - icon_state = "[icon_base]-canvas-[displayed.icon_state]" else icon_state = "[icon_base]-paper" From ae4e01586862085dd21750176fac22da3298aca9 Mon Sep 17 00:00:00 2001 From: Ty-Omaha Date: Wed, 12 Sep 2018 02:41:06 -0400 Subject: [PATCH 3/4] removes canvases 3 --- .../research/designs/autolathe_designs.dm | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index f7ab0abbcb9..5a54bf54005 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -856,40 +856,6 @@ build_path = /obj/item/videocam category = list("initial", "Miscellaneous") -/* THESE ARE BROKEN AND CRASH EVERYONE. SEE code/game/objects/structures/artstuff.dm -/datum/design/canvas - name = "11px by 11px Canvas" - id = "canvas" - build_type = AUTOLATHE - materials = list(MAT_METAL = 50) - build_path = /obj/item/canvas - category = list("initial", "Miscellaneous") - -/datum/design/canvas/nineteenXnineteen - name = "19px by 19px Canvas" - id = "canvas19x19" - build_type = AUTOLATHE - materials = list(MAT_METAL = 50) - build_path = /obj/item/canvas/nineteenXnineteen - category = list("initial", "Miscellaneous") - -/datum/design/canvas/twentythreeXnineteen - name = "23px by 19px Canvas" - id = "canvas23x19" - build_type = AUTOLATHE - materials = list(MAT_METAL = 70) - build_path = /obj/item/canvas/twentythreeXnineteen - category = list("initial", "Miscellaneous") - -/datum/design/canvas/twentythreeXtwentythree - name = "23px by 23px Canvas" - id = "canvas23x23" - build_type = AUTOLATHE - materials = list(MAT_METAL = 100) - build_path = /obj/item/canvas/twentythreeXtwentythree - category = list("initial", "Miscellaneous") -*/ - /datum/design/logic_board name = "Logic Circuit" id = "logic_board" From c101ebd30278215c0f8bf33230897e28b48cca38 Mon Sep 17 00:00:00 2001 From: Ty-Omaha Date: Wed, 12 Sep 2018 02:58:56 -0400 Subject: [PATCH 4/4] removes canvases 4 --- icons/obj/artstuff.dmi | Bin 2212 -> 0 bytes paradise.dme | 1 - 2 files changed, 1 deletion(-) delete mode 100644 icons/obj/artstuff.dmi diff --git a/icons/obj/artstuff.dmi b/icons/obj/artstuff.dmi deleted file mode 100644 index 13e8ee5ebea2d9b427133ab4ca19ba477ed10788..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2212 zcmV;V2wV4wP)V=-0C=2JR&a84_w-Y6@%7{?OD!tS%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