Fixed explosives being directly usable by characters, causing them to explode when left clicking while holding them due to 9dd9425c. See #385
This commit is contained in:
@@ -179,7 +179,7 @@
|
|||||||
|
|
||||||
<Propulsion force="-40" usablein="both"/>
|
<Propulsion force="-40" usablein="both"/>
|
||||||
|
|
||||||
<Projectile launchimpulse="80.0">
|
<Projectile characterusable="false" launchimpulse="80.0">
|
||||||
<Attack damage="1000" bleedingdamage="10" structuredamage="500" damagetype="Blunt"/>
|
<Attack damage="1000" bleedingdamage="10" structuredamage="500" damagetype="Blunt"/>
|
||||||
|
|
||||||
<StatusEffect type="OnUse" Condition="-100.0" stun="10.0" disabledeltatime="true">
|
<StatusEffect type="OnUse" Condition="-100.0" stun="10.0" disabledeltatime="true">
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<Containable name="chem"/>
|
<Containable name="chem"/>
|
||||||
</ItemContainer>
|
</ItemContainer>
|
||||||
|
|
||||||
<Projectile launchimpulse="20.0" sticktocharacters="true">
|
<Projectile characterusable="false" launchimpulse="20.0" sticktocharacters="true">
|
||||||
<Attack damage="5" bleedingdamage="0.2" structuredamage="1" damagetype="Blunt" stun="0.1" targetforce="5"/>
|
<Attack damage="5" bleedingdamage="0.2" structuredamage="1" damagetype="Blunt" stun="0.1" targetforce="5"/>
|
||||||
<StatusEffect type="OnImpact" target="Contained, Character" Condition="-50.0" disabledeltatime="true" >
|
<StatusEffect type="OnImpact" target="Contained, Character" Condition="-50.0" disabledeltatime="true" >
|
||||||
<sound file="Content/Items/Medical/syringe.ogg" range="500"/>
|
<sound file="Content/Items/Medical/syringe.ogg" range="500"/>
|
||||||
@@ -511,7 +511,7 @@
|
|||||||
|
|
||||||
<Body width="8" height="16" density="10"/>
|
<Body width="8" height="16" density="10"/>
|
||||||
|
|
||||||
<Throwable canBeCombined="true" slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
|
<Throwable characterusable="false" canBeCombined="true" slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
|
||||||
<StatusEffect type="OnImpact" target="This" Condition="0.0" setvalue="true"/>
|
<StatusEffect type="OnImpact" target="This" Condition="0.0" setvalue="true"/>
|
||||||
<StatusEffect type="OnFire" target="this" condition="-50"/>
|
<StatusEffect type="OnFire" target="this" condition="-50"/>
|
||||||
<StatusEffect type="OnBroken" target="This" Condition="-100.0">
|
<StatusEffect type="OnBroken" target="This" Condition="-100.0">
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,20" handle2="10,20" aimable="false"/>
|
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,20" handle2="10,20" aimable="false"/>
|
||||||
|
|
||||||
<Projectile launchimpulse="5.0">
|
<Projectile characterusable="false" launchimpulse="5.0">
|
||||||
<Attack damage="1" structuredamage="1" damagetype="Blunt"/>
|
<Attack damage="1" structuredamage="1" damagetype="Blunt"/>
|
||||||
<StatusEffect type="OnImpact" target="Contained">
|
<StatusEffect type="OnImpact" target="Contained">
|
||||||
<Use/>
|
<Use/>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,20" handle2="10,20" aimable="false"/>
|
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,20" handle2="10,20" aimable="false"/>
|
||||||
|
|
||||||
<Projectile launchimpulse="5.0">
|
<Projectile characterusable="false" launchimpulse="5.0">
|
||||||
<StatusEffect type="OnImpact" Condition="-100.0" stun="10.0" disabledeltatime="true">
|
<StatusEffect type="OnImpact" Condition="-100.0" stun="10.0" disabledeltatime="true">
|
||||||
<sound file="Content/Items/Weapons/bigexplosion.ogg" range="10000"/>
|
<sound file="Content/Items/Weapons/bigexplosion.ogg" range="10000"/>
|
||||||
<Explosion range="1000.0" structuredamage="1000" damage="1000" stun="10" force="50.0"/>
|
<Explosion range="1000.0" structuredamage="1000" damage="1000" stun="10" force="50.0"/>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<Sprite texture="weapons.png" depth="0.8" sourcerect="0,97,24,8"/>
|
<Sprite texture="weapons.png" depth="0.8" sourcerect="0,97,24,8"/>
|
||||||
<Body width="24" height="8"/>
|
<Body width="24" height="8"/>
|
||||||
|
|
||||||
<Throwable slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
|
<Throwable characterusable="false" slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
|
||||||
<StatusEffect type="OnUse" target="This" Condition="-100.0">
|
<StatusEffect type="OnUse" target="This" Condition="-100.0">
|
||||||
<sound file="Content/Items/Reactor/explosion.ogg" range="3000"/>
|
<sound file="Content/Items/Reactor/explosion.ogg" range="3000"/>
|
||||||
<Explosion range="500.0" structuredamage="250" damage="200" stun="5" force="20.0" severlimbsprobability="0.5" decal="explosion" decalsize="0.5"/>
|
<Explosion range="500.0" structuredamage="250" damage="200" stun="5" force="20.0" severlimbsprobability="0.5" decal="explosion" decalsize="0.5"/>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<Sprite texture="weapons.png" depth="0.8" sourcerect="0,97,24,8"/>
|
<Sprite texture="weapons.png" depth="0.8" sourcerect="0,97,24,8"/>
|
||||||
<Body width="24" height="8"/>
|
<Body width="24" height="8"/>
|
||||||
|
|
||||||
<Throwable slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
|
<Throwable characterusable="false" slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
|
||||||
<StatusEffect type="OnFire" target="This" Condition="-50.0"/>
|
<StatusEffect type="OnFire" target="This" Condition="-50.0"/>
|
||||||
<StatusEffect type="OnUse" target="This" Condition="-100.0">
|
<StatusEffect type="OnUse" target="This" Condition="-100.0">
|
||||||
<sound file="Content/Items/Reactor/explosion.ogg" range="3000"/>
|
<sound file="Content/Items/Reactor/explosion.ogg" range="3000"/>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
<Sprite texture="weapons.png" depth="0.8" sourcerect="0,97,24,8"/>
|
<Sprite texture="weapons.png" depth="0.8" sourcerect="0,97,24,8"/>
|
||||||
<Body width="24" height="8"/>
|
<Body width="24" height="8"/>
|
||||||
|
|
||||||
<Throwable slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
|
<Throwable characterusable="false" slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
|
||||||
<StatusEffect type="Always" target="This" Condition="-0.35"/>
|
<StatusEffect type="Always" target="This" Condition="-0.35"/>
|
||||||
<StatusEffect type="OnFire" target="This" Condition="-50.0"/>
|
<StatusEffect type="OnFire" target="This" Condition="-50.0"/>
|
||||||
<StatusEffect type="OnBroken" target="This">
|
<StatusEffect type="OnBroken" target="This">
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
<Sprite texture="weapons.png" depth="0.8" sourcerect="0,97,24,8"/>
|
<Sprite texture="weapons.png" depth="0.8" sourcerect="0,97,24,8"/>
|
||||||
<Body width="24" height="8"/>
|
<Body width="24" height="8"/>
|
||||||
|
|
||||||
<Throwable slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
|
<Throwable characterusable="false" slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
|
||||||
<StatusEffect type="OnFire" target="This" Condition="-50.0"/>
|
<StatusEffect type="OnFire" target="This" Condition="-50.0"/>
|
||||||
<StatusEffect type="OnUse" target="This" Condition="-100.0">
|
<StatusEffect type="OnUse" target="This" Condition="-100.0">
|
||||||
<sound file="Content/Items/Reactor/explosion.ogg" range="2000"/>
|
<sound file="Content/Items/Reactor/explosion.ogg" range="2000"/>
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false"/>
|
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false"/>
|
||||||
|
|
||||||
<Projectile launchimpulse="80.0">
|
<Projectile characterusable="false" launchimpulse="80.0">
|
||||||
<Attack damage="100" bleedingdamage="10" structuredamage="200" damagetype="Blunt" severlimbsprobability="1.0"/>
|
<Attack damage="100" bleedingdamage="10" structuredamage="200" damagetype="Blunt" severlimbsprobability="1.0"/>
|
||||||
|
|
||||||
<StatusEffect type="OnActive" target="This">
|
<StatusEffect type="OnActive" target="This">
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false"/>
|
<Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false"/>
|
||||||
|
|
||||||
<Projectile launchimpulse="80.0">
|
<Projectile characterusable="false" launchimpulse="80.0">
|
||||||
<Attack damage="1000" bleedingdamage="10" structuredamage="200" damagetype="Blunt" severlimbsprobability="1.0"/>
|
<Attack damage="1000" bleedingdamage="10" structuredamage="200" damagetype="Blunt" severlimbsprobability="1.0"/>
|
||||||
|
|
||||||
<StatusEffect type="OnUse" Condition="-100.0" stun="10.0" disabledeltatime="true">
|
<StatusEffect type="OnUse" Condition="-100.0" stun="10.0" disabledeltatime="true">
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<Body width="64" height="5" density="20"/>
|
<Body width="64" height="5" density="20"/>
|
||||||
|
|
||||||
<Pickable slots="Any"/>
|
<Pickable slots="Any"/>
|
||||||
<Projectile launchimpulse="20.0" sticktocharacters="true">
|
<Projectile characterusable="false" launchimpulse="20.0" sticktocharacters="true">
|
||||||
<Attack damage="20" bleedingdamage="2" structuredamage="50" damagetype="Blunt" stun="0.2" targetforce="50"/>
|
<Attack damage="20" bleedingdamage="2" structuredamage="50" damagetype="Blunt" stun="0.2" targetforce="50"/>
|
||||||
</Projectile>
|
</Projectile>
|
||||||
</Item>
|
</Item>
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
<Body width="8" height="3" density="40"/>
|
<Body width="8" height="3" density="40"/>
|
||||||
|
|
||||||
<Pickable slots="Any"/>
|
<Pickable slots="Any"/>
|
||||||
<Projectile hitscan="true" removeonhit="true" >
|
<Projectile characterusable="false" hitscan="true" removeonhit="true" >
|
||||||
<Attack damage="40" bleedingdamage="3" structuredamage="100" damagetype="Blunt" stun="0.5" targetforce="50"/>
|
<Attack damage="40" bleedingdamage="3" structuredamage="100" damagetype="Blunt" stun="0.5" targetforce="50"/>
|
||||||
</Projectile>
|
</Projectile>
|
||||||
</Item>
|
</Item>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
public override bool Use(float deltaTime, Character character = null)
|
public override bool Use(float deltaTime, Character character = null)
|
||||||
{
|
{
|
||||||
return true; //We do the actual throwing in Aim because Use might be used by chems
|
return characterUsable || character == null; //We do the actual throwing in Aim because Use might be used by chems
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool SecondaryUse(float deltaTime, Character character = null)
|
public override bool SecondaryUse(float deltaTime, Character character = null)
|
||||||
|
|||||||
@@ -141,6 +141,14 @@ namespace Barotrauma.Items.Components
|
|||||||
get { return removeOnCombined; }
|
get { return removeOnCombined; }
|
||||||
set { removeOnCombined = value; }
|
set { removeOnCombined = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Can the "Use" action be triggered by characters or just other items/statuseffects
|
||||||
|
[Serialize(true, false)]
|
||||||
|
public bool CharacterUsable
|
||||||
|
{
|
||||||
|
get { return characterUsable; }
|
||||||
|
set { characterUsable = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public InputType PickKey
|
public InputType PickKey
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,14 +37,7 @@ namespace Barotrauma.Items.Components
|
|||||||
get { return launchImpulse; }
|
get { return launchImpulse; }
|
||||||
set { launchImpulse = value; }
|
set { launchImpulse = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serialize(false, false)]
|
|
||||||
public bool CharacterUsable
|
|
||||||
{
|
|
||||||
get { return characterUsable; }
|
|
||||||
set { characterUsable = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serialize(false, false)]
|
[Serialize(false, false)]
|
||||||
//backwards compatibility, can stick to anything
|
//backwards compatibility, can stick to anything
|
||||||
public bool DoesStick
|
public bool DoesStick
|
||||||
|
|||||||
@@ -73,13 +73,10 @@ namespace Barotrauma.Items.Components
|
|||||||
projectileAnchor.X = element.GetAttributeFloat("projectileanchorx", 0.0f);
|
projectileAnchor.X = element.GetAttributeFloat("projectileanchorx", 0.0f);
|
||||||
projectileAnchor.Y = element.GetAttributeFloat("projectileanchory", 0.0f);
|
projectileAnchor.Y = element.GetAttributeFloat("projectileanchory", 0.0f);
|
||||||
projectileAnchor = ConvertUnits.ToSimUnits(projectileAnchor);
|
projectileAnchor = ConvertUnits.ToSimUnits(projectileAnchor);
|
||||||
|
|
||||||
characterUsable = element.GetAttributeBool("characterusable", false);
|
|
||||||
|
|
||||||
sprite = new Sprite(spritePath, new Vector2(0.5f,0.5f));
|
sprite = new Sprite(spritePath, new Vector2(0.5f,0.5f));
|
||||||
sectionLength = ConvertUnits.ToSimUnits(sprite.size.X);
|
sectionLength = ConvertUnits.ToSimUnits(sprite.size.X);
|
||||||
|
|
||||||
|
|
||||||
Path ropePath = new Path();
|
Path ropePath = new Path();
|
||||||
ropePath.Add(item.body.SimPosition);
|
ropePath.Add(item.body.SimPosition);
|
||||||
ropePath.Add(item.body.SimPosition + new Vector2(length, 0.0f));
|
ropePath.Add(item.body.SimPosition + new Vector2(length, 0.0f));
|
||||||
|
|||||||
Reference in New Issue
Block a user