From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Sun, 23 Apr 2023 23:58:45 +0000 (-0400) Subject: CHIMP handcannon (#15667) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=37bc649eefcff0fb552ce637545807b6993fb86f;p=space-station-14.git CHIMP handcannon (#15667) --- diff --git a/Content.Server/Anomaly/AnomalySystem.cs b/Content.Server/Anomaly/AnomalySystem.cs index 45e4836480..730592cc2f 100644 --- a/Content.Server/Anomaly/AnomalySystem.cs +++ b/Content.Server/Anomaly/AnomalySystem.cs @@ -66,27 +66,27 @@ public sealed partial class AnomalySystem : SharedAnomalySystem private void OnStartCollide(EntityUid uid, AnomalyComponent component, ref StartCollideEvent args) { - if (!TryComp(args.OtherFixture.Body.Owner, out var particleComponent)) + if (!TryComp(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); } } diff --git a/Content.Server/Anomaly/Components/AnomalousParticleComponent.cs b/Content.Server/Anomaly/Components/AnomalousParticleComponent.cs index 6d8e248c14..4444d49e3d 100644 --- a/Content.Server/Anomaly/Components/AnomalousParticleComponent.cs +++ b/Content.Server/Anomaly/Components/AnomalousParticleComponent.cs @@ -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 /// [DataField("fixtureId")] public string FixtureId = "projectile"; + + /// + /// The amount that the increases by when hit + /// of an anomalous particle of . + /// + [DataField("severityPerSeverityHit")] + public float SeverityPerSeverityHit = 0.025f; + + /// + /// The amount that the increases by when hit + /// of an anomalous particle of . + /// + [DataField("stabilityPerDestabilizingHit")] + public float StabilityPerDestabilizingHit = 0.04f; + + /// + /// The amount that the increases by when hit + /// of an anomalous particle of . + /// + [DataField("healthPerWeakeningeHit")] + public float HealthPerWeakeningeHit = -0.05f; + + /// + /// The amount that the increases by when hit + /// of an anomalous particle of . + /// + [DataField("stabilityPerWeakeningeHit")] + public float StabilityPerWeakeningeHit = -0.1f; } diff --git a/Content.Shared/Anomaly/Components/AnomalyComponent.cs b/Content.Shared/Anomaly/Components/AnomalyComponent.cs index 813b3b38c1..cf2e12524e 100644 --- a/Content.Shared/Anomaly/Components/AnomalyComponent.cs +++ b/Content.Shared/Anomaly/Components/AnomalyComponent.cs @@ -149,46 +149,18 @@ public sealed class AnomalyComponent : Component [DataField("severityParticleType")] public AnomalousParticleType SeverityParticleType; - /// - /// The amount that the increases by when hit - /// of an anomalous particle of . - /// - [DataField("severityPerSeverityHit")] - public float SeverityPerSeverityHit = 0.025f; - /// /// The particle type that destabilizes the anomaly. /// [DataField("destabilizingParticleType")] public AnomalousParticleType DestabilizingParticleType; - /// - /// The amount that the increases by when hit - /// of an anomalous particle of . - /// - [DataField("stabilityPerDestabilizingHit")] - public float StabilityPerDestabilizingHit = 0.04f; - /// /// The particle type that weakens the anomalys health. /// [DataField("weakeningParticleType")] public AnomalousParticleType WeakeningParticleType; - /// - /// The amount that the increases by when hit - /// of an anomalous particle of . - /// - [DataField("healthPerWeakeningeHit")] - public float HealthPerWeakeningeHit = -0.05f; - - /// - /// The amount that the increases by when hit - /// of an anomalous particle of . - /// - [DataField("stabilityPerWeakeningeHit")] - public float StabilityPerWeakeningeHit = -0.1f; - #region Points and Vessels /// /// The vessel that the anomaly is connceted to. Stored so that multiple diff --git a/Resources/Prototypes/Catalog/Research/technologies.yml b/Resources/Prototypes/Catalog/Research/technologies.yml index 9db86f498a..59549821ec 100644 --- a/Resources/Prototypes/Catalog/Research/technologies.yml +++ b/Resources/Prototypes/Catalog/Research/technologies.yml @@ -536,6 +536,10 @@ unlockedRecipes: - AnomalyVesselCircuitboard - APECircuitboard + - WeaponPistolCHIMP + - CartridgeAnomalousParticleDelta + - CartridgeAnomalousParticleEpsilon + - CartridgeAnomalousParticleZeta - type: technology name: technologies-robotics-technology diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/magnum.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/magnum.yml index 8c04c664d1..7cec8c1eb5 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/magnum.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/magnum.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml index 90e1457f68..2f13902101 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml index 356935d77b..7f8f69e1d7 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 05ed6926d3..51cd4e7a94 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -236,6 +236,10 @@ - PowerCellSmall - PowerCellMedium - PowerCellHigh + - WeaponPistolCHIMP + - CartridgeAnomalousParticleDelta + - CartridgeAnomalousParticleEpsilon + - CartridgeAnomalousParticleZeta - SynthesizerInstrument - RPED - ClothingShoesBootsMag diff --git a/Resources/Prototypes/Recipes/Lathes/devices.yml b/Resources/Prototypes/Recipes/Lathes/devices.yml index 36b66a7cc4..00adffa50a 100644 --- a/Resources/Prototypes/Recipes/Lathes/devices.yml +++ b/Resources/Prototypes/Recipes/Lathes/devices.yml @@ -63,4 +63,12 @@ completetime: 2 materials: Plastic: 200 - Glass: 150 \ No newline at end of file + Glass: 150 + +- type: latheRecipe + id: WeaponPistolCHIMP + result: WeaponPistolCHIMP + completetime: 5 + materials: + Steel: 500 + Glass: 400 \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Lathes/security.yml b/Resources/Prototypes/Recipes/Lathes/security.yml index fa10006ca9..cc0f870dd7 100644 --- a/Resources/Prototypes/Recipes/Lathes/security.yml +++ b/Resources/Prototypes/Recipes/Lathes/security.yml @@ -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 diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 10b1880985..f80c8482e8 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -94,6 +94,9 @@ - type: Tag id: CartridgeCaselessRifle +- type: Tag + id: CartridgeCHIMP + - type: Tag id: CartridgeHeavyRifle diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base-spent.png b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base-spent.png new file mode 100644 index 0000000000..165c06cfde Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base-spent.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base.png b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base.png new file mode 100644 index 0000000000..c10f0a8c99 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/meta.json new file mode 100644 index 0000000000..8a12710b11 --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/meta.json @@ -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" + } + ] +} diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/overlay.png b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/overlay.png new file mode 100644 index 0000000000..832b60e289 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/overlay.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/base.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/base.png new file mode 100644 index 0000000000..9aff531080 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/base.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/equipped-BELT.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/equipped-BELT.png new file mode 100644 index 0000000000..5a38166c22 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-left.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-left.png new file mode 100644 index 0000000000..547f6f9497 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-left.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-right.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-right.png new file mode 100644 index 0000000000..41aaf68644 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-right.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-1.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-1.png new file mode 100644 index 0000000000..2254251dad Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-1.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-2.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-2.png new file mode 100644 index 0000000000..029a50922a Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-2.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/meta.json new file mode 100644 index 0000000000..e5f6d6c61f --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/meta.json @@ -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 + } + ] +}