Explosives, chemicals and medical items disappear when their condition falls to 0 (i.e. when they're fully used).

Railgun shells, detonators and depth charges also now "use" their contents instead of destroying them. (See #322)
This commit is contained in:
Joonas Rikkonen
2018-04-03 22:43:41 +03:00
parent faaaa69fa7
commit 9dd9425caa
5 changed files with 142 additions and 15 deletions
@@ -5,8 +5,7 @@
category="Machine"
focusonselected="true"
offsetonselected="700"
linkable="true"
>
linkable="true">
<Sprite texture ="railgunetc.png" depth="0.01" sourcerect="64,180,47,76"/>
@@ -23,8 +22,7 @@
<Item
name="Depth Charge Loader"
category="Machine"
linkable="true"
>
linkable="true">
<Sprite texture="railgunetc.png" depth="0.8" sourcerect="0,160,61,96"/>
@@ -53,7 +51,9 @@
<Projectile launchimpulse="5.0">
<Attack damage="1" structuredamage="1" damagetype="Blunt"/>
<StatusEffect type="OnImpact" target="Contained" Condition="-100.0"/>
<StatusEffect type="OnImpact" target="Contained">
<Use/>
</StatusEffect>
</Projectile>
<ItemContainer hideitems="true" capacity="1" canbeselected = "true">
@@ -85,7 +85,9 @@
<sound file="Content/Items/Weapons/bigexplosion.ogg" range="10000"/>
<Explosion range="1000.0" structuredamage="1000" damage="1000" stun="10" force="50.0"/>
</StatusEffect>
<StatusEffect type="OnImpact" target="Contained" Condition="-100.0"/>
<StatusEffect type="OnImpact" target="Contained">
<Use/>
</StatusEffect>
</Projectile>
<ItemContainer hideitems="true" capacity="1" canbeselected = "true">
@@ -11,9 +11,10 @@
<Body width="24" height="8"/>
<Throwable slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
<StatusEffect type="OnBroken" target="This" Condition="-100.0">
<StatusEffect type="OnUse" target="This" Condition="-100.0">
<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"/>
<Remove/>
</StatusEffect>
</Throwable>
</Item>
@@ -30,9 +31,10 @@
<Throwable slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
<StatusEffect type="OnFire" target="This" Condition="-50.0"/>
<StatusEffect type="OnBroken" target="This" Condition="-100.0">
<StatusEffect type="OnUse" target="This" Condition="-100.0">
<sound file="Content/Items/Reactor/explosion.ogg" range="3000"/>
<Explosion range="600.0" structuredamage="150" damage="300" stun="5" force="20.0" severlimbsprobability="0.6" decal="explosion" decalsize="0.5"/>
<Remove/>
</StatusEffect>
</Throwable>
</Item>
@@ -50,9 +52,15 @@
<Throwable slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
<StatusEffect type="Always" target="This" Condition="-0.35"/>
<StatusEffect type="OnFire" target="This" Condition="-50.0"/>
<StatusEffect type="OnBroken" target="This" Condition="-100.0">
<StatusEffect type="OnBroken" target="This">
<sound file="Content/Items/Reactor/explosion.ogg" range="3000"/>
<Explosion range="600.0" structuredamage="150" damage="300" stun="5" force="20.0" severlimbsprobability="0.6" decal="explosion" decalsize="0.5"/>
<Remove/>
</StatusEffect>
<StatusEffect type="OnUse" target="This">
<sound file="Content/Items/Reactor/explosion.ogg" range="3000"/>
<Explosion range="600.0" structuredamage="150" damage="300" stun="5" force="20.0" severlimbsprobability="0.6" decal="explosion" decalsize="0.5"/>
<Remove/>
</StatusEffect>
</Throwable>
</Item>
@@ -70,10 +78,11 @@
<Throwable slots="Any,RightHand,LeftHand" throwforce="4.0" aimpos="35,-10">
<StatusEffect type="OnFire" target="This" Condition="-50.0"/>
<StatusEffect type="OnBroken" target="This" Condition="-100.0">
<StatusEffect type="OnUse" target="This" Condition="-100.0">
<sound file="Content/Items/Reactor/explosion.ogg" range="2000"/>
<Explosion range="500.0" structuredamage="50" damage="300" stun="5" force="20.0" severlimbsprobability="0.6"/>
<Fire size="500"/>
<Remove/>
</StatusEffect>
</Throwable>
</Item>
@@ -101,7 +110,7 @@
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
<requireditem name="Screwdriver,Wire" type="Equipped"/>
<input name="activate">
<StatusEffect type="OnUse" target="Contained" Condition="-100.0">
<StatusEffect type="OnUse" target="Contained">
<Use/>
</StatusEffect>
</input>
@@ -132,7 +132,9 @@
<ParticleEmitter particle="bubbles" anglemin="0" anglemax="360" particleamount="10" velocitymin="0" velocitymax="50" scalemin="2" scalemax="5"/>
</StatusEffect>
<StatusEffect type="OnImpact" target="Contained" Condition="-100.0"/>
<StatusEffect type="OnImpact" target="Contained">
<Use/>
</StatusEffect>
</Projectile>
<ItemContainer hideitems="true" capacity="1" canbeselected = "true">