Tanks will also keep up with who manipulated them last.

Tanks placed in canisters, scanned with PDA or other analysis tool will set the manipulated_by variable to whoever did so.

The idea is that this person is aware what's in the tank and will act accordingly when you press the internals HUD icon.

If the user was the last person to manipulate the tank (or it's not been manipulated) then the user is smart about selecting the proper tank.

If the user was not the last person to manipulate the tank then he is only checking the pressure gauge to see what tank is fullest that matches his species breath_type

If that tank has nasties in it, welp he is going to get a breathful of nasties.
This commit is contained in:
Ccomp5950
2013-12-03 23:01:42 -06:00
parent af11500762
commit 52d328623a
4 changed files with 16 additions and 5 deletions
@@ -1042,6 +1042,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(5)
if((istype(A, /obj/item/weapon/tank)) || (istype(A, /obj/machinery/portable_atmospherics)))
if(istype(A, /obj/item/weapon/tank))
var/obj/item/weapon/tank/t = A
t.manipulated_by = user.real_name
var/obj/icon = A
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [src] on \icon[icon] [A]"
@@ -15,7 +15,8 @@
var/distribute_pressure = ONE_ATMOSPHERE
var/integrity = 3
var/volume = 70
var/manipulated_by = null //Used by _onclick/hud/screen_objects.dm internals to determine if someone has messed with our tank or not.
//If they have and we haven't scanned it with the PDA or gas analyzer then we might just breath whatever they put in it.
/obj/item/weapon/tank/New()
..()
@@ -86,7 +87,7 @@
O << "\red [user] has used [W] on \icon[icon] [src]"
var/pressure = air_contents.return_pressure()
manipulated_by = user.real_name //This person is aware of the contents of the tank.
var/total_moles = air_contents.total_moles()
user << "\blue Results of analysis of \icon[icon]"
@@ -261,4 +262,4 @@
integrity--
else if(integrity < 3)
integrity++
integrity++