mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 20:13:45 +01:00
Reagent Scanner/Seeing
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
name = "clothing"
|
||||
var/list/species_restricted = null //Only these species can wear this kit.
|
||||
var/rig_restrict_helmet = 0 // Stops the user from equipping a rig helmet without attaching it to the suit first.
|
||||
var/scan_reagents = 0 //Can the wearer see reagents while it's equipped?
|
||||
|
||||
/*
|
||||
Sprites used when the clothing item is refit. This is done by setting icon_override.
|
||||
|
||||
@@ -78,11 +78,12 @@
|
||||
prescription_upgradable = 0
|
||||
|
||||
/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"
|
||||
prescription_upgradable = 0
|
||||
scan_reagents = 1 //You can see reagents while wearing science goggles
|
||||
|
||||
/obj/item/clothing/glasses/science/equipped(mob/user, slot)
|
||||
if(slot == slot_glasses)
|
||||
@@ -194,6 +195,11 @@
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/reagent
|
||||
name = "sunscanners"
|
||||
desc = "Strangely ancient technology used to help provide rudimentary eye color. Outfitted with apparatus to scan individual reagents."
|
||||
scan_reagents = 1
|
||||
|
||||
/obj/item/clothing/glasses/virussunglasses
|
||||
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Enhanced shielding blocks many flashes."
|
||||
name = "sunglasses"
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
on = !on
|
||||
icon_state = "rig[on]-[item_color]"
|
||||
|
||||
if(on)
|
||||
if(on)
|
||||
set_light(brightness_on)
|
||||
else
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_head()
|
||||
H.update_inv_head()
|
||||
|
||||
/obj/item/clothing/suit/space/rig
|
||||
name = "hardsuit"
|
||||
@@ -135,13 +135,13 @@
|
||||
boots.flags &= ~NODROP
|
||||
H.unEquip(boots)
|
||||
boots.forceMove(src)
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/rig/verb/toggle_helmet()
|
||||
set name = "Toggle Helmet"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!isliving(usr))
|
||||
if(!isliving(usr))
|
||||
return
|
||||
|
||||
if(!helmet)
|
||||
@@ -300,7 +300,7 @@
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot toggle your helmet while in this [user.loc]." //To prevent some lighting anomalities.
|
||||
return
|
||||
|
||||
|
||||
on = !on
|
||||
if(on)
|
||||
user << "<span class='notice'>You switch your helmet to travel mode. It will allow you to stand in zero pressure environments, at the cost of speed and armor.</span>"
|
||||
@@ -404,6 +404,7 @@
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
|
||||
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 50)
|
||||
flash_protect = 0
|
||||
scan_reagents = 1 //Generally worn by the CMO, so they'd get utility off of seeing reagents
|
||||
|
||||
/obj/item/clothing/suit/space/rig/medical
|
||||
icon_state = "rig-medical"
|
||||
|
||||
+11
-1
@@ -1442,4 +1442,14 @@ mob/proc/yank_out_object()
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
|
||||
/mob/proc/can_unbuckle(mob/user)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
|
||||
//Can the mob see reagents inside of containers?
|
||||
/mob/proc/can_see_reagents()
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
for(var/obj/item/clothing/C in H) //If they have some clothing equipped that lets them see reagents, they can see reagents
|
||||
if(C.scan_reagents)
|
||||
return 1
|
||||
return 0
|
||||
@@ -18,15 +18,6 @@
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
base_name = name
|
||||
|
||||
|
||||
examine(mob/user)
|
||||
if(..(user, 2))
|
||||
user << "\blue It contains:"
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
user << "\blue [src.reagents.total_volume] units of powder."
|
||||
else
|
||||
user << "\blue Nothing."
|
||||
|
||||
afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
else if (reagents.total_volume<=src.volume/4)
|
||||
user << "\blue \The [src] is almost empty!"
|
||||
else if (reagents.total_volume<=src.volume*0.66)
|
||||
user << "\blue \The [src] is half full!"
|
||||
user << "\blue \The [src] is half empty!" // Pessimism is the real order of the day.
|
||||
else if (reagents.total_volume<=src.volume*0.90)
|
||||
user << "\blue \The [src] is almost full!"
|
||||
else
|
||||
|
||||
@@ -49,11 +49,6 @@
|
||||
examine(mob/user)
|
||||
if(!..(user, 2))
|
||||
return
|
||||
user << "\blue It contains:"
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
user << "\blue [src.reagents.total_volume] units of liquid."
|
||||
else
|
||||
user << "\blue Nothing."
|
||||
if (!is_open_container())
|
||||
user << "\blue Airtight lid seals it completely."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user