ghkjghk
This commit is contained in:
@@ -273,6 +273,13 @@
|
|||||||
<Content Include="Content\BackgroundSprites\bgFish1.png">
|
<Content Include="Content\BackgroundSprites\bgFish1.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="Content\Characters\Coelanth\Coelanth.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Content\Characters\Coelanth\coelanth.xml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="Content\Characters\Crawler\crawler.png">
|
<Content Include="Content\Characters\Crawler\crawler.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<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>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 404 KiB |
@@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<character name ="coelanth" humanoid="false" health="100.0">
|
||||||
|
|
||||||
|
<sound file="Content/Characters/Scorpion/scorpionattack1.ogg" state="Attack" />
|
||||||
|
<sound file="Content/Characters/Scorpion/scorpionidle1.ogg" state="None" />
|
||||||
|
<sound file="Content/Characters/Scorpion/scorpionidle2.ogg" state="None" />
|
||||||
|
|
||||||
|
<ragdoll waveamplitude="50.0" wavelength="2500" swimspeed="5.0" walkspeed="3.5">
|
||||||
|
|
||||||
|
<!-- head -->
|
||||||
|
<limb id = "0" radius="50" height="270" type="Head" steerforce="1.0" impacttolerance="50.0">
|
||||||
|
<sprite texture="Content/Characters/Coelanth/coelanth.png" sourcerect="267,171,162,392" depth="0.02" origin ="0.5,0.5"/>
|
||||||
|
</limb>
|
||||||
|
|
||||||
|
<!-- lower yaw -->
|
||||||
|
<limb id = "1" radius="20" height="240" impacttolerance="50.0">
|
||||||
|
<sprite texture="Content/Characters/Coelanth/coelanth.png" sourcerect="425,1,101,309" depth="0.025" origin="0.5,0.5"/>
|
||||||
|
<attack type="PinchCCW" range="200" duration="0.5" damage="200" bleedingdamage="50" structuredamage="150" damagetype="slash"/>
|
||||||
|
</limb>
|
||||||
|
|
||||||
|
<!-- body -->
|
||||||
|
<limb id = "2" radius="100" height="350" type="Torso" steerforce="0.1">
|
||||||
|
<sprite texture="Content/Characters/Coelanth/coelanth.png" sourcerect="0,0,268,570" depth="0.03" origin="0.5,0.5"/>
|
||||||
|
</limb>
|
||||||
|
|
||||||
|
<!-- tail -->
|
||||||
|
<limb id = "3" radius="30" height="180" type="Tail">
|
||||||
|
<sprite texture="Content/Characters/Coelanth/coelanth.png" sourcerect="441,321,96,301" depth="0.035" origin="0.5,0.5"/>
|
||||||
|
</limb>
|
||||||
|
|
||||||
|
<!-- front fins -->
|
||||||
|
<limb id = "4" radius="30" height="250">
|
||||||
|
<sprite texture="Content/Characters/Coelanth/coelanth.png" sourcerect="532,0,92,382" depth="0.008" origin="0.5,0.5"/>
|
||||||
|
</limb>
|
||||||
|
|
||||||
|
<!-- back fins -->
|
||||||
|
<limb id = "5" width="80" height="150" ignorecollisions="true">
|
||||||
|
<sprite texture="Content/Characters/Coelanth/coelanth.png" sourcerect="303,5,94,163" depth="0.01" origin="0.5,0.5"/>
|
||||||
|
</limb>
|
||||||
|
|
||||||
|
<!-- body to head -->
|
||||||
|
<joint limb1="0" limb1anchor="-5,-133" limb2="2" limb2anchor="-30,225" lowerlimit="-10" upperlimit="10"/>
|
||||||
|
<!-- body to lower yaw -->
|
||||||
|
<joint limb1="1" limb1anchor="0,-119" limb2="2" limb2anchor="40,240" lowerlimit="10" upperlimit="40"/>
|
||||||
|
|
||||||
|
<!-- body to tail -->
|
||||||
|
<joint limb1="2" limb1anchor="20,-245" limb2="3" limb2anchor="0,118" lowerlimit="-20" upperlimit="20"/>
|
||||||
|
<!-- body to front fin -->
|
||||||
|
<joint limb1="2" limb1anchor="65,100" limb2="4" limb2anchor="0,160" lowerlimit="-50" upperlimit="0"/>
|
||||||
|
|
||||||
|
<!-- body to back fin -->
|
||||||
|
<joint limb1="2" limb1anchor="46,-48" limb2="5" limb2anchor="0,55" lowerlimit="-50" upperlimit="0"/>
|
||||||
|
|
||||||
|
|
||||||
|
</ragdoll>
|
||||||
|
|
||||||
|
<ai attackhumans="100.0" attackrooms="50.0" attackweaker="50" attackstronger="-30" sight="2.0" hearing="10.0"/>
|
||||||
|
</character>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<prefabs>
|
<prefabs>
|
||||||
<largehorizontalback sprite="Content/Map/testroom.png" sourcerect="0,0,896,64" depth ="0.9"
|
<largehorizontalback sprite="Content/Map/testroom.png" sourcerect="0,0,896,64" depth ="0.9"
|
||||||
width = "128" height ="64" resizehorizontal="true"/>
|
width = "128" height ="64" resizehorizontal="true"/>
|
||||||
|
|
||||||
<smallhorizontalback sprite="Content/Map/testroom.png" sourcerect="0,64,896,32" depth ="0.9"
|
<smallhorizontalback sprite="Content/Map/testroom.png" sourcerect="0,64,896,32" depth ="0.9"
|
||||||
width = "128" height ="32" resizehorizontal="true"/>
|
width = "128" height ="32" resizehorizontal="true"/>
|
||||||
|
|
||||||
<largeverticalback sprite="Content/Map/testroom.png" sourcerect="0,96,64,448" depth ="0.9"
|
<largeverticalback sprite="Content/Map/testroom.png" sourcerect="0,96,64,448" depth ="0.9"
|
||||||
width = "64" height ="128" resizevertical="true"/>
|
width = "64" height ="128" resizevertical="true"/>
|
||||||
@@ -34,19 +34,19 @@
|
|||||||
width = "16" height ="16"/>
|
width = "16" height ="16"/>
|
||||||
|
|
||||||
<arrowLeft sprite="Content/Map/testroom.png" sourcerect="592,383,16,16" depth ="0.99"
|
<arrowLeft sprite="Content/Map/testroom.png" sourcerect="592,383,16,16" depth ="0.99"
|
||||||
width = "16" height ="16"/>
|
width = "16" height ="16"/>
|
||||||
|
|
||||||
<arrowRight sprite="Content/Map/testroom.png" sourcerect="608,383,16,16" depth ="0.99"
|
<arrowRight sprite="Content/Map/testroom.png" sourcerect="608,383,16,16" depth ="0.99"
|
||||||
width = "16" height ="16"/>
|
width = "16" height ="16"/>
|
||||||
|
|
||||||
<leftwall sprite="Content/Map/testroom.png" sourcerect="688,368,32,496" depth ="0.05" castshadow="true"
|
<leftwall sprite="Content/Map/testroom.png" sourcerect="688,368,32,496" depth ="0.05" castshadow="true"
|
||||||
width = "32" height ="64" resizevertical="true" fliphorizontal="true" body="true" health="500"/>
|
width = "32" height ="64" resizevertical="true" fliphorizontal="true" body="true" health="500"/>
|
||||||
|
|
||||||
<rightwall sprite="Content/Map/testroom.png" sourcerect="688,368,32,496" depth ="0.05" castshadow="true"
|
<rightwall sprite="Content/Map/testroom.png" sourcerect="688,368,32,496" depth ="0.05" castshadow="true"
|
||||||
width = "32" height ="64" resizevertical="true" body="true" health="500"/>
|
width = "32" height ="64" resizevertical="true" body="true" health="500"/>
|
||||||
|
|
||||||
<topwall sprite="Content/Map/testroom.png" sourcerect="144,464,496,32" depth ="0.06" castshadow="true"
|
<topwall sprite="Content/Map/testroom.png" sourcerect="144,464,496,32" depth ="0.06" castshadow="true"
|
||||||
width = "64" height ="32" resizehorizontal="true" body="true" health="500"/>
|
width = "64" height ="32" resizehorizontal="true" body="true" health="500"/>
|
||||||
|
|
||||||
<topwindow sprite="Content/Map/testroom.png" sourcerect="208,352,128,80" depth ="0.05"
|
<topwindow sprite="Content/Map/testroom.png" sourcerect="208,352,128,80" depth ="0.05"
|
||||||
width = "128" height ="80" body="true" health="100"/>
|
width = "128" height ="80" body="true" health="100"/>
|
||||||
@@ -54,29 +54,35 @@
|
|||||||
<verticalwindow sprite="Content/Map/testroom.png" sourcerect="256,784,128,224" depth ="0.05"
|
<verticalwindow sprite="Content/Map/testroom.png" sourcerect="256,784,128,224" depth ="0.05"
|
||||||
width = "128" height ="224" body="true" health="100"/>
|
width = "128" height ="224" body="true" health="100"/>
|
||||||
|
|
||||||
|
<horizontalresizablewindow sprite="Content/Map/testroom.png" sourcerect="896,208,128,64" depth ="0.06"
|
||||||
|
width = "128" height ="64" body="true" health="100" resizehorizontal="true"/>
|
||||||
|
|
||||||
|
<verticalresizablewindow sprite="Content/Map/testroom.png" sourcerect="896,80,64,128" depth ="0.06"
|
||||||
|
width = "64" height ="128" body="true" health="100" resizevertical="true"/>
|
||||||
|
|
||||||
<smallhorizontalback sprite="Content/Map/testroom.png" sourcerect="0,65,896,32" depth ="0.4"
|
<smallhorizontalback sprite="Content/Map/testroom.png" sourcerect="0,65,896,32" depth ="0.4"
|
||||||
width = "128" height ="32" resizehorizontal="true"/>
|
width = "128" height ="32" resizehorizontal="true"/>
|
||||||
|
|
||||||
<largeplatform sprite="Content/Map/testroom.png" sourcerect="896,0,128,64" depth ="0.9"
|
<largeplatform sprite="Content/Map/testroom.png" sourcerect="896,0,128,64" depth ="0.9"
|
||||||
width = "64" height ="64" resizehorizontal="true" body="true" platform="true"/>
|
width = "64" height ="64" resizehorizontal="true" body="true" platform="true"/>
|
||||||
|
|
||||||
<platform sprite="Content/Map/testroom.png" sourcerect="896,64,128,32" depth ="0.9"
|
<platform sprite="Content/Map/testroom.png" sourcerect="896,64,128,32" depth ="0.9"
|
||||||
width = "64" height ="32" resizehorizontal="true" body="true" platform="true"/>
|
width = "64" height ="32" resizehorizontal="true" body="true" platform="true"/>
|
||||||
|
|
||||||
<roughbgwall sprite="Content/Map/testroom.png" sourcerect="200,104,240,240" depth = "1.0"
|
<roughbgwall sprite="Content/Map/testroom.png" sourcerect="200,104,240,240" depth = "1.0"
|
||||||
width="64" height="64" resizehorizontal="true" resizevertical="true"/>
|
width="64" height="64" resizehorizontal="true" resizevertical="true"/>
|
||||||
|
|
||||||
<cleanbgwall sprite="Content/Map/testroom.png" sourcerect="448,96,448,224" depth = "1.0"
|
<cleanbgwall sprite="Content/Map/testroom.png" sourcerect="448,96,448,224" depth = "1.0"
|
||||||
width="64" height="64" resizehorizontal="true" resizevertical="true"/>
|
width="64" height="64" resizehorizontal="true" resizevertical="true"/>
|
||||||
|
|
||||||
<bgpanels sprite="Content/Map/testroom.png" sourcerect="768,320,224,224" depth = "1.0"
|
<bgpanels sprite="Content/Map/testroom.png" sourcerect="768,320,224,224" depth = "1.0"
|
||||||
width="64" height="64" resizehorizontal="true" resizevertical="true"/>
|
width="64" height="64" resizehorizontal="true" resizevertical="true"/>
|
||||||
|
|
||||||
<stairsright sprite="Content/Map/testroom.png" sourcerect="0,704,256,320"
|
<stairsright sprite="Content/Map/testroom.png" sourcerect="0,704,256,320"
|
||||||
width="256" height="320" depth = "0.1" stairdirection="Right"/>
|
width="256" height="320" depth = "0.1" stairdirection="Right"/>
|
||||||
|
|
||||||
<stairsleft sprite="Content/Map/testroom.png" fliphorizontal="true" sourcerect="0,704,256,320"
|
<stairsleft sprite="Content/Map/testroom.png" fliphorizontal="true" sourcerect="0,704,256,320"
|
||||||
width="256" height="320" depth = "0.1" stairdirection="Left"/>
|
width="256" height="320" depth = "0.1" stairdirection="Left"/>
|
||||||
|
|
||||||
<bunk sprite="Content/Map/testroom.png" fliphorizontal="true" sourcerect="0,546,173,129"
|
<bunk sprite="Content/Map/testroom.png" fliphorizontal="true" sourcerect="0,546,173,129"
|
||||||
width="173" height="129" depth = "0.9"/>
|
width="173" height="129" depth = "0.9"/>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 695 KiB After Width: | Height: | Size: 716 KiB |
@@ -25,4 +25,13 @@
|
|||||||
difficulty="25"
|
difficulty="25"
|
||||||
minamount="1" maxamount="2"
|
minamount="1" maxamount="2"
|
||||||
musictype="monster"/>
|
musictype="monster"/>
|
||||||
|
|
||||||
|
<MonsterEvent name="Under attack" description=""
|
||||||
|
characterfile="Content/Characters/Coelanth/coelanth.xml"
|
||||||
|
spawndeep="true"
|
||||||
|
commonness="10"
|
||||||
|
difficulty="5"
|
||||||
|
minamount="1" maxamount="1"
|
||||||
|
musictype="monster"/>
|
||||||
|
|
||||||
</Randomevents>
|
</Randomevents>
|
||||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("0.2.4.1")]
|
[assembly: AssemblyVersion("0.2.5.0")]
|
||||||
[assembly: AssemblyFileVersion("0.2.4.1")]
|
[assembly: AssemblyFileVersion("0.2.5.0")]
|
||||||
|
|||||||
@@ -825,15 +825,26 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (!Enabled) return;
|
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;
|
||||||
|
|
||||||
if (PressureProtection==0.0f &&
|
if (!(this is AICharacter))
|
||||||
(AnimController.CurrentHull == null || AnimController.CurrentHull.LethalPressure >= 100.0f))
|
|
||||||
{
|
{
|
||||||
Implode();
|
bool protectedFromPressure = PressureProtection > 0.0f;
|
||||||
return;
|
|
||||||
|
if (Submarine.Loaded!=null && Level.Loaded !=null)
|
||||||
|
{
|
||||||
|
protectedFromPressure = protectedFromPressure && (Position-Level.Loaded.Position).Y > SubmarineBody.DamageDepth;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!protectedFromPressure &&
|
||||||
|
(AnimController.CurrentHull == null || AnimController.CurrentHull.LethalPressure >= 100.0f))
|
||||||
|
{
|
||||||
|
Implode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controlled == this)
|
if (controlled == this)
|
||||||
|
|||||||
@@ -154,7 +154,10 @@ namespace EventInput
|
|||||||
public static void Initialize(GameWindow window)
|
public static void Initialize(GameWindow window)
|
||||||
{
|
{
|
||||||
if (initialized)
|
if (initialized)
|
||||||
throw new InvalidOperationException("TextInput.Initialize can only be called once!");
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//throw new InvalidOperationException("TextInput.Initialize can only be called once!");
|
||||||
|
|
||||||
hookProcDelegate = HookProc;
|
hookProcDelegate = HookProc;
|
||||||
#if WINDOWS
|
#if WINDOWS
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ namespace Barotrauma
|
|||||||
|
|
||||||
private Character[] monsters;
|
private Character[] monsters;
|
||||||
|
|
||||||
|
private bool spawnDeep;
|
||||||
|
|
||||||
public MonsterEvent(XElement element)
|
public MonsterEvent(XElement element)
|
||||||
: base (element)
|
: base (element)
|
||||||
{
|
{
|
||||||
@@ -19,6 +21,8 @@ namespace Barotrauma
|
|||||||
|
|
||||||
minAmount = ToolBox.GetAttributeInt(element, "minamount", 1);
|
minAmount = ToolBox.GetAttributeInt(element, "minamount", 1);
|
||||||
maxAmount = Math.Max(ToolBox.GetAttributeInt(element, "maxamount", 1), minAmount);
|
maxAmount = Math.Max(ToolBox.GetAttributeInt(element, "maxamount", 1), minAmount);
|
||||||
|
|
||||||
|
spawnDeep = ToolBox.GetAttributeBool(element, "spawndeep", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SpawnMonsters()
|
private void SpawnMonsters()
|
||||||
@@ -32,6 +36,13 @@ namespace Barotrauma
|
|||||||
for (int i = 0; i < amount; i++)
|
for (int i = 0; i < amount; i++)
|
||||||
{
|
{
|
||||||
Vector2 position = (randomWayPoint == null) ? Vector2.Zero : FarseerPhysics.ConvertUnits.ToSimUnits(randomWayPoint.Position + Level.Loaded.Position);
|
Vector2 position = (randomWayPoint == null) ? Vector2.Zero : FarseerPhysics.ConvertUnits.ToSimUnits(randomWayPoint.Position + Level.Loaded.Position);
|
||||||
|
|
||||||
|
|
||||||
|
if (spawnDeep)
|
||||||
|
{
|
||||||
|
position.Y = FarseerPhysics.ConvertUnits.ToSimUnits(Level.Loaded.Position.Y);
|
||||||
|
}
|
||||||
|
|
||||||
position.X += Rand.Range(-0.5f, 0.5f);
|
position.X += Rand.Range(-0.5f, 0.5f);
|
||||||
position.Y += Rand.Range(-0.5f, 0.5f);
|
position.Y += Rand.Range(-0.5f, 0.5f);
|
||||||
monsters[i] = new AICharacter(characterFile, position);
|
monsters[i] = new AICharacter(characterFile, position);
|
||||||
|
|||||||
@@ -64,5 +64,10 @@ namespace Barotrauma
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void CloseAll()
|
||||||
|
{
|
||||||
|
MessageBoxes.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ namespace Barotrauma
|
|||||||
static int graphicsWidth, graphicsHeight;
|
static int graphicsWidth, graphicsHeight;
|
||||||
static SpriteBatch spriteBatch;
|
static SpriteBatch spriteBatch;
|
||||||
|
|
||||||
|
public static GameMain Instance;
|
||||||
|
|
||||||
public static bool DebugDraw;
|
public static bool DebugDraw;
|
||||||
|
|
||||||
public static GraphicsDevice CurrGraphicsDevice;
|
public static GraphicsDevice CurrGraphicsDevice;
|
||||||
@@ -99,6 +101,8 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
Graphics = new GraphicsDeviceManager(this);
|
Graphics = new GraphicsDeviceManager(this);
|
||||||
|
|
||||||
|
Instance = this;
|
||||||
|
|
||||||
Config = new GameSettings("config.xml");
|
Config = new GameSettings("config.xml");
|
||||||
if (Config.WasGameUpdated)
|
if (Config.WasGameUpdated)
|
||||||
{
|
{
|
||||||
@@ -169,7 +173,7 @@ namespace Barotrauma
|
|||||||
CoroutineManager.StartCoroutine(Load());
|
CoroutineManager.StartCoroutine(Load());
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerable<object> Load()
|
public IEnumerable<object> Load()
|
||||||
{
|
{
|
||||||
GUI.Init(Content);
|
GUI.Init(Content);
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ namespace Barotrauma
|
|||||||
return keyMapping[(int)inputType];
|
return keyMapping[(int)inputType];
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GraphicsWidth { get; set; }
|
public int GraphicsWidth { get; set; }
|
||||||
public int GraphicsHeight { get; set; }
|
public int GraphicsHeight { get; set; }
|
||||||
|
|
||||||
public bool FullScreenEnabled { get; set; }
|
public bool FullScreenEnabled { get; set; }
|
||||||
|
|
||||||
@@ -155,15 +155,14 @@ namespace Barotrauma
|
|||||||
int mouseButton;
|
int mouseButton;
|
||||||
if (Enum.TryParse(attribute.Name.ToString(), true, out inputType))
|
if (Enum.TryParse(attribute.Name.ToString(), true, out inputType))
|
||||||
{
|
{
|
||||||
if (Enum.TryParse(attribute.Value.ToString(), true, out key))
|
if (int.TryParse(attribute.Value.ToString(), out mouseButton))
|
||||||
{
|
|
||||||
keyMapping[(int)inputType] = new KeyOrMouse(key);
|
|
||||||
}
|
|
||||||
else if (int.TryParse(attribute.Value.ToString(), out mouseButton))
|
|
||||||
{
|
{
|
||||||
keyMapping[(int)inputType] = new KeyOrMouse(mouseButton);
|
keyMapping[(int)inputType] = new KeyOrMouse(mouseButton);
|
||||||
}
|
}
|
||||||
|
else if (Enum.TryParse(attribute.Value.ToString(), true, out key))
|
||||||
|
{
|
||||||
|
keyMapping[(int)inputType] = new KeyOrMouse(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -213,6 +212,22 @@ namespace Barotrauma
|
|||||||
new XAttribute("path", SelectedContentPackage.Path)));
|
new XAttribute("path", SelectedContentPackage.Path)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var keyMappingElement = new XElement("keymapping");
|
||||||
|
doc.Root.Add(keyMappingElement);
|
||||||
|
for (int i = 0; i<keyMapping.Length;i++)
|
||||||
|
{
|
||||||
|
if (keyMapping[i].MouseButton==null)
|
||||||
|
{
|
||||||
|
keyMappingElement.Add(new XAttribute(((InputType)i).ToString(), keyMapping[i].Key));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
keyMappingElement.Add(new XAttribute(((InputType)i).ToString(), keyMapping[i].MouseButton));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
doc.Save(filePath);
|
doc.Save(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,6 +251,10 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
UnsavedSettings = true;
|
UnsavedSettings = true;
|
||||||
FullScreenEnabled = !FullScreenEnabled;
|
FullScreenEnabled = !FullScreenEnabled;
|
||||||
|
|
||||||
|
GameMain.Graphics.IsFullScreen = FullScreenEnabled;
|
||||||
|
GameMain.Graphics.ApplyChanges();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,6 +273,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
new GUITextBlock(new Rectangle(0, y, 20, 20), "Resolution", GUI.Style, Alignment.TopLeft, Alignment.TopLeft, settingsFrame);
|
new GUITextBlock(new Rectangle(0, y, 20, 20), "Resolution", GUI.Style, Alignment.TopLeft, Alignment.TopLeft, settingsFrame);
|
||||||
var resolutionDD = new GUIDropDown(new Rectangle(0, y + 20, 180, 20), "", GUI.Style, settingsFrame);
|
var resolutionDD = new GUIDropDown(new Rectangle(0, y + 20, 180, 20), "", GUI.Style, settingsFrame);
|
||||||
|
resolutionDD.OnSelected = SelectResolution;
|
||||||
|
|
||||||
var supportedModes = new List<DisplayMode>();
|
var supportedModes = new List<DisplayMode>();
|
||||||
foreach (DisplayMode mode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
|
foreach (DisplayMode mode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
|
||||||
@@ -340,9 +360,18 @@ namespace Barotrauma
|
|||||||
DisplayMode mode = selected.UserData as DisplayMode;
|
DisplayMode mode = selected.UserData as DisplayMode;
|
||||||
if (mode == null) return false;
|
if (mode == null) return false;
|
||||||
|
|
||||||
|
if (GraphicsWidth == mode.Width && GraphicsHeight == mode.Height) return false;
|
||||||
|
|
||||||
GraphicsWidth = mode.Width;
|
GraphicsWidth = mode.Width;
|
||||||
GraphicsHeight = mode.Height;
|
GraphicsHeight = mode.Height;
|
||||||
|
|
||||||
|
|
||||||
|
//GameMain.Graphics.PreferredBackBufferWidth = GraphicsWidth;
|
||||||
|
//GameMain.Graphics.PreferredBackBufferHeight = GraphicsHeight;
|
||||||
|
//GameMain.Graphics.ApplyChanges();
|
||||||
|
|
||||||
|
//CoroutineManager.StartCoroutine(GameMain.Instance.Load());
|
||||||
|
|
||||||
UnsavedSettings = true;
|
UnsavedSettings = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -352,7 +381,10 @@ namespace Barotrauma
|
|||||||
|
|
||||||
private IEnumerable<object> WaitForKeyPress(GUITextBox keyBox)
|
private IEnumerable<object> WaitForKeyPress(GUITextBox keyBox)
|
||||||
{
|
{
|
||||||
while (keyBox.Selected && PlayerInput.GetKeyboardState.GetPressedKeys().Length==0)
|
yield return CoroutineStatus.Running;
|
||||||
|
|
||||||
|
while (keyBox.Selected && PlayerInput.GetKeyboardState.GetPressedKeys().Length==0
|
||||||
|
&& !PlayerInput.LeftButtonClicked() && !PlayerInput.RightButtonClicked())
|
||||||
{
|
{
|
||||||
if (Screen.Selected != GameMain.MainMenuScreen) yield return CoroutineStatus.Success;
|
if (Screen.Selected != GameMain.MainMenuScreen) yield return CoroutineStatus.Success;
|
||||||
|
|
||||||
@@ -361,12 +393,29 @@ namespace Barotrauma
|
|||||||
|
|
||||||
UnsavedSettings = true;
|
UnsavedSettings = true;
|
||||||
|
|
||||||
Keys key = PlayerInput.GetKeyboardState.GetPressedKeys()[0];
|
|
||||||
|
|
||||||
int keyIndex = (int)keyBox.UserData;
|
int keyIndex = (int)keyBox.UserData;
|
||||||
keyMapping[keyIndex] = new KeyOrMouse(key);
|
|
||||||
|
|
||||||
keyBox.Text = key.ToString("G");
|
if (PlayerInput.LeftButtonClicked())
|
||||||
|
{
|
||||||
|
keyMapping[keyIndex] = new KeyOrMouse(0);
|
||||||
|
keyBox.Text = "Mouse1";
|
||||||
|
}
|
||||||
|
else if (PlayerInput.LeftButtonClicked())
|
||||||
|
{
|
||||||
|
keyMapping[keyIndex] = new KeyOrMouse(1);
|
||||||
|
keyBox.Text = "Mouse2";
|
||||||
|
}
|
||||||
|
else if (PlayerInput.GetKeyboardState.GetPressedKeys().Length > 0)
|
||||||
|
{
|
||||||
|
Keys key = PlayerInput.GetKeyboardState.GetPressedKeys()[0];
|
||||||
|
keyMapping[keyIndex] = new KeyOrMouse(key);
|
||||||
|
keyBox.Text = key.ToString("G");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
yield return CoroutineStatus.Success;
|
||||||
|
}
|
||||||
|
|
||||||
keyBox.Deselect();
|
keyBox.Deselect();
|
||||||
|
|
||||||
yield return CoroutineStatus.Success;
|
yield return CoroutineStatus.Success;
|
||||||
@@ -375,6 +424,12 @@ namespace Barotrauma
|
|||||||
private bool ApplyClicked(GUIButton button, object userData)
|
private bool ApplyClicked(GUIButton button, object userData)
|
||||||
{
|
{
|
||||||
Save("config.xml");
|
Save("config.xml");
|
||||||
|
|
||||||
|
if (GameMain.GraphicsWidth != GameMain.Config.GraphicsWidth || GameMain.GraphicsHeight != GameMain.Config.GraphicsHeight)
|
||||||
|
{
|
||||||
|
new GUIMessageBox("Restart required", "You need to restart the game for the resolution changes to take effect.");
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,12 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
Vector2 position = Submarine.MouseToWorldGrid(cam);
|
Vector2 position = Submarine.MouseToWorldGrid(cam);
|
||||||
|
|
||||||
|
if (PlayerInput.RightButtonClicked())
|
||||||
|
{
|
||||||
|
selected = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!resizeHorizontal && !resizeVertical)
|
if (!resizeHorizontal && !resizeVertical)
|
||||||
{
|
{
|
||||||
if (PlayerInput.LeftButtonClicked())
|
if (PlayerInput.LeftButtonClicked())
|
||||||
@@ -80,7 +86,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
placePosition = Vector2.Zero;
|
placePosition = Vector2.Zero;
|
||||||
|
|
||||||
selected = null;
|
// selected = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +112,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
new Item(new Rectangle((int)placePosition.X, (int)placePosition.Y, (int)placeSize.X, (int)placeSize.Y), this);
|
new Item(new Rectangle((int)placePosition.X, (int)placePosition.Y, (int)placeSize.X, (int)placeSize.Y), this);
|
||||||
|
|
||||||
selected = null;
|
//selected = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +122,7 @@ namespace Barotrauma
|
|||||||
if (sprite != null) sprite.DrawTiled(spriteBatch, new Vector2(position.X, -position.Y), placeSize, Color.White);
|
if (sprite != null) sprite.DrawTiled(spriteBatch, new Vector2(position.X, -position.Y), placeSize, Color.White);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PlayerInput.GetMouseState.RightButton == ButtonState.Pressed) selected = null;
|
//if (PlayerInput.GetMouseState.RightButton == ButtonState.Pressed) selected = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -305,9 +305,9 @@ namespace Barotrauma
|
|||||||
|
|
||||||
cells = CleanCells(pathCells);
|
cells = CleanCells(pathCells);
|
||||||
|
|
||||||
pathCells.AddRange(CreateBottomHoles(1.0f, new Rectangle(
|
pathCells.AddRange(CreateBottomHoles(0.8f, new Rectangle(
|
||||||
(int)(borders.Width * 0.2f), 0,
|
(int)(borders.Width * 0.2f), 0,
|
||||||
(int)(borders.Width * 0.6f), (int)(borders.Height * 0.3f))));
|
(int)(borders.Width * 0.6f), (int)(borders.Height * 0.5f))));
|
||||||
|
|
||||||
foreach (VoronoiCell cell in pathCells)
|
foreach (VoronoiCell cell in pathCells)
|
||||||
{
|
{
|
||||||
@@ -338,7 +338,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < 2; i++)
|
for (int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
wrappingWalls[side, i] = new WrappingWall(pathCells, cells, borders.Height * 0.7f,
|
wrappingWalls[side, i] = new WrappingWall(pathCells, cells, borders.Height * 0.5f,
|
||||||
(side == 0 ? -1 : 1) * (i == 0 ? 1 : 2));
|
(side == 0 ? -1 : 1) * (i == 0 ? 1 : 2));
|
||||||
|
|
||||||
wrappingWalls[side, i].Vertices = GeneratePolygons(wrappingWalls[side, i].Cells, new List<VoronoiCell>());
|
wrappingWalls[side, i].Vertices = GeneratePolygons(wrappingWalls[side, i].Cells, new List<VoronoiCell>());
|
||||||
@@ -651,7 +651,7 @@ namespace Barotrauma
|
|||||||
if (!tempVertices.Contains(ge.point2)) tempVertices.Add(ge.point2);
|
if (!tempVertices.Contains(ge.point2)) tempVertices.Add(ge.point2);
|
||||||
|
|
||||||
VoronoiCell adjacentCell = ge.AdjacentCell(cell);
|
VoronoiCell adjacentCell = ge.AdjacentCell(cell);
|
||||||
if (adjacentCell!=null && !emptyCells.Contains(adjacentCell)) continue;
|
if (adjacentCell!=null && cells.Contains(adjacentCell)) continue;
|
||||||
|
|
||||||
ge.isSolid = true;
|
ge.isSolid = true;
|
||||||
|
|
||||||
@@ -929,7 +929,30 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return edges;
|
for (int side = 0; side < 2; side++ )
|
||||||
|
{
|
||||||
|
for (int n = 0 ; n<2; n++)
|
||||||
|
{
|
||||||
|
if (Vector2.Distance(wrappingWalls[side, n].MidPos, refPos) > WrappingWall.WallWidth) continue;
|
||||||
|
|
||||||
|
foreach (VoronoiCell cell in wrappingWalls[side, n].Cells)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < cell.edges.Count; i++)
|
||||||
|
{
|
||||||
|
if (onlySolid && !cell.edges[i].isSolid) continue;
|
||||||
|
Vector2 start = cell.edges[i].point1 + Position;
|
||||||
|
start.Y = -start.Y;
|
||||||
|
|
||||||
|
Vector2 end = cell.edges[i].point2 + Position;
|
||||||
|
end.Y = -end.Y;
|
||||||
|
|
||||||
|
edges.Add(new Vector2[] { start, end });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return edges;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Render(GraphicsDevice graphicsDevice, Camera cam)
|
public void Render(GraphicsDevice graphicsDevice, Camera cam)
|
||||||
|
|||||||
@@ -157,6 +157,12 @@ namespace Voronoi2
|
|||||||
edges.Add(ge);
|
edges.Add(ge);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GraphEdge lastEdge = new GraphEdge();
|
||||||
|
lastEdge.point1 = vertices[0];
|
||||||
|
lastEdge.point2 = vertices[vertices.Length-1];
|
||||||
|
|
||||||
|
edges.Add(lastEdge);
|
||||||
|
|
||||||
site = new Site();
|
site = new Site();
|
||||||
site.SetPoint(midPoint);
|
site.SetPoint(midPoint);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Barotrauma
|
|||||||
class WrappingWall
|
class WrappingWall
|
||||||
{
|
{
|
||||||
|
|
||||||
const float wallWidth = 20000.0f;
|
public const float WallWidth = 20000.0f;
|
||||||
|
|
||||||
public VertexPositionTexture[] Vertices;
|
public VertexPositionTexture[] Vertices;
|
||||||
|
|
||||||
@@ -34,6 +34,11 @@ namespace Barotrauma
|
|||||||
get { return cells; }
|
get { return cells; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Vector2 MidPos
|
||||||
|
{
|
||||||
|
get { return midPos; }
|
||||||
|
}
|
||||||
|
|
||||||
public WrappingWall(List<VoronoiCell> pathCells, List<VoronoiCell> mapCells, float maxY, int dir = -1)
|
public WrappingWall(List<VoronoiCell> pathCells, List<VoronoiCell> mapCells, float maxY, int dir = -1)
|
||||||
{
|
{
|
||||||
cells = new List<VoronoiCell>();
|
cells = new List<VoronoiCell>();
|
||||||
@@ -61,21 +66,21 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2 wallSectionSize = new Vector2(2300.0f, 2300.0f);
|
Vector2 wallSectionSize = new Vector2(2000.0f, 2000.0f);
|
||||||
Vector2 startPos = (dir < 0) ?
|
Vector2 startPos = (dir < 0) ?
|
||||||
edgeCell.Center + Vector2.UnitX * wallWidth * dir :
|
edgeCell.Center + Vector2.UnitX * WallWidth * dir :
|
||||||
edgeCell.Center + wallWidth * Vector2.UnitX * (dir - 1);
|
edgeCell.Center + WallWidth * Vector2.UnitX * (dir - 1);
|
||||||
|
|
||||||
midPos = startPos + Vector2.UnitX * wallWidth/2;
|
midPos = startPos + Vector2.UnitX * WallWidth/2;
|
||||||
|
|
||||||
List<Vector2> bottomVertices = new List<Vector2>();
|
List<Vector2> bottomVertices = new List<Vector2>();
|
||||||
|
|
||||||
for (float x = 0; x <= wallWidth; x += wallSectionSize.X)
|
for (float x = 0; x <= WallWidth; x += wallSectionSize.X)
|
||||||
{
|
{
|
||||||
Vector2 center = new Vector2(startPos.X + x, edgeCell.Center.Y);
|
Vector2 center = new Vector2(startPos.X + x, edgeCell.Center.Y);
|
||||||
float distFromCenter = Math.Abs(x - wallWidth / 2);
|
float distFromCenter = Math.Abs(x - WallWidth / 2);
|
||||||
float distFromEdge = wallWidth / 2 - distFromCenter;
|
float distFromEdge = WallWidth / 2 - distFromCenter;
|
||||||
float normalizedDist = distFromEdge / (wallWidth / 2);
|
float normalizedDist = distFromEdge / (WallWidth / 2);
|
||||||
|
|
||||||
float variance = 1000.0f * normalizedDist;
|
float variance = 1000.0f * normalizedDist;
|
||||||
bottomVertices.Add(center + new Vector2(Rand.Range(-variance, variance, false), Rand.Range(-variance, variance, false)*2.0f));
|
bottomVertices.Add(center + new Vector2(Rand.Range(-variance, variance, false), Rand.Range(-variance, variance, false)*2.0f));
|
||||||
@@ -90,23 +95,16 @@ namespace Barotrauma
|
|||||||
vertices[3] = vertices[0] + Vector2.UnitY * wallSectionSize.Y;
|
vertices[3] = vertices[0] + Vector2.UnitY * wallSectionSize.Y;
|
||||||
|
|
||||||
VoronoiCell wallCell = new VoronoiCell(vertices);
|
VoronoiCell wallCell = new VoronoiCell(vertices);
|
||||||
|
wallCell.edges[1].cell1 = wallCell;
|
||||||
|
wallCell.edges[3].cell1 = wallCell;
|
||||||
|
if (i > 1)
|
||||||
|
{
|
||||||
|
wallCell.edges[1].cell2 = cells[i - 2];
|
||||||
|
cells[i - 2].edges[3].cell2 = wallCell;
|
||||||
|
}
|
||||||
|
|
||||||
cells.Add(wallCell);
|
cells.Add(wallCell);
|
||||||
}
|
}
|
||||||
|
|
||||||
//for (float x = 0; x<=wallWidth; x+=wallSectionSize.X)
|
|
||||||
//{
|
|
||||||
// Vector2 center = new Vector2(startPos.X+x, edgeCell.Center.Y);
|
|
||||||
|
|
||||||
// Vector2[] vertices = new Vector2[4];
|
|
||||||
// vertices[0] = center - wallSectionSize / 2;
|
|
||||||
// vertices[2] = center + wallSectionSize / 2;
|
|
||||||
// vertices[1] = new Vector2(vertices[2].X, vertices[0].Y);
|
|
||||||
// vertices[3] = new Vector2(vertices[0].X, vertices[2].Y);
|
|
||||||
|
|
||||||
// VoronoiCell wallCell = new VoronoiCell(vertices);
|
|
||||||
// wallCells.Add(wallCell);
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -150,7 +148,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
slot += amount;
|
slot += amount;
|
||||||
|
|
||||||
Vector2 moveAmount = Vector2.UnitX * wallWidth * amount;
|
Vector2 moveAmount = Vector2.UnitX * WallWidth * amount;
|
||||||
|
|
||||||
Vector2 simMoveAmount = ConvertUnits.ToSimUnits(moveAmount);
|
Vector2 simMoveAmount = ConvertUnits.ToSimUnits(moveAmount);
|
||||||
foreach (VoronoiCell cell in cells)
|
foreach (VoronoiCell cell in cells)
|
||||||
|
|||||||
@@ -117,6 +117,11 @@ namespace Barotrauma
|
|||||||
get { return filePath; }
|
get { return filePath; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool AtDamageDepth
|
||||||
|
{
|
||||||
|
get { return subBody == null ? false : subBody.AtDamageDepth; }
|
||||||
|
}
|
||||||
|
|
||||||
//constructors & generation ----------------------------------------------------
|
//constructors & generation ----------------------------------------------------
|
||||||
|
|
||||||
public Submarine(string filePath, string hash = "")
|
public Submarine(string filePath, string hash = "")
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
class SubmarineBody
|
class SubmarineBody
|
||||||
{
|
{
|
||||||
const float DamageDepth = 0.0f;
|
public const float DamageDepth = -10000.0f;
|
||||||
const float PressureDamageMultiplier = 0.001f;
|
const float PressureDamageMultiplier = 0.001f;
|
||||||
|
|
||||||
//structure damage = impact * damageMultiplier
|
//structure damage = impact * damageMultiplier
|
||||||
@@ -77,6 +77,11 @@ namespace Barotrauma
|
|||||||
get { return new Vector2(Borders.X + Borders.Width / 2, Borders.Y - Borders.Height / 2); }
|
get { return new Vector2(Borders.X + Borders.Width / 2, Borders.Y - Borders.Height / 2); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool AtDamageDepth
|
||||||
|
{
|
||||||
|
get { return sub.Position.Y < DamageDepth; }
|
||||||
|
}
|
||||||
|
|
||||||
public SubmarineBody(Submarine sub)
|
public SubmarineBody(Submarine sub)
|
||||||
{
|
{
|
||||||
this.sub = sub;
|
this.sub = sub;
|
||||||
|
|||||||
@@ -636,8 +636,6 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
if (recipients.Count == 0) return;
|
if (recipients.Count == 0) return;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (NetworkEvent networkEvent in NetworkEvent.events)
|
foreach (NetworkEvent networkEvent in NetworkEvent.events)
|
||||||
{
|
{
|
||||||
NetOutgoingMessage message = server.CreateMessage();
|
NetOutgoingMessage message = server.CreateMessage();
|
||||||
@@ -676,8 +674,17 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
public bool StartGameClicked(GUIButton button, object obj)
|
public bool StartGameClicked(GUIButton button, object obj)
|
||||||
{
|
{
|
||||||
Submarine selectedSub = Voting.AllowSubVoting ?
|
Submarine selectedSub = null;
|
||||||
Voting.HighestVoted<Submarine>(VoteType.Sub, connectedClients) : GameMain.NetLobbyScreen.SelectedSub;
|
|
||||||
|
if (Voting.AllowSubVoting)
|
||||||
|
{
|
||||||
|
Voting.HighestVoted<Submarine>(VoteType.Sub, connectedClients);
|
||||||
|
if (selectedSub == null) selectedSub = GameMain.NetLobbyScreen.SelectedSub;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
selectedSub = GameMain.NetLobbyScreen.SelectedSub;
|
||||||
|
}
|
||||||
|
|
||||||
if (selectedSub == null)
|
if (selectedSub == null)
|
||||||
{
|
{
|
||||||
@@ -692,6 +699,8 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
private IEnumerable<object> StartGame(Submarine selectedSub)
|
private IEnumerable<object> StartGame(Submarine selectedSub)
|
||||||
{
|
{
|
||||||
|
GUIMessageBox.CloseAll();
|
||||||
|
|
||||||
AssignJobs();
|
AssignJobs();
|
||||||
|
|
||||||
//selectedMap.Load();
|
//selectedMap.Load();
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace Barotrauma.Networking
|
|||||||
settingsFrame = null;
|
settingsFrame = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ namespace Barotrauma.Networking
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PlayerInput.KeyHit(Keys.Tab))
|
if (PlayerInput.KeyHit(InputType.Chat))
|
||||||
{
|
{
|
||||||
if (chatMsgBox.Selected)
|
if (chatMsgBox.Selected)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,6 +18,15 @@ namespace Barotrauma
|
|||||||
Keys keyBinding;
|
Keys keyBinding;
|
||||||
int? mouseButton;
|
int? mouseButton;
|
||||||
|
|
||||||
|
public Keys Key
|
||||||
|
{
|
||||||
|
get { return keyBinding; }
|
||||||
|
}
|
||||||
|
public int? MouseButton
|
||||||
|
{
|
||||||
|
get { return mouseButton; }
|
||||||
|
}
|
||||||
|
|
||||||
public KeyOrMouse(Keys keyBinding)
|
public KeyOrMouse(Keys keyBinding)
|
||||||
{
|
{
|
||||||
this.keyBinding = keyBinding;
|
this.keyBinding = keyBinding;
|
||||||
@@ -258,6 +267,16 @@ namespace Barotrauma
|
|||||||
return doubleClicked;
|
return doubleClicked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool KeyHit(InputType inputType)
|
||||||
|
{
|
||||||
|
return GameMain.Config.KeyBind(inputType).IsHit();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool KeyDOwn(InputType inputType)
|
||||||
|
{
|
||||||
|
return GameMain.Config.KeyBind(inputType).IsDown();
|
||||||
|
}
|
||||||
|
|
||||||
public static bool KeyHit(Keys button)
|
public static bool KeyHit(Keys button)
|
||||||
{
|
{
|
||||||
return (oldKeyboardState.IsKeyDown(button) && keyboardState.IsKeyUp(button));
|
return (oldKeyboardState.IsKeyDown(button) && keyboardState.IsKeyUp(button));
|
||||||
|
|||||||
@@ -235,6 +235,11 @@ namespace Barotrauma
|
|||||||
GameMain.Config.Save("config.xml");
|
GameMain.Config.Save("config.xml");
|
||||||
selectedTab = (int)obj;
|
selectedTab = (int)obj;
|
||||||
|
|
||||||
|
if (GameMain.GraphicsWidth != GameMain.Config.GraphicsWidth || GameMain.GraphicsHeight != GameMain.Config.GraphicsHeight)
|
||||||
|
{
|
||||||
|
new GUIMessageBox("Restart required", "You need to restart the game for the resolution changes to take effect.");
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ namespace Barotrauma
|
|||||||
modeList.OnSelected = VotableClicked;
|
modeList.OnSelected = VotableClicked;
|
||||||
modeList.OnSelected += SelectMode;
|
modeList.OnSelected += SelectMode;
|
||||||
subList.OnSelected = VotableClicked;
|
subList.OnSelected = VotableClicked;
|
||||||
subList.OnSelected += SelectMode;
|
subList.OnSelected += SelectMap;
|
||||||
|
|
||||||
GUIButton startButton = new GUIButton(new Rectangle(0, 0, 80, 30), "Start", Alignment.BottomRight, GUI.Style, infoFrame);
|
GUIButton startButton = new GUIButton(new Rectangle(0, 0, 80, 30), "Start", Alignment.BottomRight, GUI.Style, infoFrame);
|
||||||
startButton.OnClicked = GameMain.Server.StartGameClicked;
|
startButton.OnClicked = GameMain.Server.StartGameClicked;
|
||||||
|
|||||||
@@ -1,4 +1,26 @@
|
|||||||
|
|
||||||
|
---------------------------------------------------------------------------------------------------------
|
||||||
|
v0.2.5
|
||||||
|
---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Multiplayer:
|
||||||
|
- option to randomly select level seed, submarine and/or game mode
|
||||||
|
- players can be allowed to vote for the next sub and game mode
|
||||||
|
- option to choose character's head
|
||||||
|
|
||||||
|
Submarine:
|
||||||
|
- pressure damage if the submarine dives too deep
|
||||||
|
- added the missing mechanic spawnpoint missing to Aegir
|
||||||
|
|
||||||
|
Creatures:
|
||||||
|
- a new enemy that only spawns deep below the level
|
||||||
|
|
||||||
|
Misc:
|
||||||
|
- the levels aren't just enclosed tunnels anymore and it's possible to dive much deeper
|
||||||
|
- settings menu
|
||||||
|
- better UI scaling on small resolutions
|
||||||
|
- fixed items occasionally disappearing from inventory after loading in single player
|
||||||
|
|
||||||
---------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------
|
||||||
v0.2.4.1
|
v0.2.4.1
|
||||||
---------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user