mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Remove FullCP437Handler emotes. Very rarely used and the only client that supports them, lets you type them in by pressing left alt anyways.
This commit is contained in:
parent
3f36248120
commit
8273253828
@ -166,7 +166,6 @@ namespace MCGalaxy {
|
||||
sb.Replace("<3", "(heart)");
|
||||
}
|
||||
message = EmotesHandler.Replace(sb.ToString());
|
||||
message = FullCP437Handler.Replace(message);
|
||||
return message;
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,14 @@ namespace MCGalaxy {
|
||||
{ "house", '⌂' }
|
||||
};
|
||||
|
||||
/// <summary> Conversion for code page 437 characters from index 0 to 31 to unicode. </summary>
|
||||
public const string ControlCharReplacements = "\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼";
|
||||
|
||||
/// <summary> Conversion for code page 437 characters from index 127 to 255 to unicode. </summary>
|
||||
public const string ExtendedCharReplacements = "⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»" +
|
||||
"░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌" +
|
||||
"█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\u00a0";
|
||||
|
||||
public static string Replace(string message) {
|
||||
return Unescape(message, '(', ')', EmoteKeywords);
|
||||
}
|
||||
|
@ -1,108 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace MCGalaxy
|
||||
{
|
||||
public static class FullCP437Handler
|
||||
{
|
||||
public static readonly Dictionary<string, char> Replacements = new Dictionary<string, char> {
|
||||
{ "big-c-cedilla", 'Ç' },
|
||||
{ "small-u-diaeresis", 'ü' },
|
||||
{ "small-e-acute", 'é' },
|
||||
{ "small-a-circumflex", 'â' },
|
||||
{ "small-a-diaeresis", 'ä' },
|
||||
{ "small-a-grave", 'à' },
|
||||
{ "small-a-ring above", 'å' },
|
||||
{ "small-c-cedilla", 'ç' },
|
||||
{ "small-e-circumflex", 'ê' },
|
||||
{ "small-e-diaeresis", 'ë' },
|
||||
{ "small-e-grave", 'è' },
|
||||
{ "small-i-diaeresis", 'ï' },
|
||||
{ "small-i-circumflex", 'î' },
|
||||
{ "small-i-grave", 'ì' },
|
||||
{ "big-a-diaeresis", 'Ä' },
|
||||
{ "big-a-ring above", 'Å' },
|
||||
{ "big-e-acute", 'É' },
|
||||
{ "small-ae", 'æ' },
|
||||
{ "big-ae", 'Æ' },
|
||||
{ "small-o-circumflex", 'ô' },
|
||||
{ "small-o-diaeresis", 'ö' },
|
||||
{ "small-o-grave", 'ò' },
|
||||
{ "small-u-circumflex", 'û' },
|
||||
{ "small-u-grave", 'ù' },
|
||||
{ "small-y-diaeresis", 'ÿ' },
|
||||
{ "big-o-diaeresis", 'Ö' },
|
||||
{ "big-u-diaeresis", 'Ü' },
|
||||
{ "cents", '¢' },
|
||||
{ "pound", '£' },
|
||||
{ "yen", '¥' },
|
||||
{ "peseta", '₧' },
|
||||
{ "small-f-hook", 'ƒ' },
|
||||
{ "small-a-acute", 'á' },
|
||||
{ "small-i-acute", 'í' },
|
||||
{ "small-o-acute", 'ó' },
|
||||
{ "small-u-acute", 'ú' },
|
||||
{ "small-n-tilde", 'ñ' },
|
||||
{ "big-n-tilde", 'Ñ' },
|
||||
{ "feminine-ordinal-indicator", 'ª' },
|
||||
{ "masculine-ordinal-indicator", 'º' },
|
||||
{ "inverted-question", '¿' },
|
||||
{ "reversed-not", '⌐' },
|
||||
{ "not", '¬' },
|
||||
{ "fraction-half", '½' },
|
||||
{ "fraction-quarter", '¼' },
|
||||
{ "inverted-exclamation", '¡' },
|
||||
{ "left-pointing-quotation", '«' },
|
||||
{ "right-pointing-quotation", '»' },
|
||||
{ "square-light", '░' },
|
||||
{ "square-medium", '▒' },
|
||||
{ "square-dark", '▓' },
|
||||
|
||||
{ "small-alpha", 'α' },
|
||||
{ "big-double-s", 'ß' },
|
||||
{ "big-gamma", 'Γ' },
|
||||
{ "pi", 'π' },
|
||||
{ "big-sigma", 'Σ' },
|
||||
{ "small-sigma", 'σ' },
|
||||
{ "micro", 'µ' },
|
||||
{ "tau", 'τ' },
|
||||
{ "big-phi", 'Φ' },
|
||||
{ "theta", 'Θ' },
|
||||
{ "omega", 'Ω' },
|
||||
{ "delta", 'δ' },
|
||||
{ "infinity", '∞' },
|
||||
{ "small-phi", 'φ' },
|
||||
{ "epsilon", 'ε' },
|
||||
{ "intersect", '∩' },
|
||||
{ "identical", '≡' },
|
||||
{ "plus-minus", '±' },
|
||||
{ "gequal", '≥' },
|
||||
{ "lequal", '≤' },
|
||||
{ "top-integral", '⌠' },
|
||||
{ "bottom-integral", '⌡' },
|
||||
{ "divide", '÷' },
|
||||
{ "almost-equal", '≈' },
|
||||
{ "degree", '°' },
|
||||
{ "bullet-operator", '∙' },
|
||||
{ "middle-dot", '·' },
|
||||
{ "root", '√' },
|
||||
{ "sqroot", '√' },
|
||||
{ "superscript-n", 'ⁿ' },
|
||||
{ "superscript-two", '²' },
|
||||
{ "black-square", '■' },
|
||||
};
|
||||
|
||||
public static string Replace(string message) {
|
||||
return EmotesHandler.Unescape(message, '{', '}', Replacements);
|
||||
}
|
||||
|
||||
/// <summary> Conversion for code page 437 characters from index 0 to 31 to unicode. </summary>
|
||||
public const string ControlCharReplacements = "\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼";
|
||||
|
||||
/// <summary> Conversion for code page 437 characters from index 127 to 255 to unicode. </summary>
|
||||
public const string ExtendedCharReplacements = "⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»" +
|
||||
"░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌" +
|
||||
"█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\u00a0";
|
||||
}
|
||||
}
|
@ -191,15 +191,15 @@ namespace MCGalaxy.Commands.Fun {
|
||||
}
|
||||
|
||||
public override void Help(Player p) {
|
||||
Player.Message(p, "%T/Team owner [name] %H-Sets the player who has owner privileges for the team.");
|
||||
Player.Message(p, "%T/Team kick [name] %H-Removes that player from the team you are in.");
|
||||
Player.Message(p, "%T/Team color [color] %H-Sets the color of the team name shown in chat.");
|
||||
Player.Message(p, "%T/Team owner [name] %H- Sets the player who has owner privileges for the team.");
|
||||
Player.Message(p, "%T/Team kick [name] %H- Removes that player from the team you are in.");
|
||||
Player.Message(p, "%T/Team color [color] %H- Sets the color of the team name shown in chat.");
|
||||
|
||||
Player.Message(p, "%T/Team create %H- Creates a new team.");
|
||||
Player.Message(p, "%T/Team join %H-Joins the team you last received an invite to.");
|
||||
Player.Message(p, "%T/Team invite [name] %H-Invites that player to join your team.");
|
||||
Player.Message(p, "%T/Team leave %H-Removes you from the team you are in.");
|
||||
Player.Message(p, "%T/Team members [name] %H-Lists the players within that team.");
|
||||
Player.Message(p, "%T/Team join %H- Joins the team you last received an invite to.");
|
||||
Player.Message(p, "%T/Team invite [name] %H- Invites that player to join your team.");
|
||||
Player.Message(p, "%T/Team leave %H- Removes you from the team you are in.");
|
||||
Player.Message(p, "%T/Team members [name] %H- Lists the players within that team.");
|
||||
Player.Message(p, "%HAnything else is sent as a message to all members of the team.");
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +113,6 @@
|
||||
<Compile Include="Chat\ChatModes.cs" />
|
||||
<Compile Include="Chat\Colors.cs" />
|
||||
<Compile Include="Chat\EmotesHandler.cs" />
|
||||
<Compile Include="Chat\FullCP437Handler.cs" />
|
||||
<Compile Include="Chat\ChatTokens.cs" />
|
||||
<Compile Include="Chat\LineWrapper.cs" />
|
||||
<Compile Include="Chat\ProfanityFilter.cs" />
|
||||
|
@ -131,7 +131,6 @@ namespace MCGalaxy {
|
||||
if (String.IsNullOrEmpty(message.Trim()))
|
||||
message = ".";
|
||||
message = EmotesHandler.Replace(message);
|
||||
message = FullCP437Handler.Replace(message);
|
||||
message = ChatTokens.ApplyCustom(message);
|
||||
|
||||
if (color)
|
||||
|
@ -83,11 +83,11 @@ namespace MCGalaxy {
|
||||
/// <summary> Converts a code page 437 indice into unicode. </summary>
|
||||
public static char Cp437ToUnicode(this char c) {
|
||||
if (c < 0x20) {
|
||||
return FullCP437Handler.ControlCharReplacements[c];
|
||||
return EmotesHandler.ControlCharReplacements[c];
|
||||
} else if (c < 0x7F) {
|
||||
return c;
|
||||
} else if (c <= 0xFF) {
|
||||
return FullCP437Handler.ExtendedCharReplacements[c - 0x7F];
|
||||
return EmotesHandler.ExtendedCharReplacements[c - 0x7F];
|
||||
}
|
||||
return '?';
|
||||
}
|
||||
@ -97,9 +97,9 @@ namespace MCGalaxy {
|
||||
int cpIndex = 0;
|
||||
if (c >= ' ' && c <= '~') {
|
||||
return c;
|
||||
} else if ((cpIndex = FullCP437Handler.ControlCharReplacements.IndexOf(c)) >= 0 ) {
|
||||
} else if ((cpIndex = EmotesHandler.ControlCharReplacements.IndexOf(c)) >= 0 ) {
|
||||
return (char)cpIndex;
|
||||
} else if ((cpIndex = FullCP437Handler.ExtendedCharReplacements.IndexOf(c)) >= 0 ) {
|
||||
} else if ((cpIndex = EmotesHandler.ExtendedCharReplacements.IndexOf(c)) >= 0 ) {
|
||||
return (char)(cpIndex + 127);
|
||||
}
|
||||
return '?';
|
||||
|
Loading…
x
Reference in New Issue
Block a user