From ec6e3183430bf63096438cf30301abbf8e5ea32d Mon Sep 17 00:00:00 2001 From: phil235 Date: Sat, 23 May 2015 16:03:48 +0200 Subject: [PATCH] Fixes extinguisher (w/safety off) spraying water when placed on a table. Fixes runtime when putting beaker in autolathe. Fixes spray can empty message appearing when placing it on a table. Fixes experimentor manual not having a title. Fixes runtime with engine goggles updating nearby objects visibility. Fixes runtime when looking at picture from the AI camera. Updating the 'can_be_placed_into' list for items so their afterattack don't do anything when placing them in experimentor, autolathe, destructive analyzer. Fixes soap starting to clean the table when placed on it. Fixes drinking glasses having capitalized names. --- code/game/objects/items.dm | 5 ++- code/game/objects/items/toys.dm | 2 +- .../game/objects/items/weapons/clown_items.dm | 2 +- .../objects/items/weapons/extinguisher.dm | 2 +- code/game/objects/items/weapons/janisigns.dm | 9 ---- code/game/objects/items/weapons/manuals.dm | 1 + .../clothing/glasses/engine_goggles.dm | 2 +- .../detectivework/footprints_and_rag.dm | 1 - .../drinks/drinks/drinkingglass.dm | 42 +++++++++---------- code/modules/paperwork/photography.dm | 11 ++--- .../reagents/reagent_containers/glass.dm | 3 ++ 11 files changed, 39 insertions(+), 41 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 9ed07a3fb24..c2ab2cabdf9 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -71,7 +71,10 @@ /obj/structure/closet, /obj/item/weapon/storage, /obj/structure/safe, - /obj/machinery/disposal + /obj/machinery/disposal, + /obj/machinery/r_n_d/destructive_analyzer, + /obj/machinery/r_n_d/experimentor, + /obj/machinery/autolathe ) /obj/item/proc/check_allowed_items(atom/target, not_inside) if((src in target) || ((!istype(target.loc, /turf)) && (!istype(target, /turf)) && (not_inside)) || is_type_in_list(target, can_be_placed_into)) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 54a982ced76..9cca4b143ee 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -399,7 +399,7 @@ update_window(usr) /obj/item/toy/crayon/afterattack(atom/target, mob/user as mob, proximity) - if(!proximity) return + if(!proximity || !check_allowed_items(target)) return if(!uses) user << "There is no more of [src.name] left!" if(!instant) diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index f67f6013119..f2681b01489 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -41,7 +41,7 @@ M.slip(4, 2, src) /obj/item/weapon/soap/afterattack(atom/target, mob/user as mob, proximity) - if(!proximity) + if(!proximity || !check_allowed_items(target)) return //I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing. //So this is a workaround. This also makes more sense from an IC standpoint. ~Carn diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 398d8668258..2dfa4b44c66 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -77,7 +77,7 @@ /obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag) //TODO; Add support for reagents in water. - if(target.loc == user)//No more spraying yourself when putting your extinguisher away + if(target.loc == user || !check_allowed_items(target)) //No more spraying yourself when putting your extinguisher away return var/Refill = AttemptRefill(target, user) if(Refill) diff --git a/code/game/objects/items/weapons/janisigns.dm b/code/game/objects/items/weapons/janisigns.dm index 3844bff42ad..48fd898b696 100644 --- a/code/game/objects/items/weapons/janisigns.dm +++ b/code/game/objects/items/weapons/janisigns.dm @@ -12,15 +12,6 @@ origin_tech = "programming=3" var/list/signs = list() var/max_signs = 10 - can_be_placed_into = list( - /obj/machinery/r_n_d/destructive_analyzer, - /obj/structure/table, - /obj/structure/rack, - /obj/structure/closet, - /obj/item/weapon/storage, - /obj/structure/safe, - /obj/machinery/disposal - ) /obj/item/weapon/holosign_creator/afterattack(atom/target, mob/user, flag) if(flag) diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index 5136e6073d2..7e69597ba3d 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -287,6 +287,7 @@ name = "Mentoring your Experiments" icon_state = "rdbook" author = "Dr. H.P. Kritz" + title = "Mentoring your Experiments" dat = {"