Some more randomness in level generation, info message about the radio command in mp

This commit is contained in:
Regalis
2016-04-23 17:32:52 +03:00
parent 1a96159bdb
commit 8c19adeb5e
4 changed files with 20 additions and 11 deletions

View File

@@ -585,11 +585,6 @@ namespace Barotrauma
}
}
if (cells.IndexOf(closestCell) == -1)
{
int asdf = 1;
}
return cells.IndexOf(closestCell);
}

View File

@@ -124,7 +124,10 @@ namespace Barotrauma
public static Level CreateRandom(LocationConnection locationConnection)
{
string seed = locationConnection.Locations[0].Name + locationConnection.Locations[1].Name;
return new Level(seed, locationConnection.Difficulty, 100000, 50000, 2000);
Rand.SetSyncedSeed(ToolBox.StringToInt(seed));
return new Level(seed, locationConnection.Difficulty, Rand.Range(80000, 120000, false), Rand.Range(40000, 60000, false), 2000);
}
public static Level CreateRandom(string seed = "")
@@ -133,7 +136,10 @@ namespace Barotrauma
{
seed = Rand.Range(0, int.MaxValue, false).ToString();
}
return new Level(seed, Rand.Range(30.0f,80.0f,false), 100000, 50000, 2000);
Rand.SetSyncedSeed(ToolBox.StringToInt(seed));
return new Level(seed, Rand.Range(30.0f, 80.0f, false), Rand.Range(80000, 120000, false), Rand.Range(40000, 60000, false), 2000);
}
public void Generate(bool mirror=false)
@@ -290,7 +296,7 @@ namespace Barotrauma
cells = CleanCells(pathCells);
pathCells.AddRange(CreateBottomHoles(Rand.Range(0.2f,0.8f, false), new Rectangle(
pathCells.AddRange(CreateBottomHoles(Rand.Range(0.1f,0.8f, false), new Rectangle(
(int)(borders.Width * 0.2f), 0,
(int)(borders.Width * 0.6f), (int)(borders.Height * 0.3f))));

View File

@@ -660,7 +660,7 @@ namespace Barotrauma.Networking
GameMain.GameScreen.Select();
AddChatMessage("Press TAB to chat", ChatMessageType.Server);
AddChatMessage("Press TAB to chat. Use ''r;'' to talk through the radio.", ChatMessageType.Server);
//GameMain.GameSession.CrewManager.CreateCrewFrame(crew);

View File

@@ -955,8 +955,16 @@ namespace Barotrauma.Networking
GameMain.GameScreen.Select();
AddChatMessage("Press TAB to chat. Use ''d;'' to talk to dead players and spectators, "
+"and ''player name;'' to only send the message to a specific player.", ChatMessageType.Server);
if (myCharacter == null)
{
AddChatMessage("Press TAB to chat. Use ''d;'' to talk to dead players and spectators, "
+ "and ''player name;'' to only send the message to a specific player.", ChatMessageType.Server);
}
else
{
AddChatMessage("Press TAB to chat. Use ''r;'' to talk through the radio.", ChatMessageType.Server);
}
yield return CoroutineStatus.Success;
}