mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 03:49:10 +01:00
NTIRC Communicators (#11658)
This commit is contained in:
@@ -125,6 +125,8 @@ var/global/ntnrc_uid = 0
|
||||
/datum/ntnet_conversation/proc/cl_leave(var/datum/computer_file/program/chat_client/Cl)
|
||||
if(!istype(Cl) || !istype(Cl.my_user) || !(Cl.my_user in users) || !can_interact(Cl) || direct)
|
||||
return
|
||||
if(Cl.focused_conv == src)
|
||||
Cl.focused_conv = null
|
||||
var/datum/ntnet_message/leave/msg = new(Cl)
|
||||
Cl.my_user.channels.Remove(src)
|
||||
users.Remove(Cl.my_user)
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
for(var/obj/item/computer_hardware/CH in src.get_all_components())
|
||||
uninstall_component(null, CH)
|
||||
qdel(CH)
|
||||
listening_objects -= src
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
QDEL_NULL(listener)
|
||||
return ..()
|
||||
|
||||
@@ -319,3 +319,11 @@
|
||||
/obj/item/modular_computer/GetID()
|
||||
if(card_slot)
|
||||
return card_slot.stored_card
|
||||
|
||||
/obj/item/modular_computer/hear_talk(mob/M, text, verb, datum/language/speaking)
|
||||
if(Adjacent(M))
|
||||
var/datum/computer_file/program/chat_client/P = hard_drive.find_file_by_name("ntnrc_client")
|
||||
if(!P || (P.program_state == PROGRAM_STATE_KILLED && P.service_state == PROGRAM_STATE_KILLED))
|
||||
return
|
||||
if(P.focused_conv)
|
||||
P.focused_conv.cl_send(P, text, M)
|
||||
@@ -13,6 +13,8 @@
|
||||
silent = FALSE
|
||||
|
||||
var/datum/ntnet_user/my_user
|
||||
var/datum/ntnet_conversation/focused_conv
|
||||
|
||||
var/netadmin_mode = FALSE // Administrator mode (invisible to other users + bypasses passwords)
|
||||
var/set_offline = FALSE // appear "invisible"
|
||||
|
||||
@@ -62,6 +64,19 @@
|
||||
if(ishuman(user))
|
||||
user.visible_message("[SPAN_BOLD("\The [user]")] taps on [user.get_pronoun("his")] [computer.lexical_name]'s screen.")
|
||||
conv.cl_send(src, message, user)
|
||||
if(href_list["focus"])
|
||||
var/mob/living/user = usr
|
||||
var/datum/ntnet_conversation/conv = locate(href_list["focus"])
|
||||
if(istype(conv))
|
||||
if(ishuman(user))
|
||||
user.visible_message("[SPAN_BOLD("\The [user]")] taps on [user.get_pronoun("his")] [computer.lexical_name]'s screen.")
|
||||
if(focused_conv == conv)
|
||||
focused_conv = null
|
||||
listening_objects -= computer
|
||||
else
|
||||
focused_conv = conv
|
||||
listening_objects |= computer
|
||||
SSvueui.check_uis_for_change(src)
|
||||
if(href_list["join"])
|
||||
var/datum/ntnet_conversation/conv = locate(href_list["join"]["target"])
|
||||
var/password = href_list["join"]["password"]
|
||||
@@ -121,8 +136,7 @@
|
||||
if(ishuman(user))
|
||||
user.visible_message("[SPAN_BOLD("\The [user]")] taps on [user.get_pronoun("his")] [computer.lexical_name]'s screen.")
|
||||
conv.cl_send(src, message, user)
|
||||
|
||||
|
||||
|
||||
/datum/computer_file/program/chat_client/service_activate()
|
||||
. = ..()
|
||||
if(istype(my_user) && get_signal(NTNET_COMMUNICATION))
|
||||
@@ -220,7 +234,8 @@
|
||||
"direct" = Channel.direct,
|
||||
"password" = !!Channel.password,
|
||||
"can_interact" = can_interact,
|
||||
"can_manage" = can_manage
|
||||
"can_manage" = can_manage,
|
||||
"focused" = focused_conv == Channel ? TRUE : FALSE
|
||||
)
|
||||
if(can_interact)
|
||||
data["channels"][ref]["msg"] = Channel.messages
|
||||
|
||||
Reference in New Issue
Block a user