CHIMP handcannon (#15667)
@@ -66,27 +66,27 @@ public sealed partial class AnomalySystem : SharedAnomalySystem
|
||||
|
||||
private void OnStartCollide(EntityUid uid, AnomalyComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (!TryComp<AnomalousParticleComponent>(args.OtherFixture.Body.Owner, out var particleComponent))
|
||||
if (!TryComp<AnomalousParticleComponent>(args.OtherFixture.Body.Owner, out var particle))
|
||||
return;
|
||||
|
||||
if (args.OtherFixture.ID != particleComponent.FixtureId)
|
||||
if (args.OtherFixture.ID != particle.FixtureId)
|
||||
return;
|
||||
|
||||
// small function to randomize because it's easier to read like this
|
||||
float VaryValue(float v) => v * Random.NextFloat(MinParticleVariation, MaxParticleVariation);
|
||||
|
||||
if (particleComponent.ParticleType == component.DestabilizingParticleType)
|
||||
if (particle.ParticleType == component.DestabilizingParticleType)
|
||||
{
|
||||
ChangeAnomalyStability(uid, VaryValue(component.StabilityPerDestabilizingHit), component);
|
||||
ChangeAnomalyStability(uid, VaryValue(particle.StabilityPerDestabilizingHit), component);
|
||||
}
|
||||
else if (particleComponent.ParticleType == component.SeverityParticleType)
|
||||
else if (particle.ParticleType == component.SeverityParticleType)
|
||||
{
|
||||
ChangeAnomalySeverity(uid, VaryValue(component.SeverityPerSeverityHit), component);
|
||||
ChangeAnomalySeverity(uid, VaryValue(particle.SeverityPerSeverityHit), component);
|
||||
}
|
||||
else if (particleComponent.ParticleType == component.WeakeningParticleType)
|
||||
else if (particle.ParticleType == component.WeakeningParticleType)
|
||||
{
|
||||
ChangeAnomalyHealth(uid, VaryValue(component.HealthPerWeakeningeHit), component);
|
||||
ChangeAnomalyStability(uid, VaryValue(component.StabilityPerWeakeningeHit), component);
|
||||
ChangeAnomalyHealth(uid, VaryValue(particle.HealthPerWeakeningeHit), component);
|
||||
ChangeAnomalyStability(uid, VaryValue(particle.StabilityPerWeakeningeHit), component);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.Anomaly;
|
||||
using Content.Shared.Anomaly.Components;
|
||||
|
||||
namespace Content.Server.Anomaly.Components;
|
||||
|
||||
@@ -20,4 +21,32 @@ public sealed class AnomalousParticleComponent : Component
|
||||
/// </summary>
|
||||
[DataField("fixtureId")]
|
||||
public string FixtureId = "projectile";
|
||||
|
||||
/// <summary>
|
||||
/// The amount that the <see cref="AnomalyComponent.Severity"/> increases by when hit
|
||||
/// of an anomalous particle of <seealso cref="AnomalyComponent.SeverityParticleType"/>.
|
||||
/// </summary>
|
||||
[DataField("severityPerSeverityHit")]
|
||||
public float SeverityPerSeverityHit = 0.025f;
|
||||
|
||||
/// <summary>
|
||||
/// The amount that the <see cref="AnomalyComponent.Stability"/> increases by when hit
|
||||
/// of an anomalous particle of <seealso cref="AnomalyComponent.DestabilizingParticleType"/>.
|
||||
/// </summary>
|
||||
[DataField("stabilityPerDestabilizingHit")]
|
||||
public float StabilityPerDestabilizingHit = 0.04f;
|
||||
|
||||
/// <summary>
|
||||
/// The amount that the <see cref="AnomalyComponent.Stability"/> increases by when hit
|
||||
/// of an anomalous particle of <seealso cref="AnomalyComponent.DestabilizingParticleType"/>.
|
||||
/// </summary>
|
||||
[DataField("healthPerWeakeningeHit")]
|
||||
public float HealthPerWeakeningeHit = -0.05f;
|
||||
|
||||
/// <summary>
|
||||
/// The amount that the <see cref="AnomalyComponent.Stability"/> increases by when hit
|
||||
/// of an anomalous particle of <seealso cref="AnomalyComponent.DestabilizingParticleType"/>.
|
||||
/// </summary>
|
||||
[DataField("stabilityPerWeakeningeHit")]
|
||||
public float StabilityPerWeakeningeHit = -0.1f;
|
||||
}
|
||||
|
||||
@@ -149,46 +149,18 @@ public sealed class AnomalyComponent : Component
|
||||
[DataField("severityParticleType")]
|
||||
public AnomalousParticleType SeverityParticleType;
|
||||
|
||||
/// <summary>
|
||||
/// The amount that the <see cref="Severity"/> increases by when hit
|
||||
/// of an anomalous particle of <seealso cref="SeverityParticleType"/>.
|
||||
/// </summary>
|
||||
[DataField("severityPerSeverityHit")]
|
||||
public float SeverityPerSeverityHit = 0.025f;
|
||||
|
||||
/// <summary>
|
||||
/// The particle type that destabilizes the anomaly.
|
||||
/// </summary>
|
||||
[DataField("destabilizingParticleType")]
|
||||
public AnomalousParticleType DestabilizingParticleType;
|
||||
|
||||
/// <summary>
|
||||
/// The amount that the <see cref="Stability"/> increases by when hit
|
||||
/// of an anomalous particle of <seealso cref="DestabilizingParticleType"/>.
|
||||
/// </summary>
|
||||
[DataField("stabilityPerDestabilizingHit")]
|
||||
public float StabilityPerDestabilizingHit = 0.04f;
|
||||
|
||||
/// <summary>
|
||||
/// The particle type that weakens the anomalys health.
|
||||
/// </summary>
|
||||
[DataField("weakeningParticleType")]
|
||||
public AnomalousParticleType WeakeningParticleType;
|
||||
|
||||
/// <summary>
|
||||
/// The amount that the <see cref="Stability"/> increases by when hit
|
||||
/// of an anomalous particle of <seealso cref="DestabilizingParticleType"/>.
|
||||
/// </summary>
|
||||
[DataField("healthPerWeakeningeHit")]
|
||||
public float HealthPerWeakeningeHit = -0.05f;
|
||||
|
||||
/// <summary>
|
||||
/// The amount that the <see cref="Stability"/> increases by when hit
|
||||
/// of an anomalous particle of <seealso cref="DestabilizingParticleType"/>.
|
||||
/// </summary>
|
||||
[DataField("stabilityPerWeakeningeHit")]
|
||||
public float StabilityPerWeakeningeHit = -0.1f;
|
||||
|
||||
#region Points and Vessels
|
||||
/// <summary>
|
||||
/// The vessel that the anomaly is connceted to. Stored so that multiple
|
||||
|
||||
@@ -536,6 +536,10 @@
|
||||
unlockedRecipes:
|
||||
- AnomalyVesselCircuitboard
|
||||
- APECircuitboard
|
||||
- WeaponPistolCHIMP
|
||||
- CartridgeAnomalousParticleDelta
|
||||
- CartridgeAnomalousParticleEpsilon
|
||||
- CartridgeAnomalousParticleZeta
|
||||
|
||||
- type: technology
|
||||
name: technologies-robotics-technology
|
||||
|
||||
@@ -52,3 +52,62 @@
|
||||
components:
|
||||
- type: CartridgeAmmo
|
||||
proto: BulletMagnumRubber
|
||||
|
||||
- type: entity
|
||||
id: BaseAnomalousCartridge
|
||||
parent: BaseCartridgeMagnum
|
||||
description: Packs twice the punch of a standard A.P.E. particle.
|
||||
abstract: true
|
||||
components:
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
sprite: Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi
|
||||
layers:
|
||||
- state: base
|
||||
map: ["enum.AmmoVisualLayers.Base"]
|
||||
- type: Tag
|
||||
tags:
|
||||
- Cartridge
|
||||
- CartridgeCHIMP
|
||||
|
||||
- type: entity
|
||||
id: CartridgeAnomalousParticleDelta
|
||||
parent: BaseAnomalousCartridge
|
||||
name: cartridge (delta particle)
|
||||
components:
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: base
|
||||
map: ["enum.AmmoVisualLayers.Base"]
|
||||
- state: overlay
|
||||
color: crimson
|
||||
- type: CartridgeAmmo
|
||||
proto: AnomalousParticleDeltaStrong
|
||||
|
||||
- type: entity
|
||||
id: CartridgeAnomalousParticleEpsilon
|
||||
parent: BaseAnomalousCartridge
|
||||
name: cartridge (epsilon particle)
|
||||
components:
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: base
|
||||
map: ["enum.AmmoVisualLayers.Base"]
|
||||
- state: overlay
|
||||
color: plum
|
||||
- type: CartridgeAmmo
|
||||
proto: AnomalousParticleEpsilonStrong
|
||||
|
||||
- type: entity
|
||||
id: CartridgeAnomalousParticleZeta
|
||||
parent: BaseAnomalousCartridge
|
||||
name: cartridge (zeta particle)
|
||||
components:
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: base
|
||||
map: ["enum.AmmoVisualLayers.Base"]
|
||||
- state: overlay
|
||||
color: goldenrod
|
||||
- type: CartridgeAmmo
|
||||
proto: AnomalousParticleZetaStrong
|
||||
|
||||
@@ -338,10 +338,23 @@
|
||||
- type: Projectile
|
||||
damage:
|
||||
types:
|
||||
Heat: 3
|
||||
Heat: 5
|
||||
- type: TimedDespawn
|
||||
lifetime: 3
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: AnomalousParticleDelta
|
||||
id: AnomalousParticleDeltaStrong
|
||||
noSpawn: true
|
||||
components:
|
||||
- type: AnomalousParticle
|
||||
particleType: Delta
|
||||
severityPerSeverityHit: 0.05
|
||||
stabilityPerDestabilizingHit: 0.08
|
||||
healthPerWeakeningeHit: -0.1
|
||||
stabilityPerWeakeningeHit: -0.2
|
||||
|
||||
- type: entity
|
||||
parent: AnomalousParticleDelta
|
||||
id: AnomalousParticleEpsilon
|
||||
@@ -351,6 +364,18 @@
|
||||
- type: AnomalousParticle
|
||||
particleType: Epsilon
|
||||
|
||||
- type: entity
|
||||
parent: AnomalousParticleEpsilon
|
||||
id: AnomalousParticleEpsilonStrong
|
||||
noSpawn: true
|
||||
components:
|
||||
- type: AnomalousParticle
|
||||
particleType: Epsilon
|
||||
severityPerSeverityHit: 0.05
|
||||
stabilityPerDestabilizingHit: 0.08
|
||||
healthPerWeakeningeHit: -0.1
|
||||
stabilityPerWeakeningeHit: -0.2
|
||||
|
||||
- type: entity
|
||||
parent: AnomalousParticleDelta
|
||||
id: AnomalousParticleZeta
|
||||
@@ -360,6 +385,18 @@
|
||||
- type: AnomalousParticle
|
||||
particleType: Zeta
|
||||
|
||||
- type: entity
|
||||
parent: AnomalousParticleZeta
|
||||
id: AnomalousParticleZetaStrong
|
||||
noSpawn: true
|
||||
components:
|
||||
- type: AnomalousParticle
|
||||
particleType: Zeta
|
||||
severityPerSeverityHit: 0.05
|
||||
stabilityPerDestabilizingHit: 0.08
|
||||
healthPerWeakeningeHit: -0.1
|
||||
stabilityPerWeakeningeHit: -0.2
|
||||
|
||||
# Launcher projectiles (grenade / rocket)
|
||||
- type: entity
|
||||
id: BulletRocket
|
||||
|
||||
@@ -125,3 +125,42 @@
|
||||
capacity: 5
|
||||
chambers: [ True, True, True, True, True ]
|
||||
ammoSlots: [ null, null, null, null, null ]
|
||||
|
||||
- type: entity
|
||||
id: WeaponPistolCHIMP
|
||||
parent: BaseWeaponRevolver
|
||||
name: C.H.I.M.P. handcannon
|
||||
description: Just because it's a little C.H.I.M.P. doesn't mean it can't punch like an A.P.E.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Weapons/Guns/Revolvers/chimp.rsi
|
||||
layers:
|
||||
- state: base
|
||||
map: ["enum.GunVisualLayers.Base"]
|
||||
- state: mag-unshaded-1
|
||||
visible: false
|
||||
map: ["enum.GunVisualLayers.MagUnshaded"]
|
||||
shader: unshaded
|
||||
- type: Appearance
|
||||
- type: MagazineVisuals
|
||||
magState: mag
|
||||
steps: 3
|
||||
zeroVisible: false
|
||||
- type: Clothing
|
||||
sprite: Objects/Weapons/Guns/Revolvers/chimp.rsi
|
||||
- type: RevolverAmmoProvider
|
||||
whitelist:
|
||||
tags:
|
||||
- CartridgeCHIMP
|
||||
proto: CartridgeAnomalousParticleDelta #when revolvers stop sucking cock, make this spawn empty
|
||||
capacity: 10
|
||||
chambers: [ True, True, True, True, True, True, True, True, True, True ]
|
||||
ammoSlots: [ null, null, null, null, null, null, null, null, null, null ]
|
||||
soundEject:
|
||||
path: /Audio/Weapons/Guns/MagOut/revolver_magout.ogg
|
||||
soundInsert:
|
||||
path: /Audio/Weapons/Guns/MagIn/revolver_magin.ogg
|
||||
- type: Gun
|
||||
fireRate: 1.5
|
||||
soundGunshot:
|
||||
path: /Audio/Weapons/Guns/Gunshots/taser2.ogg
|
||||
|
||||
@@ -236,6 +236,10 @@
|
||||
- PowerCellSmall
|
||||
- PowerCellMedium
|
||||
- PowerCellHigh
|
||||
- WeaponPistolCHIMP
|
||||
- CartridgeAnomalousParticleDelta
|
||||
- CartridgeAnomalousParticleEpsilon
|
||||
- CartridgeAnomalousParticleZeta
|
||||
- SynthesizerInstrument
|
||||
- RPED
|
||||
- ClothingShoesBootsMag
|
||||
|
||||
@@ -64,3 +64,11 @@
|
||||
materials:
|
||||
Plastic: 200
|
||||
Glass: 150
|
||||
|
||||
- type: latheRecipe
|
||||
id: WeaponPistolCHIMP
|
||||
result: WeaponPistolCHIMP
|
||||
completetime: 5
|
||||
materials:
|
||||
Steel: 500
|
||||
Glass: 400
|
||||
@@ -144,6 +144,27 @@
|
||||
Steel: 10
|
||||
Glass: 5
|
||||
|
||||
- type: latheRecipe
|
||||
id: CartridgeAnomalousParticleDelta
|
||||
result: CartridgeAnomalousParticleDelta
|
||||
completetime: 2
|
||||
materials:
|
||||
Plastic: 25
|
||||
|
||||
- type: latheRecipe
|
||||
id: CartridgeAnomalousParticleEpsilon
|
||||
result: CartridgeAnomalousParticleEpsilon
|
||||
completetime: 2
|
||||
materials:
|
||||
Plastic: 25
|
||||
|
||||
- type: latheRecipe
|
||||
id: CartridgeAnomalousParticleZeta
|
||||
result: CartridgeAnomalousParticleZeta
|
||||
completetime: 2
|
||||
materials:
|
||||
Plastic: 25
|
||||
|
||||
- type: latheRecipe
|
||||
id: TargetHuman
|
||||
result: TargetHuman
|
||||
|
||||
@@ -94,6 +94,9 @@
|
||||
- type: Tag
|
||||
id: CartridgeCaselessRifle
|
||||
|
||||
- type: Tag
|
||||
id: CartridgeCHIMP
|
||||
|
||||
- type: Tag
|
||||
id: CartridgeHeavyRifle
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 767 B |
|
After Width: | Height: | Size: 744 B |
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC0-1.0",
|
||||
"copyright": "Created by EmoGarbage404 (github) for Space Station 14.",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "base"
|
||||
},
|
||||
{
|
||||
"name": "base-spent"
|
||||
},
|
||||
{
|
||||
"name": "overlay"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 481 B |
|
After Width: | Height: | Size: 637 B |
|
After Width: | Height: | Size: 233 B |
|
After Width: | Height: | Size: 716 B |
|
After Width: | Height: | Size: 762 B |
|
After Width: | Height: | Size: 148 B |
|
After Width: | Height: | Size: 148 B |
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "Taken from cev-eris at https://github.com/discordia-space/CEV-Eris/raw/e1a3cbe9ba2e6e29b7f1cad1bb456b390aac936d/icons/obj/guns/projectile.dmi",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "base"
|
||||
},
|
||||
{
|
||||
"name": "mag-unshaded-1"
|
||||
},
|
||||
{
|
||||
"name": "mag-unshaded-2"
|
||||
},
|
||||
{
|
||||
"name": "inhand-left",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-right",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "equipped-BELT",
|
||||
"directions": 4
|
||||
}
|
||||
]
|
||||
}
|
||||