From e02831d5b1e2ddd578a357b1e02d64e5c06bf0d0 Mon Sep 17 00:00:00 2001 From: Xhuis Date: Thu, 12 Nov 2015 23:01:33 +0100 Subject: [PATCH] Reagents can no longer be determined by examining a reagent container without the proper apparatus. Silicons and ghosts can always see reagents. Science goggles now allow reagents to be seen on examine. In addition, chemists now start wearing them. The bartender has a pair that looks and functions like sunglasses. --- code/game/atoms.dm | 10 +++++++-- code/game/jobs/job/cargo_service.dm | 1 + code/game/jobs/job/medical.dm | 1 + code/modules/clothing/clothing.dm | 1 + code/modules/clothing/glasses/glasses.dm | 10 +++++++-- code/modules/clothing/spacesuits/hardsuit.dm | 2 ++ code/modules/mob/mob.dm | 22 +++++++++++++++++++- 7 files changed, 42 insertions(+), 5 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 2c2bf0e349e..8e1d0b2da09 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -186,8 +186,14 @@ Maxdistance is the longest range the beam will persist before it gives up. if(reagents && is_open_container()) //is_open_container() isn't really the right proc for this, but w/e user << "It contains:" if(reagents.reagent_list.len) - for(var/datum/reagent/R in reagents.reagent_list) - user << "[R.volume] units of [R.name]" + if(user.can_see_reagents()) //Show each individual reagent + for(var/datum/reagent/R in reagents.reagent_list) + user << "[R.volume] units of [R.name]" + else //Otherwise, just show the total volume + var/total_volume = 0 + for(var/datum/reagent/R in reagents.reagent_list) + total_volume += R.volume + user << "[total_volume] units of various reagents" else user << "Nothing." diff --git a/code/game/jobs/job/cargo_service.dm b/code/game/jobs/job/cargo_service.dm index 1eeca19eaa5..496aa1d9a38 100644 --- a/code/game/jobs/job/cargo_service.dm +++ b/code/game/jobs/job/cargo_service.dm @@ -111,6 +111,7 @@ Bartender /datum/outfit/job/bartender name = "Bartender" + glasses = /obj/item/clothing/glasses/sunglasses/reagent belt = /obj/item/device/pda/bar ears = /obj/item/device/radio/headset/headset_srv uniform = /obj/item/clothing/under/rank/bartender diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 4566d4fb2a7..e2f5df21dbe 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -98,6 +98,7 @@ Chemist /datum/outfit/job/chemist name = "Chemist" + glasses = /obj/item/clothing/glasses/science belt = /obj/item/device/pda/chemist ears = /obj/item/device/radio/headset/headset_med uniform = /obj/item/clothing/under/rank/chemist diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index ef0bd6cd590..884ec112dfc 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -17,6 +17,7 @@ var/obj/item/device/flashlight/F = null var/can_flashlight = 0 var/gang //Is this a gang outfit? + var/scan_reagents = 0 //Can the wearer see reagents while it's equipped? //Ears: currently only used for headsets and earmuffs /obj/item/clothing/ears diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 2de8b83742a..cf45cdfbdc4 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -32,10 +32,11 @@ sharpness = IS_SHARP /obj/item/clothing/glasses/science - name = "Science Goggles" - desc = "A pair of snazzy goggles used to protect against chemical spills. Fitted with an analyzer for scanning items." + name = "science goggles" + desc = "A pair of snazzy goggles used to protect against chemical spills. Fitted with an analyzer for scanning items and reagents." icon_state = "purple" item_state = "glasses" + scan_reagents = 1 //You can see reagents while wearing science goggles /obj/item/clothing/glasses/science/equipped(mob/user, slot) if(slot == slot_glasses) @@ -104,6 +105,11 @@ flash_protect = 1 tint = 1 +/obj/item/clothing/glasses/sunglasses/reagent + name = "beer goggles" + desc = "A pair of sunglasses outfitted with apparatus to scan reagents." + scan_reagents = 1 + /obj/item/clothing/glasses/sunglasses/garb desc = "Go beyond impossible and kick reason to the curb!" name = "black gar glasses" diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index f178e38289a..1e9bf5303a6 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -310,6 +310,7 @@ flash_protect = 0 flags_inv = HIDEMASK|HIDEEARS|HIDEEYES armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 50) + scan_reagents = 1 /obj/item/clothing/suit/space/hardsuit/medical icon_state = "hardsuit-medical" @@ -331,6 +332,7 @@ max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 100, bio = 100, rad = 60) var/obj/machinery/doppler_array/integrated/bomb_radar + scan_reagents = 1 /obj/item/clothing/head/helmet/space/hardsuit/rd/New() ..() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c8921d96e99..3163b7a5289 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1009,4 +1009,24 @@ var/list/slot_equipment_priority = list( \ //can the mob be unbuckled from something by default? /mob/proc/can_unbuckle() - return 1 \ No newline at end of file + return 1 + +//Can the mob see reagents inside of containers? +/mob/proc/can_see_reagents() + if(stat == DEAD) //Ghosts and such can always see reagents + return 1 + if(has_unlimited_silicon_privilege) //Silicons can automatically view reagents + return 1 + if(ishuman(src)) + var/mob/living/carbon/human/H = src + if(H.head && istype(H.head, /obj/item/clothing)) + var/obj/item/clothing/CL = H.head + if(CL.scan_reagents) + return 1 + if(H.wear_mask && H.wear_mask.scan_reagents) + return 1 + if(H.glasses && istype(H.glasses, /obj/item/clothing)) + var/obj/item/clothing/CL = H.glasses + if(CL.scan_reagents) + return 1 + return 0 \ No newline at end of file