From 94df140755f9c9ae1c3f31016375cb582725a313 Mon Sep 17 00:00:00 2001 From: Kearel Date: Thu, 23 Jul 2015 23:48:26 -0500 Subject: [PATCH 1/5] Library changes -Added ability to build/dismantle book shelves using wood or a screwdriver, respectively. -Added ability to move book shelves using a wrench. -Added buttons to library computer to help sort the list of books available. --- code/modules/library/lib_items.dm | 17 +++++++++++++++++ code/modules/library/lib_machines.dm | 16 ++++++++++++---- code/modules/materials/material_recipes.dm | 1 + 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index f9292dc1b1..56bd0de81b 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -36,6 +36,22 @@ return else name = ("bookcase ([newname])") + else if(istype(O,/obj/item/weapon/wrench)) + playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) + user << (anchored ? "You unfasten the [src.name] from the floor." : "You secure the [src.name] to the floor.") + anchored = !anchored + else if(istype(O,/obj/item/weapon/screwdriver)) + playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1) + user << "You begin dismantling the [src.name]." + if(do_after(user,25)) + if(!src) return + user << "You dismantle the [src.name]." + var/obj/item/stack/w = new /obj/item/stack/material/wood(get_turf(src)) + w.amount = 3 + for(var/obj/item/weapon/book/b in contents) + b.loc = (get_turf(src)) + qdel(src) + else ..() @@ -81,6 +97,7 @@ icon_state = "book-5" + /obj/structure/bookcase/manuals/medical name = "Medical Manuals bookcase" diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index ac47fd706e..0dcbe1d35c 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -122,6 +122,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f density = 1 var/arcanecheckout = 0 var/screenstate = 0 // 0 - Main Menu, 1 - Inventory, 2 - Checked Out, 3 - Check Out a Book + var/sortby = "author" var/buffer_book var/buffer_mob var/upload_category = "Fiction" @@ -195,9 +196,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f else dat += {"(Order book by SS13BN)

- "} - - var/DBQuery/query = dbcon_old.NewQuery("SELECT id, author, title, category FROM library") +
AUTHORTITLECATEGORY
TITLEClose

" user << browse(dat, "window=library") onclose(user, "library") - + /obj/machinery/librarycomp/emag_act(var/remaining_charges, var/mob/user) if (src.density && !src.emagged) src.emagged = 1 @@ -389,6 +389,14 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f if(isnum(orderid)) var/nhref = "src=\ref[src];targetid=[orderid]" spawn() src.Topic(nhref, params2list(nhref), src) + if(href_list["sort"]) + switch(href_list["sort"]) + if("0") + sortby = "author" + if("1") + sortby = "title" + if("2") + sortby = "category" src.add_fingerprint(usr) src.updateUsrDialog() return diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm index 67e60fc4c4..50f1c5a605 100644 --- a/code/modules/materials/material_recipes.dm +++ b/code/modules/materials/material_recipes.dm @@ -104,6 +104,7 @@ recipes += new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1) recipes += new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0) recipes += new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1) + recipes += new/datum/stack_recipe("book shelf", /obj/structure/bookcase, 5, time = 15, one_per_turf = 1, on_floor = 1) /material/cardboard/generate_recipes() ..() From 4f3818e4089be26f7ac3fc5af76d1ebc1030eb4b Mon Sep 17 00:00:00 2001 From: Kearel Date: Fri, 24 Jul 2015 00:18:24 -0500 Subject: [PATCH 2/5] Modified bookshelf wood spawning code --- code/modules/library/lib_items.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 56bd0de81b..5ed8303265 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -46,8 +46,7 @@ if(do_after(user,25)) if(!src) return user << "You dismantle the [src.name]." - var/obj/item/stack/w = new /obj/item/stack/material/wood(get_turf(src)) - w.amount = 3 + new /obj/item/stack/material/wood(get_turf(src), amount = 3) for(var/obj/item/weapon/book/b in contents) b.loc = (get_turf(src)) qdel(src) From 7c6cd7b1e768241211568fe369eb180160e19fea Mon Sep 17 00:00:00 2001 From: Kearel Date: Sun, 26 Jul 2015 13:58:53 -0500 Subject: [PATCH 3/5] Further modifications --- code/modules/library/lib_items.dm | 7 +++---- code/modules/library/lib_machines.dm | 12 ++++-------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 5ed8303265..976b55f82e 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -38,14 +38,13 @@ name = ("bookcase ([newname])") else if(istype(O,/obj/item/weapon/wrench)) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) - user << (anchored ? "You unfasten the [src.name] from the floor." : "You secure the [src.name] to the floor.") + user << (anchored ? "You unfasten the [src] from the floor." : "You secure the [src] to the floor.") anchored = !anchored else if(istype(O,/obj/item/weapon/screwdriver)) playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1) - user << "You begin dismantling the [src.name]." + user << "You begin dismantling the [src]." if(do_after(user,25)) - if(!src) return - user << "You dismantle the [src.name]." + user << "You dismantle the [src]." new /obj/item/stack/material/wood(get_turf(src), amount = 3) for(var/obj/item/weapon/book/b in contents) b.loc = (get_turf(src)) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 0dcbe1d35c..1d82db431d 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -196,7 +196,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f else dat += {"(Order book by SS13BN)

- "} var/DBQuery/query = dbcon_old.NewQuery("SELECT id, author, title, category FROM library ORDER BY [sortby]") query.Execute() @@ -390,13 +390,9 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f var/nhref = "src=\ref[src];targetid=[orderid]" spawn() src.Topic(nhref, params2list(nhref), src) if(href_list["sort"]) - switch(href_list["sort"]) - if("0") - sortby = "author" - if("1") - sortby = "title" - if("2") - sortby = "category" + if(href_list["sort"] != "author" && href_list["sort"] != "title" && href_list["sort"] != "category") + return + sortby = href_list["sort"] src.add_fingerprint(usr) src.updateUsrDialog() return From ecaf43440bd90712b40ec61d67dcd3cd211579a0 Mon Sep 17 00:00:00 2001 From: Kearel Date: Sun, 26 Jul 2015 18:58:29 -0500 Subject: [PATCH 4/5] Paperbin Adds ability to pick up paperbin by dragging it on the player. --- code/modules/paperwork/paperbin.dm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 4ef6f1eef5..963243107f 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -17,7 +17,17 @@ if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr)))))) if(!istype(usr, /mob/living/carbon/slime) && !istype(usr, /mob/living/simple_animal)) if( !usr.get_active_hand() ) //if active hand is empty - attack_hand(usr, 1, 1) + var/mob/living/carbon/human/H = user + var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] + + if (H.hand) + temp = H.organs_by_name["l_hand"] + if(temp && !temp.is_usable()) + user << "You try to move your [temp.name], but cannot!" + return + + user << "You pick up the [src]." + user.put_in_hands(src) return From 93959dc83d6e8f6b0f83d88653e51039e617d8bc Mon Sep 17 00:00:00 2001 From: Kearel Date: Thu, 13 Aug 2015 01:16:00 -0500 Subject: [PATCH 5/5] Changelog + scrambled paper --- code/modules/library/lib_items.dm | 6 +++--- code/modules/library/lib_machines.dm | 4 +--- code/modules/paperwork/paper.dm | 13 +++++++++++++ html/changelogs/TheWelp-dev.yml | 6 ++++++ 4 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 html/changelogs/TheWelp-dev.yml diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 976b55f82e..44cde40ced 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -38,13 +38,13 @@ name = ("bookcase ([newname])") else if(istype(O,/obj/item/weapon/wrench)) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) - user << (anchored ? "You unfasten the [src] from the floor." : "You secure the [src] to the floor.") + user << (anchored ? "You unfasten \the [src] from the floor." : "You secure \the [src] to the floor.") anchored = !anchored else if(istype(O,/obj/item/weapon/screwdriver)) playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1) - user << "You begin dismantling the [src]." + user << "You begin dismantling \the [src]." if(do_after(user,25)) - user << "You dismantle the [src]." + user << "You dismantle \the [src]." new /obj/item/stack/material/wood(get_turf(src), amount = 3) for(var/obj/item/weapon/book/b in contents) b.loc = (get_turf(src)) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 1d82db431d..6f59a45f15 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -389,9 +389,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f if(isnum(orderid)) var/nhref = "src=\ref[src];targetid=[orderid]" spawn() src.Topic(nhref, params2list(nhref), src) - if(href_list["sort"]) - if(href_list["sort"] != "author" && href_list["sort"] != "title" && href_list["sort"] != "category") - return + if(href_list["sort"] in list("author", "title", "category")) sortby = href_list["sort"] src.add_fingerprint(usr) src.updateUsrDialog() diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index f72fa474fd..d7b41e80cb 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -107,6 +107,15 @@ return /obj/item/weapon/paper/attack_self(mob/living/user as mob) + if(user.a_intent == I_HURT) + if(icon_state == "scrap") + user.show_message("\The [src] is already crumpled.") + return + //crumple dat paper + info = stars(info,85) + user.visible_message("\The [user] crumples \the [src] into a ball!") + icon_state = "scrap" + return user.examinate(src) if(rigged && (Holiday == "April Fool's Day")) if(spam_flag == 0) @@ -442,6 +451,10 @@ B.update_icon() else if(istype(P, /obj/item/weapon/pen)) + if(icon_state == "scrap") + usr << "\The [src] is too crumpled to write on." + return + var/obj/item/weapon/pen/robopen/RP = P if ( istype(RP) && RP.mode == 2 ) RP.RenamePaper(user,src) diff --git a/html/changelogs/TheWelp-dev.yml b/html/changelogs/TheWelp-dev.yml new file mode 100644 index 0000000000..865e86ea0e --- /dev/null +++ b/html/changelogs/TheWelp-dev.yml @@ -0,0 +1,6 @@ +author: TheWelp +delete-after: True +changes: + - rscadd: "Bookcases are now movable/buildable/destroyable." + - rscadd: "Paper can now be crumpled by using in-hand while on hurt intent." + - rscadd: "Library Computer External Archive is now sortable."
TITLEAUTHORCATEGORY