v0.1
|
After Width: | Height: | Size: 17 KiB |
@@ -34,6 +34,9 @@
|
||||
<PropertyGroup>
|
||||
<StartupObject>Launcher.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -96,6 +99,9 @@
|
||||
<Name>Subsurface</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Icon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
<Items>
|
||||
<Item
|
||||
name="Skyholder Artifact"
|
||||
pickdistance="150"
|
||||
price="100">
|
||||
pickdistance="150">
|
||||
|
||||
<Sprite texture="artifact.png" depth="0.8"/>
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
name="Button"
|
||||
type="Controller"
|
||||
linkable="true"
|
||||
pickdistance="150.0">
|
||||
pickdistance="150.0"
|
||||
price="10">
|
||||
|
||||
<Sprite texture ="button.png" depth="0.8"/>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<Sprite texture ="door.png" sourcerect="0,0,48,208" depth="0.8" origin="0.5,0.5"/>
|
||||
|
||||
<Door>
|
||||
<Sprite texture ="door.png" sourcerect="80,0,19,208" depth="0.4" origin="0.5,0.0"/>
|
||||
<Sprite texture ="door.png" sourcerect="80,0,19,208" depth="0.0" origin="0.5,0.0"/>
|
||||
</Door>
|
||||
|
||||
<AiTarget sightrange="5000.0"/>
|
||||
@@ -29,7 +29,7 @@
|
||||
<Sprite texture ="door.png" sourcerect="0,0,48,208" depth="0.8" origin="0.5,0.5"/>
|
||||
|
||||
<Door window="0,-18,10,89">
|
||||
<Sprite texture ="door.png" sourcerect="56,0,19,208" depth="0.4" origin="0.5,0.0"/>
|
||||
<Sprite texture ="door.png" sourcerect="56,0,19,208" depth="0.0" origin="0.5,0.0"/>
|
||||
</Door>
|
||||
|
||||
<AiTarget sightrange="5000.0"/>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<Item
|
||||
name="Medical Syringe"
|
||||
Tags="smallitem"
|
||||
pickdistance="150">
|
||||
pickdistance="150"
|
||||
price="50">
|
||||
|
||||
<Sprite texture ="med.png" sourcerect="0,0,24,5" depth="0.6"/>
|
||||
|
||||
@@ -17,7 +18,8 @@
|
||||
<Item
|
||||
name="Bandage"
|
||||
Tags="smallitem"
|
||||
pickdistance="150">
|
||||
pickdistance="150"
|
||||
price="20">
|
||||
|
||||
<Sprite texture ="med.png" sourcerect="0,14,14,18" depth="0.6"/>
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<Item
|
||||
name="Welding Tool"
|
||||
Tags="smallitem"
|
||||
pickdistance="200">
|
||||
pickdistance="200"
|
||||
price="100">
|
||||
|
||||
<Sprite texture ="weldingtool.png" depth="0.5"/>
|
||||
|
||||
@@ -45,7 +46,8 @@
|
||||
<Item
|
||||
name="Plasma Cutter"
|
||||
Tags="smallitem"
|
||||
pickdistance="200">
|
||||
pickdistance="200"
|
||||
price="100">
|
||||
|
||||
<Sprite texture ="plasmacutter.png" depth="0.5"/>
|
||||
|
||||
@@ -77,7 +79,8 @@
|
||||
<Item
|
||||
name="Welding Fuel Tank"
|
||||
Tags="smallitem"
|
||||
pickdistance="150">
|
||||
pickdistance="150"
|
||||
price="50">
|
||||
|
||||
<Sprite texture ="fueltank.png" depth="0.5"/>
|
||||
|
||||
@@ -90,7 +93,8 @@
|
||||
<Item
|
||||
name="Screwdriver"
|
||||
Tags="smallitem"
|
||||
pickdistance="200">
|
||||
pickdistance="200"
|
||||
price="10">
|
||||
|
||||
<Sprite texture ="screwdriver.png" depth="0.5"/>
|
||||
|
||||
@@ -104,7 +108,8 @@
|
||||
<Item
|
||||
name="Wrench"
|
||||
Tags="smallitem"
|
||||
pickdistance="200">
|
||||
pickdistance="200"
|
||||
price="10">
|
||||
|
||||
<Sprite texture ="wrench.png" depth="0.5"/>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name="C-4 Block"
|
||||
Tags="smallitem,explosive"
|
||||
pickdistance="150"
|
||||
price="50">
|
||||
price="100">
|
||||
|
||||
<Sprite texture="explosives.png" depth="0.8" sourcerect="0,0,16,7"/>
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<Items>
|
||||
<Item
|
||||
name="Spear"
|
||||
pickdistance="200">
|
||||
pickdistance="200"
|
||||
price="50">
|
||||
|
||||
<Sprite texture ="spear.png" depth="0.55"/>
|
||||
|
||||
@@ -17,7 +18,8 @@
|
||||
|
||||
<Item
|
||||
name="Harpoon Gun"
|
||||
pickdistance="200" >
|
||||
pickdistance="200"
|
||||
price="500">
|
||||
|
||||
<Sprite texture ="harpoongun.png" depth="0.5"/>
|
||||
|
||||
@@ -39,7 +41,9 @@
|
||||
|
||||
<Item
|
||||
name="Stun Grenade"
|
||||
pickdistance="200" >
|
||||
pickdistance="200"
|
||||
price="200"
|
||||
tags="smallitem">
|
||||
|
||||
<Sprite texture ="stungrenade.png" depth="0.04"/>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 301 B After Width: | Height: | Size: 283 B |
|
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 253 B |
@@ -6,7 +6,7 @@
|
||||
commonness="10"
|
||||
reward="1000"
|
||||
radarlabel="Infrasonic signal"
|
||||
failuremessage="fail"
|
||||
failuremessage="Retrieving the artifact failed"
|
||||
successmessage="The artifact has been succesfully retrived"
|
||||
itemname="Skyholder Artifact">
|
||||
</SalvageQuest>
|
||||
@@ -17,7 +17,6 @@
|
||||
commonness="10"
|
||||
reward="1000"
|
||||
radarlabel="Moloch"
|
||||
failuremessage="fail"
|
||||
successmessage="The Moloch has been killed."
|
||||
monsterfile="Content/Characters/Moloch/moloch.xml">
|
||||
</MonsterQuest>
|
||||
@@ -28,7 +27,6 @@
|
||||
commonness="10"
|
||||
reward="800"
|
||||
radarlabel="Tiger Thresher"
|
||||
failuremessage="fail"
|
||||
successmessage="The Tiger Thresher has been killed."
|
||||
monsterfile="Content/Characters/TigerThresher/tigerthresher.xml">
|
||||
</MonsterQuest>
|
||||
@@ -39,7 +37,6 @@
|
||||
commonness="5"
|
||||
reward="1000"
|
||||
radarlabel="Infrasonic signal"
|
||||
failuremessage="It turns out the signal picked up by [location1] was emitted by a Moloch."
|
||||
successmessage="It turns out the signal was emitted by a Moloch. The researchers of [location1] have agreed to pay you the reward nevertheless for killing the Moloch."
|
||||
monsterfile="Content/Characters/Moloch/moloch.xml">
|
||||
</MonsterQuest>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 17 KiB |
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.0.1.3")]
|
||||
[assembly: AssemblyFileVersion("0.0.1.3")]
|
||||
[assembly: AssemblyVersion("0.1.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.1.0.0")]
|
||||
|
||||
@@ -54,6 +54,12 @@ namespace Subsurface
|
||||
{
|
||||
XDocument doc = ToolBox.TryLoadXml(filePath);
|
||||
|
||||
if (doc==null)
|
||||
{
|
||||
DebugConsole.ThrowError("Couldn't load content package ''"+filePath+"''!");
|
||||
return;
|
||||
}
|
||||
|
||||
Path = filePath;
|
||||
|
||||
name = ToolBox.GetAttributeString(doc.Root, "name", "");
|
||||
@@ -136,6 +136,12 @@ namespace Subsurface
|
||||
|
||||
public static void ExecuteCommand(string command, Game1 game)
|
||||
{
|
||||
if (Game1.Client!=null)
|
||||
{
|
||||
ThrowError("Console commands are disabled in multiplayer mode");
|
||||
return;
|
||||
}
|
||||
|
||||
if (command == "") return;
|
||||
string[] commands = command.Split(' ');
|
||||
|
||||
@@ -253,12 +259,12 @@ namespace Subsurface
|
||||
if (commands.Length < 2) break;
|
||||
Submarine.Load("Content/SavedMaps/" + string.Join(" ", commands.Skip(1)));
|
||||
break;
|
||||
case "savegame":
|
||||
SaveUtil.SaveGame(SaveUtil.SaveFolder+"save");
|
||||
break;
|
||||
case "loadgame":
|
||||
SaveUtil.LoadGame(SaveUtil.SaveFolder + "save");
|
||||
break;
|
||||
//case "savegame":
|
||||
// SaveUtil.SaveGame();
|
||||
// break;
|
||||
//case "loadgame":
|
||||
// SaveUtil.LoadGame(SaveUtil.SaveFolder + "save");
|
||||
// break;
|
||||
case "messagebox":
|
||||
if (commands.Length < 3) break;
|
||||
new GUIMessageBox(commands[1], commands[2]);
|
||||
@@ -121,8 +121,16 @@ namespace Subsurface
|
||||
object instance = constructor.Invoke(new object[] { element });
|
||||
|
||||
Quest quest = (Quest)instance;
|
||||
quest.description = quest.description.Replace("[location1]", locations[0].Name);
|
||||
quest.description = quest.description.Replace("[location2]", locations[1].Name);
|
||||
|
||||
for (int n = 0; n<2; n++)
|
||||
{
|
||||
quest.description = quest.description.Replace("[location"+(n+1)+"]", locations[n].Name);
|
||||
|
||||
quest.successMessage = quest.successMessage.Replace("[location" + (n + 1) + "]", locations[n].Name);
|
||||
quest.failureMessage = quest.failureMessage.Replace("[location" + (n + 1) + "]", locations[n].Name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return quest;
|
||||
}
|
||||
@@ -80,10 +80,23 @@ namespace Subsurface
|
||||
}
|
||||
}
|
||||
|
||||
button = new GUIButton(new Rectangle(0, y, 0, 30), "Quit", Alignment.CenterX, GUI.style, pauseMenu);
|
||||
if (Screen.Selected == Game1.LobbyScreen)
|
||||
{
|
||||
SinglePlayerMode spMode = Game1.GameSession.gameMode as SinglePlayerMode;
|
||||
if (spMode != null)
|
||||
{
|
||||
button = new GUIButton(new Rectangle(0, y, 0, 30), "Save & quit", Alignment.CenterX, GUI.style, pauseMenu);
|
||||
button.OnClicked += QuitClicked;
|
||||
button.OnClicked += TogglePauseMenu;
|
||||
button.UserData = "save";
|
||||
|
||||
button.UserData = (int)MainMenuScreen.Tabs.Main;
|
||||
button.OnClicked += Game1.MainMenuScreen.SelectTab;
|
||||
y += 60;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
button = new GUIButton(new Rectangle(0, y, 0, 30), "Quit", Alignment.CenterX, GUI.style, pauseMenu);
|
||||
button.OnClicked += QuitClicked;
|
||||
button.OnClicked += TogglePauseMenu;
|
||||
}
|
||||
|
||||
@@ -96,6 +109,20 @@ namespace Subsurface
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool QuitClicked(GUIButton button, object obj)
|
||||
{
|
||||
if (button.UserData as string == "save")
|
||||
{
|
||||
SaveUtil.SaveGame(Game1.GameSession.SaveFile);
|
||||
}
|
||||
|
||||
|
||||
Game1.MainMenuScreen.Select();
|
||||
Game1.MainMenuScreen.SelectTab(null, (int)MainMenuScreen.Tabs.Main);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void DrawLine(SpriteBatch sb, Vector2 start, Vector2 end, Color clr, float depth = 0.0f)
|
||||
{
|
||||
Vector2 edge = end - start;
|
||||
@@ -297,6 +297,7 @@ namespace Subsurface
|
||||
{
|
||||
Screen.Selected.Draw(deltaTime, GraphicsDevice, spriteBatch);
|
||||
}
|
||||
|
||||
//renderTimeElapsed = (int)renderTimer.Elapsed.Ticks;
|
||||
//renderTimer.Stop();
|
||||
if (sw.Elapsed.TotalSeconds < Physics.step)
|
||||
@@ -25,7 +25,7 @@ namespace Subsurface
|
||||
//private GUIListBox chatBox;
|
||||
//private GUITextBox textBox;
|
||||
|
||||
private string savePath;
|
||||
private string saveFile;
|
||||
|
||||
private Submarine submarine;
|
||||
|
||||
@@ -60,22 +60,22 @@ namespace Subsurface
|
||||
get { return submarine; }
|
||||
}
|
||||
|
||||
public string SavePath
|
||||
public string SaveFile
|
||||
{
|
||||
get { return savePath; }
|
||||
get { return saveFile; }
|
||||
}
|
||||
|
||||
public GameSession(Submarine submarine, GameModePreset gameModePreset)
|
||||
:this(submarine, gameModePreset.Instantiate())
|
||||
public GameSession(Submarine submarine, string saveFile, GameModePreset gameModePreset)
|
||||
:this(submarine, saveFile, gameModePreset.Instantiate())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public GameSession(Submarine selectedSub, GameMode gameMode = null)
|
||||
public GameSession(Submarine selectedSub, string saveFile, GameMode gameMode = null)
|
||||
{
|
||||
taskManager = new TaskManager(this);
|
||||
|
||||
savePath = SaveUtil.CreateSavePath(SaveUtil.SaveFolder);
|
||||
this.saveFile = saveFile;
|
||||
|
||||
guiRoot = new GUIFrame(new Rectangle(0,0,Game1.GraphicsWidth,Game1.GraphicsWidth), Color.Transparent);
|
||||
|
||||
@@ -84,8 +84,8 @@ namespace Subsurface
|
||||
|
||||
}
|
||||
|
||||
public GameSession(Submarine selectedSub, string savePath, string filePath)
|
||||
: this(selectedSub)
|
||||
public GameSession(Submarine selectedSub, string saveFile, string filePath)
|
||||
: this(selectedSub, saveFile)
|
||||
{
|
||||
XDocument doc = ToolBox.TryLoadXml(filePath);
|
||||
if (doc == null) return;
|
||||
@@ -96,8 +96,6 @@ namespace Subsurface
|
||||
|
||||
gameMode = new SinglePlayerMode(subElement);
|
||||
}
|
||||
|
||||
this.savePath = savePath;
|
||||
}
|
||||
|
||||
public void StartShift(TimeSpan duration, string levelSeed)
|
||||
@@ -130,7 +128,6 @@ namespace Subsurface
|
||||
|
||||
public void EndShift(string endMessage)
|
||||
{
|
||||
|
||||
if (Quest != null) Quest.End();
|
||||
|
||||
if (Game1.Server!=null)
|
||||
@@ -159,7 +156,7 @@ namespace Subsurface
|
||||
|
||||
public bool LoadPrevious(GUIButton button, object obj)
|
||||
{
|
||||
SaveUtil.LoadGame(savePath);
|
||||
SaveUtil.LoadGame(saveFile);
|
||||
|
||||
Game1.LobbyScreen.Select();
|
||||
|
||||
@@ -188,6 +185,9 @@ namespace Subsurface
|
||||
XDocument doc = new XDocument(
|
||||
new XElement((XName)"Gamesession"));
|
||||
|
||||
var now = DateTime.Now;
|
||||
doc.Root.Add(new XAttribute("savetime", now.Hour + ":" + now.Minute + ", " + now.ToShortDateString()));
|
||||
|
||||
((SinglePlayerMode)gameMode).Save(doc.Root);
|
||||
|
||||
try
|
||||
@@ -101,7 +101,7 @@ namespace Subsurface
|
||||
|
||||
if (!savedOnStart)
|
||||
{
|
||||
SaveUtil.SaveGame(Game1.GameSession.SavePath);
|
||||
SaveUtil.SaveGame(Game1.GameSession.SaveFile);
|
||||
savedOnStart = true;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,11 @@ namespace Subsurface
|
||||
|
||||
public override void End(string endMessage = "")
|
||||
{
|
||||
base.End(endMessage);
|
||||
|
||||
isRunning = false;
|
||||
|
||||
//if (endMessage != "" || this.endMessage == null) this.endMessage = endMessage;
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
List<Character> casualties = crewManager.characters.FindAll(c => c.IsDead);
|
||||
@@ -187,7 +191,7 @@ namespace Subsurface
|
||||
{
|
||||
sb.Append("Your entire crew has died!");
|
||||
|
||||
var msgBox = new GUIMessageBox("GG", sb.ToString(), new string[] { "Load game", "Quit" });
|
||||
var msgBox = new GUIMessageBox("", sb.ToString(), new string[] { "Load game", "Quit" });
|
||||
msgBox.Buttons[0].OnClicked += Game1.GameSession.LoadPrevious;
|
||||
msgBox.Buttons[0].OnClicked += msgBox.Close;
|
||||
msgBox.Buttons[1].OnClicked = Game1.LobbyScreen.QuitToMainMenu;
|
||||
@@ -213,7 +217,7 @@ namespace Subsurface
|
||||
map.MoveToNextLocation();
|
||||
}
|
||||
|
||||
SaveUtil.SaveGame(Game1.GameSession.SavePath);
|
||||
SaveUtil.SaveGame(Game1.GameSession.SaveFile);
|
||||
}
|
||||
|
||||
crewManager.EndShift();
|
||||