diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index d3b9c46cfd3..00b4a870bfe 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -84,6 +84,7 @@ GLOBAL_LIST_INIT(metal_recipes, list( new /datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), new /datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), new /datum/stack_recipe("storage shelf", /obj/structure/shelf, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), + new /datum/stack_recipe("metal bookcase", /obj/structure/bookcase/metal, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), new /datum/stack_recipe("gun rack", /obj/structure/gunrack, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), null, new /datum/stack_recipe_list("airlock assemblies", list( @@ -186,6 +187,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list( new /datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 3, time = 5 SECONDS), new /datum/stack_recipe("Surgery Table", /obj/machinery/optable, 5, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), new /datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 5 SECONDS, one_per_turf = TRUE), + new /datum/stack_recipe("military bookcase", /obj/structure/bookcase/military, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), new /datum/stack_recipe("Mass Driver frame", /obj/machinery/mass_driver_frame, 3, time = 5 SECONDS, one_per_turf = TRUE), new /datum/stack_recipe("hardened wheelchair", /obj/structure/chair/wheelchair/plasteel, 15, time = 6 SECONDS, one_per_turf = TRUE, on_floor = TRUE), null, diff --git a/code/modules/library/library_equipment.dm b/code/modules/library/library_equipment.dm index 38b9038220e..f4cb1252880 100644 --- a/code/modules/library/library_equipment.dm +++ b/code/modules/library/library_equipment.dm @@ -10,7 +10,7 @@ /obj/structure/bookcase name = "bookcase" icon = 'icons/obj/library.dmi' - icon_state = "bookshelf-0" + icon_state = "bookshelf" anchored = TRUE density = TRUE opacity = TRUE @@ -18,6 +18,7 @@ max_integrity = 200 armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 50, ACID = 0) var/list/allowed_books = list(/obj/item/book, /obj/item/spellbook, /obj/item/storage/bible, /obj/item/tome) //Things allowed in the bookcase + var/material_type = /obj/item/stack/sheet/wood /obj/structure/bookcase/Initialize(mapload) . = ..() @@ -29,14 +30,14 @@ for(var/obj/item/I in get_turf(src)) if(is_type_in_list(I, allowed_books)) I.forceMove(src) - update_icon(UPDATE_ICON_STATE) + update_icon(UPDATE_OVERLAYS) /obj/structure/bookcase/attackby__legacy__attackchain(obj/item/O, mob/user) if(is_type_in_list(O, allowed_books)) if(!user.drop_item()) return O.forceMove(src) - update_icon(UPDATE_ICON_STATE) + update_icon(UPDATE_OVERLAYS) return TRUE if(istype(O, /obj/item/storage/bag/books)) var/obj/item/storage/bag/books/B = O @@ -44,7 +45,7 @@ if(is_type_in_list(T, allowed_books)) B.remove_from_storage(T, src) to_chat(user, "You empty [O] into [src].") - update_icon(UPDATE_ICON_STATE) + update_icon(UPDATE_OVERLAYS) return TRUE if(is_pen(O)) rename_interactive(user, O) @@ -65,17 +66,19 @@ user.put_in_hands(choice) else choice.forceMove(get_turf(src)) - update_icon(UPDATE_ICON_STATE) + update_icon(UPDATE_OVERLAYS) /obj/structure/bookcase/deconstruct(disassembled = TRUE) - new /obj/item/stack/sheet/wood(loc, 5) + new material_type(get_turf(src), 5) for(var/obj/item/I in contents) if(is_type_in_list(I, allowed_books)) I.forceMove(get_turf(src)) ..() -/obj/structure/bookcase/update_icon_state() - icon_state = "bookshelf-[min(length(contents), 5)]" +/obj/structure/bookcase/update_overlays() + . = ..() + if(length(contents)) + . += "[icon_state]-[min(length(contents), 5)]" /obj/structure/bookcase/screwdriver_act(mob/user, obj/item/I) @@ -101,7 +104,7 @@ /obj/structure/bookcase/manuals/medical/Initialize(mapload) . = ..() new /obj/item/book/manual/medical_cloning(src) - update_icon(UPDATE_ICON_STATE) + update_icon(UPDATE_OVERLAYS) /obj/structure/bookcase/manuals/engineering @@ -115,7 +118,7 @@ new /obj/item/book/manual/wiki/engineering_guide(src) new /obj/item/book/manual/engineering_singularity_safety(src) new /obj/item/book/manual/wiki/robotics_cyborgs(src) - update_icon(UPDATE_ICON_STATE) + update_icon(UPDATE_OVERLAYS) /obj/structure/bookcase/manuals/research_and_development name = "R&D Manuals bookcase" @@ -123,7 +126,7 @@ /obj/structure/bookcase/manuals/research_and_development/Initialize(mapload) . = ..() new /obj/item/book/manual/research_and_development(src) - update_icon(UPDATE_ICON_STATE) + update_icon(UPDATE_OVERLAYS) /obj/structure/bookcase/sop name = "bookcase (Standard Operating Procedures)" @@ -139,7 +142,7 @@ new /obj/item/book/manual/wiki/sop_security(src) new /obj/item/book/manual/wiki/sop_service(src) new /obj/item/book/manual/wiki/sop_supply(src) - update_icon(UPDATE_ICON_STATE) + update_icon(UPDATE_OVERLAYS) /obj/structure/bookcase/random var/category = null @@ -155,7 +158,19 @@ var/list/books = GLOB.library_catalog.get_random_book(book_count) for(var/datum/cachedbook/book as anything in books) new /obj/item/book(src, book, TRUE, FALSE) - update_icon(UPDATE_ICON_STATE) + update_icon(UPDATE_OVERLAYS) + +/obj/structure/bookcase/metal + icon_state = "bookshelf_metal" + material_type = /obj/item/stack/sheet/metal + +/obj/structure/bookcase/nt + icon_state = "bookshelf_nt" + material_type = /obj/item/stack/sheet/metal + +/obj/structure/bookcase/military + icon_state = "bookshelf_military" + material_type = /obj/item/stack/sheet/plasteel /* * Book binder diff --git a/icons/obj/library.dmi b/icons/obj/library.dmi index 7b8e4a277aa..49743c8f21d 100644 Binary files a/icons/obj/library.dmi and b/icons/obj/library.dmi differ