Turret rotation fix, CharacterInventory networking bugfixes, prevent limbs clipping with other colliders when mirroring, fixed mantis animations, better looking explosions, spark effect when overvoltage breaks an item
This commit is contained in:
@@ -43,20 +43,19 @@ namespace Subsurface
|
||||
|
||||
cam = new Camera();
|
||||
|
||||
GUIpanel = new GUIFrame(new Rectangle(0, 0, 300, Game1.GraphicsHeight), Color.DarkGray * 0.8f);
|
||||
GUIpanel = new GUIFrame(new Rectangle(0, 0, 300, Game1.GraphicsHeight), GUI.style);
|
||||
GUIpanel.Padding = new Vector4(10.0f, 10.0f, 10.0f, 10.0f);
|
||||
|
||||
physicsButton = new GUIButton(new Rectangle(0, 50, 200, 25), "Physics", Alignment.Left, GUI.style, GUIpanel);
|
||||
physicsButton.OnClicked += TogglePhysics;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, 80, 0, 25), "Limbs:", Color.Transparent, Color.Black, Alignment.Left, null, GUIpanel);
|
||||
new GUITextBlock(new Rectangle(0, 80, 0, 25), "Limbs:", GUI.style, GUIpanel);
|
||||
limbList = new GUIListBox(new Rectangle(0, 110, 0, 250), Color.White * 0.7f, GUI.style, GUIpanel);
|
||||
limbList.OnSelected = SelectLimb;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, 360, 0, 25), "Joints:", Color.Transparent, Color.Black, Alignment.Left, null, GUIpanel);
|
||||
new GUITextBlock(new Rectangle(0, 360, 0, 25), "Joints:", GUI.style, GUIpanel);
|
||||
jointList = new GUIListBox(new Rectangle(0, 390, 0, 250), Color.White * 0.7f, GUI.style, GUIpanel);
|
||||
|
||||
|
||||
|
||||
while (Character.CharacterList.Count > 1)
|
||||
{
|
||||
Character.CharacterList.First().Remove();
|
||||
@@ -226,7 +225,7 @@ namespace Subsurface
|
||||
new Rectangle(0,0,0,25),
|
||||
limb.type.ToString(),
|
||||
Color.Transparent,
|
||||
Color.Black,
|
||||
Color.White,
|
||||
Alignment.Left, null,
|
||||
limbList);
|
||||
textBlock.Padding = new Vector4(10.0f, 0.0f, 0.0f, 0.0f);
|
||||
@@ -243,7 +242,7 @@ namespace Subsurface
|
||||
new Rectangle(0, 0, 0, 25),
|
||||
limb1.type.ToString() + " - " + limb2.type.ToString(),
|
||||
Color.Transparent,
|
||||
Color.Black,
|
||||
Color.White,
|
||||
Alignment.Left, null,
|
||||
jointList);
|
||||
textBlock.Padding = new Vector4(10.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Subsurface
|
||||
|
||||
selectedTab = -1;
|
||||
|
||||
GUIpanel = new GUIFrame(new Rectangle(0,0, 120, Game1.GraphicsHeight), Color.DarkGray*0.8f);
|
||||
GUIpanel = new GUIFrame(new Rectangle(0, 0, 150, Game1.GraphicsHeight), GUI.style);
|
||||
GUIpanel.Padding = new Vector4(10.0f, 10.0f, 10.0f, 10.0f);
|
||||
//GUIListBox constructionList = new GUIListBox(new Rectangle(0, 0, 0, 300), Color.White * 0.7f, GUIpanel);
|
||||
//constructionList.OnSelected = MapEntityPrefab.SelectPrefab;
|
||||
@@ -50,13 +50,13 @@ namespace Subsurface
|
||||
|
||||
GUItabs = new GUIComponent[2];
|
||||
int width = 400, height = 400;
|
||||
GUItabs[0] = new GUIFrame(new Rectangle(Game1.GraphicsWidth/2-width/2, Game1.GraphicsHeight/2-height/2, width, height), Color.DarkGray*0.8f);
|
||||
GUItabs[0] = new GUIFrame(new Rectangle(Game1.GraphicsWidth/2-width/2, Game1.GraphicsHeight/2-height/2, width, height), GUI.style);
|
||||
GUItabs[0].Padding = new Vector4(10.0f, 10.0f, 10.0f, 10.0f);
|
||||
GUIListBox itemList = new GUIListBox(new Rectangle(0, 0, 0, 0), Color.White * 0.7f, GUI.style, GUItabs[0]);
|
||||
itemList.OnSelected = SelectPrefab;
|
||||
itemList.CheckSelected = MapEntityPrefab.GetSelected;
|
||||
|
||||
GUItabs[1] = new GUIFrame(new Rectangle(Game1.GraphicsWidth / 2 - width / 2, Game1.GraphicsHeight / 2 - height / 2, width, height), Color.DarkGray * 0.8f);
|
||||
|
||||
GUItabs[1] = new GUIFrame(new Rectangle(Game1.GraphicsWidth / 2 - width / 2, Game1.GraphicsHeight / 2 - height / 2, width, height), GUI.style);
|
||||
GUItabs[1].Padding = new Vector4(10.0f, 10.0f, 10.0f, 10.0f);
|
||||
GUIListBox structureList = new GUIListBox(new Rectangle(0, 0, 0, 300), Color.White * 0.7f, GUI.style, GUItabs[1]);
|
||||
structureList.OnSelected = SelectPrefab;
|
||||
@@ -65,7 +65,7 @@ namespace Subsurface
|
||||
foreach (MapEntityPrefab ep in MapEntityPrefab.list)
|
||||
{
|
||||
GUIListBox parent = ((ep as ItemPrefab) == null) ? structureList : itemList;
|
||||
Color color = ((parent.CountChildren % 2) == 0) ? Color.White : Color.LightGray;
|
||||
Color color = ((parent.CountChildren % 2) == 0) ? Color.Transparent : Color.White * 0.1f;
|
||||
|
||||
GUIFrame frame = new GUIFrame(new Rectangle(0, 0, 0, 50), Color.Transparent, null, parent);
|
||||
frame.UserData = ep;
|
||||
@@ -77,7 +77,7 @@ namespace Subsurface
|
||||
GUITextBlock textBlock = new GUITextBlock(
|
||||
new Rectangle(40, 0, 0, 25),
|
||||
ep.Name,
|
||||
Color.Transparent, Color.Black,
|
||||
Color.Transparent, Color.White,
|
||||
Alignment.Left, Alignment.Left,
|
||||
null, frame);
|
||||
textBlock.Padding = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
|
||||
@@ -130,6 +130,8 @@ namespace Subsurface
|
||||
|
||||
private bool ToggleCharacterMode(GUIButton button, object obj)
|
||||
{
|
||||
selectedTab = 0;
|
||||
|
||||
characterMode = !characterMode;
|
||||
button.Color = (characterMode) ? Color.Gold : Color.White;
|
||||
|
||||
|
||||
@@ -284,6 +284,7 @@ namespace Subsurface
|
||||
if (infoFrame.children.Find(c => c.UserData as string == "playyourself") == null)
|
||||
{
|
||||
var playYourself = new GUITickBox(new Rectangle(0, -20, 20, 20), "Play yourself", Alignment.TopLeft, playerFrame);
|
||||
playYourself.Selected = Game1.Server.CharacterInfo != null;
|
||||
playYourself.OnSelected = TogglePlayYourself;
|
||||
playYourself.UserData = "playyourself";
|
||||
}
|
||||
@@ -373,6 +374,7 @@ namespace Subsurface
|
||||
if (IsServer && Game1.Server != null)
|
||||
{
|
||||
Game1.Server.CharacterInfo = null;
|
||||
Game1.Server.Character = null;
|
||||
|
||||
var playYourself = new GUITickBox(new Rectangle(0, -20, 20, 20), "Play yourself", Alignment.TopLeft, playerFrame);
|
||||
playYourself.OnSelected = TogglePlayYourself;
|
||||
@@ -577,9 +579,14 @@ namespace Subsurface
|
||||
{
|
||||
if (string.IsNullOrEmpty(newName)) return false;
|
||||
|
||||
Game1.Client.CharacterInfo.Name = newName;
|
||||
Game1.Client.Name = newName;
|
||||
Game1.Client.SendCharacterData();
|
||||
if (Game1.NetworkMember == null || Game1.NetworkMember.CharacterInfo == null) return true;
|
||||
|
||||
Game1.NetworkMember.CharacterInfo.Name = newName;
|
||||
if (Game1.Client != null)
|
||||
{
|
||||
Game1.Client.Name = newName;
|
||||
Game1.Client.SendCharacterData();
|
||||
}
|
||||
|
||||
textBox.Text = newName;
|
||||
textBox.Selected = false;
|
||||
|
||||
Reference in New Issue
Block a user