diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 8bdc6b87243..bcbe7a07e5d 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -22,7 +22,7 @@ var/defaultmsg = "Welcome. Please select an option." var/rebootmsg = "%$&(£: Critical %$$@ Error // !RestArting! - ?pLeaSe wAit!" //Computer properties - var/screen = 0 // 0 = Main menu, 1 = Message Logs, 2 = Hacked screen, 3 = Custom Message, 4 = chat room selection, 5 = chat room logs + var/screen = 0 // 0 = Main menu, 1 = Message Logs, 2 = Hacked screen, 3 = Custom Message var/hacking = 0 // Is it being hacked into by the AI/Cyborg var/emag = 0 // When it is emagged. var/message = "System bootup complete. Please select an option." // The message that shows on the main menu. @@ -33,7 +33,6 @@ var/obj/item/pda/customrecepient = null var/customjob = "Admin" var/custommessage = "This is a test, please ignore." - var/datum/chatroom/current_chatroom = null light_color = LIGHT_COLOR_DARKGREEN @@ -129,7 +128,6 @@ dat += "
[++i]. Clear Request Console Logs
" dat += "
[++i]. Set Custom Key
" dat += "
[++i]. Send Admin Message
" - dat += "
[++i]. View Chatrooms
" else for(var/n = ++i; n <= optioncount; n++) dat += "
[n]. ---------------
" @@ -247,42 +245,6 @@ dat += {"
X
[rc.send_dpt] [rc.rec_dpt][rc.message][rc.stamp][rc.id_auth][rc.priority]"} dat += "" - //Chat room list - if(5) - dat += "
Back - Refresh

" - dat += {" - - - - - - "} - for(var/datum/chatroom/C in chatrooms) - var/list/invites = (C.invites - C.users) - dat += {" - - - - - "} - dat += "
Room NameUsersInvitesMessages
[C.name][C.users.len][invites.len][C.logs.len]
" - //View chat room logs - if(6) - dat += "
Back - Refresh

" - dat += {" - - - - "} - if(current_chatroom) - for(var/M in current_chatroom.logs) - var/list/message = M - dat += {" - - - "} - dat += "
NameMessage
[message["username"]][message["message"]]
" - dat += "" message = defaultmsg user << browse(dat, "window=message;size=700x700") @@ -520,19 +482,6 @@ if(href_list["back"]) src.screen = 0 - // View chat room list - if(href_list["chatroom"]) - if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) - message = noserver - else if(auth) - screen = 5 - if(href_list["viewroom"]) - if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) - message = noserver - else if(auth) - current_chatroom = locate(href_list["viewroom"]) - if(current_chatroom) - screen = 6 return src.attack_hand(usr) diff --git a/code/modules/awaymissions/snpc.dm b/code/modules/awaymissions/snpc.dm index bd7046e3b2c..0b0de76ead3 100644 --- a/code/modules/awaymissions/snpc.dm +++ b/code/modules/awaymissions/snpc.dm @@ -18,8 +18,6 @@ ..() var/datum/data/pda/app/messenger/M = MYPDA.find_program(/datum/data/pda/app/messenger) M.toff = 1 - var/datum/data/pda/app/chatroom/C = MYPDA.find_program(/datum/data/pda/app/chatroom) - C.toff = 1 /mob/living/carbon/human/interactive/away/job2area() return away_area diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index d24518d4888..d28ce620a0c 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -114,8 +114,6 @@ pda.name = pda.owner + " (" + pda.ownjob + ")" var/datum/data/pda/app/messenger/M = pda.find_program(/datum/data/pda/app/messenger) M.toff = 1 - var/datum/data/pda/app/chatroom/C = pda.find_program(/datum/data/pda/app/chatroom) - C.toff = 1 ..() /mob/living/silicon/pai/Destroy() diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index bf9e4eeab0d..48c1c1d7d10 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -226,123 +226,6 @@ M.create_message(P, target, 1) return 1 -/datum/pai_software/chatroom - name = "Digital Chatroom" - ram_cost = 5 - id = "chatroom" - toggle = 0 - - autoupdate = 1 - template_file = "pai_chatroom.tmpl" - ui_title = "Digital Chatroom" - -/datum/pai_software/chatroom/on_ui_data(mob/living/silicon/pai/user, datum/topic_state/state = self_state) - var/data[0] - - if(!user.pda) - log_runtime(EXCEPTION("pAI found without PDA."), user) - return data - var/datum/data/pda/app/chatroom/M = user.pda.find_program(/datum/data/pda/app/chatroom) - if(!M) - log_runtime(EXCEPTION("pAI PDA lacks a chatroom program"), user) - return data - - data["receiver_off"] = M.toff - data["ringer_off"] = M.notify_silent - - var/list/rooms[0] - for(var/datum/chatroom/c in chatrooms) - if((M in c.users) || (M in c.invites) || c.is_public) - rooms += list(list(name = "[c]", ref = "\ref[c]")) - data["rooms"] = rooms - - if(M.disconnected || !M.messaging_available(1)) - data["disconnected"] = 1 - else if(M.current_room) - data["current_room"] = "\ref[M.current_room]" - data["current_room_name"] = M.current_room.name - data["current_room_topic"] = M.current_room.topic - data["messages"] = M.current_room.logs - var/list/users[0] - for(var/U in M.current_room.users) - var/datum/data/pda/app/chatroom/ch = U - users += "[ch.pda.owner]" - for(var/U in (M.current_room.invites - M.current_room.users)) - var/datum/data/pda/app/chatroom/ch = U - users += "[ch.pda.owner]" - data["users"] = users - - return data - -/datum/pai_software/chatroom/Topic(href, href_list) - var/mob/living/silicon/pai/P = usr - if(!istype(P)) - return - - if(!isnull(P.pda) && P.pda.can_use()) - var/datum/data/pda/app/chatroom/M = P.pda.find_program(/datum/data/pda/app/chatroom) - if(!M) - return - - if(href_list["toggler"]) - M.toff = href_list["toggler"] != "1" - return 1 - else if(href_list["ringer"]) - M.notify_silent = href_list["ringer"] != "1" - return 1 - else if(href_list["topic"]) - if(!M.current_room) - return 1 - - var/t = input("Enter new topic:", M.current_room, M.current_room.topic) as text|null - spawn() - if(!t || !M.check_messaging_available() || !P.pda.can_use()) - return - t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) - t = readd_quotes(t) - if(!t) - return - - M.current_room.topic = t - M.current_room.announce(M, "Topic has been changed to '[t]' by [P.pda.owner].") - return 1 - else if(href_list["select"]) - var/s = href_list["select"] - if(s == "*NONE*") - M.current_room = null - else - var/datum/chatroom/CR = locate(s) - if(istype(CR)) - if(!(M in CR.users)) - if(!CR.login(M)) - return - M.current_room = CR - return 1 - else if(href_list["target"]) - if(P.silence_time) - return alert("Communications circuits remain uninitialized.") - - var/datum/chatroom/target = locate(href_list["target"]) - if(istype(target)) - if(!(M in target.users)) - if(!target.login(M)) - return - var/t = input("Please enter message", target) as text|null - spawn() - if(!t || !M.check_messaging_available()) - return - t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) - t = readd_quotes(t) - if(!t || !P.pda.can_use()) - return - - target.post(M, t) - return 1 - else if(href_list["reconnect"]) - spawn() - M.messaging_available() - return 1 - /datum/pai_software/med_records name = "Medical Records" ram_cost = 15 diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index 703ec2bd628..38422a89528 100755 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -44,7 +44,6 @@ var/global/list/obj/item/pda/PDAs = list() new/datum/data/pda/app/notekeeper, new/datum/data/pda/app/messenger, new/datum/data/pda/app/manifest, - new/datum/data/pda/app/chatroom, new/datum/data/pda/app/atmos_scanner, new/datum/data/pda/utility/scanmode/notes, new/datum/data/pda/utility/flashlight) diff --git a/code/modules/pda/chatroom.dm b/code/modules/pda/chatroom.dm deleted file mode 100644 index ef9027b888c..00000000000 --- a/code/modules/pda/chatroom.dm +++ /dev/null @@ -1,265 +0,0 @@ -var/list/chatrooms = list(new /datum/chatroom("General Discussion")) - -/datum/chatroom - var/name = "Generic Chatroom" - var/list/users = list() - var/list/invites = list() - var/list/logs = list() // chat logs - var/topic = "Discussion" // topic message for the chatroom - var/is_public = 1 - var/announcer = "CyberiadAI" - -/datum/chatroom/New(n) - name = n - -/datum/chatroom/proc/post(user, message, username) - if(!user || !message) - return - - if(!username) - if(istype(user, /datum/data/pda/app/chatroom)) - var/datum/data/pda/app/chatroom/c = user - if(!c.pda.owner) - return - username = c.pda.owner - else - return - - logs += list(list(username = username, message = message)) - - for(var/datum/data/pda/app/chatroom/u in users) - spawn() - if(u.messaging_available() && !u.toff && user != u) - u.notify("Post from [username] in #[name], \"[message]\" (
Post)") - -/datum/chatroom/proc/announce(user, message) - post(user, "[message]", announcer) - -/datum/chatroom/proc/login(datum/data/pda/app/chatroom/user) - if(!user || !user.pda.owner) - return 0 - - if(user in users) - return 1 - - if(!is_public && !(user in invites)) - return 0 - - users |= user - announce(user, "[user.pda.owner] has entered #[name].") - return 1 - -/datum/chatroom/proc/logout(datum/data/pda/app/chatroom/user) - if(!user || !user.pda.owner || !(user in users)) - return - - users -= user - invites -= user - announce(user, "[user.pda.owner] has left #[name].") - -/datum/data/pda/app/chatroom - name = "Chatbuddy" - icon = "hashtag" - notify_icon = "comments" - template = "pda_chatroom" - var/toff = 0 - var/datum/chatroom/current_room = null - var/inviting = 0 - var/channels_created = 0 - var/max_channels_created = 3 - var/latest_post = 0 - var/auto_scroll = 1 - var/disconnected = 0 - -/datum/data/pda/app/chatroom/Destroy() - for(var/C in chatrooms) - var/datum/chatroom/ch = C - if(src in ch.users) - ch.users -= src - if(src in ch.invites) - ch.invites -= src - return ..() - -/datum/data/pda/app/chatroom/start() - . = ..() - unnotify() - latest_post = 0 - -/datum/data/pda/app/chatroom/update_ui(mob/user as mob, list/data) - data["silent"] = notify_silent - data["toff"] = toff - if(disconnected || !messaging_available(1)) - data["no_server"] = 1 - has_back = 0 - else if(current_room) - data["room"] = current_room.name - data["topic"] = current_room.topic - if(inviting) - data["inviting"] = 1 - var/list/pdas = list() - for(var/A in PDAs) - var/obj/item/pda/P = A - var/datum/data/pda/app/chatroom/C = P.find_program(/datum/data/pda/app/chatroom) - var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger) - - if(!P.owner || P == pda || PM.m_hidden || (C in current_room.invites) || (C in current_room.users)) - continue - pdas += list(list(name = "[P.owner] ([P.ownjob])", ref = "\ref[C]")) - data["people"] = pdas - else - data["history"] = current_room.logs - var/list/users[0] - for(var/U in current_room.users) - var/datum/data/pda/app/chatroom/ch = U - users += "[ch.pda.owner]" - for(var/U in (current_room.invites - current_room.users)) - var/datum/data/pda/app/chatroom/ch = U - users += "[ch.pda.owner]" - data["users"] = users - data["auto_scroll"] = auto_scroll - data["latest_post"] = latest_post - latest_post = current_room.logs.len - has_back = 1 - else - var/list/rooms[0] - for(var/datum/chatroom/c in chatrooms) - if((src in c.users) || (src in c.invites) || c.is_public) - rooms += list(list(name = "[c]", ref = "\ref[c]")) - data["rooms"] = rooms - has_back = 0 - -/datum/data/pda/app/chatroom/proc/messaging_available(cheap = 0) - . = 0 - if(message_servers) - for(var/A in message_servers) - var/obj/machinery/message_server/MS = A - if(MS.active) - . = cheap || pda.test_telecomms() - disconnected = !. - -/datum/data/pda/app/chatroom/proc/check_messaging_available() - . = messaging_available() - if(!.) - to_chat(usr, "ERROR: Messaging server is not responding.") - -/datum/data/pda/app/chatroom/Topic(href, list/href_list) - if(!pda.can_use()) - return - unnotify() - - switch(href_list["choice"]) - if("Toggle Chatroom") - toff = !toff - if("Toggle Ringer") - notify_silent = !notify_silent - if("Back") - if(inviting) - inviting = 0 - else - current_room = null - latest_post = 0 - if("Join") - if(href_list["room"]) - current_room = locate(href_list["room"]) - if(!(src in current_room.users)) - if(!current_room.login(src)) - current_room = null - latest_post = 0 - if("Post") - var/datum/chatroom/target - if(href_list["target"]) - target = locate(href_list["target"]) - else - target = current_room - - if(!target) - return - - var/t = input("Please enter message", target) as text|null - spawn() - if(!t || !check_messaging_available()) - return - t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) - t = readd_quotes(t) - if(!t || !pda.can_use()) - return - - target.post(src, t) - if("Topic") - if(!current_room) - return - - var/t = input("Enter new topic:", current_room, current_room.topic) as text|null - spawn() - if(!t || !check_messaging_available() || !pda.can_use()) - return - t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) - t = readd_quotes(t) - if(!t) - return - - current_room.topic = t - current_room.announce(src, "Topic has been changed to '[t]' by [pda.owner].") - if("Leave") - if(!current_room) - return - - current_room.logout(src) - current_room = null - latest_post = 0 - if("Invite") - if(!current_room) - return - - inviting = 1 - if("Invite PDA") - spawn() - if(!check_messaging_available() || !current_room || !href_list["user"]) - return - - var/datum/data/pda/app/chatroom/C = locate(href_list["user"]) - if(C) - current_room.invites |= C - spawn() - if(C.messaging_available() && !C.toff) - C.notify("Invite to #[current_room] (Join)") - if("New Room") - if(channels_created >= max_channels_created) - alert("This PDA has already reached its maximum channels created.", name) - return - - var/t = input("Enter room name:", name) as text|null - if(!t) - return - t = sanitize(copytext(t, 1, MAX_NAME_LEN)) - t = readd_quotes(t) - - var/access = input("Room access?", current_room) as null|anything in list("Public", "Private") - if(!access) - return - - spawn() - if(!t || !check_messaging_available() || !pda.can_use()) - return - - // check if already taken - for(var/datum/chatroom/C in chatrooms) - if(C.name == t) - alert("Channel with that name already exists.", name) - return - - channels_created++ - current_room = new /datum/chatroom(t) - chatrooms += current_room - latest_post = 0 - - current_room.invites |= src - current_room.is_public = access == "Public" - current_room.login(src) - if(!current_room.is_public) - current_room.announce(src, "Users must be invited to join this room.") - if("Autoscroll") - auto_scroll = !auto_scroll - if("Reconnect") - spawn() - messaging_available() \ No newline at end of file diff --git a/code/modules/pda/messenger_plugins.dm b/code/modules/pda/messenger_plugins.dm index 7e228445d3f..2666b82c5df 100644 --- a/code/modules/pda/messenger_plugins.dm +++ b/code/modules/pda/messenger_plugins.dm @@ -35,9 +35,6 @@ if(.) user.show_message("Virus sent!", 1) var/datum/data/pda/app/M = P.find_program(/datum/data/pda/app/messenger) - if(M) - M.notify_silent = 1 - M = P.find_program(/datum/data/pda/app/chatroom) if(M) M.notify_silent = 1 P.ttone = "silence" diff --git a/code/modules/pda/pdas.dm b/code/modules/pda/pdas.dm index a9a4cbb9714..676d193a6d3 100644 --- a/code/modules/pda/pdas.dm +++ b/code/modules/pda/pdas.dm @@ -54,9 +54,6 @@ var/datum/data/pda/app/M = find_program(/datum/data/pda/app/messenger) if(M) M.notify_silent = 1 - M = find_program(/datum/data/pda/app/chatroom) - if(M) - M.notify_silent = 1 /obj/item/pda/heads default_cartridge = /obj/item/cartridge/head @@ -161,9 +158,6 @@ var/datum/data/pda/app/M = find_program(/datum/data/pda/app/messenger) if(M) M.notify_silent = 1 //Quiet in the library! - M = find_program(/datum/data/pda/app/chatroom) - if(M) - M.notify_silent = 1 //Quiet in the library! /obj/item/pda/clear icon_state = "pda-transp" diff --git a/nano/templates/pda_chatroom.tmpl b/nano/templates/pda_chatroom.tmpl deleted file mode 100644 index ae0d8e7f35b..00000000000 --- a/nano/templates/pda_chatroom.tmpl +++ /dev/null @@ -1,85 +0,0 @@ - -
-
- Chat Functions: -
-
- {{:helper.link(data.silent == 1 ? 'Ringer: Off' : 'Ringer: On', data.silent == 1 ? 'volume-off' : 'volume-up', {'choice' : "Toggle Ringer"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link(data.toff == 1 ? 'Notifications: Off' : 'Notifications: On',data.toff == 1 ? 'close' : 'check', {'choice' : "Toggle Chatroom"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link('Set Ringtone', 'bell-o', {'choice' : "Ringtone"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link('New Room', 'plus', {'choice' : "New Room"}, null, 'pdalink fixedLeftWide')}} -
-
- -
- {{if data.no_server}} -

ERROR: Messaging server is not responding.

- {{:helper.link('Reconnect', 'refresh', {'choice' : "Reconnect"}, null, 'pdalink fixedLeftWidest')}} - {{else data.room}} - {{if data.inviting}} -

Invite whom to #{{:data.room}}?

- {{for data.people}} - {{:helper.link(value.name, 'user-plus', {'choice': "Invite PDA", 'user': value.ref}, null, 'pdalink fixedLeftWidest')}} - {{empty}} - No other people found. - {{/for}} - {{else}} -

#{{:data.room}} – {{:data.topic}}

-
-
- Room Functions: -
-
- {{:helper.link('Invite', 'user-plus', {'choice' : "Invite"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link('Change Topic', 'tag', {'choice' : "Topic"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link('Leave Channel', 'user-times', {'choice' : "Leave"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link(data.auto_scroll ? 'Autoscroll: On' : 'Autoscroll: Off', 'level-down', {'choice' : "Autoscroll"}, null, 'pdalink fixedLeftWide')}} -
-
-
-
- {{var prevName = "";}} - {{for data.history}} -
-
{{:value.username!=prevName ? value.username : " "}}
-
- {{:value.message}} -
-
- {{prevName = value.username;}} - {{/for}} -
-
- {{:helper.link('Post', 'comment', {'choice' : "Post"}, null, 'pdalink fixedLeftWidest')}} -
-
-
- {{for data.users}} -
-
{{:value}}
-
- {{/for}} -
- - {{/if}} - {{else}} -

Rooms

- {{for data.rooms}} -
- {{:helper.link(value.name, 'arrow-circle-down', {'choice' : "Join", 'room' : value.ref}, null, 'pdalink fixedLeftWidest')}} -
- {{empty}} - No rooms located. - {{/for}} - {{/if}} -
\ No newline at end of file diff --git a/paradise.dme b/paradise.dme index 242a83419cd..cf95208dfda 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1924,7 +1924,6 @@ #include "code\modules\pda\app.dm" #include "code\modules\pda\cart.dm" #include "code\modules\pda\cart_apps.dm" -#include "code\modules\pda\chatroom.dm" #include "code\modules\pda\core_apps.dm" #include "code\modules\pda\messenger.dm" #include "code\modules\pda\messenger_plugins.dm"