Remove some unused goonchat stuff

we don't have dectalk, so that can go

the command var is completely unused, seems legacy from the goon
implementation.

The chatmode stuff doesn't do anything at all that I can see and no
alternative spritesheets exist
This commit is contained in:
oranges
2017-08-23 23:45:39 +00:00
parent b208a51975
commit 5b44f77b67

View File

@@ -33,7 +33,6 @@ var opts = {
'imageRetryLimit': 50, //how many attempts should we make?
'popups': 0, //Amount of popups opened ever
'wasd': false, //Is the user in wasd mode?
'chatMode': 'default', //The mode the chat is in
'priorChatHeight': 0, //Thing for height-resizing detection
'restarting': false, //Is the round restarting?
@@ -341,23 +340,6 @@ function toHex(n) {
return "0123456789ABCDEF".charAt((n-n%16)/16) + "0123456789ABCDEF".charAt(n%16);
}
function changeMode(mode) {
switch (mode) {
case 'geocities':
//switch in stylesheet
opts.chatMode = mode;
break;
case 'console':
opts.chatMode = mode;
break;
case 'default':
default:
//remove loaded stylesheet/s
opts.chatMode = 'default';
}
}
function handleClientData(ckey, ip, compid) {
//byond sends player info to here
var currentData = {'ckey': ckey, 'ip': ip, 'compid': compid};
@@ -409,8 +391,6 @@ function ehjaxCallback(data) {
} else if (data == 'roundrestart') {
opts.restarting = true;
internalOutput('<div class="connectionClosed internal restarting">The connection has been closed because the server is restarting. Please wait while you automatically reconnect.</div>', 'internal');
} else if (data == 'stopaudio') {
$('.dectalk').remove();
} else {
//Oh we're actually being sent data instead of an instruction
var dataJ;
@@ -434,8 +414,6 @@ function ehjaxCallback(data) {
} else {
handleClientData(data.clientData.ckey, data.clientData.ip, data.clientData.compid);
}
} else if (data.modeChange) {
changeMode(data.modeChange);
} else if (data.firebug) {
if (data.trigger) {
internalOutput('<span class="internal boldnshit">Loading firebug console, triggered by '+data.trigger+'...</span>', 'internal');
@@ -445,14 +423,7 @@ function ehjaxCallback(data) {
var firebugEl = document.createElement('script');
firebugEl.src = 'https://getfirebug.com/firebug-lite-debug.js';
document.body.appendChild(firebugEl);
} else if (data.dectalk) {
var message = '<audio class="dectalk" src="'+data.dectalk+'" autoplay="autoplay"></audio>';
if (data.decTalkTrigger) {
message = '<a href="#" class="stopAudio icon-stack" title="Stop Audio" style="color: black;"><i class="icon-volume-off"></i><i class="icon-ban-circle" style="color: red;"></i></a> '+
'<span class="italic">You hear a strange robotic voice...</span>' + message;
}
internalOutput(message, 'preventLink');
}
}
}
}
@@ -634,8 +605,6 @@ $(function() {
e.preventDefault()
var k = e.which;
var command; // Command to execute through winset.
// Hardcoded because else there would be no feedback message.
if (k == 113) { // F2
runByond('byond://winset?screenshot=auto');
@@ -681,14 +650,7 @@ $(function() {
c = String.fromCharCode(k);
}
// if(opts.macros.hasOwnProperty(c.toUpperCase()))
// command = opts.macros[c];
if (command) {
runByond('byond://winset?mapwindow.map.focus=true;command='+command);
return false;
}
else if (c.length == 0) {
if (c.length == 0) {
if (!e.shiftKey) {
c = c.toLowerCase();
}
@@ -708,14 +670,6 @@ $(function() {
}
});
//Audio sound prevention
$messages.on('click', '.stopAudio', function() {
var $audio = $(this).parent().children('audio');
if ($audio) {
$audio.remove();
}
});
/*****************************************
*