- PowerContainer capacity is initialized before charge to allow setting the charge higher than default capacity
- soundplayer doesn't crash the game if it can't stream a music clip - some new structure prefabs - more effective corrigodone (health med)
This commit is contained in:
@@ -769,6 +769,9 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Content\Map\structures2.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Map\waypointIcons.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
</ItemComponent>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand">
|
||||
<StatusEffect type="OnUse" target="Character" Health="2.0" duration="5.0">
|
||||
<StatusEffect type="OnUse" target="Character" Health="3.0" duration="5.0">
|
||||
<RequiredItem name="Medical Syringe" type="Container"/>
|
||||
</StatusEffect>
|
||||
</Holdable>
|
||||
|
||||
@@ -119,7 +119,12 @@
|
||||
|
||||
<PipesBackground sprite="Content/Map/testroom.png" sourcerect="381,795,192,192" depth = "1.0"
|
||||
width="64" height="64" resizehorizontal="true" resizevertical="true"/>
|
||||
|
||||
|
||||
<SlopeForward sprite="Content/Map/structures2.png" sourcerect="0,0,224,64"
|
||||
width="16" height="16" resizehorizontal="true" resizevertical="true" depth = "0.95"/>
|
||||
|
||||
<SlopeBack sprite="Content/Map/structures2.png" sourcerect="0,64,224,64"
|
||||
width="16" height="16" resizehorizontal="true" resizevertical="true" depth = "0.95"/>
|
||||
|
||||
<stairsright sprite="Content/Map/testroom.png" sourcerect="100,667,256,320"
|
||||
width="256" height="320" depth = "0.1" stairdirection="Right"/>
|
||||
|
||||
BIN
Subsurface/Content/Map/structures2.png
Normal file
BIN
Subsurface/Content/Map/structures2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
@@ -36,6 +36,13 @@ namespace Barotrauma.Items.Components
|
||||
get { return maxOutput; }
|
||||
}
|
||||
|
||||
[HasDefaultValue(10.0f, true), Editable]
|
||||
public float Capacity
|
||||
{
|
||||
get { return capacity; }
|
||||
set { capacity = Math.Max(value, 1.0f); }
|
||||
}
|
||||
|
||||
[Editable, HasDefaultValue(0.0f, true)]
|
||||
public float Charge
|
||||
{
|
||||
@@ -47,13 +54,6 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
[HasDefaultValue(10.0f, true), Editable]
|
||||
public float Capacity
|
||||
{
|
||||
get { return capacity; }
|
||||
set { capacity = Math.Max(value, 1.0f); }
|
||||
}
|
||||
|
||||
[HasDefaultValue(10.0f, true), Editable]
|
||||
public float RechargeSpeed
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using FarseerPhysics.Dynamics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Barotrauma.Sounds;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -249,7 +250,16 @@ namespace Barotrauma
|
||||
if (currMusicVolume < 0.01f)
|
||||
{
|
||||
Sound.StopStream();
|
||||
if (targetMusic != null) Sound.StartStream(targetMusic.file, currMusicVolume);
|
||||
|
||||
try
|
||||
{
|
||||
if (targetMusic != null) Sound.StartStream(targetMusic.file, currMusicVolume);
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
DebugConsole.ThrowError("Music clip " + targetMusic.file + " not found!");
|
||||
}
|
||||
|
||||
currentMusic = targetMusic;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user