Merge branch 'master' into changeling-update
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)
|
||||
|
||||
@@ -106,6 +106,10 @@
|
||||
sensor_mode_intended = sensor_mode
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/Initialize(mapload)
|
||||
. = ..()
|
||||
register_context()
|
||||
|
||||
/obj/item/clothing/under/equipped(mob/user, slot)
|
||||
..()
|
||||
if(adjusted)
|
||||
@@ -360,5 +364,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
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
///Cooldown for the Reset Lobby Menu HUD verb
|
||||
#define RESET_HUD_INTERVAL 15 SECONDS
|
||||
/mob/dead/new_player
|
||||
var/ready = 0
|
||||
var/spawning = 0//Referenced when you want to delete the new_player later on in the code.
|
||||
///Referenced when you want to delete the new_player later on in the code.
|
||||
var/spawning = 0
|
||||
|
||||
flags_1 = NONE
|
||||
|
||||
@@ -11,13 +14,16 @@
|
||||
hud_type = /datum/hud/new_player
|
||||
hud_possible = list()
|
||||
|
||||
var/mob/living/new_character //for instant transfer once the round is set up
|
||||
///For instant transfer once the round is set up
|
||||
var/mob/living/new_character
|
||||
|
||||
//Used to make sure someone doesn't get spammed with messages if they're ineligible for roles
|
||||
///Used to make sure someone doesn't get spammed with messages if they're ineligible for roles
|
||||
var/ineligible_for_roles = FALSE
|
||||
|
||||
//is there a result we want to read from the age gate
|
||||
///Is there a result we want to read from the age gate
|
||||
var/age_gate_result
|
||||
///Cooldown for the Reset Lobby Menu HUD verb
|
||||
COOLDOWN_DECLARE(reset_hud_cooldown)
|
||||
|
||||
/mob/dead/new_player/Initialize(mapload)
|
||||
if(client && SSticker.state == GAME_STATE_STARTUP)
|
||||
@@ -34,6 +40,7 @@
|
||||
. = ..()
|
||||
|
||||
GLOB.new_player_list += src
|
||||
add_verb(src, /mob/dead/new_player/proc/reset_menu_hud)
|
||||
|
||||
/mob/dead/new_player/Destroy()
|
||||
GLOB.new_player_list -= src
|
||||
@@ -351,6 +358,11 @@
|
||||
return
|
||||
to_chat(src, "<span class='notice'>Vote successful.</span>")
|
||||
|
||||
/mob/dead/new_player/get_status_tab_items()
|
||||
. = ..()
|
||||
if(!SSticker.HasRoundStarted()) //only show this when the round hasn't started yet
|
||||
. += "Readiness status: [ready ? "" : "Not "]Readied Up!"
|
||||
|
||||
//When you cop out of the round (NB: this HAS A SLEEP FOR PLAYER INPUT IN IT)
|
||||
/mob/dead/new_player/proc/make_me_an_observer()
|
||||
if(QDELETED(src) || !src.client)
|
||||
@@ -579,14 +591,14 @@
|
||||
if(job_datum && IsJobUnavailable(job_datum.title, TRUE) == JOB_AVAILABLE)
|
||||
// Get currently occupied slots
|
||||
var/num_positions_current = job_datum.current_positions
|
||||
|
||||
|
||||
// Get total slots that can be occupied
|
||||
var/num_positions_total = job_datum.total_positions
|
||||
|
||||
|
||||
// Change to lemniscate for infinite-slot jobs
|
||||
// This variable should only used to display text!
|
||||
num_positions_total = (num_positions_total == -1 ? "∞" : num_positions_total)
|
||||
|
||||
|
||||
var/command_bold = ""
|
||||
if(job in GLOB.command_positions)
|
||||
command_bold = " command"
|
||||
@@ -752,3 +764,21 @@
|
||||
|
||||
return FALSE //This is the only case someone should actually be completely blocked from antag rolling as well
|
||||
return TRUE
|
||||
|
||||
///Resets the Lobby Menu HUD, recreating and reassigning it to the new player
|
||||
/mob/dead/new_player/proc/reset_menu_hud()
|
||||
set name = "Reset Lobby Menu HUD"
|
||||
set category = "OOC"
|
||||
var/mob/dead/new_player/new_player = usr
|
||||
if(!COOLDOWN_FINISHED(new_player, reset_hud_cooldown))
|
||||
to_chat(new_player, span_warning("You must wait <b>[DisplayTimeText(COOLDOWN_TIMELEFT(new_player, reset_hud_cooldown))]</b> before resetting the Lobby Menu HUD again!"))
|
||||
return
|
||||
if(!new_player?.client)
|
||||
return
|
||||
COOLDOWN_START(new_player, reset_hud_cooldown, RESET_HUD_INTERVAL)
|
||||
qdel(new_player.hud_used)
|
||||
create_mob_hud()
|
||||
to_chat(new_player, span_info("Lobby Menu HUD reset. You may reset the HUD again in <b>[DisplayTimeText(RESET_HUD_INTERVAL)]</b>."))
|
||||
hud_used.show_hud(hud_used.hud_version)
|
||||
|
||||
#undef RESET_HUD_INTERVAL
|
||||
|
||||
@@ -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