mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-23 12:06:22 +01:00
Merge remote-tracking branch 'origin/dev' into dev
Conflicts: code/modules/virus2/helpers.dm
This commit is contained in:
@@ -966,6 +966,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U.last_target_click = world.time
|
||||
var/t = input(U, "Please enter message", P.name, null) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
t = readd_quotes(t)
|
||||
if (!t || !istype(P))
|
||||
return
|
||||
if (!in_range(src, U) && loc != U)
|
||||
|
||||
@@ -117,10 +117,16 @@
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/mob/living/carbon/location = null
|
||||
|
||||
if(istype(loc, /obj/item/weapon/rig)) // check for tanks in rigs
|
||||
if(istype(loc.loc, /mob/living/carbon))
|
||||
location = loc.loc
|
||||
else if(istype(loc, /mob/living/carbon))
|
||||
location = loc
|
||||
|
||||
var/using_internal
|
||||
if(istype(loc,/mob/living/carbon))
|
||||
var/mob/living/carbon/location = loc
|
||||
if(istype(location))
|
||||
if(location.internal==src)
|
||||
using_internal = 1
|
||||
|
||||
@@ -133,9 +139,20 @@
|
||||
data["valveOpen"] = using_internal ? 1 : 0
|
||||
|
||||
data["maskConnected"] = 0
|
||||
if(istype(loc,/mob/living/carbon))
|
||||
var/mob/living/carbon/location = loc
|
||||
if(location.internal == src)
|
||||
|
||||
if(istype(location))
|
||||
var/mask_check = 0
|
||||
|
||||
if(location.internal == src) // if tank is current internal
|
||||
mask_check = 1
|
||||
else if(src in location) // or if tank is in the mobs possession
|
||||
if(!location.internal) // and they do not have any active internals
|
||||
mask_check = 1
|
||||
else if(istype(src.loc, /obj/item/weapon/rig) && src.loc in location) // or the rig is in the mobs possession
|
||||
if(!location.internal) // and they do not have any active internals
|
||||
mask_check = 1
|
||||
|
||||
if(mask_check)
|
||||
if(location.wear_mask && (location.wear_mask.flags & AIRTIGHT))
|
||||
data["maskConnected"] = 1
|
||||
else if(istype(location, /mob/living/carbon/human))
|
||||
|
||||
Reference in New Issue
Block a user