v0.5.0, updated subs + changelog
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
@@ -210,7 +211,10 @@ namespace Barotrauma.Networking
|
||||
private void LoadSettings()
|
||||
{
|
||||
XDocument doc = null;
|
||||
doc = ToolBox.TryLoadXml(SettingsFile);
|
||||
if (File.Exists(SettingsFile))
|
||||
{
|
||||
doc = ToolBox.TryLoadXml(SettingsFile);
|
||||
}
|
||||
|
||||
if (doc == null || doc.Root == null)
|
||||
{
|
||||
@@ -379,7 +383,7 @@ namespace Barotrauma.Networking
|
||||
respawnDurationSlider.ToolTip = minRespawnText.ToolTip;
|
||||
respawnDurationSlider.UserData = respawnDurationText;
|
||||
respawnDurationSlider.Step = 0.1f;
|
||||
respawnDurationSlider.BarScroll = MinRespawnRatio;
|
||||
respawnDurationSlider.BarScroll = MaxTransportTime <= 0.0f ? 1.0f : (MaxTransportTime - 60.0f) / 600.0f;
|
||||
respawnDurationSlider.OnMoved = (GUIScrollBar scrollBar, float barScroll) =>
|
||||
{
|
||||
GUITextBlock txt = scrollBar.UserData as GUITextBlock;
|
||||
@@ -397,7 +401,7 @@ namespace Barotrauma.Networking
|
||||
|
||||
return true;
|
||||
};
|
||||
respawnDurationSlider.OnMoved(respawnDurationSlider, (MaxTransportTime - 60.0f)/600.0f);
|
||||
respawnDurationSlider.OnMoved(respawnDurationSlider, respawnDurationSlider.BarScroll);
|
||||
|
||||
y += 40;
|
||||
|
||||
|
||||
@@ -402,7 +402,8 @@ namespace Barotrauma.Networking
|
||||
|
||||
ItemPrefab divingSuitPrefab = ItemPrefab.list.Find(ip => ip.Name == "Diving Suit") as ItemPrefab;
|
||||
ItemPrefab oxyPrefab = ItemPrefab.list.Find(ip => ip.Name == "Oxygen Tank") as ItemPrefab;
|
||||
ItemPrefab scooterPrefab = ItemPrefab.list.Find(ip => ip.Name == "Underwater Scooter") as ItemPrefab;
|
||||
ItemPrefab scooterPrefab = ItemPrefab.list.Find(ip => ip.Name == "Underwater Scooter") as ItemPrefab;
|
||||
ItemPrefab batteryPrefab = ItemPrefab.list.Find(ip => ip.Name == "Battery Cell") as ItemPrefab;
|
||||
|
||||
var cargoSp = WayPoint.WayPointList.Find(wp => wp.Submarine == respawnShuttle && wp.SpawnType == SpawnType.Cargo);
|
||||
|
||||
@@ -425,25 +426,33 @@ namespace Barotrauma.Networking
|
||||
|
||||
spawnedCharacters.Add(character);
|
||||
|
||||
Vector2 pos = cargoSp == null ? character.Position : cargoSp.Position;
|
||||
|
||||
if (divingSuitPrefab != null && oxyPrefab != null)
|
||||
{
|
||||
Vector2 pos = cargoSp == null ? character.Position : cargoSp.Position;
|
||||
|
||||
var divingSuit = new Item(divingSuitPrefab, pos, respawnShuttle);
|
||||
var oxyTank = new Item(oxyPrefab, pos, respawnShuttle);
|
||||
var scooter = new Item(scooterPrefab, pos, respawnShuttle);
|
||||
|
||||
divingSuit.Combine(oxyTank);
|
||||
|
||||
spawnedItems.Add(divingSuit);
|
||||
spawnedItems.Add(oxyTank);
|
||||
spawnedItems.Add(scooter);
|
||||
|
||||
Item.Spawner.AddToSpawnedList(divingSuit);
|
||||
Item.Spawner.AddToSpawnedList(oxyTank);
|
||||
Item.Spawner.AddToSpawnedList(scooter);
|
||||
}
|
||||
|
||||
if (scooterPrefab != null && batteryPrefab != null)
|
||||
{
|
||||
var scooter = new Item(scooterPrefab, pos, respawnShuttle);
|
||||
var battery = new Item(batteryPrefab, pos, respawnShuttle);
|
||||
|
||||
scooter.Combine(battery);
|
||||
|
||||
spawnedItems.Add(scooter);
|
||||
spawnedItems.Add(battery);
|
||||
}
|
||||
|
||||
spawnedItems.ForEach(s => Item.Spawner.AddToSpawnedList(s));
|
||||
|
||||
character.GiveJobItems(waypoints[i]);
|
||||
GameMain.GameSession.CrewManager.characters.Add(character);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user