mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 18:45:23 -04:00
Fix colour codes not being trimmed from own skin name, launcher should auto-focus to search box.
This commit is contained in:
parent
83e1a9c8fc
commit
e94e53f348
@ -113,7 +113,6 @@ namespace ClassicalSharp {
|
|||||||
canPlace[tile] = true;
|
canPlace[tile] = true;
|
||||||
canDelete[tile] = true;
|
canDelete[tile] = true;
|
||||||
}
|
}
|
||||||
canPlace[(int)Block.Grass] = false;
|
|
||||||
canPlace[(int)Block.Lava] = false;
|
canPlace[(int)Block.Lava] = false;
|
||||||
canPlace[(int)Block.Water] = false;
|
canPlace[(int)Block.Water] = false;
|
||||||
canPlace[(int)Block.StillLava] = false;
|
canPlace[(int)Block.StillLava] = false;
|
||||||
|
@ -38,9 +38,9 @@ namespace ClassicalSharp {
|
|||||||
get { return (float)GetMaxHeight( jumpVel ); }
|
get { return (float)GetMaxHeight( jumpVel ); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalPlayer( Game window ) : base( window ) {
|
public LocalPlayer( Game game ) : base( game ) {
|
||||||
DisplayName = window.Username;
|
DisplayName = game.Username;
|
||||||
SkinName = window.Username;
|
SkinName = game.Username;
|
||||||
SkinIdentifier = "skin_" + SkinName;
|
SkinIdentifier = "skin_" + SkinName;
|
||||||
InitRenderingData();
|
InitRenderingData();
|
||||||
}
|
}
|
||||||
@ -253,7 +253,6 @@ namespace ClassicalSharp {
|
|||||||
Inventory inv = game.Inventory;
|
Inventory inv = game.Inventory;
|
||||||
inv.CanPlace[(int)Block.Bedrock] = value == 0x64;
|
inv.CanPlace[(int)Block.Bedrock] = value == 0x64;
|
||||||
inv.CanDelete[(int)Block.Bedrock] = value == 0x64;
|
inv.CanDelete[(int)Block.Bedrock] = value == 0x64;
|
||||||
inv.CanPlace[(int)Block.Grass] = value == 0x64;
|
|
||||||
|
|
||||||
inv.CanPlace[(int)Block.Water] = value == 0x64;
|
inv.CanPlace[(int)Block.Water] = value == 0x64;
|
||||||
inv.CanPlace[(int)Block.StillWater] = value == 0x64;
|
inv.CanPlace[(int)Block.StillWater] = value == 0x64;
|
||||||
|
@ -9,7 +9,7 @@ namespace ClassicalSharp {
|
|||||||
int tickCount;
|
int tickCount;
|
||||||
public NetPlayer( string displayName, string skinName, Game game ) : base( game ) {
|
public NetPlayer( string displayName, string skinName, Game game ) : base( game ) {
|
||||||
DisplayName = displayName;
|
DisplayName = displayName;
|
||||||
SkinName = Utils.StripColours( skinName );
|
SkinName = skinName;
|
||||||
SkinIdentifier = "skin_" + SkinName;
|
SkinIdentifier = "skin_" + SkinName;
|
||||||
InitRenderingData();
|
InitRenderingData();
|
||||||
}
|
}
|
||||||
|
@ -255,6 +255,7 @@ namespace ClassicalSharp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AddEntity( byte entityId, string displayName, string skinName, bool readPosition ) {
|
void AddEntity( byte entityId, string displayName, string skinName, bool readPosition ) {
|
||||||
|
skinName = Utils.StripColours( skinName );
|
||||||
if( entityId != 0xFF ) {
|
if( entityId != 0xFF ) {
|
||||||
Player oldPlayer = game.Players[entityId];
|
Player oldPlayer = game.Players[entityId];
|
||||||
if( oldPlayer != null ) {
|
if( oldPlayer != null ) {
|
||||||
@ -266,7 +267,7 @@ namespace ClassicalSharp {
|
|||||||
game.AsyncDownloader.DownloadSkin( skinName );
|
game.AsyncDownloader.DownloadSkin( skinName );
|
||||||
} else {
|
} else {
|
||||||
game.LocalPlayer.SkinName = skinName;
|
game.LocalPlayer.SkinName = skinName;
|
||||||
game.LocalPlayer.SkinIdentifier = "skin_" + game.LocalPlayer.SkinName;
|
game.LocalPlayer.SkinIdentifier = "skin_" + skinName;
|
||||||
game.AsyncDownloader.DownloadSkin( skinName );
|
game.AsyncDownloader.DownloadSkin( skinName );
|
||||||
}
|
}
|
||||||
if( readPosition ) {
|
if( readPosition ) {
|
||||||
|
@ -62,7 +62,10 @@ namespace Launcher2 {
|
|||||||
base.Init();
|
base.Init();
|
||||||
game.Window.Mouse.WheelChanged += MouseWheelChanged;
|
game.Window.Mouse.WheelChanged += MouseWheelChanged;
|
||||||
game.Window.Mouse.ButtonUp += MouseButtonUp;
|
game.Window.Mouse.ButtonUp += MouseButtonUp;
|
||||||
|
|
||||||
Resize();
|
Resize();
|
||||||
|
selectedWidget = widgets[1];
|
||||||
|
InputClick( 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Resize() {
|
public override void Resize() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user