Switch to Barotrauma & too many misc changes to remember

This commit is contained in:
Regalis
2015-10-16 18:11:58 +03:00
parent 2bb5d41836
commit 838022fcd5
203 changed files with 540 additions and 419 deletions
+2 -2
View File
@@ -56,9 +56,9 @@
<MonoGameContentReference Include="Content\Content.mgcb" /> <MonoGameContentReference Include="Content\Content.mgcb" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Subsurface\Subsurface.csproj"> <ProjectReference Include="..\Subsurface\Barotrauma.csproj">
<Project>{008c0f83-e914-4966-9135-ea885059edd8}</Project> <Project>{008c0f83-e914-4966-9135-ea885059edd8}</Project>
<Name>Subsurface</Name> <Name>Barotrauma</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+1 -1
View File
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
using Subsurface; using Barotrauma;
using System.IO; using System.IO;
namespace CrashReporter namespace CrashReporter
@@ -196,11 +196,6 @@ namespace FarseerPhysics.Collision.Shapes
I += (0.25f * k_inv3 * D) * (intx2 + inty2); I += (0.25f * k_inv3 * D) * (intx2 + inty2);
} }
if (area <= Settings.Epsilon)
{
int alsmfkldsmfdkasf = 1;
}
//The area is too small for the engine to handle. //The area is too small for the engine to handle.
Debug.Assert(area > Settings.Epsilon); Debug.Assert(area > Settings.Epsilon);
+2 -2
View File
@@ -1,5 +1,5 @@
using RestSharp; using RestSharp;
using Subsurface; using Barotrauma;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -23,7 +23,7 @@ namespace Launcher
string version = AssemblyName.GetAssemblyName("Barotrauma.exe").Version.ToString(); string version = AssemblyName.GetAssemblyName("Barotrauma.exe").Version.ToString();
private const string configPath = "config.xml"; private const string configPath = "config.xml";
private Subsurface.GameSettings settings; private Barotrauma.GameSettings settings;
private string latestVersionFileList, latestVersionFolder; private string latestVersionFileList, latestVersionFolder;
+2 -2
View File
@@ -100,9 +100,9 @@
<None Include="App.config" /> <None Include="App.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Subsurface\Subsurface.csproj"> <ProjectReference Include="..\Subsurface\Barotrauma.csproj">
<Project>{008c0f83-e914-4966-9135-ea885059edd8}</Project> <Project>{008c0f83-e914-4966-9135-ea885059edd8}</Project>
<Name>Subsurface</Name> <Name>Barotrauma</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
+1 -1
View File
@@ -1,4 +1,4 @@
using Subsurface; using Barotrauma;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
+2 -2
View File
@@ -62,9 +62,9 @@
<MonoGameContentReference Include="Content\Content.mgcb" /> <MonoGameContentReference Include="Content\Content.mgcb" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Subsurface\Subsurface.csproj"> <ProjectReference Include="..\Subsurface\Barotrauma.csproj">
<Project>{008c0f83-e914-4966-9135-ea885059edd8}</Project> <Project>{008c0f83-e914-4966-9135-ea885059edd8}</Project>
<Name>Subsurface</Name> <Name>Barotrauma</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
+2 -2
View File
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
using Subsurface; using Barotrauma;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@@ -25,7 +25,7 @@ namespace Launcher2
string version = AssemblyName.GetAssemblyName("Barotrauma.exe").Version.ToString(); string version = AssemblyName.GetAssemblyName("Barotrauma.exe").Version.ToString();
private const string configPath = "config.xml"; private const string configPath = "config.xml";
private Subsurface.GameSettings settings; private Barotrauma.GameSettings settings;
private string latestVersionFileList, latestVersionFolder; private string latestVersionFileList, latestVersionFolder;
@@ -8,7 +8,7 @@
<ProjectGuid>{008C0F83-E914-4966-9135-EA885059EDD8}</ProjectGuid> <ProjectGuid>{008C0F83-E914-4966-9135-EA885059EDD8}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Subsurface</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
@@ -383,6 +383,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Content> </Content>
<Content Include="Content\Items\Weapons\stunbaton.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Jobs.xml"> <Content Include="Content\Jobs.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -845,6 +848,12 @@
<None Include="Content\Items\Engine\radarPing.ogg"> <None Include="Content\Items\Engine\radarPing.ogg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="Content\Items\Medical\bandage.ogg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Items\Medical\syringe.ogg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Items\OxygenGenerator\oxygengenerator.ogg"> <None Include="Content\Items\OxygenGenerator\oxygengenerator.ogg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
@@ -875,6 +884,9 @@
<None Include="Content\Items\Weapons\railgun.ogg"> <None Include="Content\Items\Weapons\railgun.ogg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="Content\Items\Weapons\stunbaton.ogg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Content\Items\Weapons\stunGrenade.ogg"> <None Include="Content\Items\Weapons\stunGrenade.ogg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory> <PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory /> <InstallUrlHistory />
<SupportUrlHistory /> <SupportUrlHistory />
<UpdateUrlHistory /> <UpdateUrlHistory />
<BootstrapperUrlHistory /> <BootstrapperUrlHistory />
<ErrorReportUrlHistory /> <ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture> <FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles> <VerifyUploadedFiles>false</VerifyUploadedFiles>
<ProjectView>ProjectFiles</ProjectView> <ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ReferencePath> <ReferencePath>
</ReferencePath> </ReferencePath>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
+2 -2
View File
@@ -62,7 +62,7 @@
<Body width="52" height="17"/> <Body width="52" height="17"/>
<Wearable slots="Any,Torso" armorvalue="10.0"> <Wearable slots="Any,Torso" armorvalue="10.0">
<sprite texture="securitygear.png" limb="Torso" sourcerect="0,0,38,58" origin="0.47,0.48"/> <sprite texture="securitygear.png" limb="Torso" sourcerect="0,0,38,58" origin="0.52,0.48"/>
<sprite texture="securitygear.png" limb="RightArm" sourcerect="41,0,21,21" origin="0.5,1.1"/> <sprite texture="securitygear.png" limb="RightArm" sourcerect="41,0,21,21" origin="0.5,1.1"/>
</Wearable> </Wearable>
@@ -78,7 +78,7 @@
<Body radius="12"/> <Body radius="12"/>
<Wearable slots="Any,Head" armorvalue="20.0"> <Wearable slots="Any,Head" armorvalue="20.0">
<sprite texture="securitygear.png" limb="Head" sourcerect="39,31,29,22" origin="0.5,1.5"/> <sprite texture="securitygear.png" limb="Head" sourcerect="39,31,29,22" origin="0.51,0.9"/>
</Wearable> </Wearable>
</Item> </Item>
@@ -41,7 +41,8 @@
<Sprite texture ="battery.png" depth="0.8"/> <Sprite texture ="battery.png" depth="0.8"/>
<PowerContainer capacity="2000.0" maxrechargespeed="500.0" maxoutput="1000.0" canbeselected = "true"> <PowerContainer capacity="2000.0" maxrechargespeed="500.0" maxoutput="1000.0" canbeselected = "true">
<GuiFrame rect="0,0,350,160" alignment="Center" color="0.0,0.0,0.0,0.6"/> <GuiFrame rect="0,-100,350,160" alignment="Center" color="0.0,0.0,0.0,0.6"/>
<StatusEffect type="OnActive" target="Contained" targetnames="loadable" Condition="2.0"/>
</PowerContainer> </PowerContainer>
<ConnectionPanel canbeselected = "true" msg="Rewire [Screwdriver]"> <ConnectionPanel canbeselected = "true" msg="Rewire [Screwdriver]">
@@ -50,7 +51,11 @@
</StatusEffect> </StatusEffect>
<requireditem name="Screwdriver" type="Equipped"/> <requireditem name="Screwdriver" type="Equipped"/>
<input name="power"/> <input name="power"/>
</ConnectionPanel> </ConnectionPanel>
<ItemContainer capacity="3" hideitems="true">
<Containable name="loadable"/>
</ItemContainer>
</Item> </Item>
<Item <Item
Binary file not shown.
+2 -2
View File
@@ -11,7 +11,7 @@
<Body width="24" height="5"/> <Body width="24" height="5"/>
<Holdable slots="Any,RightHand,LeftHand" RemoveOnUse="true"> <Holdable slots="Any,RightHand,LeftHand" RemoveOnUse="true">
<StatusEffect type="OnUse" target="This, Character" health="30.0" Condition="-100.0" disabledeltatime="true"/> <StatusEffect type="OnUse" target="This, Character" health="30.0" Condition="-100.0" disabledeltatime="true" sound="Content/Items/Medical/syringe.ogg"/>
</Holdable> </Holdable>
</Item> </Item>
@@ -26,7 +26,7 @@
<Body width="9" height="15"/> <Body width="9" height="15"/>
<Holdable slots="Any,RightHand,LeftHand" RemoveOnUse="true"> <Holdable slots="Any,RightHand,LeftHand" RemoveOnUse="true">
<StatusEffect type="OnUse" target="This, Character" bleeding="-10.0" Condition="-100.0" disabledeltatime="true"/> <StatusEffect type="OnUse" target="This, Character" bleeding="-10.0" Condition="-100.0" disabledeltatime="true" sound="Content/Items/Medical/bandage.ogg"/>
</Holdable> </Holdable>
</Item> </Item>
Binary file not shown.
+1 -1
View File
@@ -3,7 +3,7 @@
linkable="true" linkable="true"
pickdistance="200"> pickdistance="200">
<Sprite texture ="pump.png" depth="0.08"/> <Sprite texture ="pump.png" depth="0.8"/>
<Pump canbeselected = "true" maxflow="500" PowerConsumption="300.0" MinVoltage="0.3"> <Pump canbeselected = "true" maxflow="500" PowerConsumption="300.0" MinVoltage="0.3">
<GuiFrame rect="0,0,330,145" alignment="Center" color="0.0,0.0,0.0,0.6"/> <GuiFrame rect="0,0,330,145" alignment="Center" color="0.0,0.0,0.0,0.6"/>
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

+23 -5
View File
@@ -49,7 +49,7 @@
<Body width="11" height="24" density="15" friction="0.8f"/> <Body width="11" height="24" density="15" friction="0.8f"/>
<Throwable slots="Any,RightHand,LeftHand" holdpos="0,0" handle1="0,0" throwforce="5.0" aimpos="35,-10"> <Throwable slots="Any,RightHand,LeftHand" holdpos="0,0" handle1="0,0" throwforce="4.0" aimpos="35,-10">
<StatusEffect type="OnUse" target="This" Condition="-100.0" delay="3.0" sound="Content/Items/Weapons/stunGrenade.ogg"> <StatusEffect type="OnUse" target="This" Condition="-100.0" delay="3.0" sound="Content/Items/Weapons/stunGrenade.ogg">
<Explosion range="500" damage="5" stun="10" force="0.1"/> <Explosion range="500" damage="5" stun="10" force="0.1"/>
</StatusEffect> </StatusEffect>
@@ -62,16 +62,34 @@
pickdistance="150" pickdistance="150"
price="100"> price="100">
<Sprite texture="harpoongun.png" depth="0.5"/> <Sprite texture="stunbaton.png" sourcerect="0,12,77,23" depth="0.5"/>
<Body width="90" height="30" density="10"/> <Body width="90" height="30" density="10"/>
<MeleeWeapon slots="Any,RightHand,LeftHand" <MeleeWeapon slots="Any,RightHand,LeftHand"
aimpos="50,0" handle1="-15,-6" holdangle="100"> aimpos="50,0" handle1="-15,-6" holdangle="100">
<Attack stun="10.0" sound="Content/Items/Electricity/zap1.ogg"> <RequiredItems name="Battery Cell" type="Contained" msg="Loaded Battery Cell required"/>
<ParticleEmitter particle="spark" velocitymin="100" velocitymax="200" anglemin="0" anglemax="360" particleamount="10"/> <Attack stun="10.0" sound="Content/Items/Electricity/zap1.ogg"/>
</Attack> <StatusEffect type="OnUse" target="Contained" Condition="-25.0" disabledeltatime="true" sound="Content/Items/Weapons/stunbaton.ogg">
<Explosion range="100.0" force="0.1" shockwave="false" flames="false" camerashake="5.0"/>
</StatusEffect>
</MeleeWeapon> </MeleeWeapon>
<ItemContainer capacity="1" hideitems="true">
<Containable name="Battery Cell"/>
</ItemContainer>
</Item>
<Item
name="Battery Cell"
pickdistance="150"
tags="smallitem,loadable">
<Sprite texture ="stunbaton.png" sourcerect="0,0,20,9" depth="0.8"/>
<Body width="20" height="9" density="15"/>
<Pickable slots="Any,RightHand,LeftHand"/>
</Item> </Item>
</Items> </Items>
+11 -11
View File
@@ -8,8 +8,8 @@
<Skills> <Skills>
<Skill name="Weapons" level="50,60"/> <Skill name="Weapons" level="50,60"/>
<Skill name="Construction" level="10,20"/> <Skill name="Construction" level="20,30"/>
<Skill name="Electrical Engineering" level="10,20"/> <Skill name="Electrical Engineering" level="20,30"/>
</Skills> </Skills>
</Job> </Job>
@@ -24,7 +24,7 @@
<Item name="Screwdriver"/> <Item name="Screwdriver"/>
</Job> </Job>
<Job name="Mechanic" description="Mechanics have high construction and mechanic skills. They can use welders and plasma cutters safely, and are usually the only ones who can fix broken mechanical devices." minnumber="1"> <Job name="Mechanic" description="Mechanics have high construction and mechanic skills. They are skilled at using tools such as plasma cutters and welders, and are usually the only ones who can fix broken mechanical devices." minnumber="1">
<Skills> <Skills>
<Skill name="Weapons" level="10,30"/> <Skill name="Weapons" level="10,30"/>
<Skill name="Construction" level="50,60"/> <Skill name="Construction" level="50,60"/>
@@ -35,18 +35,18 @@
<Item name="Screwdriver"/> <Item name="Screwdriver"/>
</Job> </Job>
<Job name="Security Officer" description="Security officers are are responsible for keeping the submarine safe from potential attackers. The creatures inhabiting the subsurface ocean aren't the only threat they need to worry about, as several of the renegade groups opposing the Europa Coalition are known to have sent infiltrators on board our vessels."> <Job name="Security Officer" description="Security officers are are responsible for keeping the submarine safe from potential attackers. The creatures inhabiting the ocean aren't the only threat they need to worry about, as several of the renegade groups opposing the Europa Coalition are known to have sent infiltrators on board the vessels." maxnumber="2">
<Skills> <Skills>
<Skill name="Weapons" level="10,30"/> <Skill name="Weapons" level="50,60"/>
<Skill name="Construction" level="50,60"/> <Skill name="Construction" level="10,20"/>
<Skill name="Electrical Engineering" level="30,40"/> <Skill name="Electrical Engineering" level="10,20"/>
</Skills> </Skills>
<Item name="ID Card"/> <Item name="Stun Baton"/>
<Item name="Wrench"/> <Item name="Body Armor"/>
<Item name="Screwdriver"/> <Item name="Ballistic Helmet"/>
</Job> </Job>
<Job name="Assistant" description="Assistants don't have any specific responsibilities or areas of expertise. This job is a good choice for newcomers who want to get a hang of working on board a submarine without taking up tasks that they aren't qualified for." allowalways="true"> <Job name="Assistant" description="Assistants don't have any specific responsibilities or areas of expertise. This job is a good choice for newcomers who want to get a hang of working on board the submarine without taking up tasks that they aren't qualified for." allowalways="true">
<Skills> <Skills>
<Skill name="Weapons" level="0,10"/> <Skill name="Weapons" level="0,10"/>
<Skill name="Construction" level="0,10"/> <Skill name="Construction" level="0,10"/>
Binary file not shown.
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<contentpackage name="Vanilla 0.1.3" path="Data/ContentPackages/Vanilla 0.1.3"> <contentpackage name="Vanilla 0.2" path="Data/ContentPackages/Vanilla 0.2">
<Item file="Content\Items\idcard.xml" /> <Item file="Content\Items\idcard.xml" />
<Item file="Content\Items\itemlabel.xml" /> <Item file="Content\Items\itemlabel.xml" />
<Item file="Content\Items\Artifacts\artifacts.xml" /> <Item file="Content\Items\Artifacts\artifacts.xml" />
@@ -32,5 +32,5 @@
<Character file="Content\Characters\TigerThresher\tigerthresher.xml" /> <Character file="Content\Characters\TigerThresher\tigerthresher.xml" />
<Structure file="Content\Map\StructurePrefabs.xml" /> <Structure file="Content\Map\StructurePrefabs.xml" />
<Jobs file="Content\Jobs.xml" /> <Jobs file="Content\Jobs.xml" />
<Executable file="Subsurface.exe" /> <Executable file="Barotrauma.exe" />
</contentpackage> </contentpackage>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
namespace Subsurface namespace Barotrauma
{ {
public class Camera public class Camera
{ {
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
namespace Subsurface namespace Barotrauma
{ {
class AIController : ISteerable class AIController : ISteerable
{ {
+1 -1
View File
@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
namespace Subsurface namespace Barotrauma
{ {
class AITarget class AITarget
{ {
@@ -8,7 +8,7 @@ using Microsoft.Xna.Framework;
using FarseerPhysics.Dynamics; using FarseerPhysics.Dynamics;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
namespace Subsurface namespace Barotrauma
{ {
class EnemyAIController : AIController class EnemyAIController : AIController
@@ -1,6 +1,6 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
namespace Subsurface namespace Barotrauma
{ {
interface ISteerable interface ISteerable
{ {
@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace Subsurface namespace Barotrauma
{ {
class PathNode class PathNode
{ {
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using FarseerPhysics.Dynamics; using FarseerPhysics.Dynamics;
namespace Subsurface namespace Barotrauma
{ {
class SteeringManager class SteeringManager
{ {
@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
namespace Subsurface namespace Barotrauma
{ {
class SteeringPath class SteeringPath
{ {
+11 -3
View File
@@ -1,12 +1,12 @@
using Lidgren.Network; using Lidgren.Network;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Subsurface.Networking; using Barotrauma.Networking;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
class AICharacter : Character class AICharacter : Character
{ {
@@ -14,6 +14,11 @@ namespace Subsurface
private AIController aiController; private AIController aiController;
public override AIController AIController
{
get { return aiController; }
}
public AICharacter(string file) : this(file, Vector2.Zero, null) public AICharacter(string file) : this(file, Vector2.Zero, null)
{ {
} }
@@ -37,7 +42,10 @@ namespace Subsurface
public AICharacter(string file, Vector2 position, CharacterInfo characterInfo = null, bool isNetworkPlayer = false) public AICharacter(string file, Vector2 position, CharacterInfo characterInfo = null, bool isNetworkPlayer = false)
: base(file, position, characterInfo, isNetworkPlayer) : base(file, position, characterInfo, isNetworkPlayer)
{ {
aiController = new EnemyAIController(this, file); aiController = new EnemyAIController(this, file);
if (GameMain.Client != null && GameMain.Server == null) Enabled = false;
} }
public override void Update(Camera cam, float deltaTime) public override void Update(Camera cam, float deltaTime)
@@ -2,7 +2,7 @@
using FarseerPhysics; using FarseerPhysics;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
namespace Subsurface namespace Barotrauma
{ {
class AnimController : Ragdoll class AnimController : Ragdoll
{ {
+2 -2
View File
@@ -1,10 +1,10 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Subsurface.Particles; using Barotrauma.Particles;
using System; using System;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
public enum DamageType { None, Blunt, Slash } public enum DamageType { None, Blunt, Slash }
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class BackgroundSprite : ISteerable class BackgroundSprite : ISteerable
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class BackgroundSpriteManager class BackgroundSpriteManager
{ {
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class BackgroundSpritePrefab class BackgroundSpritePrefab
{ {
+26 -12
View File
@@ -5,15 +5,15 @@ using Lidgren.Network;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
using Subsurface.Networking; using Barotrauma.Networking;
using Subsurface.Particles; using Barotrauma.Particles;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class Character : Entity, IDamageable, IPropertyObject class Character : Entity, IDamageable, IPropertyObject
@@ -33,6 +33,12 @@ namespace Subsurface
set { controlled = value; } set { controlled = value; }
} }
public bool Enabled
{
get;
set;
}
public readonly bool IsNetworkPlayer; public readonly bool IsNetworkPlayer;
private CharacterInventory inventory; private CharacterInventory inventory;
@@ -411,6 +417,8 @@ namespace Subsurface
AnimController.FindHull(); AnimController.FindHull();
CharacterList.Add(this); CharacterList.Add(this);
Enabled = true;
} }
private static string humanConfigFile; private static string humanConfigFile;
@@ -498,7 +506,7 @@ namespace Subsurface
public void Control(float deltaTime, Camera cam) public void Control(float deltaTime, Camera cam)
{ {
if (isDead) return; if (isDead || AnimController.StunTimer>0.0f) return;
Vector2 targetMovement = Vector2.Zero; Vector2 targetMovement = Vector2.Zero;
if (GetInputState(InputType.Left)) targetMovement.X -= 1.0f; if (GetInputState(InputType.Left)) targetMovement.X -= 1.0f;
@@ -741,17 +749,17 @@ namespace Subsurface
{ {
foreach (Character c in CharacterList) foreach (Character c in CharacterList)
{ {
if (c.isDead) continue; if (c.isDead || !c.Enabled) continue;
c.AnimController.UpdateAnim(deltaTime); c.AnimController.UpdateAnim(deltaTime);
} }
} }
public static void UpdateAll(Camera cam, float deltaTime) public static void UpdateAll(Camera cam, float deltaTime)
{ {
if (NewCharacterQueue.Count>0) //if (NewCharacterQueue.Count>0)
{ //{
new Character(NewCharacterQueue.Dequeue(), Vector2.Zero); // new Character(NewCharacterQueue.Dequeue(), Vector2.Zero);
} //}
foreach (Character c in CharacterList) foreach (Character c in CharacterList)
{ {
@@ -761,6 +769,8 @@ namespace Subsurface
public virtual void Update(Camera cam, float deltaTime) public virtual void Update(Camera cam, float deltaTime)
{ {
if (!Enabled) return;
AnimController.SimplePhysicsEnabled = (Character.controlled!=this && Vector2.Distance(cam.WorldViewCenter, Position)>5000.0f); AnimController.SimplePhysicsEnabled = (Character.controlled!=this && Vector2.Distance(cam.WorldViewCenter, Position)>5000.0f);
if (isDead) return; if (isDead) return;
@@ -828,6 +838,8 @@ namespace Subsurface
public void Draw(SpriteBatch spriteBatch) public void Draw(SpriteBatch spriteBatch)
{ {
if (!Enabled) return;
AnimController.Draw(spriteBatch); AnimController.Draw(spriteBatch);
//GUI.DrawLine(spriteBatch, ConvertUnits.ToDisplayUnits(animController.limbs[0].SimPosition.X, animController.limbs[0].SimPosition.Y), //GUI.DrawLine(spriteBatch, ConvertUnits.ToDisplayUnits(animController.limbs[0].SimPosition.X, animController.limbs[0].SimPosition.Y),
@@ -842,6 +854,8 @@ namespace Subsurface
public virtual void DrawFront(SpriteBatch spriteBatch) public virtual void DrawFront(SpriteBatch spriteBatch)
{ {
if (!Enabled) return;
Vector2 pos = ConvertUnits.ToDisplayUnits(AnimController.Limbs[0].SimPosition); Vector2 pos = ConvertUnits.ToDisplayUnits(AnimController.Limbs[0].SimPosition);
pos.Y = -pos.Y; pos.Y = -pos.Y;
@@ -869,9 +883,6 @@ namespace Subsurface
GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X, (int)healthBarPos.Y, (int)(100.0f * (health / maxHealth)), 15), Color.Red, true); GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X, (int)healthBarPos.Y, (int)(100.0f * (health / maxHealth)), 15), Color.Red, true);
} }
public void PlaySound(AIController.AiState state) public void PlaySound(AIController.AiState state)
{ {
if (sounds == null || !sounds.Any()) return; if (sounds == null || !sounds.Any()) return;
@@ -931,6 +942,7 @@ namespace Subsurface
{ {
if (stunTimer <= 0.0f) return; if (stunTimer <= 0.0f) return;
AnimController.ResetPullJoints();
AnimController.StunTimer = Math.Max(AnimController.StunTimer, stunTimer); AnimController.StunTimer = Math.Max(AnimController.StunTimer, stunTimer);
selectedConstruction = null; selectedConstruction = null;
@@ -1138,6 +1150,8 @@ namespace Subsurface
public override void ReadNetworkData(NetworkEventType type, NetIncomingMessage message) public override void ReadNetworkData(NetworkEventType type, NetIncomingMessage message)
{ {
Enabled = true;
if (type == NetworkEventType.PickItem) if (type == NetworkEventType.PickItem)
{ {
System.Diagnostics.Debug.WriteLine("**************** PickItem networkevent received"); System.Diagnostics.Debug.WriteLine("**************** PickItem networkevent received");
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
class CharacterHUD class CharacterHUD
{ {
@@ -3,7 +3,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
public enum Gender { None, Male, Female }; public enum Gender { None, Male, Female };
@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class DelayedEffect : StatusEffect class DelayedEffect : StatusEffect
{ {
@@ -6,7 +6,7 @@ using FarseerPhysics.Dynamics.Joints;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
namespace Subsurface namespace Barotrauma
{ {
class FishAnimController : AnimController class FishAnimController : AnimController
{ {
@@ -3,9 +3,9 @@ using System.Linq;
using System.Xml.Linq; using System.Xml.Linq;
using FarseerPhysics; using FarseerPhysics;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Subsurface.Items.Components; using Barotrauma.Items.Components;
namespace Subsurface namespace Barotrauma
{ {
class HumanoidAnimController : AnimController class HumanoidAnimController : AnimController
{ {
@@ -120,23 +120,24 @@ namespace Subsurface
{ {
onFloorTimer -= deltaTime; onFloorTimer -= deltaTime;
} }
IgnorePlatforms = (TargetMovement.Y < 0.0f);
//stun (= disable the animations) if the ragdoll receives a large enough impact //stun (= disable the animations) if the ragdoll receives a large enough impact
if (strongestImpact > 0.0f) if (strongestImpact > 0.0f)
{ {
character.StartStun(MathHelper.Min(strongestImpact * 0.5f, 5.0f)); character.StartStun(MathHelper.Min(strongestImpact * 0.5f, 5.0f));
} }
strongestImpact = 0.0f; strongestImpact = 0.0f;
if (stunTimer > 0) if (stunTimer > 0)
{ {
stunTimer -= deltaTime; stunTimer -= deltaTime;
return; return;
} }
IgnorePlatforms = (TargetMovement.Y < 0.0f);
if (Anim != Animation.UsingConstruction) ResetPullJoints(); if (Anim != Animation.UsingConstruction) ResetPullJoints();
if (TargetDir != dir) Flip(); if (TargetDir != dir) Flip();
@@ -228,30 +229,35 @@ namespace Subsurface
this.stepSize.Y * walkPosY * runningModifier * runningModifier); this.stepSize.Y * walkPosY * runningModifier * runningModifier);
float footMid = waist.SimPosition.X;// (leftFoot.SimPosition.X + rightFoot.SimPosition.X) / 2.0f; float footMid = waist.SimPosition.X;// (leftFoot.SimPosition.X + rightFoot.SimPosition.X) / 2.0f;
int limbsInWater = 0; if (Math.Abs(TargetMovement.X)>1.0f)
foreach (Limb limb in Limbs)
{ {
if (limb.inWater) limbsInWater++; int limbsInWater = 0;
} foreach (Limb limb in Limbs)
{
if (limb.inWater) limbsInWater++;
}
TargetMovement *= (1.0f - 0.5f * ((float)limbsInWater / (float)Limbs.Count())); float slowdownFactor = (float)limbsInWater / (float)Limbs.Count();
TargetMovement = Vector2.Normalize(TargetMovement) * Math.Max(TargetMovement.Length() - slowdownFactor, 1.0f);
}
movement = MathUtils.SmoothStep(movement, TargetMovement, movementLerp); movement = MathUtils.SmoothStep(movement, TargetMovement, movementLerp);
movement.Y = 0.0f; movement.Y = 0.0f;
bool legsUp = false;
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
{ {
Limb leg = GetLimb((i == 0) ? LimbType.LeftThigh : LimbType.RightThigh);// : leftLeg; Limb leg = GetLimb((i == 0) ? LimbType.LeftThigh : LimbType.RightThigh);// : leftLeg;
if (leg.SimPosition.Y < torso.SimPosition.Y) continue; if (leg.SimPosition.Y < torso.SimPosition.Y) continue;
leg.body.ApplyTorque(-Dir * leg.Mass * 10.0f); leg.body.ApplyTorque(Dir * leg.Mass * 10.0f);
legsUp = true;
} }
//place the anchors of the head and the torso to make the ragdoll stand if (legsUp || LowestLimb == null) return;
if (LowestLimb == null) return;
if (!onGround || (LowestLimb.SimPosition.Y - floorY > 0.5f && stairs == null)) return; if (!onGround || (LowestLimb.SimPosition.Y - floorY > 0.5f && stairs == null)) return;
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class Job class Job
{ {
+11 -2
View File
@@ -4,7 +4,7 @@ using System.Globalization;
using System.Xml.Linq; using System.Xml.Linq;
using System.Linq; using System.Linq;
namespace Subsurface namespace Barotrauma
{ {
class JobPrefab class JobPrefab
{ {
@@ -20,13 +20,15 @@ namespace Subsurface
//(i.e. if one captain is required, one captain is chosen even if all the players have set captain to lowest preference) //(i.e. if one captain is required, one captain is chosen even if all the players have set captain to lowest preference)
private int minNumber; private int minNumber;
private float commonness;
//if set to true, a client that has chosen this as their preferred job will get it no matter what //if set to true, a client that has chosen this as their preferred job will get it no matter what
public bool AllowAlways public bool AllowAlways
{ {
get; get;
private set; private set;
} }
//names of the items the character spawns with //names of the items the character spawns with
public List<string> ItemNames; public List<string> ItemNames;
public List<bool> EquipItem; public List<bool> EquipItem;
@@ -53,6 +55,11 @@ namespace Subsurface
get { return minNumber; } get { return minNumber; }
} }
public float Commonness
{
get { return commonness; }
}
public JobPrefab(XElement element) public JobPrefab(XElement element)
{ {
name = ToolBox.GetAttributeString(element, "name", "name not found"); name = ToolBox.GetAttributeString(element, "name", "name not found");
@@ -62,6 +69,8 @@ namespace Subsurface
minNumber = ToolBox.GetAttributeInt(element, "minnumber", 0); minNumber = ToolBox.GetAttributeInt(element, "minnumber", 0);
maxNumber = ToolBox.GetAttributeInt(element, "maxnumber", 10); maxNumber = ToolBox.GetAttributeInt(element, "maxnumber", 10);
commonness = ToolBox.GetAttributeInt(element, "commonness", 10);
AllowAlways = ToolBox.GetAttributeBool(element, "allowalways", false); AllowAlways = ToolBox.GetAttributeBool(element, "allowalways", false);
ItemNames = new List<string>(); ItemNames = new List<string>();
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
class Skill class Skill
{ {
@@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class SkillPrefab class SkillPrefab
{ {
+2 -2
View File
@@ -5,9 +5,9 @@ using FarseerPhysics.Dynamics;
using FarseerPhysics.Dynamics.Joints; using FarseerPhysics.Dynamics.Joints;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Subsurface.Items.Components; using Barotrauma.Items.Components;
namespace Subsurface namespace Barotrauma
{ {
public enum LimbType public enum LimbType
{ {
+7 -6
View File
@@ -8,9 +8,9 @@ using FarseerPhysics.Dynamics.Contacts;
using FarseerPhysics.Dynamics.Joints; using FarseerPhysics.Dynamics.Joints;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Subsurface.Networking; using Barotrauma.Networking;
namespace Subsurface namespace Barotrauma
{ {
class Ragdoll class Ragdoll
{ {
@@ -491,8 +491,7 @@ namespace Subsurface
{ {
for (int i = 0; i < Limbs.Count(); i++) for (int i = 0; i < Limbs.Count(); i++)
{ {
if (Limbs[i] == null) continue; if (Limbs[i] == null || Limbs[i].pullJoint == null) continue;
if (Limbs[i].pullJoint == null) continue;
Limbs[i].pullJoint.Enabled = false; Limbs[i].pullJoint.Enabled = false;
} }
} }
@@ -526,7 +525,7 @@ namespace Subsurface
Category collisionCategory = (ignorePlatforms) ? Category collisionCategory = (ignorePlatforms) ?
wall | Physics.CollisionProjectile | Physics.CollisionStairs wall | Physics.CollisionProjectile | Physics.CollisionStairs
: wall | Physics.CollisionPlatform | Physics.CollisionStairs; : wall | Physics.CollisionProjectile | Physics.CollisionPlatform | Physics.CollisionStairs;
foreach (Limb limb in Limbs) foreach (Limb limb in Limbs)
{ {
@@ -538,6 +537,8 @@ namespace Subsurface
public void Update(Camera cam, float deltaTime) public void Update(Camera cam, float deltaTime)
{ {
if (!character.Enabled) return;
UpdateNetplayerPosition(); UpdateNetplayerPosition();
Vector2 flowForce = Vector2.Zero; Vector2 flowForce = Vector2.Zero;
@@ -605,7 +606,7 @@ namespace Subsurface
{ {
//create a splash particle //create a splash particle
Subsurface.Particles.Particle splash = GameMain.ParticleManager.CreateParticle("watersplash", Barotrauma.Particles.Particle splash = GameMain.ParticleManager.CreateParticle("watersplash",
new Vector2(limb.Position.X, limbHull.Surface), new Vector2(limb.Position.X, limbHull.Surface),
new Vector2(0.0f, Math.Abs(-limb.LinearVelocity.Y * 10.0f)), new Vector2(0.0f, Math.Abs(-limb.LinearVelocity.Y * 10.0f)),
0.0f); 0.0f);
+3 -2
View File
@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class StatusEffect class StatusEffect
{ {
@@ -182,7 +182,8 @@ namespace Subsurface
ObjectProperty property; ObjectProperty property;
foreach (IPropertyObject target in targets) foreach (IPropertyObject target in targets)
{ {
if (targetNames!=null && !targetNames.Contains(target.Name)) continue; //if (targetNames!=null && !targetNames.Contains(target.Name)) continue;
if (!target.ObjectProperties.TryGetValue(propertyNames[i], out property)) continue; if (!target.ObjectProperties.TryGetValue(propertyNames[i], out property)) continue;
ApplyToProperty(property, propertyEffects[i], deltaTime); ApplyToProperty(property, propertyEffects[i], deltaTime);
+1 -1
View File
@@ -6,7 +6,7 @@ using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
public enum ContentType public enum ContentType
{ {
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
enum CoroutineStatus enum CoroutineStatus
{ {
+3 -3
View File
@@ -4,9 +4,9 @@ using System.Linq;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
using Subsurface.Networking; using Barotrauma.Networking;
namespace Subsurface namespace Barotrauma
{ {
struct ColoredText struct ColoredText
{ {
@@ -289,7 +289,7 @@ namespace Subsurface
DebugConsole.ThrowError("Illegal symbols in filename (../)"); DebugConsole.ThrowError("Illegal symbols in filename (../)");
return; return;
} }
Submarine.SaveCurrent(fileName +".gz"); Submarine.SaveCurrent(fileName +".sub");
NewMessage("map saved", Color.Green); NewMessage("map saved", Color.Green);
break; break;
case "loadmap": case "loadmap":
+1 -1
View File
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using System; using System;
namespace Subsurface namespace Barotrauma
{ {
class MonsterEvent : ScriptedEvent class MonsterEvent : ScriptedEvent
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Subsurface namespace Barotrauma
{ {
class PropertyTask : Task class PropertyTask : Task
{ {
@@ -6,12 +6,10 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class MonsterQuest : Quest class MonsterQuest : Quest
{ {
//string monsterName;
string monsterFile; string monsterFile;
Character monster; Character monster;
@@ -33,7 +31,7 @@ namespace Subsurface
monster = new AICharacter(monsterFile, ConvertUnits.ToSimUnits(position+level.Position)); monster = new AICharacter(monsterFile, ConvertUnits.ToSimUnits(position+level.Position));
} }
public override void End() public override void End()
{ {
if (!monster.IsDead) if (!monster.IsDead)
+2 -2
View File
@@ -6,7 +6,7 @@ using System.Reflection;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class Quest class Quest
{ {
@@ -104,7 +104,7 @@ namespace Subsurface
try try
{ {
t = Type.GetType("Subsurface." + type, true, true); t = Type.GetType("Barotrauma." + type, true, true);
if (t == null) if (t == null)
{ {
DebugConsole.ThrowError("Error in " + configFile + "! Could not find a quest class of the type ''" + type + "''."); DebugConsole.ThrowError("Error in " + configFile + "! Could not find a quest class of the type ''" + type + "''.");
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class SalvageQuest : Quest class SalvageQuest : Quest
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Subsurface namespace Barotrauma
{ {
class RepairTask : Task class RepairTask : Task
{ {
+2 -2
View File
@@ -4,7 +4,7 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class ScriptedEvent class ScriptedEvent
{ {
@@ -137,7 +137,7 @@ namespace Subsurface
try try
{ {
t = Type.GetType("Subsurface." + type, true, true); t = Type.GetType("Barotrauma." + type, true, true);
if (t == null) if (t == null)
{ {
DebugConsole.ThrowError("Error in " + configFile + "! Could not find an event class of the type ''" + type + "''."); DebugConsole.ThrowError("Error in " + configFile + "! Could not find an event class of the type ''" + type + "''.");
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Subsurface namespace Barotrauma
{ {
class ScriptedTask : Task class ScriptedTask : Task
{ {
+1 -1
View File
@@ -1,5 +1,5 @@
namespace Subsurface namespace Barotrauma
{ {
class Task class Task
{ {
+1 -1
View File
@@ -3,7 +3,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using System; using System;
namespace Subsurface namespace Barotrauma
{ {
class TaskManager class TaskManager
{ {
+1 -1
View File
@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace Subsurface namespace Barotrauma
{ {
public class FrameCounter public class FrameCounter
{ {
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
public class GUIComponentStyle public class GUIComponentStyle
{ {
+1 -1
View File
@@ -5,7 +5,7 @@ using Microsoft.Xna.Framework.Input;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Subsurface namespace Barotrauma
{ {
[Flags] [Flags]
public enum Alignment public enum Alignment
+1 -1
View File
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
namespace Subsurface namespace Barotrauma
{ {
public class GUIButton : GUIComponent public class GUIButton : GUIComponent
{ {
+1 -1
View File
@@ -5,7 +5,7 @@ using EventInput;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
namespace Subsurface namespace Barotrauma
{ {
public abstract class GUIComponent public abstract class GUIComponent
{ {
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
public class GUIDropDown : GUIComponent public class GUIDropDown : GUIComponent
{ {
+1 -1
View File
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using System; using System;
namespace Subsurface namespace Barotrauma
{ {
public class GUIFrame : GUIComponent public class GUIFrame : GUIComponent
{ {
+1 -1
View File
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
namespace Subsurface namespace Barotrauma
{ {
public class GUIImage : GUIComponent public class GUIImage : GUIComponent
{ {
+1 -1
View File
@@ -3,7 +3,7 @@ using System.Diagnostics;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
namespace Subsurface namespace Barotrauma
{ {
public class GUIListBox : GUIComponent public class GUIListBox : GUIComponent
{ {
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
class GUIMessage class GUIMessage
{ {
+1 -1
View File
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using System.Collections.Generic; using System.Collections.Generic;
namespace Subsurface namespace Barotrauma
{ {
public class GUIMessageBox : GUIFrame public class GUIMessageBox : GUIFrame
{ {
+1 -1
View File
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
namespace Subsurface namespace Barotrauma
{ {
public class GUIProgressBar : GUIComponent public class GUIProgressBar : GUIComponent
{ {
+1 -1
View File
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
namespace Subsurface namespace Barotrauma
{ {
public class GUIScrollBar : GUIComponent public class GUIScrollBar : GUIComponent
{ {
+1 -1
View File
@@ -3,7 +3,7 @@ using Microsoft.Xna.Framework;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Subsurface namespace Barotrauma
{ {
public class GUIStyle public class GUIStyle
{ {
+1 -1
View File
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
namespace Subsurface namespace Barotrauma
{ {
public class GUITextBlock : GUIComponent public class GUITextBlock : GUIComponent
{ {
+1 -1
View File
@@ -4,7 +4,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
namespace Subsurface namespace Barotrauma
{ {
delegate void TextBoxEvent(GUITextBox sender); delegate void TextBoxEvent(GUITextBox sender);
+1 -1
View File
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
namespace Subsurface namespace Barotrauma
{ {
public class GUITickBox : GUIComponent public class GUITickBox : GUIComponent
{ {
+1 -1
View File
@@ -7,7 +7,7 @@ using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
class LoadingScreen class LoadingScreen
{ {
+3 -3
View File
@@ -5,14 +5,14 @@ using FarseerPhysics;
using FarseerPhysics.Dynamics; using FarseerPhysics.Dynamics;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Subsurface.Networking; using Barotrauma.Networking;
using Subsurface.Particles; using Barotrauma.Particles;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
using System.Xml; using System.Xml;
namespace Subsurface namespace Barotrauma
{ {
class GameMain : Game class GameMain : Game
{ {
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
class CargoManager class CargoManager
{ {
+1 -1
View File
@@ -5,7 +5,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class CrewManager class CrewManager
{ {
@@ -4,7 +4,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
namespace Subsurface namespace Barotrauma
{ {
class GameMode class GameMode
{ {
@@ -4,7 +4,7 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
class GameModePreset class GameModePreset
{ {
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
class QuestMode : GameMode class QuestMode : GameMode
{ {
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class SinglePlayerMode : GameMode class SinglePlayerMode : GameMode
{ {
@@ -1,8 +1,8 @@
using System; using System;
using System.Linq; using System.Linq;
using Subsurface.Networking; using Barotrauma.Networking;
namespace Subsurface namespace Barotrauma
{ {
class TraitorMode : GameMode class TraitorMode : GameMode
{ {
@@ -1,13 +1,13 @@
using FarseerPhysics; using FarseerPhysics;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Subsurface.Items.Components; using Barotrauma.Items.Components;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Subsurface namespace Barotrauma
{ {
class TutorialMode : GameMode class TutorialMode : GameMode
{ {
@@ -17,7 +17,7 @@ namespace Subsurface
public static void Start() public static void Start()
{ {
Submarine.Load("Content/Map/TutorialSub.gz", ""); Submarine.Load("Content/Map/TutorialSub.sub", "");
GameMain.GameSession = new GameSession(Submarine.Loaded, "", GameModePreset.list.Find(gm => gm.Name.ToLower()=="tutorial")); GameMain.GameSession = new GameSession(Submarine.Loaded, "", GameModePreset.list.Find(gm => gm.Name.ToLower()=="tutorial"));
@@ -86,12 +86,15 @@ namespace Subsurface
private IEnumerable<object> UpdateState() private IEnumerable<object> UpdateState()
{ {
Submarine.Loaded.SetPosition(new Vector2(Submarine.Loaded.Position.X, 38500.0f));
GameMain.GameScreen.BackgroundSpriteManager.SpawnSprites(1, Submarine.Loaded.Position + Character.Controlled.Position); //spawn some fish next to the player
GameMain.GameScreen.BackgroundSpriteManager.SpawnSprites(2,
Submarine.Loaded.Position + Character.Controlled.Position);
yield return new WaitForSeconds(4.0f); yield return new WaitForSeconds(4.0f);
infoBox = CreateInfoFrame("Use WASD to move and mouse to look around"); infoBox = CreateInfoFrame("Use WASD to move and the mouse to look around");
yield return new WaitForSeconds(5.0f); yield return new WaitForSeconds(5.0f);
@@ -110,9 +113,19 @@ namespace Subsurface
//----------------------------------- //-----------------------------------
infoBox = CreateInfoFrame("Now it's time to power up the submarine. Go to the upper left corner of the submarine, where you'll find a nuclear reactor."); infoBox = CreateInfoFrame("Hold W or S to walk up or down stairs. Use shift to run.", true);
while (infoBox!=null)
{
yield return CoroutineStatus.Running;
}
//-----------------------------------
infoBox = CreateInfoFrame("At the moment the submarine has no power, which means that crucial systems such as the oxygen generator or the engine aren't running. Let's fix this: go to the upper left corner of the submarine, where you'll find a nuclear reactor.");
Reactor reactor = Item.itemList.Find(i => i.HasTag("tutorialreactor")).GetComponent<Reactor>(); Reactor reactor = Item.itemList.Find(i => i.HasTag("tutorialreactor")).GetComponent<Reactor>();
reactor.MeltDownTemp = 20000.0f;
while (Vector2.Distance(Character.Controlled.Position, reactor.Item.Position)>200.0f) while (Vector2.Distance(Character.Controlled.Position, reactor.Item.Position)>200.0f)
{ {
@@ -135,28 +148,39 @@ namespace Subsurface
} }
yield return new WaitForSeconds(0.5f); yield return new WaitForSeconds(0.5f);
infoBox = CreateInfoFrame("The reactor core has started generating heat, which in turn generates power for the submarine. It won't generate much power at the moment, " infoBox = CreateInfoFrame("The reactor core has started generating heat, which in turn generates power for the submarine. The power generation is very low at the moment,"
+" because the shutdown temperature is set to 500. When the temperature of the reactor raises higher than the shutdown temperature, the reactor will automatically start to cool itself down." +" because the reactor is set to shut itself down when the temperature rises above 500 degrees Celsius. You can adjust the temperature limit by changing the ''Shutdown Temperature'' in the control panel.", true);
+ " You should increase it to somewhere around 5000.");
while (Math.Abs(reactor.ShutDownTemp-5000.0f) > 400.0f) while (infoBox!=null)
{ {
reactor.ShutDownTemp = Math.Min(reactor.ShutDownTemp, 5000.0f);
yield return CoroutineStatus.Running; yield return CoroutineStatus.Running;
} }
yield return new WaitForSeconds(0.5f); yield return new WaitForSeconds(0.5f);
infoBox = CreateInfoFrame("The amount of power generated by the reactor should be kept close to the amount of power consumed by the devices in the submarine. " infoBox = CreateInfoFrame("The amount of power generated by the reactor should be kept close to the amount of power consumed by the devices in the submarine. "
+"If there's not enough power, devices won't function properly, and if there's too much power, some devices may be damaged. Turn on ''Automatic temperature control'' to " +"If there isn't enough power, devices won't function properly (or at all), and if there's too much power, some devices may be damaged."
+"make the reactor automatically adjust the temperature to a suitable level."); +" Try to raise the temperature of the reactor close to 3000 degrees by adjusting the fission and cooling rates.");
while (Math.Abs(reactor.Temperature-3000.0f) > 100.0f)
{
reactor.ShutDownTemp = Math.Min(reactor.ShutDownTemp, 5000.0f);
yield return CoroutineStatus.Running;
}
yield return new WaitForSeconds(0.5f);
infoBox = CreateInfoFrame("Looks like we're up and running! Now you should turn on the ''Automatic temperature control'', which will make the reactor "
+"automatically adjust the temperature to a suitable level. Even though it's an easy way to keep the reactor up and running most of the time, "
+"you should keep in mind that it changes the temperature very slowly and carefully, which may cause issues if there are sudden changes in grid load.");
while (!reactor.AutoTemp) while (!reactor.AutoTemp)
{ {
yield return CoroutineStatus.Running; yield return CoroutineStatus.Running;
} }
yield return new WaitForSeconds(0.5f); yield return new WaitForSeconds(0.5f);
infoBox = CreateInfoFrame("That's the basics you need to know to power up the reactor! Now that there's power available for the engines, let's try steering the sub. " infoBox = CreateInfoFrame("That's the basics of operating the reactor! Now that there's power available for the engines, it's time to get the submarine moving. "
+"Deselect the reactor by pressing E and head to the command room at the left edge of the vessel."); +"Deselect the reactor by pressing E and head to the command room at the right edge of the vessel.");
Steering steering = Item.itemList.Find(i => i.HasTag("tutorialsteering")).GetComponent<Steering>(); Steering steering = Item.itemList.Find(i => i.HasTag("tutorialsteering")).GetComponent<Steering>();
Radar radar = steering.Item.GetComponent<Radar>(); Radar radar = steering.Item.GetComponent<Radar>();
@@ -165,6 +189,8 @@ namespace Subsurface
{ {
yield return CoroutineStatus.Running; yield return CoroutineStatus.Running;
} }
CoroutineManager.StartCoroutine(KeepReactorRunning(reactor));
infoBox = CreateInfoFrame("Select the navigation terminal by walking next to it and pressing E."); infoBox = CreateInfoFrame("Select the navigation terminal by walking next to it and pressing E.");
@@ -183,7 +209,7 @@ namespace Subsurface
{ {
yield return CoroutineStatus.Running; yield return CoroutineStatus.Running;
} }
yield return new WaitForSeconds(1.0f); yield return new WaitForSeconds(5.0f);
infoBox = CreateInfoFrame("You need a screwdriver to check the wiring of the terminal." infoBox = CreateInfoFrame("You need a screwdriver to check the wiring of the terminal."
+ " Equip a screwdriver by pulling it to either of the slots with a hand symbol, and then select the terminal again by pressing E."); + " Equip a screwdriver by pulling it to either of the slots with a hand symbol, and then select the terminal again by pressing E.");
@@ -272,14 +298,21 @@ namespace Subsurface
yield return new WaitForSeconds(0.5f); yield return new WaitForSeconds(0.5f);
infoBox = CreateInfoFrame("The white box in the middle is the submarine, and the white lines outside it are the walls of an underwater cavern. " infoBox = CreateInfoFrame("The white box in the middle is the submarine, and the white lines outside it are the walls of an underwater cavern. "
+ "Try moving the submarine by clicking somewhere inside the rectangle and draggind the pointer to the direction you want to go to."); + "Try moving the submarine by clicking somewhere on the monitor and dragging the pointer to the direction you want to go to.");
while (steering.CurrTargetVelocity == Vector2.Zero && steering.CurrTargetVelocity.Length() < 50.0f) while (steering.CurrTargetVelocity == Vector2.Zero && steering.CurrTargetVelocity.Length() < 50.0f)
{ {
yield return CoroutineStatus.Running; yield return CoroutineStatus.Running;
} }
yield return new WaitForSeconds(4.0f); yield return new WaitForSeconds(4.0f);
infoBox = CreateInfoFrame("The submarine moves up and down by pumping water in and out of the two ballast tanks at the bottom of the submarine. "
+"The engine at the back of the sub moves it forwards and backwards.", true);
while (infoBox!=null)
{
yield return CoroutineStatus.Running;
}
infoBox = CreateInfoFrame("Steer the submarine downwards, heading further into the cavern."); infoBox = CreateInfoFrame("Steer the submarine downwards, heading further into the cavern.");
@@ -287,10 +320,7 @@ namespace Subsurface
{ {
yield return CoroutineStatus.Running; yield return CoroutineStatus.Running;
} }
yield return new WaitForSeconds(8.0f); yield return new WaitForSeconds(1.0f);
infoBox = CreateInfoFrame("The submarine moves up and down by pumping water in and out of the two ballast tanks at the bottom of the submarine. "
+"The engine at the back of the sub moves it forwards and backwards.");
var moloch = new AICharacter("Content/Characters/Moloch/moloch.xml", steering.Item.SimPosition + Vector2.UnitX * 25.0f); var moloch = new AICharacter("Content/Characters/Moloch/moloch.xml", steering.Item.SimPosition + Vector2.UnitX * 25.0f);
moloch.PlaySound(AIController.AiState.Attack); moloch.PlaySound(AIController.AiState.Attack);
@@ -318,7 +348,7 @@ namespace Subsurface
foreach (Limb limb in moloch.AnimController.Limbs) foreach (Limb limb in moloch.AnimController.Limbs)
{ {
limb.body.LinearVelocity = new Vector2(limb.LinearVelocity.X, limb.LinearVelocity.Y + steeringDir.Y*10.0f); limb.body.LinearVelocity = new Vector2(limb.LinearVelocity.X*2.0f, limb.LinearVelocity.Y + steeringDir.Y*10.0f);
} }
moloch.AIController.Steering = steeringDir; moloch.AIController.Steering = steeringDir;
@@ -338,17 +368,15 @@ namespace Subsurface
yield return new WaitForSeconds(1.0f); yield return new WaitForSeconds(1.0f);
} while (!broken); } while (!broken);
yield return new WaitForSeconds(1.0f); yield return new WaitForSeconds(0.5f);
var capacitor1 = Item.itemList.Find(i => i.HasTag("capacitor1")).GetComponent<PowerContainer>(); var capacitor1 = Item.itemList.Find(i => i.HasTag("capacitor1")).GetComponent<PowerContainer>();
var capacitor2 = Item.itemList.Find(i => i.HasTag("capacitor1")).GetComponent<PowerContainer>(); var capacitor2 = Item.itemList.Find(i => i.HasTag("capacitor1")).GetComponent<PowerContainer>();
CoroutineManager.StartCoroutine(KeepEnemyAway(moloch, new PowerContainer[] { capacitor1, capacitor2 })); CoroutineManager.StartCoroutine(KeepEnemyAway(moloch, new PowerContainer[] { capacitor1, capacitor2 }));
infoBox = CreateInfoFrame("The hull has been breached! Close all the doors to the command room to stop the water from flooding the entire sub!"); infoBox = CreateInfoFrame("The hull has been breached! Close all the doors to the command room to stop the water from flooding the entire sub!");
Door commandDoor1 = Item.itemList.Find(i => i.HasTag("commanddoor1")).GetComponent<Door>(); Door commandDoor1 = Item.itemList.Find(i => i.HasTag("commanddoor1")).GetComponent<Door>();
Door commandDoor2 = Item.itemList.Find(i => i.HasTag("commanddoor2")).GetComponent<Door>(); Door commandDoor2 = Item.itemList.Find(i => i.HasTag("commanddoor2")).GetComponent<Door>();
Door commandDoor3 = Item.itemList.Find(i => i.HasTag("commanddoor3")).GetComponent<Door>(); Door commandDoor3 = Item.itemList.Find(i => i.HasTag("commanddoor3")).GetComponent<Door>();
@@ -358,7 +386,7 @@ namespace Subsurface
yield return CoroutineStatus.Running; yield return CoroutineStatus.Running;
} }
infoBox = CreateInfoFrame("You should find yourself an diving mask or a diving suit, in case the creature causes more damage. "+ infoBox = CreateInfoFrame("You should quickly find yourself a diving mask or a diving suit. "+
"There are some in the room next to the airlock."); "There are some in the room next to the airlock.");
while (!HasItem("Diving Mask") && !HasItem("Diving Suit")) while (!HasItem("Diving Mask") && !HasItem("Diving Suit"))
@@ -386,7 +414,7 @@ namespace Subsurface
yield return new WaitForSeconds(5.0f); yield return new WaitForSeconds(5.0f);
infoBox = CreateInfoFrame("Now it's time to stop the creature attacking the submarine. Head to the railgun room at the upper right corner of the sub."); infoBox = CreateInfoFrame("Now you should stop the creature attacking the submarine before it does any more damage. Head to the railgun room at the upper right corner of the sub.");
var railGun = Item.itemList.Find(i => i.GetComponent<Turret>()!=null); var railGun = Item.itemList.Find(i => i.GetComponent<Turret>()!=null);
@@ -515,6 +543,7 @@ namespace Subsurface
Character.Controlled = null; Character.Controlled = null;
GameMain.GameScreen.Cam.TargetPos = Vector2.Zero; GameMain.GameScreen.Cam.TargetPos = Vector2.Zero;
GameMain.LightManager.LosEnabled = false;
do do
{ {
@@ -590,6 +619,19 @@ namespace Subsurface
yield return CoroutineStatus.Success; yield return CoroutineStatus.Success;
} }
private IEnumerable<object> KeepReactorRunning(Reactor reactor)
{
do
{
reactor.AutoTemp = true;
reactor.ShutDownTemp = 5000.0f;
yield return CoroutineStatus.Running;
} while (Item.itemList.Contains(reactor.Item));
yield return CoroutineStatus.Success;
}
public override void Draw(SpriteBatch spriteBatch) public override void Draw(SpriteBatch spriteBatch)
{ {
base.Draw(spriteBatch); base.Draw(spriteBatch);
@@ -598,10 +640,17 @@ namespace Subsurface
if (infoBox != null) infoBox.Draw(spriteBatch); if (infoBox != null) infoBox.Draw(spriteBatch);
} }
private GUIComponent CreateInfoFrame(string text) private bool CloseInfoFrame(GUIButton button, object userData)
{
infoBox = null;
return true;
}
private GUIComponent CreateInfoFrame(string text, bool hasButton = false)
{ {
int width = 300; int width = 300;
int height = 80; int height = hasButton ? 110 : 80;
string wrappedText = ToolBox.WrapText(text, width, GUI.Font); string wrappedText = ToolBox.WrapText(text, width, GUI.Font);
@@ -612,7 +661,13 @@ namespace Subsurface
infoBlock.Padding = new Vector4(10.0f, 10.0f, 10.0f, 10.0f); infoBlock.Padding = new Vector4(10.0f, 10.0f, 10.0f, 10.0f);
infoBlock.Flash(Color.Green); infoBlock.Flash(Color.Green);
new GUITextBlock(new Rectangle(10, 10, width - 40, height), text, GUI.Style, infoBlock, true); var textBlock = new GUITextBlock(new Rectangle(10, 10, width - 40, height), text, GUI.Style, infoBlock, true);
if (hasButton)
{
var okButton = new GUIButton(new Rectangle(0,-40,80,25), "OK", Alignment.BottomCenter, GUI.Style, textBlock);
okButton.OnClicked = CloseInfoFrame;
}
GUI.PlayMessageSound(); GUI.PlayMessageSound();
+1 -1
View File
@@ -8,7 +8,7 @@ using System.Text;
using System.Collections.Generic; using System.Collections.Generic;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
class GameSession class GameSession
{ {
+1 -1
View File
@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace Subsurface namespace Barotrauma
{ {
class HireManager class HireManager
{ {
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Subsurface namespace Barotrauma
{ {
public class GameSettings public class GameSettings
{ {
+1 -1
View File
@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace Subsurface namespace Barotrauma
{ {
interface IPropertyObject interface IPropertyObject
{ {
@@ -3,7 +3,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
namespace Subsurface namespace Barotrauma
{ {
[Flags] [Flags]
public enum LimbSlot public enum LimbSlot
@@ -279,7 +279,7 @@ namespace Subsurface
{ {
DropItem(draggingItem); DropItem(draggingItem);
new Networking.NetworkEvent(Subsurface.Networking.NetworkEventType.DropItem, draggingItem.ID, true); new Networking.NetworkEvent(Barotrauma.Networking.NetworkEventType.DropItem, draggingItem.ID, true);
//draggingItem = null; //draggingItem = null;
} }
} }
+2 -2
View File
@@ -6,9 +6,9 @@ using FarseerPhysics.Dynamics;
using FarseerPhysics.Factories; using FarseerPhysics.Factories;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Subsurface.Lights; using Barotrauma.Lights;
namespace Subsurface.Items.Components namespace Barotrauma.Items.Components
{ {
class Door : ItemComponent class Door : ItemComponent
{ {

Some files were not shown because too many files have changed in this diff Show More