-fixed a typo in fabricableItem requirement & added checking for said typos
- fixed being able to set battery recharge sped over the limits - fixed vents being added to OxygenGenerator.ventlist multiple times - fixed item.Submarine not being set if pulling an item from a fabricator - some tutorial fixes - fixed TraitorMode endmessage not being shown if the sub isn't at the end and neither character is dead - SalvageQuest fails if the item has been destroyed -
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
<fabricableitem name="Fulgurium Battery Cell" requireditems="Steel Bar, Fulgurium Bar, FPGA Circuit" requiredtime="10"/>
|
||||
|
||||
<fabricableitem name ="Incendium Grenade" requireditems="Stun Grenage, Incendium Bar" requiredtime="20"/>
|
||||
<fabricableitem name ="Incendium Grenade" requireditems="Stun Grenade, Incendium Bar" requiredtime="20"/>
|
||||
|
||||
<fabricableitem name ="IC-4 Block" requireditems="C-4 Block, Incendium Bar" requiredtime="20"/>
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
<Pickable slots="Any">
|
||||
<StatusEffect type="OnBroken" target="This" Condition="-100.0" sound="Content/Items/Reactor/explosion.ogg">
|
||||
<Explosion range="500.0" structuredamage="250" damage="300" stun="5" force="20.0"/>
|
||||
<Fire size="150"/>
|
||||
<Explosion range="500.0" structuredamage="50" damage="300" stun="5" force="20.0"/>
|
||||
<Fire size="500"/>
|
||||
</StatusEffect>
|
||||
</Pickable>
|
||||
</Item>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<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">
|
||||
<Explosion range="500" damage="5" stun="1" force="0.1"/>
|
||||
<Fire size="100.0f"/>
|
||||
<Fire size="300.0"/>
|
||||
</StatusEffect>
|
||||
</Throwable>
|
||||
</Item>
|
||||
|
||||
Binary file not shown.
@@ -13,11 +13,11 @@
|
||||
</Order>
|
||||
|
||||
|
||||
<Order name="Operate Reactor" doingtext="Operating Reactor" targetitemtype="Reactor" options="Power up, Shutdown" color="0.12,0.3,0.5,1.0">
|
||||
<Order name="Operate Reactor" doingtext="Operating Reactor" targetitemtype="Reactor" options="Power up, Shutdown" color="1.0,0.78,0.05,1.0">
|
||||
<Sprite texture="Content/UI/orderSymbols.png" sourcerect="192,0,64,64"/>
|
||||
</Order>
|
||||
|
||||
<Order name="Operate Railgun" doingtext="Operating Railgun" targetitemtype="Turret" usecontroller="true" options="Fire at will, Hold fire" color="1.0,0.0,0.0,1.0">
|
||||
<Order name="Operate Railgun" doingtext="Operating Railgun" targetitemtype="Turret" usecontroller="true" options="Fire at will, Hold fire" color="0.12,0.3,0.5,1.0">
|
||||
<Sprite texture="Content/UI/orderSymbols.png" sourcerect="0,64,64,64"/>
|
||||
</Order>
|
||||
|
||||
|
||||
Binary file not shown.
BIN
Subsurface/Data/SavedSubs/Nehalennia.sub
Normal file
BIN
Subsurface/Data/SavedSubs/Nehalennia.sub
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -418,8 +418,20 @@ namespace Barotrauma
|
||||
case "cleanbuild":
|
||||
GameMain.Config.MusicVolume = 0.5f;
|
||||
GameMain.Config.SoundVolume = 0.5f;
|
||||
DebugConsole.NewMessage("Music and sound volume set to 0.5", Color.Green);
|
||||
|
||||
GameMain.Config.GraphicsWidth = 0;
|
||||
GameMain.Config.GraphicsHeight = 0;
|
||||
GameMain.Config.FullScreenEnabled = true;
|
||||
DebugConsole.NewMessage("Resolution set to 0 x 0 (screen resolution will be used)", Color.Green);
|
||||
DebugConsole.NewMessage("Fullscreen enabled", Color.Green);
|
||||
|
||||
if (GameMain.Config.MasterServerUrl != "http://www.undertowgames.com/baromaster")
|
||||
{
|
||||
DebugConsole.ThrowError("MasterServerUrl ''"+GameMain.Config.MasterServerUrl+"''!");
|
||||
}
|
||||
|
||||
GameMain.Config.Save("config.xml");
|
||||
DebugConsole.NewMessage("Set music and sound volume to 0.5", Color.Green);
|
||||
|
||||
var saveFiles = System.IO.Directory.GetFiles(SaveUtil.SaveFolder);
|
||||
|
||||
@@ -432,6 +444,14 @@ namespace Barotrauma
|
||||
if (System.IO.File.Exists("filelist.xml"))
|
||||
{
|
||||
System.IO.File.Delete("filelist.xml");
|
||||
DebugConsole.NewMessage("Deleted filelist", Color.Green);
|
||||
}
|
||||
|
||||
if (System.IO.File.Exists("Data/SavedSubs/TutorialSub.sub"))
|
||||
{
|
||||
System.IO.File.Delete("Data/SavedSubs/TutorialSub.sub");
|
||||
|
||||
DebugConsole.NewMessage("Deleted TutorialSub from SavedSubs", Color.Green);
|
||||
}
|
||||
|
||||
if (!System.IO.File.Exists("Content/Map/TutorialSub.sub"))
|
||||
|
||||
@@ -68,8 +68,8 @@ namespace Barotrauma
|
||||
|
||||
public override void End()
|
||||
{
|
||||
if (item.CurrentHull == null || item.Removed) return;
|
||||
item.Remove();
|
||||
if (item.CurrentHull == null) return;
|
||||
|
||||
GiveReward();
|
||||
|
||||
|
||||
@@ -17,14 +17,14 @@ namespace Barotrauma
|
||||
{
|
||||
if (GameMain.Server == null || traitorCharacter == null || targetCharacter == null) return "";
|
||||
|
||||
if (targetCharacter == null || targetCharacter.IsDead)
|
||||
if (targetCharacter.IsDead)
|
||||
{
|
||||
string endMessage = traitorCharacter.Name + " was a traitor! ";
|
||||
endMessage += (traitorCharacter.Info.Gender == Gender.Male) ? "His" : "Her";
|
||||
endMessage += " task was to assassinate " + targetCharacter.Name + ". The task was successful.";
|
||||
//End(endMessage);
|
||||
}
|
||||
else if (traitorCharacter == null || traitorCharacter.IsDead)
|
||||
else if (traitorCharacter.IsDead)
|
||||
{
|
||||
string endMessage = traitorCharacter.Name + " was a traitor! ";
|
||||
endMessage += (traitorCharacter.Info.Gender == Gender.Male) ? "His" : "Her";
|
||||
@@ -35,12 +35,14 @@ namespace Barotrauma
|
||||
|
||||
return endMessage;
|
||||
}
|
||||
else if (Submarine.Loaded.AtEndPosition)
|
||||
else
|
||||
{
|
||||
string endMessage = traitorCharacter.Name + " was a traitor! ";
|
||||
endMessage += (traitorCharacter.Info.Gender == Gender.Male) ? "His" : "Her";
|
||||
endMessage += " task was to assassinate " + targetCharacter.Name + ". ";
|
||||
endMessage += "The task was unsuccessful - the has submarine reached its destination.";
|
||||
endMessage += (Submarine.Loaded.AtEndPosition) ?
|
||||
"The task was unsuccessful - the has submarine reached its destination." :
|
||||
"The task was unsuccessful.";
|
||||
|
||||
return endMessage;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace Barotrauma.Tutorials
|
||||
infoBox = CreateInfoFrame("Here you can see all the wires connected to the terminal. Apparently there's no wire"
|
||||
+ " going into the to the power connection - that's why the monitor isn't working."
|
||||
+ " You should find a piece of wire to connect it. Try searching some of the cabinets scattered around the sub.");
|
||||
|
||||
|
||||
while (!HasItem("Wire"))
|
||||
{
|
||||
yield return CoroutineStatus.Running;
|
||||
@@ -227,7 +227,7 @@ namespace Barotrauma.Tutorials
|
||||
yield return CoroutineStatus.Running;
|
||||
}
|
||||
|
||||
infoBox = CreateInfoFrame("You can take a look at the area around the sub by pressing ''Activate Radar''.");
|
||||
infoBox = CreateInfoFrame("You can take a look at the area around the sub by selecting the ''Sonar'' checkbox.");
|
||||
|
||||
while (!radar.IsActive)
|
||||
{
|
||||
@@ -235,7 +235,7 @@ namespace Barotrauma.Tutorials
|
||||
}
|
||||
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 green rectangle in the middle is the submarine, and the flickering shapes outside it are the walls of an underwater cavern. "
|
||||
+ "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)
|
||||
@@ -254,13 +254,13 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
infoBox = CreateInfoFrame("Steer the submarine downwards, heading further into the cavern.");
|
||||
|
||||
while (Submarine.Loaded.Position.Y > 10000.0f)
|
||||
while (Submarine.Loaded.WorldPosition.Y > 33000.0f)
|
||||
{
|
||||
yield return CoroutineStatus.Running;
|
||||
}
|
||||
yield return new WaitForSeconds(1.0f);
|
||||
|
||||
var moloch = Character.Create("Content/Characters/Moloch/moloch.xml", steering.Item.SimPosition + Vector2.UnitX * 25.0f);
|
||||
var moloch = Character.Create("Content/Characters/Moloch/moloch.xml", steering.Item.WorldPosition + Vector2.UnitX * 3000.0f);
|
||||
moloch.PlaySound(AIController.AiState.Attack);
|
||||
|
||||
yield return new WaitForSeconds(1.0f);
|
||||
@@ -281,7 +281,7 @@ namespace Barotrauma.Tutorials
|
||||
Submarine.Loaded.Velocity = Vector2.Zero;
|
||||
|
||||
moloch.AIController.SelectTarget(steering.Item.CurrentHull.AiTarget);
|
||||
Vector2 steeringDir = windows[0].Position - moloch.Position;
|
||||
Vector2 steeringDir = windows[0].WorldPosition - moloch.WorldPosition;
|
||||
if (steeringDir != Vector2.Zero) steeringDir = Vector2.Normalize(steeringDir);
|
||||
|
||||
//foreach (Limb limb in moloch.AnimController.Limbs)
|
||||
@@ -306,6 +306,18 @@ namespace Barotrauma.Tutorials
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
} while (!broken);
|
||||
|
||||
//fix everything except the command windows
|
||||
foreach (Structure w in Structure.WallList)
|
||||
{
|
||||
for (int i = 0; i < w.SectionCount; i++)
|
||||
{
|
||||
if (!w.SectionHasHole(i)) continue;
|
||||
if (windows.Contains(w)) continue;
|
||||
|
||||
w.AddDamage(i, -100000.0f);
|
||||
}
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
Submarine.Loaded.GodMode = true;
|
||||
@@ -486,20 +498,27 @@ namespace Barotrauma.Tutorials
|
||||
GameMain.GameScreen.Cam.TargetPos = Vector2.Zero;
|
||||
GameMain.LightManager.LosEnabled = false;
|
||||
|
||||
do
|
||||
//do
|
||||
//{
|
||||
// secondsLeft = (float)(endTime - DateTime.Now).TotalSeconds;
|
||||
|
||||
// float camAngle = (float)((DateTime.Now - endTime).TotalSeconds / endPreviewLength) * MathHelper.TwoPi;
|
||||
// Vector2 offset = (new Vector2(
|
||||
// (float)Math.Cos(camAngle) * (Submarine.Borders.Width / 2.0f),
|
||||
// (float)Math.Sin(camAngle) * (Submarine.Borders.Height / 2.0f)));
|
||||
|
||||
// GameMain.GameScreen.Cam.TargetPos = offset * 0.8f;
|
||||
// //Game1.GameScreen.Cam.MoveCamera((float)deltaTime);
|
||||
|
||||
// yield return CoroutineStatus.Running;
|
||||
//} while (secondsLeft > 0.0f);
|
||||
|
||||
var cinematic = new TransitionCinematic(Submarine.Loaded, GameMain.GameScreen.Cam, 5.0f);
|
||||
|
||||
while (cinematic.Running)
|
||||
{
|
||||
secondsLeft = (float)(endTime - DateTime.Now).TotalSeconds;
|
||||
|
||||
float camAngle = (float)((DateTime.Now - endTime).TotalSeconds / endPreviewLength) * MathHelper.TwoPi;
|
||||
Vector2 offset = (new Vector2(
|
||||
(float)Math.Cos(camAngle) * (Submarine.Borders.Width / 2.0f),
|
||||
(float)Math.Sin(camAngle) * (Submarine.Borders.Height / 2.0f)));
|
||||
|
||||
GameMain.GameScreen.Cam.TargetPos = offset * 0.8f;
|
||||
//Game1.GameScreen.Cam.MoveCamera((float)deltaTime);
|
||||
|
||||
yield return CoroutineStatus.Running;
|
||||
} while (secondsLeft > 0.0f);
|
||||
}
|
||||
|
||||
Submarine.Unload();
|
||||
GameMain.MainMenuScreen.Select();
|
||||
@@ -543,9 +562,9 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
enemy.AIController.State = AIController.AiState.None;
|
||||
|
||||
Vector2 targetPos = Character.Controlled.Position + new Vector2(0.0f, 3000.0f);
|
||||
Vector2 targetPos = Character.Controlled.WorldPosition + new Vector2(0.0f, 3000.0f);
|
||||
|
||||
Vector2 steering = targetPos - enemy.Position;
|
||||
Vector2 steering = targetPos - enemy.WorldPosition;
|
||||
if (steering != Vector2.Zero) steering = Vector2.Normalize(steering);
|
||||
|
||||
enemy.AIController.Steering = steering * 2.0f;
|
||||
|
||||
@@ -210,10 +210,18 @@ namespace Barotrauma
|
||||
doc.Root.Add(gMode);
|
||||
}
|
||||
|
||||
gMode.ReplaceAttributes(
|
||||
new XAttribute("width", GraphicsWidth),
|
||||
new XAttribute("height", GraphicsHeight),
|
||||
new XAttribute("fullscreen", FullScreenEnabled ? "true" : "false"));
|
||||
if (GraphicsWidth==0 || GraphicsHeight==0)
|
||||
{
|
||||
gMode.ReplaceAttributes(new XAttribute("fullscreen", FullScreenEnabled ? "true" : "false"));
|
||||
}
|
||||
else
|
||||
{
|
||||
gMode.ReplaceAttributes(
|
||||
new XAttribute("width", GraphicsWidth),
|
||||
new XAttribute("height", GraphicsHeight),
|
||||
new XAttribute("fullscreen", FullScreenEnabled ? "true" : "false"));
|
||||
}
|
||||
|
||||
|
||||
if (SelectedContentPackage != null)
|
||||
{
|
||||
|
||||
@@ -134,6 +134,8 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
picker = character;
|
||||
|
||||
if (character != null) item.Submarine = character.Submarine;
|
||||
|
||||
if (item.body == null)
|
||||
{
|
||||
if (body!=null)
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Barotrauma.Items.Components
|
||||
if (throwPos < -0.0)
|
||||
{
|
||||
|
||||
Vector2 throwVector = picker.CursorPosition - picker.AnimController.RefLimb.Position;
|
||||
Vector2 throwVector = picker.CursorWorldPosition - picker.WorldPosition;
|
||||
throwVector = Vector2.Normalize(throwVector);
|
||||
|
||||
item.Drop();
|
||||
|
||||
@@ -94,18 +94,17 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
spriteBatch.DrawString(GUI.Font, "Force: " + (int)(targetForce) + " %", new Vector2(GuiFrame.Rect.X + 30, GuiFrame.Rect.Y + 30), Color.White);
|
||||
|
||||
if (GUI.DrawButton(spriteBatch, new Rectangle(GuiFrame.Rect.X + 280, GuiFrame.Rect.Y + 30, 40, 40), "+", true))
|
||||
{
|
||||
targetForce += 1.0f;
|
||||
item.NewComponentEvent(this, true, false);
|
||||
}
|
||||
if (GUI.DrawButton(spriteBatch, new Rectangle(GuiFrame.Rect.X + 280, GuiFrame.Rect.Y + 80, 40, 40), "-", true))
|
||||
{
|
||||
targetForce -= 1.0f;
|
||||
item.NewComponentEvent(this, true, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (GUI.DrawButton(spriteBatch, new Rectangle(GuiFrame.Rect.X + 280, GuiFrame.Rect.Y + 30, 40, 40), "+", true))
|
||||
{
|
||||
targetForce += 1.0f;
|
||||
item.NewComponentEvent(this, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateBroken(float deltaTime, Camera cam)
|
||||
|
||||
@@ -20,12 +20,12 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public FabricableItem(XElement element)
|
||||
{
|
||||
string name = ToolBox.GetAttributeString(element, "name", "").ToLower();
|
||||
string name = ToolBox.GetAttributeString(element, "name", "");
|
||||
|
||||
TargetItem = ItemPrefab.list.Find(ip => ip.Name.ToLower() == name) as ItemPrefab;
|
||||
TargetItem = ItemPrefab.list.Find(ip => ip.Name.ToLower() == name.ToLower()) as ItemPrefab;
|
||||
if (TargetItem == null)
|
||||
{
|
||||
DebugConsole.ThrowError("Error in Fabricable Item! Item ''" + element.Name + "'' not found.");
|
||||
DebugConsole.ThrowError("Error in fabricable item "+name+"! Item ''" + element.Name + "'' not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,12 @@ namespace Barotrauma.Items.Components
|
||||
foreach (string requiredItemName in requiredItemNames)
|
||||
{
|
||||
ItemPrefab requiredItem = ItemPrefab.list.Find(ip => ip.Name.ToLower() == requiredItemName.Trim().ToLower()) as ItemPrefab;
|
||||
if (requiredItem == null) continue;
|
||||
if (requiredItem == null)
|
||||
{
|
||||
DebugConsole.ThrowError("Error in fabricable item " + name + "! Required item ''" + requiredItemName + "'' not found.");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
var existing = RequiredItems.Find(r => r.Item1 == requiredItem);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
using System.Linq;
|
||||
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
@@ -73,7 +74,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
running = true;
|
||||
|
||||
CurrFlow = Math.Min(voltage, 1.0f) * generatedAmount * 1000.0f;
|
||||
CurrFlow = Math.Min(voltage, 1.0f) * generatedAmount*100.0f;
|
||||
item.CurrentHull.Oxygen += CurrFlow * deltaTime;
|
||||
|
||||
UpdateVents(CurrFlow);
|
||||
@@ -88,7 +89,9 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
|
||||
private void GetVents()
|
||||
{
|
||||
{
|
||||
ventList.Clear();
|
||||
|
||||
foreach (MapEntity entity in item.linkedTo)
|
||||
{
|
||||
Item linkedItem = entity as Item;
|
||||
@@ -101,7 +104,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private void UpdateVents(float deltaOxygen)
|
||||
{
|
||||
if (ventList.Count == 0) return;
|
||||
if (!ventList.Any()) return;
|
||||
|
||||
deltaOxygen = deltaOxygen / ventList.Count;
|
||||
foreach (Vent v in ventList)
|
||||
|
||||
@@ -161,16 +161,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
IsActive = true;
|
||||
|
||||
var button = new GUIButton(new Rectangle(410, 70, 40,40), "+", GUI.Style, GuiFrame);
|
||||
button.OnPressed = () =>
|
||||
{
|
||||
unsentChanges = true;
|
||||
ShutDownTemp += 100.0f;
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
button = new GUIButton(new Rectangle(460, 70, 40, 40), "-", GUI.Style, GuiFrame);
|
||||
var button = new GUIButton(new Rectangle(410, 70, 40, 40), "-", GUI.Style, GuiFrame);
|
||||
button.OnPressed = () =>
|
||||
{
|
||||
unsentChanges = true;
|
||||
@@ -179,6 +170,15 @@ namespace Barotrauma.Items.Components
|
||||
return true;
|
||||
};
|
||||
|
||||
button = new GUIButton(new Rectangle(460, 70, 40,40), "+", GUI.Style, GuiFrame);
|
||||
button.OnPressed = () =>
|
||||
{
|
||||
unsentChanges = true;
|
||||
ShutDownTemp += 100.0f;
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
autoTempTickBox = new GUITickBox(new Rectangle(410, 170, 20, 20), "Automatic temperature control", Alignment.TopLeft, GuiFrame);
|
||||
autoTempTickBox.OnSelected = ToggleAutoTemp;
|
||||
|
||||
@@ -453,7 +453,7 @@ namespace Barotrauma.Items.Components
|
||||
DrawGraph(loadGraph, spriteBatch,
|
||||
new Rectangle(x + 30, y + 30, 400, 250), 10000.0f, xOffset, Color.Yellow);
|
||||
|
||||
spriteBatch.DrawString(GUI.Font, "Shutdown Temperature: " + shutDownTemp, new Vector2(x + 450, y + 80), Color.White);
|
||||
spriteBatch.DrawString(GUI.Font, "Shutdown Temperature: " + (int)shutDownTemp, new Vector2(x + 450, y + 80), Color.White);
|
||||
|
||||
//spriteBatch.DrawString(GUI.Font, "Automatic Temperature Control: " + ((autoTemp) ? "ON" : "OFF"), new Vector2(x + 450, y + 180), Color.White);
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Barotrauma.Items.Components
|
||||
var button = new GUIButton(new Rectangle(160, 50, 30,30), "-", GUI.Style, GuiFrame);
|
||||
button.OnClicked = (GUIButton btn, object obj) =>
|
||||
{
|
||||
rechargeSpeed = Math.Max(rechargeSpeed - maxRechargeSpeed * 0.1f, 0.0f);
|
||||
RechargeSpeed = Math.Max(rechargeSpeed - maxRechargeSpeed * 0.1f, 0.0f);
|
||||
item.NewComponentEvent(this, true, false);
|
||||
|
||||
return true;
|
||||
@@ -86,7 +86,7 @@ namespace Barotrauma.Items.Components
|
||||
button = new GUIButton(new Rectangle(200, 50, 30, 30), "+", GUI.Style, GuiFrame);
|
||||
button.OnClicked = (GUIButton btn, object obj) =>
|
||||
{
|
||||
rechargeSpeed = Math.Max(rechargeSpeed + maxRechargeSpeed * 0.1f, 0.0f);
|
||||
RechargeSpeed = Math.Max(rechargeSpeed + maxRechargeSpeed * 0.1f, 0.0f);
|
||||
item.NewComponentEvent(this, true, false);
|
||||
|
||||
return true;
|
||||
@@ -213,8 +213,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public override bool FillNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetBuffer message)
|
||||
{
|
||||
message.WriteRangedSingle(MathHelper.Clamp(rechargeSpeed/MaxRechargeSpeed, 0.0f, 1.0f), 0.0f, 1.0f, 8);
|
||||
message.WriteRangedSingle(MathHelper.Clamp(charge/capacity,0.0f, 1.0f), 0.0f, 1.0f, 8);
|
||||
message.WriteRangedSingle(MathHelper.Clamp(rechargeSpeed / MaxRechargeSpeed, 0.0f, 1.0f), 0.0f, 1.0f, 8);
|
||||
message.WriteRangedSingle(MathHelper.Clamp(charge / capacity, 0.0f, 1.0f), 0.0f, 1.0f, 8);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -203,6 +203,12 @@ namespace Barotrauma
|
||||
get { return prefab.ConfigFile; }
|
||||
}
|
||||
|
||||
public bool Removed
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
//which type of inventory slots (head, torso, any, etc) the item can be placed in
|
||||
public List<LimbSlot> AllowedSlots
|
||||
{
|
||||
@@ -1504,6 +1510,8 @@ namespace Barotrauma
|
||||
{
|
||||
base.Remove();
|
||||
|
||||
Removed = true;
|
||||
|
||||
//sprite.Remove();
|
||||
//if (body != null) body.Remove();
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Barotrauma
|
||||
shockwave = ToolBox.GetAttributeBool(element, "shockwave", true);
|
||||
flames = ToolBox.GetAttributeBool(element, "flames", true);
|
||||
|
||||
CameraShake = ToolBox.GetAttributeFloat(element, "camerashake", attack.Range);
|
||||
CameraShake = ToolBox.GetAttributeFloat(element, "camerashake", attack.Range*0.1f);
|
||||
}
|
||||
|
||||
public void Explode(Vector2 worldPosition)
|
||||
|
||||
@@ -59,6 +59,8 @@ namespace Barotrauma
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
|
||||
GUI.ScreenOverlayColor = Color.TransparentBlack;
|
||||
|
||||
Running = false;
|
||||
yield return CoroutineStatus.Success;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,8 +83,8 @@ namespace Barotrauma
|
||||
//nameBox.OnEnterPressed = ChangeSubName;
|
||||
nameBlock.TextGetter = GetSubName;
|
||||
|
||||
GUIButton button = new GUIButton(new Rectangle(0,70,0,20), "Save", GUI.Style, GUIpanel);
|
||||
button.OnClicked = SaveSub;
|
||||
//GUIButton button = new GUIButton(new Rectangle(0,70,0,20), "Save", GUI.Style, GUIpanel);
|
||||
//button.OnClicked = SaveSub;
|
||||
|
||||
GUITextBlock itemCount = new GUITextBlock(new Rectangle(0, 100, 0, 20), "", GUI.Style, GUIpanel);
|
||||
itemCount.TextGetter = GetItemCount;
|
||||
@@ -161,7 +161,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
y+=50;
|
||||
button = new GUIButton(new Rectangle(0, y, 0, 20), "Character mode", Alignment.Left, GUI.Style, GUIpanel);
|
||||
var button = new GUIButton(new Rectangle(0, y, 0, 20), "Character mode", Alignment.Left, GUI.Style, GUIpanel);
|
||||
button.ToolTip = "Allows you to pick up and use items. Useful for things such as placing items inside closets, turning devices on/off and doing the wiring.";
|
||||
button.OnClicked = ToggleCharacterMode;
|
||||
|
||||
|
||||
@@ -130,14 +130,14 @@ namespace Barotrauma
|
||||
maxPlayersBox.Text = "8";
|
||||
maxPlayersBox.Enabled = false;
|
||||
|
||||
var plusPlayersBox = new GUIButton(new Rectangle(230, 100, 30, 30), "+", GUI.Style, menuTabs[(int)Tab.HostServer]);
|
||||
plusPlayersBox.UserData = 1;
|
||||
plusPlayersBox.OnClicked = ChangeMaxPlayers;
|
||||
|
||||
var minusPlayersBox = new GUIButton(new Rectangle(160, 100, 30, 30), "-", GUI.Style, menuTabs[(int)Tab.HostServer]);
|
||||
minusPlayersBox.UserData = -1;
|
||||
minusPlayersBox.OnClicked = ChangeMaxPlayers;
|
||||
|
||||
var plusPlayersBox = new GUIButton(new Rectangle(230, 100, 30, 30), "+", GUI.Style, menuTabs[(int)Tab.HostServer]);
|
||||
plusPlayersBox.UserData = 1;
|
||||
plusPlayersBox.OnClicked = ChangeMaxPlayers;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, 150, 0, 30), "Password (optional):", GUI.Style, Alignment.TopLeft, Alignment.Left, menuTabs[(int)Tab.HostServer]);
|
||||
passwordBox = new GUITextBox(new Rectangle(160, 150, 200, 30), null, null, Alignment.TopLeft, Alignment.Left, GUI.Style, menuTabs[(int)Tab.HostServer]);
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ namespace Barotrauma
|
||||
traitorProbabilityButtons[0] = new GUIButton(new Rectangle(columnX, 205, 20, 20), "<", GUI.Style, infoFrame);
|
||||
traitorProbabilityButtons[0].UserData = -1;
|
||||
|
||||
traitorProbabilityText = new GUITextBlock(new Rectangle(columnX, 205, 120, 20), "No", null,null, Alignment.TopCenter, GUI.Style, infoFrame);
|
||||
traitorProbabilityText = new GUITextBlock(new Rectangle(columnX+20, 205, 80, 20), "No", null,null, Alignment.TopCenter, GUI.Style, infoFrame);
|
||||
|
||||
traitorProbabilityButtons[1] = new GUIButton(new Rectangle(columnX + 100, 205, 20, 20), ">", GUI.Style, infoFrame);
|
||||
traitorProbabilityButtons[1].UserData = 1;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user