Added a fully functional syringe gun! Accepts syringes as ammo. Has custom sprite and sound.
Made syringes have a "projectile" component for syringe guns Adds several missing signal components to the fabricator, as well as medical syringe to medical fabricator Adds support for status effects applied to characters from onImpact Removed "contained.Condition = 0.0f;" in Projectile.cs due to it limiting the possibilities of the .xml content creation Added a couple null checks in StatusEffect.cs due to crashes caused by the new projectile changes - might need to debug further, perhaps there's a root cause? Added itemlist console command
This commit is contained in:
@@ -1021,6 +1021,9 @@
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Weapons\stungrenade.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Items\Weapons\syringegun.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)Content\Map\TutorialSub.sub">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@@ -40,13 +40,16 @@
|
||||
<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"/>
|
||||
<fabricableitem name="Relay Component" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="Delay Component" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<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="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"/>
|
||||
<fabricableitem name="Wifi Component" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
|
||||
<fabricableitem name="Emergency Siren" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
<fabricableitem name="Alarm Buzzer" requireditems="Steel Bar, FPGA Circuit" requiredtime="10"/>
|
||||
|
||||
<fabricableitem name="Underwater Scooter" requireditems="Steel Bar, Polycarbonate Bar, Polycarbonate Bar, FPGA Circuit" requiredtime="30"/>
|
||||
@@ -96,6 +99,7 @@
|
||||
|
||||
<sound file="fabricator.ogg" type="OnActive" range="1000.0" loop="true"/>
|
||||
|
||||
<fabricableitem name="Medical Syringe" requireditems="Steel Bar" requiredtime="10"/>
|
||||
<fabricableitem name="Chloral Hydrate" requireditems="Chlorine, Ethanol" requiredtime="20">
|
||||
<RequiredSkill name="Medical" level="30"/>
|
||||
</fabricableitem>
|
||||
|
||||
@@ -25,6 +25,15 @@
|
||||
<ItemContainer capacity="1" hideitems="true">
|
||||
<Containable name="chem"/>
|
||||
</ItemContainer>
|
||||
|
||||
<Projectile launchimpulse="10.0" doesstick="true">
|
||||
<Attack damage="5" bleedingdamage="0" structuredamage="0" damagetype="Blunt" stun="0.1" targetforce="5"/>
|
||||
<StatusEffect type="OnImpact" target="Contained, Character" Condition="-50.0" disabledeltatime="true" >
|
||||
<sound file="Content/Items/Medical/syringe.ogg" range="500"/>
|
||||
<RequiredItem name="chem" type="Contained"/>
|
||||
<Use/>
|
||||
</StatusEffect>
|
||||
</Projectile>
|
||||
</Item>
|
||||
|
||||
<Item
|
||||
|
||||
BIN
Barotrauma/BarotraumaShared/Content/Items/Weapons/syringegun.ogg
Normal file
BIN
Barotrauma/BarotraumaShared/Content/Items/Weapons/syringegun.ogg
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
@@ -56,6 +56,38 @@
|
||||
</ItemContainer>
|
||||
</Item>
|
||||
|
||||
<Item
|
||||
name="Syringe Gun"
|
||||
category="Equipment"
|
||||
|
||||
price="700"
|
||||
tags="weapon">
|
||||
|
||||
<Deconstruct time="10">
|
||||
<Item name="Steel Bar"/>
|
||||
<Item name="Aluminium"/>
|
||||
<Item name="Polycarbonate Bar"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Sprite texture="weapons.png" sourcerect="62,97,44,24" depth="0.55"/>
|
||||
|
||||
<Body width="40" height="25" density="50"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" controlpose="true"
|
||||
aimpos="90,10" handle1="-10,-7"/>
|
||||
|
||||
<RangedWeapon barrelpos="30,13" spread="0" unskilledspread="10">
|
||||
<Sound file="syringegun.ogg" type="OnUse"/>
|
||||
<RequiredItems name="Medical Syringe" type="Contained" msg="Please load a Syringe"/>
|
||||
<RequiredSkill name="Weapons" level="15"/>
|
||||
<RequiredSkill name="Medical" level="30"/>
|
||||
</RangedWeapon>
|
||||
|
||||
<ItemContainer capacity="1" itempos="10,10" hideitems="false">
|
||||
<Containable name="Medical Syringe"/>
|
||||
</ItemContainer>
|
||||
</Item>
|
||||
|
||||
<Item
|
||||
name="Revolver Round"
|
||||
category="Equipment"
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace Barotrauma
|
||||
{
|
||||
SerializableProperty property;
|
||||
|
||||
if (!target.SerializableProperties.TryGetValue(propertyNames[i], out property)) continue;
|
||||
if (target == null || target.SerializableProperties == null || !target.SerializableProperties.TryGetValue(propertyNames[i], out property)) continue;
|
||||
|
||||
if (duration > 0.0f)
|
||||
{
|
||||
|
||||
@@ -114,6 +114,17 @@ namespace Barotrauma
|
||||
NewMessage("The code words are: " + traitorManager.codeWords + ", response: " + traitorManager.codeResponse + ".", Color.Cyan);
|
||||
}));
|
||||
|
||||
commands.Add(new Command("itemlist", "itemlist: List all the item prefabs available for spawning.", (string[] args) =>
|
||||
{
|
||||
NewMessage("***************", Color.Cyan);
|
||||
foreach (ItemPrefab itemPrefab in MapEntityPrefab.List)
|
||||
{
|
||||
|
||||
NewMessage("- " + itemPrefab.Name, Color.Cyan);
|
||||
}
|
||||
NewMessage("***************", Color.Cyan);
|
||||
}));
|
||||
|
||||
commands.Add(new Command("createfilelist", "", (string[] args) =>
|
||||
{
|
||||
UpdaterUtil.SaveFileList("filelist.xml");
|
||||
|
||||
@@ -237,6 +237,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
|
||||
AttackResult attackResult = new AttackResult();
|
||||
Character character = null;
|
||||
if (attack != null)
|
||||
{
|
||||
var submarine = target.Body.UserData as Submarine;
|
||||
@@ -248,11 +249,13 @@ namespace Barotrauma.Items.Components
|
||||
return true;
|
||||
}
|
||||
|
||||
Limb limb;
|
||||
Limb limb = target.Body.UserData as Limb;
|
||||
Structure structure;
|
||||
if ((limb = (target.Body.UserData as Limb)) != null)
|
||||
if (limb != null)
|
||||
{
|
||||
attackResult = attack.DoDamageToLimb(User, limb, item.WorldPosition, 1.0f);
|
||||
if (limb.character != null)
|
||||
character = limb.character;
|
||||
}
|
||||
else if ((structure = (target.Body.UserData as Structure)) != null)
|
||||
{
|
||||
@@ -260,8 +263,8 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
ApplyStatusEffects(ActionType.OnUse, 1.0f);
|
||||
ApplyStatusEffects(ActionType.OnImpact, 1.0f);
|
||||
ApplyStatusEffects(ActionType.OnUse, 1.0f, character);
|
||||
ApplyStatusEffects(ActionType.OnImpact, 1.0f, character);
|
||||
|
||||
IsActive = false;
|
||||
|
||||
@@ -306,7 +309,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
contained.SetTransform(item.SimPosition, contained.body.Rotation);
|
||||
}
|
||||
contained.Condition = 0.0f;
|
||||
//contained.Condition = 0.0f; //Let the freaking .xml handle it jeez
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user