some hints
This commit is contained in:
@@ -233,6 +233,12 @@
|
||||
|
||||
power_change()
|
||||
set_frequency(frequency)
|
||||
register_context()
|
||||
|
||||
/obj/machinery/airalarm/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
|
||||
. = ..()
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, locked ? "Unlock" : "Lock")
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/machinery/airalarm/Destroy()
|
||||
SSradio.remove_object(src, frequency)
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
var/on = FALSE
|
||||
var/interacts_with_air = FALSE
|
||||
|
||||
/obj/machinery/atmospherics/Initialize(mapload)
|
||||
. = ..()
|
||||
register_context()
|
||||
|
||||
/obj/machinery/atmospherics/examine(mob/user)
|
||||
. = ..()
|
||||
if(is_type_in_list(src, GLOB.ventcrawl_machinery) && isliving(user))
|
||||
@@ -48,6 +52,17 @@
|
||||
if(SEND_SIGNAL(L, COMSIG_CHECK_VENTCRAWL))
|
||||
. += "<span class='notice'>Alt-click to crawl through it.</span>"
|
||||
|
||||
/obj/machinery/atmospherics/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
|
||||
. = ..()
|
||||
|
||||
if(can_unwrench && held_item?.tool_behaviour == TOOL_WRENCH)
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Unfasten")
|
||||
. = CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
if(is_type_in_list(src, GLOB.ventcrawl_machinery) && isliving(user) && SEND_SIGNAL(user, COMSIG_CHECK_VENTCRAWL))
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, "Crawl into")
|
||||
. = CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/machinery/atmospherics/New(loc, process = TRUE, setdir)
|
||||
if(!isnull(setdir))
|
||||
setDir(setdir)
|
||||
|
||||
@@ -99,12 +99,13 @@
|
||||
has_sensor = BROKEN_SENSORS
|
||||
sensordamage = sensormaxintegrity
|
||||
|
||||
/obj/item/clothing/under/New()
|
||||
/obj/item/clothing/under/Initialize(mapload)
|
||||
if(sensor_flags & SENSOR_RANDOM)
|
||||
//make the sensor mode favor higher levels, except coords.
|
||||
sensor_mode = pick(SENSOR_OFF, SENSOR_LIVING, SENSOR_LIVING, SENSOR_VITALS, SENSOR_VITALS, SENSOR_VITALS, SENSOR_COORDS, SENSOR_COORDS)
|
||||
sensor_mode_intended = sensor_mode
|
||||
..()
|
||||
register_context()
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/under/equipped(mob/user, slot)
|
||||
..()
|
||||
@@ -360,5 +361,20 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/under/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
|
||||
. = ..()
|
||||
if (!(item_flags & IN_INVENTORY))
|
||||
return
|
||||
|
||||
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Set to highest sensor")
|
||||
if(attached_accessory)
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, "Remove [attached_accessory]")
|
||||
else
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, "Adjust [src]")
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/item/clothing/under/rank
|
||||
dying_key = DYE_REGISTRY_UNDER
|
||||
|
||||
@@ -36,6 +36,17 @@
|
||||
inserted_item = new inserted_item(src)
|
||||
else
|
||||
inserted_item = new /obj/item/pen(src)
|
||||
register_context()
|
||||
|
||||
/obj/item/modular_computer/tablet/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
|
||||
. = ..()
|
||||
if(can_have_pen)
|
||||
if(inserted_item)
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Remove [inserted_item]")
|
||||
. = CONTEXTUAL_SCREENTIP_SET
|
||||
else if(is_type_in_list(held_item, contained_item))
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Insert [held_item]")
|
||||
. = CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/item/modular_computer/tablet/proc/insert_pen(obj/item/pen)
|
||||
if(!usr.transferItemToLoc(pen, src))
|
||||
|
||||
@@ -290,6 +290,13 @@
|
||||
set_machine_stat(stat | MAINT)
|
||||
update_appearance()
|
||||
addtimer(CALLBACK(src, .proc/update), 5)
|
||||
register_context()
|
||||
|
||||
/obj/machinery/power/apc/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
|
||||
. = ..()
|
||||
if(operating)
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, locked ? "Unlock" : "Lock")
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/machinery/power/apc/Destroy()
|
||||
GLOB.apcs_list -= src
|
||||
|
||||
@@ -15,6 +15,16 @@
|
||||
var/ignore_flags = 0
|
||||
var/infinite = FALSE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/Initialize(mapload, vol)
|
||||
. = ..()
|
||||
register_item_context()
|
||||
|
||||
/obj/item/reagent_containers/add_item_context(obj/item/source, list/context, atom/target, mob/living/user)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Inject")
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/item/reagent_containers/hypospray/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -378,6 +388,23 @@
|
||||
if(start_vial)
|
||||
vial = new start_vial
|
||||
update_icon()
|
||||
register_context()
|
||||
register_item_context()
|
||||
|
||||
/obj/item/hypospray/mkii/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
|
||||
. = ..()
|
||||
// Did you know that clicking something while you're holding it is the same as attack_self()?
|
||||
if(vial && (held_item == src))
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Remove [vial]")
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Set to [mode ? "spray" : "inject"]")
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, "Set transfer amount")
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/item/hypospray/mkii/add_item_context(obj/item/source, list/context, atom/target, mob/living/user)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, mode ? "Inject" : "Spray")
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/item/hypospray/mkii/ComponentInitialize()
|
||||
. = ..()
|
||||
|
||||
@@ -349,6 +349,16 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("slapped")
|
||||
|
||||
/obj/item/surgical_drapes/Initialize(mapload)
|
||||
. = ..()
|
||||
register_item_context()
|
||||
|
||||
/obj/item/surgical_drapes/add_item_context(obj/item/source, list/context, atom/target, mob/living/user)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Prepare Surgery")
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/item/surgical_drapes/attack(mob/living/M, mob/user)
|
||||
if(!attempt_initiate_surgery(src, M, user))
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user