Spectating, fire, damaged limb sprites, water detector, engineer jumpsuit, new signal comp sprites, resharper cleanup (god knows what else, commit more often)
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Barotrauma
|
||||
private GUIComponent[] GUItabs;
|
||||
private int selectedTab;
|
||||
|
||||
//a character used for picking up and manipulating items
|
||||
//a Character used for picking up and manipulating items
|
||||
private Character dummyCharacter;
|
||||
|
||||
private bool characterMode;
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace Barotrauma
|
||||
BlendState.AlphaBlend,
|
||||
null, DepthStencilState.DepthRead, null, null,
|
||||
cam.Transform);
|
||||
GameMain.ParticleManager.Draw(spriteBatch, true);
|
||||
GameMain.ParticleManager.Draw(spriteBatch, true, Particles.ParticleBlendState.AlphaBlend);
|
||||
|
||||
spriteBatch.End();
|
||||
|
||||
@@ -271,10 +271,17 @@ namespace Barotrauma
|
||||
BlendState.AlphaBlend,
|
||||
null, DepthStencilState.DepthRead, null, null,
|
||||
cam.Transform);
|
||||
|
||||
GameMain.ParticleManager.Draw(spriteBatch, false);
|
||||
GameMain.ParticleManager.Draw(spriteBatch, false, Particles.ParticleBlendState.AlphaBlend);
|
||||
spriteBatch.End();
|
||||
|
||||
spriteBatch.Begin(SpriteSortMode.Immediate,
|
||||
BlendState.Additive,
|
||||
null, DepthStencilState.DepthRead, null, null,
|
||||
cam.Transform);
|
||||
GameMain.ParticleManager.Draw(spriteBatch, false, Particles.ParticleBlendState.Additive);
|
||||
spriteBatch.End();
|
||||
|
||||
|
||||
graphics.SetRenderTarget(null);
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
@@ -54,6 +54,11 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
private CrewManager CrewManager
|
||||
{
|
||||
get { return GameMain.GameSession.CrewManager; }
|
||||
}
|
||||
|
||||
public LobbyScreen()
|
||||
{
|
||||
Rectangle panelRect = new Rectangle(
|
||||
@@ -68,7 +73,7 @@ namespace Barotrauma
|
||||
// save, Color.Transparent, Color.White, Alignment.Left, GUI.Style, leftPanel);
|
||||
|
||||
GUITextBlock moneyText = new GUITextBlock(new Rectangle(0, 30, 0, 25), "", GUI.Style,
|
||||
Alignment.TopCenter, Alignment.Top, leftPanel);
|
||||
Alignment.TopLeft, Alignment.TopLeft, leftPanel);
|
||||
moneyText.TextGetter = GetMoney;
|
||||
|
||||
GUIButton button = new GUIButton(new Rectangle(0, 70, 100, 30), "Map", null, Alignment.TopCenter, GUI.Style, leftPanel);
|
||||
@@ -234,7 +239,7 @@ namespace Barotrauma
|
||||
private void UpdateCharacterLists()
|
||||
{
|
||||
characterList.ClearChildren();
|
||||
foreach (CharacterInfo c in gameMode.CrewManager.characterInfos)
|
||||
foreach (CharacterInfo c in CrewManager.characterInfos)
|
||||
{
|
||||
GUITextBlock textBlock = new GUITextBlock(
|
||||
new Rectangle(0, 0, 0, 25),
|
||||
@@ -291,7 +296,7 @@ namespace Barotrauma
|
||||
|
||||
CreateItemFrame(prefab, selectedItemList);
|
||||
|
||||
buyButton.Enabled = gameMode.CrewManager.Money >= selectedItemCost;
|
||||
buyButton.Enabled = CrewManager.Money >= selectedItemCost;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -310,9 +315,9 @@ namespace Barotrauma
|
||||
{
|
||||
int cost = selectedItemCost;
|
||||
|
||||
if (gameMode.CrewManager.Money < cost) return false;
|
||||
if (CrewManager.Money < cost) return false;
|
||||
|
||||
gameMode.CrewManager.Money -= cost;
|
||||
CrewManager.Money -= cost;
|
||||
|
||||
for (int i = selectedItemList.children.Count-1; i>=0; i--)
|
||||
{
|
||||
@@ -345,7 +350,7 @@ namespace Barotrauma
|
||||
public override void Draw(double deltaTime, GraphicsDevice graphics, SpriteBatch spriteBatch)
|
||||
{
|
||||
|
||||
if (characterList.CountChildren != gameMode.CrewManager.characterInfos.Count)
|
||||
if (characterList.CountChildren != CrewManager.characterInfos.Count)
|
||||
{
|
||||
UpdateCharacterLists();
|
||||
}
|
||||
@@ -406,7 +411,7 @@ namespace Barotrauma
|
||||
|
||||
private string GetMoney()
|
||||
{
|
||||
return "Money: " + ((GameMain.GameSession == null) ? "" : gameMode.CrewManager.Money.ToString());
|
||||
return "Money: " + ((GameMain.GameSession == null) ? "" : CrewManager.Money.ToString());
|
||||
}
|
||||
|
||||
private bool SelectCharacter(GUIComponent component, object selection)
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace Barotrauma
|
||||
//server info panel ------------------------------------------------------------
|
||||
|
||||
infoFrame = new GUIFrame(new Rectangle(0, 0, (int)(panelRect.Width * 0.7f), (int)(panelRect.Height * 0.6f)), GUI.Style, menu);
|
||||
infoFrame.Padding = new Vector4(20.0f, 20.0f, 20.0f, 20.0f); ;
|
||||
infoFrame.Padding = new Vector4(20.0f, 20.0f, 20.0f, 20.0f);
|
||||
|
||||
//chatbox ----------------------------------------------------------------------
|
||||
GUIFrame chatFrame = new GUIFrame(
|
||||
@@ -295,8 +295,8 @@ namespace Barotrauma
|
||||
ServerName = (GameMain.Server==null) ? "Server" : GameMain.Server.Name;
|
||||
|
||||
|
||||
|
||||
infoFrame.RemoveChild(infoFrame.children.Find(c => c.UserData as string == "startButton"));
|
||||
infoFrame.RemoveChild(infoFrame.children.Find(c => c.UserData as string == "spectateButton"));
|
||||
|
||||
playerList.Parent.RemoveChild(playerList.Parent.children.Find(c => c.UserData as string == "banListButton"));
|
||||
|
||||
@@ -313,15 +313,13 @@ namespace Barotrauma
|
||||
|
||||
GUIButton settingsButton = new GUIButton(new Rectangle(-100, 0, 80, 30), "Settings", Alignment.BottomRight, GUI.Style, infoFrame);
|
||||
settingsButton.OnClicked = GameMain.Server.ToggleSettingsFrame;
|
||||
settingsButton.CanBeSelected = false;
|
||||
settingsButton.UserData = "settingsButton";
|
||||
|
||||
var banListButton = new GUIButton(new Rectangle(0, 30, 100, 20), "Banned IPs", Alignment.BottomRight, GUI.Style, playerList.Parent);
|
||||
banListButton.OnClicked = GameMain.Server.BanList.ToggleBanFrame;
|
||||
banListButton.UserData = "banListButton";
|
||||
|
||||
//mapList.OnSelected = new GUIListBox.OnSelectedHandler(Game1.server.UpdateNetLobby);
|
||||
//modeList.OnSelected += GameMain.Server.UpdateNetLobby;
|
||||
|
||||
if (subList.CountChildren > 0 && subList.Selected == null) subList.Select(-1);
|
||||
if (GameModePreset.list.Count > 0 && modeList.Selected == null) modeList.Select(-1);
|
||||
|
||||
@@ -337,8 +335,15 @@ namespace Barotrauma
|
||||
if (GameMain.Server.SubSelectionMode == SelectionMode.Random) subList.Select(Rand.Range(0,subList.CountChildren));
|
||||
if (GameMain.Server.ModeSelectionMode == SelectionMode.Random) modeList.Select(Rand.Range(0, modeList.CountChildren));
|
||||
}
|
||||
else
|
||||
else if (GameMain.Client != null)
|
||||
{
|
||||
if (GameMain.Client.GameStarted)
|
||||
{
|
||||
GUIButton spectateButton = new GUIButton(new Rectangle(0, 0, 80, 30), "Spectate", Alignment.BottomRight, GUI.Style, infoFrame);
|
||||
spectateButton.OnClicked = GameMain.Client.SpectateClicked;
|
||||
spectateButton.UserData = "spectateButton";
|
||||
}
|
||||
|
||||
UpdatePlayerFrame(GameMain.Client.CharacterInfo);
|
||||
}
|
||||
|
||||
@@ -654,7 +659,6 @@ namespace Barotrauma
|
||||
public void NewChatMessage(string message, Color color)
|
||||
{
|
||||
float prevSize = chatBox.BarSize;
|
||||
float oldScroll = chatBox.BarScroll;
|
||||
|
||||
while (chatBox.CountChildren>20)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Barotrauma
|
||||
|
||||
if (GameMain.Server != null)
|
||||
{
|
||||
UpdateVoteTexts(GameMain.Server.connectedClients, VoteType.Sub);
|
||||
UpdateVoteTexts(GameMain.Server.ConnectedClients, VoteType.Sub);
|
||||
GameMain.Server.UpdateVoteStatus();
|
||||
}
|
||||
else
|
||||
@@ -44,7 +44,7 @@ namespace Barotrauma
|
||||
GameMain.NetLobbyScreen.InfoFrame.FindChild("modevotes").Visible = value;
|
||||
if (GameMain.Server != null)
|
||||
{
|
||||
UpdateVoteTexts(GameMain.Server.connectedClients, VoteType.Mode);
|
||||
UpdateVoteTexts(GameMain.Server.ConnectedClients, VoteType.Mode);
|
||||
GameMain.Server.UpdateVoteStatus();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace Barotrauma
|
||||
|
||||
if (string.IsNullOrWhiteSpace(masterServerData))
|
||||
{
|
||||
var nameText = new GUITextBlock(new Rectangle(0, 0, 0, 20), "Couldn't find any servers", GUI.Style, serverList);
|
||||
new GUITextBlock(new Rectangle(0, 0, 0, 20), "Couldn't find any servers", GUI.Style, serverList);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user