Adds ducts, switches and motion detectors, as well as door breaking sounds, all based on Barotrauma Extended mod.
Several sounds and sprites were altered to their mod counterpart. Fixes doors being unfixable without having a crowbar. Fixed case sensitivity mismatch for crowbar.ogg - this is a problem for linux builds.
This commit is contained in:
@@ -295,6 +295,9 @@
|
||||
<Content Include="$(MSBuildThisFileDirectory)Content\Items\Door\doors.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="$(MSBuildThisFileDirectory)Content\Items\Door\duct.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="$(MSBuildThisFileDirectory)Content\Items\Door\hatch.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@@ -913,6 +916,9 @@
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Button\beep.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Button\switch.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Diving\divingSuit.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
@@ -928,6 +934,18 @@
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Door\door.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Door\DoorBreak1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Door\DoorBreak2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Door\duct.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Door\DuctBreak.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Electricity\powerOn.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -1,33 +1,66 @@
|
||||
<Item
|
||||
name="Button"
|
||||
category="Electrical"
|
||||
linkable="true"
|
||||
tags="smallitem"
|
||||
|
||||
price="10">
|
||||
<Items>
|
||||
<Item
|
||||
name="Button"
|
||||
category="Electrical"
|
||||
linkable="true"
|
||||
tags="smallitem"
|
||||
|
||||
price="10">
|
||||
|
||||
<Sprite texture ="button.png" depth="0.8"/>
|
||||
<Sprite texture ="button.png" sourcerect="0,0,24,27" depth="0.8"/>
|
||||
|
||||
<Deconstruct time="10">
|
||||
<Item name="Polycarbonate Bar"/>
|
||||
<Item name="FPGA Circuit"/>
|
||||
</Deconstruct>
|
||||
<Deconstruct time="10">
|
||||
<Item name="Polycarbonate Bar"/>
|
||||
<Item name="FPGA Circuit"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Body width="32" height="32" density="40"/>
|
||||
<Body width="32" height="32" density="40"/>
|
||||
|
||||
<Controller direction ="None" canbepicked = "true" msg="Press [E]">
|
||||
<RequiredItem name="ID Card" type="Picked" msg="UNAUTHORIZED ACCESS"/>
|
||||
<sound file="beep.ogg" type="OnUse" range="500.0"/>
|
||||
</Controller>
|
||||
<Controller direction ="None" canbepicked = "true" msg="Press [E]">
|
||||
<RequiredItem name="ID Card" type="Picked" msg="UNAUTHORIZED ACCESS"/>
|
||||
<sound file="beep.ogg" type="OnUse" range="500.0"/>
|
||||
</Controller>
|
||||
|
||||
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
|
||||
<RequiredItem name="Screwdriver" type="Equipped"/>
|
||||
<output name="signal_out"/>
|
||||
</ConnectionPanel>
|
||||
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
|
||||
<RequiredItem name="Screwdriver" type="Equipped"/>
|
||||
<output name="signal_out"/>
|
||||
</ConnectionPanel>
|
||||
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="10.0"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" attachedbydefault="true" aimable="true">
|
||||
<requireditem name="Wrench" type="Equipped"/>
|
||||
</Holdable>
|
||||
|
||||
</Item>
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="10.0"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" attachedbydefault="true" aimable="true">
|
||||
<requireditem name="Wrench" type="Equipped"/>
|
||||
</Holdable>
|
||||
</Item>
|
||||
|
||||
<Item
|
||||
name="Switch"
|
||||
category="Electrical"
|
||||
linkable="true"
|
||||
tags="smallitem"
|
||||
|
||||
price="10">
|
||||
|
||||
<Sprite texture ="button.png" sourcerect="24,0,11,16" depth="0.79"/>
|
||||
|
||||
<Deconstruct time="10">
|
||||
<Item name="Polycarbonate Bar"/>
|
||||
<Item name="FPGA Circuit"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Body width="16" height="16" density="20"/>
|
||||
|
||||
<Controller direction="None" canbepicked="true" msg="Press [E]">
|
||||
<sound file="switch.ogg" type="OnUse" range="250.0"/>
|
||||
</Controller>
|
||||
|
||||
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
|
||||
<RequiredItem name="Screwdriver" type="Equipped"/>
|
||||
<output name="signal_out"/>
|
||||
</ConnectionPanel>
|
||||
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="10.0"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" attachedbydefault="true" aimable="true">
|
||||
<requireditem name="Wrench" type="Equipped"/>
|
||||
</Holdable>
|
||||
</Item>
|
||||
</Items>
|
||||
BIN
Barotrauma/BarotraumaShared/Content/Items/Button/switch.ogg
Normal file
BIN
Barotrauma/BarotraumaShared/Content/Items/Button/switch.ogg
Normal file
Binary file not shown.
BIN
Barotrauma/BarotraumaShared/Content/Items/Door/doorBreak1.ogg
Normal file
BIN
Barotrauma/BarotraumaShared/Content/Items/Door/doorBreak1.ogg
Normal file
Binary file not shown.
BIN
Barotrauma/BarotraumaShared/Content/Items/Door/doorBreak2.ogg
Normal file
BIN
Barotrauma/BarotraumaShared/Content/Items/Door/doorBreak2.ogg
Normal file
Binary file not shown.
@@ -6,13 +6,16 @@
|
||||
|
||||
<Sprite texture ="door.png" sourcerect="1,0,48,208" depth="0.01" origin="0.5,0.5"/>
|
||||
|
||||
<Door canbeselected="true" selectkey="Action" msg="Force Open [Crowbar]" PickingTime="10.0">
|
||||
<Door canbeselected="true" pickkey="Action" msg="Force Open [Crowbar]" PickingTime="10.0">
|
||||
<requireditem name="Crowbar" type="Equipped"/>
|
||||
<Sprite texture ="door.png" sourcerect="80,0,19,208" depth="0.05" origin="0.5,0.0"/>
|
||||
<WeldedSprite texture ="door.png" sourcerect="99,0,32,188" depth="0.0" origin="0.5,0.5"/>
|
||||
<BrokenSprite texture ="door.png" sourcerect="133,0,58,208" depth="0.051" origin="0.5,0.0" scale="true"/>
|
||||
<sound file="door.ogg" type="OnUse" range="500.0"/>
|
||||
<sound file="Content/Items/Tools/Crowbar.ogg" type="OnPicked" range="2000.0"/>
|
||||
<sound file="Content/Items/Tools/crowbar.ogg" type="OnPicked" range="2000.0"/>
|
||||
<StatusEffect type="OnBroken" target="This">
|
||||
<sound file="Content/Items/Door/doorBreak2.ogg" range="3000"/>
|
||||
</StatusEffect>
|
||||
</Door>
|
||||
|
||||
<AiTarget sightrange="500.0"/>
|
||||
@@ -37,13 +40,16 @@
|
||||
|
||||
<Sprite texture="door.png" sourcerect="1,0,48,208" depth="0.01" origin="0.5,0.5"/>
|
||||
|
||||
<Door window="0,-32,10,75" canbeselected="true" selectkey="Action" msg="Force Open [Crowbar]" PickingTime="10.0">
|
||||
<Door window="0,-32,10,75" canbeselected="true" pickkey="Action" msg="Force Open [Crowbar]" PickingTime="10.0">
|
||||
<requireditem name="Crowbar" type="Equipped"/>
|
||||
<Sprite texture="door.png" sourcerect="56,0,19,208" depth="0.05" origin="0.5,0.0"/>
|
||||
<WeldedSprite texture="door.png" sourcerect="9,0,32,188" depth="0.0" origin="0.5,0.5"/>
|
||||
<BrokenSprite texture="door.png" sourcerect="192,0,40,208" depth="0.051" origin="0.5,0.0" scale="true"/>
|
||||
<sound file="door.ogg" type="OnUse" range="500.0"/>
|
||||
<sound file="Content/Items/Tools/Crowbar.ogg" type="OnPicked" range="2000.0"/>
|
||||
<sound file="Content/Items/Tools/crowbar.ogg" type="OnPicked" range="2000.0"/>
|
||||
<StatusEffect type="OnBroken" target="This">
|
||||
<sound file="Content/Items/Door/doorBreak1.ogg" range="3000"/>
|
||||
</StatusEffect>
|
||||
</Door>
|
||||
|
||||
<AiTarget sightrange="500.0"/>
|
||||
@@ -68,13 +74,16 @@
|
||||
|
||||
<Sprite texture="hatch.png" sourcerect="0,0,128,46" depth="0.01" origin="0.5,0.5"/>
|
||||
|
||||
<Door canbeselected="true" horizontal="true" selectkey="Action" msg="Force Open [Crowbar]" PickingTime="10.0">
|
||||
<Door canbeselected="true" horizontal="true" pickkey="Action" msg="Force Open [Crowbar]" PickingTime="10.0">
|
||||
<requireditem name="Crowbar" type="Equipped"/>
|
||||
<Sprite texture="hatch.png" sourcerect="128,0,128,19" depth="0.05" origin="0.0,0.5"/>
|
||||
<WeldedSprite texture="hatch.png" sourcerect="0,56,108,33" depth="0.0" origin="0.5,0.5"/>
|
||||
<BrokenSprite texture="hatch.png" sourcerect="128,21,128,58" depth="0.051" origin="0.0,0.5" scale="true"/>
|
||||
<sound file="door.ogg" type="OnUse" range="500.0"/>
|
||||
<sound file="Content/Items/Tools/Crowbar.ogg" type="OnPicked" range="2000.0"/>
|
||||
<sound file="Content/Items/Tools/crowbar.ogg" type="OnPicked" range="2000.0"/>
|
||||
<StatusEffect type="OnBroken" target="This">
|
||||
<sound file="Content/Items/Door/doorBreak1.ogg" range="3000"/>
|
||||
</StatusEffect>
|
||||
</Door>
|
||||
|
||||
<AiTarget sightrange="500.0"/>
|
||||
@@ -103,6 +112,9 @@
|
||||
<Sprite texture ="dockingport.png" sourcerect="127,0,112,144" depth="0.05" origin="0.5,0.5"/>
|
||||
<sound file="dockingport1.ogg" type="OnUse" range="1000.0"/>
|
||||
<sound file="dockingport2.ogg" type="OnSecondaryUse" range="1000.0"/>
|
||||
<StatusEffect type="OnBroken" target="This">
|
||||
<sound file="Content/Items/Door/doorBreak2.ogg" range="3000"/>
|
||||
</StatusEffect>
|
||||
</DockingPort>
|
||||
|
||||
<PowerTransfer/>
|
||||
@@ -134,6 +146,9 @@
|
||||
<Sprite texture ="dockingport.png" sourcerect="127,144,48,112" depth="0.05" origin="0.5,0.5"/>
|
||||
<sound file="dockingport1.ogg" type="OnUse" range="1000.0"/>
|
||||
<sound file="dockingport2.ogg" type="OnSecondaryUse" range="1000.0"/>
|
||||
<StatusEffect type="OnBroken" target="This">
|
||||
<sound file="Content/Items/Door/doorBreak2.ogg" range="3000"/>
|
||||
</StatusEffect>
|
||||
</DockingPort>
|
||||
|
||||
<fixrequirement name="Electrical repairs">
|
||||
@@ -158,5 +173,39 @@
|
||||
<output name="state_out"/>
|
||||
<output name="proximity_sensor"/>
|
||||
</ConnectionPanel>
|
||||
</Item>
|
||||
</Item>
|
||||
|
||||
<Item
|
||||
name="Duct Block"
|
||||
linkable="true"
|
||||
>
|
||||
|
||||
<Sprite texture ="duct.png" sourcerect="0,0,33,33" depth="0.01" origin="0.5,0.5"/>
|
||||
|
||||
<Door canbeselected="true" pickkey="Action" msg="Force Open [Crowbar]" PickingTime="3.0">
|
||||
<requireditem name="Crowbar" type="Equipped"/>
|
||||
<Sprite texture ="duct.png" sourcerect="66,0,19,19" depth="0.05" origin="-0.4,0.5"/>
|
||||
<WeldedSprite texture ="duct.png" sourcerect="33,0,33,33" depth="0.0" origin="0.5,0.5"/>
|
||||
<BrokenSprite texture="duct.png" sourcerect="0,34,52,52" depth="0.051" origin="0.2,0.5" scale="true"/>
|
||||
<sound file="duct.ogg" type="OnUse" range="300"/>
|
||||
<sound file="Content/Items/Tools/crowbar.ogg" type="OnPicked" range="500.0"/>
|
||||
<StatusEffect type="OnBroken" target="This">
|
||||
<sound file="Content/Items/Door/ductBreak.ogg" range="2000"/>
|
||||
</StatusEffect>
|
||||
</Door>
|
||||
|
||||
<AiTarget sightrange="500.0"/>
|
||||
|
||||
<fixrequirement name="Mechanical repairs">
|
||||
<skill name="Construction" level="30"/>
|
||||
<item name="Welding Tool"/>
|
||||
</fixrequirement>
|
||||
|
||||
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
|
||||
<requireditem name="Screwdriver" type="Equipped"/>
|
||||
<input name="toggle"/>
|
||||
<input name="set_state"/>
|
||||
<output name="state_out"/>
|
||||
</ConnectionPanel>
|
||||
</Item>
|
||||
</Items>
|
||||
BIN
Barotrauma/BarotraumaShared/Content/Items/Door/duct.ogg
Normal file
BIN
Barotrauma/BarotraumaShared/Content/Items/Door/duct.ogg
Normal file
Binary file not shown.
BIN
Barotrauma/BarotraumaShared/Content/Items/Door/duct.png
Normal file
BIN
Barotrauma/BarotraumaShared/Content/Items/Door/duct.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
Barotrauma/BarotraumaShared/Content/Items/Door/ductBreak.ogg
Normal file
BIN
Barotrauma/BarotraumaShared/Content/Items/Door/ductBreak.ogg
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
@@ -335,7 +335,7 @@
|
||||
<Item name="FPGA Circuit"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Sprite texture="signalcomp.png" depth="0.8" sourcerect="96,0,31,24"/>
|
||||
<Sprite texture="signalcomp.png" depth="0.8" sourcerect="97,0,31,24"/>
|
||||
|
||||
<OxygenDetector canbeselected = "true"/>
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
<Item name="FPGA Circuit"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Sprite texture="signalcomp.png" depth="0.8" sourcerect="64,0,31,25"/>
|
||||
<Sprite texture="signalcomp.png" depth="0.8" sourcerect="65,0,31,24"/>
|
||||
|
||||
<WaterDetector canbeselected = "true"/>
|
||||
|
||||
@@ -382,6 +382,37 @@
|
||||
<output name="signal_out"/>
|
||||
</ConnectionPanel>
|
||||
</Item>
|
||||
|
||||
<Item
|
||||
name="Motion Detector"
|
||||
category="Electrical"
|
||||
Tags="smallitem"
|
||||
|
||||
linkable="true"
|
||||
price="10"
|
||||
description="Sends out a signal when it detects movement.">
|
||||
|
||||
<Deconstruct time="10">
|
||||
<Item name="Steel Bar"/>
|
||||
<Item name="FPGA Circuit"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Sprite texture="signalcomp.png" depth="0.8" sourcerect="65,24,31,24"/>
|
||||
|
||||
<MotionSensor range="100" canbeselected = "true"/>
|
||||
|
||||
<Body width="31" height="24" density="30"/>
|
||||
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="5.0"
|
||||
aimpos="65,-10" handle1="0,0" attachable="true" aimable="true">
|
||||
<requireditem name="Wrench" type="Equipped"/>
|
||||
</Holdable>
|
||||
|
||||
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
|
||||
<requireditem name="Screwdriver,Wire" type="Equipped"/>
|
||||
<output name="state_out"/>
|
||||
</ConnectionPanel>
|
||||
</Item>
|
||||
|
||||
<Item
|
||||
name="Signal Check Component"
|
||||
@@ -561,7 +592,7 @@
|
||||
<Item name="FPGA Circuit"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Sprite texture="signalcomp.png" depth="0.8" sourcerect="64,32,23,16"/>
|
||||
<Sprite texture="signalcomp.png" depth="0.8" sourcerect="34,64,23,16"/>
|
||||
|
||||
<Body width="20" height="16" density="20"/>
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<fabricableitem name="Wire" requireditems="Copper Bar" requiredtime="5"/>
|
||||
|
||||
<fabricableitem name="Button" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="Switch" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="And Component" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="Or Component" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="Not Component" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
@@ -45,6 +46,7 @@
|
||||
<fabricableitem name="Light Component" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="Oxygen Detector" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="Water Detector" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="Motion Detector" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="Signal Check Component" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="RegEx Find Component" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="Oscillator" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
|
||||
@@ -203,8 +203,22 @@ namespace Barotrauma.Items.Components
|
||||
#endif
|
||||
}
|
||||
|
||||
public override bool HasRequiredItems(Character character, bool addMessage)
|
||||
{
|
||||
if (item.Condition <= 0.0f) return true; //For repairing
|
||||
|
||||
return base.HasRequiredItems(character, addMessage);
|
||||
}
|
||||
|
||||
public override bool Pick(Character picker)
|
||||
{
|
||||
return item.Condition <= 0.0f ? true : base.Pick(picker);
|
||||
}
|
||||
|
||||
public override bool OnPicked(Character picker)
|
||||
{
|
||||
if (item.Condition <= 0.0f) return true; //repairs
|
||||
|
||||
SetState(predictedState == null ? !isOpen : !predictedState.Value, false, true); //crowbar function
|
||||
#if CLIENT
|
||||
PlaySound(ActionType.OnPicked, item.WorldPosition);
|
||||
|
||||
@@ -196,7 +196,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
try
|
||||
{
|
||||
string pickKeyStr = element.GetAttributeString("selectkey", "Select");
|
||||
string pickKeyStr = element.GetAttributeString("pickkey", "Select");
|
||||
pickKeyStr = ToolBox.ConvertInputType(pickKeyStr);
|
||||
PickKey = (InputType)Enum.Parse(typeof(InputType),pickKeyStr, true);
|
||||
}
|
||||
@@ -437,7 +437,7 @@ namespace Barotrauma.Items.Components
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool HasRequiredItems(Character character, bool addMessage)
|
||||
public virtual bool HasRequiredItems(Character character, bool addMessage)
|
||||
{
|
||||
if (!requiredItems.Any()) return true;
|
||||
if (character.Inventory == null) return false;
|
||||
|
||||
@@ -1106,8 +1106,6 @@ namespace Barotrauma
|
||||
ic.ApplyStatusEffects(ActionType.OnPicked, 1.0f, picker);
|
||||
|
||||
#if CLIENT
|
||||
ic.PlaySound(ActionType.OnPicked, picker.WorldPosition);
|
||||
|
||||
if (picker == Character.Controlled) GUIComponent.ForceMouseOn(null);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user