mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-22 19:46:36 +01:00
Merge branch 'dev' into ofDryingAndRacks
This commit is contained in:
@@ -464,7 +464,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
data["convo_job"] = sanitize(c["job"])
|
||||
break
|
||||
if(mode==41)
|
||||
data["manifest"] = data_core.get_manifest_json()
|
||||
data_core.get_manifest_json()
|
||||
|
||||
|
||||
if(mode==3)
|
||||
@@ -535,12 +535,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
nanoUI = data
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
if(ui)
|
||||
ui.load_cached_data(ManifestJSON)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400)
|
||||
// when the ui is first opened this is the data it will use
|
||||
|
||||
ui.load_cached_data(ManifestJSON)
|
||||
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
|
||||
@@ -61,6 +61,8 @@
|
||||
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
|
||||
overlays.Cut()
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/fork
|
||||
name = "fork"
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
user.put_in_hands(tape)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user as mob)
|
||||
/obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user)
|
||||
if(!istype(W, /obj/item/weapon/paper))
|
||||
return
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
w_class = 1
|
||||
layer = 4
|
||||
anchored = 1 //it's sticky, no you cant move it
|
||||
|
||||
|
||||
var/obj/item/weapon/stuck = null
|
||||
|
||||
/obj/item/weapon/ducttape/New()
|
||||
..()
|
||||
flags |= NOBLUDGEON
|
||||
|
||||
/obj/item/weapon/ducttape/examine(mob/user as mob)
|
||||
/obj/item/weapon/ducttape/examine(mob/user)
|
||||
return stuck.examine(user)
|
||||
|
||||
/obj/item/weapon/ducttape/proc/attach(var/obj/item/weapon/W)
|
||||
@@ -47,7 +47,7 @@
|
||||
name = W.name + " (taped)"
|
||||
overlays = W.overlays
|
||||
|
||||
/obj/item/weapon/ducttape/attack_self(mob/user as mob)
|
||||
/obj/item/weapon/ducttape/attack_self(mob/user)
|
||||
if(!stuck)
|
||||
return
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
overlays = null
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/ducttape/afterattack(var/A, mob/user as mob, flag, params)
|
||||
/obj/item/weapon/ducttape/afterattack(var/A, mob/user, flag, params)
|
||||
if(!in_range(user, A) || istype(A, /obj/machinery/door) || !stuck)
|
||||
return
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
var/dir_offset = 0
|
||||
if(target_turf != source_turf)
|
||||
dir_offset = get_dir(source_turf, target_turf)
|
||||
if(!(dir_offset in cardinal))
|
||||
user << "You cannot reach that from here." // can only place stuck papers in cardinal directions, to
|
||||
return // reduce papers around corners issue.
|
||||
|
||||
user.drop_from_inventory(src)
|
||||
forceMove(source_turf)
|
||||
|
||||
Reference in New Issue
Block a user