From 9caa5a408bcbb4ad6cb732cb0c928e716dbd9617 Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Sun, 18 Feb 2024 17:28:18 +0900 Subject: [PATCH] =?UTF-8?q?=D0=A2=D0=B5=D0=BC=D0=BF=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=82=D1=83=D1=80=D0=BD=D1=8B=D0=B5=20=D0=BF=D1=83=D1=88=D0=BA?= =?UTF-8?q?=D0=B8=20(#90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * - add: Temperature guns. * - tweak: Change cryo sting slowdown. * - tweak: Tempgun tweaks. * - add: Hardsuit temperature adjustment system. --- .../Changeling/ChangelingSystem.Abilities.cs | 12 +-- .../Components/TemperatureComponent.cs | 3 + .../Temperature/Systems/TemperatureSystem.cs | 7 ++ .../ChangeTemperatureOnCollideComponent.cs | 11 +++ .../ChangeTemperatureOnCollideSystem.cs | 30 +++++++ .../ClothingTemperatureAdjustComponent.cs | 11 +++ .../ClothingTemperatureAdjustSystem.cs | 23 ++++++ .../LowTemperatureSlowdownSystem.cs | 52 ++++++++++++ .../Inventory/InventorySystem.Relay.cs | 1 + .../Temperature/TemperatureEvents.cs | 14 ++++ .../TwoModeEnergyAmmoProviderComponent.cs | 6 ++ .../Systems/SharedGunSystem.Interactions.cs | 6 +- Resources/Locale/ru-RU/weapons/ranged/gun.ftl | 2 + Resources/Locale/ru-RU/white/tempgun.ftl | 4 + .../Catalog/Fills/Lockers/security.yml | 11 +++ .../OuterClothing/base_clothingouter.yml | 1 + .../Entities/Mobs/NPCs/simplemob.yml | 4 + .../Weapons/Guns/Projectiles/projectiles.yml | 53 +++++++++++++ .../Entities/Structures/Machines/lathe.yml | 2 + .../Entities/Objects/Weapons/Guns/tempgun.yml | 27 +++++++ .../White/Recipes/lathe_recipes.yml | 9 +++ .../Prototypes/White/Research/arsenal.yml | 11 +++ .../Projectiles/temperature.rsi/cold.png | Bin 0 -> 254 bytes .../Projectiles/temperature.rsi/heat.png | Bin 0 -> 245 bytes .../Projectiles/temperature.rsi/meta.json | 17 ++++ .../Weapons/Guns/Battery/tempgun.rsi/base.png | Bin 0 -> 681 bytes .../Weapons/Guns/Battery/tempgun.rsi/icon.png | Bin 0 -> 681 bytes .../Guns/Battery/tempgun.rsi/inhand-left.png | Bin 0 -> 876 bytes .../Guns/Battery/tempgun.rsi/inhand-right.png | Bin 0 -> 878 bytes .../Battery/tempgun.rsi/laser-inhand-left.png | Bin 0 -> 871 bytes .../tempgun.rsi/laser-inhand-right.png | Bin 0 -> 877 bytes .../Battery/tempgun.rsi/mag-twomode1-0.png | Bin 0 -> 221 bytes .../Battery/tempgun.rsi/mag-twomode1-1.png | Bin 0 -> 112 bytes .../Battery/tempgun.rsi/mag-twomode1-2.png | Bin 0 -> 115 bytes .../Battery/tempgun.rsi/mag-twomode1-3.png | Bin 0 -> 115 bytes .../Battery/tempgun.rsi/mag-twomode1-4.png | Bin 0 -> 115 bytes .../Battery/tempgun.rsi/mag-twomode2-0.png | Bin 0 -> 221 bytes .../Battery/tempgun.rsi/mag-twomode2-1.png | Bin 0 -> 109 bytes .../Battery/tempgun.rsi/mag-twomode2-2.png | Bin 0 -> 113 bytes .../Battery/tempgun.rsi/mag-twomode2-3.png | Bin 0 -> 113 bytes .../Battery/tempgun.rsi/mag-twomode2-4.png | Bin 0 -> 113 bytes .../Guns/Battery/tempgun.rsi/meta.json | 75 ++++++++++++++++++ 42 files changed, 383 insertions(+), 9 deletions(-) create mode 100644 Content.Server/_White/ChangeTemperatureOnCollide/ChangeTemperatureOnCollideComponent.cs create mode 100644 Content.Server/_White/ChangeTemperatureOnCollide/ChangeTemperatureOnCollideSystem.cs create mode 100644 Content.Server/_White/ChangeTemperatureOnCollide/ClothingTemperatureAdjustComponent.cs create mode 100644 Content.Server/_White/ChangeTemperatureOnCollide/ClothingTemperatureAdjustSystem.cs create mode 100644 Content.Server/_White/ChangeTemperatureOnCollide/LowTemperatureSlowdownSystem.cs create mode 100644 Resources/Locale/ru-RU/white/tempgun.ftl create mode 100644 Resources/Prototypes/White/Entities/Objects/Weapons/Guns/tempgun.yml create mode 100644 Resources/Prototypes/White/Research/arsenal.yml create mode 100644 Resources/Textures/White/Objects/Projectiles/temperature.rsi/cold.png create mode 100644 Resources/Textures/White/Objects/Projectiles/temperature.rsi/heat.png create mode 100644 Resources/Textures/White/Objects/Projectiles/temperature.rsi/meta.json create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/base.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/icon.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/inhand-left.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/inhand-right.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/laser-inhand-left.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/laser-inhand-right.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-0.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-1.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-2.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-3.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-4.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-0.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-1.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-2.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-3.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-4.png create mode 100644 Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/meta.json diff --git a/Content.Server/Changeling/ChangelingSystem.Abilities.cs b/Content.Server/Changeling/ChangelingSystem.Abilities.cs index abb30c976c..b837e9a912 100644 --- a/Content.Server/Changeling/ChangelingSystem.Abilities.cs +++ b/Content.Server/Changeling/ChangelingSystem.Abilities.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using Content.Server.Administration.Systems; using Content.Server.Body.Components; using Content.Server.Body.Systems; @@ -11,6 +11,7 @@ using Content.Server.Mind; using Content.Server.Polymorph.Systems; using Content.Server.Popups; using Content.Server.Store.Components; +using Content.Server.Temperature.Components; using Content.Server.Temperature.Systems; using Content.Shared.Actions; using Content.Shared.Changeling; @@ -431,7 +432,8 @@ public sealed partial class ChangelingSystem private void OnCryoSting(EntityUid uid, ChangelingComponent component, CryoStingActionEvent args) { - if (!HasComp(args.Target)) + if (!HasComp(args.Target) || + !TryComp(args.Target, out TemperatureComponent? temperature)) { _popup.PopupEntity(Loc.GetString("changeling-popup-cant-sting"), uid, uid); return; @@ -440,10 +442,8 @@ public sealed partial class ChangelingSystem if (!TakeChemicals(uid, component, 15)) return; - var statusTimeSpan = TimeSpan.FromSeconds(30); - _statusEffectsSystem.TryAddStatusEffect(args.Target, "SlowedDown", statusTimeSpan, false, "SlowedDown"); - - _temperatureSystem.ForceChangeTemperature(args.Target, 100); + _temperatureSystem.ForceChangeTemperature(args.Target, MathF.Min(70, temperature.CurrentTemperature), + temperature); args.Handled = true; } diff --git a/Content.Server/Temperature/Components/TemperatureComponent.cs b/Content.Server/Temperature/Components/TemperatureComponent.cs index ec00a570f9..2fa39a1b29 100644 --- a/Content.Server/Temperature/Components/TemperatureComponent.cs +++ b/Content.Server/Temperature/Components/TemperatureComponent.cs @@ -58,6 +58,9 @@ public sealed partial class TemperatureComponent : Component } } + [DataField, ViewVariables(VVAccess.ReadWrite)] + public bool Slowdown = true; + [DataField, ViewVariables(VVAccess.ReadWrite)] public DamageSpecifier ColdDamage = new(); diff --git a/Content.Server/Temperature/Systems/TemperatureSystem.cs b/Content.Server/Temperature/Systems/TemperatureSystem.cs index 9f7057d9b6..ff3a23fc79 100644 --- a/Content.Server/Temperature/Systems/TemperatureSystem.cs +++ b/Content.Server/Temperature/Systems/TemperatureSystem.cs @@ -155,6 +155,13 @@ public sealed class TemperatureSystem : EntitySystem var heat = temperatureDelta * (airHeatCapacity * heatCapacity / (airHeatCapacity + heatCapacity)); ChangeHeat(uid, heat * temperature.AtmosTemperatureTransferEfficiency, temperature: temperature); + + // WD START + var adjEv = new AdjustTemperatureEvent(temperature.CurrentTemperature); + RaiseLocalEvent(uid, adjEv); + if (!MathHelper.CloseTo(adjEv.Temperature, temperature.CurrentTemperature)) + ForceChangeTemperature(uid, adjEv.Temperature, temperature); + // WD END } public float GetHeatCapacity(EntityUid uid, TemperatureComponent? comp = null, PhysicsComponent? physics = null) diff --git a/Content.Server/_White/ChangeTemperatureOnCollide/ChangeTemperatureOnCollideComponent.cs b/Content.Server/_White/ChangeTemperatureOnCollide/ChangeTemperatureOnCollideComponent.cs new file mode 100644 index 0000000000..2836e07e43 --- /dev/null +++ b/Content.Server/_White/ChangeTemperatureOnCollide/ChangeTemperatureOnCollideComponent.cs @@ -0,0 +1,11 @@ +namespace Content.Server._White.ChangeTemperatureOnCollide; + +[RegisterComponent] +public sealed partial class ChangeTemperatureOnCollideComponent : Component +{ + [DataField, ViewVariables(VVAccess.ReadWrite)] + public float Temperature; + + [DataField] + public string FixtureID = "projectile"; +} diff --git a/Content.Server/_White/ChangeTemperatureOnCollide/ChangeTemperatureOnCollideSystem.cs b/Content.Server/_White/ChangeTemperatureOnCollide/ChangeTemperatureOnCollideSystem.cs new file mode 100644 index 0000000000..05df58c2c3 --- /dev/null +++ b/Content.Server/_White/ChangeTemperatureOnCollide/ChangeTemperatureOnCollideSystem.cs @@ -0,0 +1,30 @@ +using Content.Server.Temperature.Components; +using Content.Server.Temperature.Systems; +using Content.Shared.Atmos; +using Robust.Shared.Physics.Events; + +namespace Content.Server._White.ChangeTemperatureOnCollide; + +public sealed class ChangeTemperatureOnCollideSystem : EntitySystem +{ + [Dependency] private readonly TemperatureSystem _temperature = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnCollide); + } + + private void OnCollide(EntityUid uid, ChangeTemperatureOnCollideComponent component, ref StartCollideEvent args) + { + if (args.OurFixtureId != component.FixtureID) + return; + + if (!TryComp(args.OtherEntity, out TemperatureComponent? temperature)) + return; + + _temperature.ForceChangeTemperature(args.OtherEntity, + MathF.Max(Atmospherics.TCMB, temperature.CurrentTemperature + component.Temperature), temperature); + } +} diff --git a/Content.Server/_White/ChangeTemperatureOnCollide/ClothingTemperatureAdjustComponent.cs b/Content.Server/_White/ChangeTemperatureOnCollide/ClothingTemperatureAdjustComponent.cs new file mode 100644 index 0000000000..a5739c2034 --- /dev/null +++ b/Content.Server/_White/ChangeTemperatureOnCollide/ClothingTemperatureAdjustComponent.cs @@ -0,0 +1,11 @@ +namespace Content.Server._White.ChangeTemperatureOnCollide; + +[RegisterComponent] +public sealed partial class ClothingTemperatureAdjustComponent : Component +{ + [DataField, ViewVariables(VVAccess.ReadWrite)] + public float Rate = 1f; + + [DataField, ViewVariables(VVAccess.ReadWrite)] + public float TargetTemperature = 310.15f; +} diff --git a/Content.Server/_White/ChangeTemperatureOnCollide/ClothingTemperatureAdjustSystem.cs b/Content.Server/_White/ChangeTemperatureOnCollide/ClothingTemperatureAdjustSystem.cs new file mode 100644 index 0000000000..3af17233b9 --- /dev/null +++ b/Content.Server/_White/ChangeTemperatureOnCollide/ClothingTemperatureAdjustSystem.cs @@ -0,0 +1,23 @@ +using Content.Shared.Inventory; +using Content.Shared.Temperature; + +namespace Content.Server._White.ChangeTemperatureOnCollide; + +public sealed class ClothingTemperatureAdjustSystem : EntitySystem +{ + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent>( + OnAdjustTemperature); + } + + private void OnAdjustTemperature(Entity ent, + ref InventoryRelayedEvent args) + { + var delta = ent.Comp.TargetTemperature - args.Args.Temperature; + var rate = Math.Min(ent.Comp.Rate, Math.Abs(delta)); + args.Args.Temperature += Math.Sign(delta) * rate; + } +} diff --git a/Content.Server/_White/ChangeTemperatureOnCollide/LowTemperatureSlowdownSystem.cs b/Content.Server/_White/ChangeTemperatureOnCollide/LowTemperatureSlowdownSystem.cs new file mode 100644 index 0000000000..9c5fc8dada --- /dev/null +++ b/Content.Server/_White/ChangeTemperatureOnCollide/LowTemperatureSlowdownSystem.cs @@ -0,0 +1,52 @@ +using Content.Server.Temperature.Components; +using Content.Server.Temperature.Systems; +using Content.Shared.Movement.Components; +using Content.Shared.Movement.Systems; + +namespace Content.Server._White.ChangeTemperatureOnCollide; + +public sealed class LowTemperatureSlowdownSystem : EntitySystem +{ + [Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifierSystem = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnTemperatureChange); + SubscribeLocalEvent(OnMoveSpeedRefresh); + } + + private void OnMoveSpeedRefresh(EntityUid uid, TemperatureComponent component, + RefreshMovementSpeedModifiersEvent args) + { + var modifier = !component.Slowdown ? 1f : GetSpeedModifier(component.CurrentTemperature); + args.ModifySpeed(modifier, modifier); + } + + private void OnTemperatureChange(EntityUid uid, MovementSpeedModifierComponent component, + OnTemperatureChangeEvent args) + { + // ReSharper disable once CompareOfFloatsByEqualityOperator + if(GetSpeedModifier(args.LastTemperature) == GetSpeedModifier(args.CurrentTemperature)) + return; + + _movementSpeedModifierSystem.RefreshMovementSpeedModifiers(uid, component); + } + + private static float GetSpeedModifier(float temperature) + { + return temperature switch + { + > 290f => 1f, + > 280f => 0.9f, + > 260f => 0.8f, + > 230f => 0.7f, + > 200f => 0.6f, + > 160f => 0.5f, + > 110f => 0.4f, + > 50f => 0.3f, + _ => 0.2f + }; + } +} diff --git a/Content.Shared/Inventory/InventorySystem.Relay.cs b/Content.Shared/Inventory/InventorySystem.Relay.cs index c43a588507..89cb3c61a6 100644 --- a/Content.Shared/Inventory/InventorySystem.Relay.cs +++ b/Content.Shared/Inventory/InventorySystem.Relay.cs @@ -26,6 +26,7 @@ public partial class InventorySystem SubscribeLocalEvent(RelayInventoryEvent); SubscribeLocalEvent(RelayInventoryEvent); SubscribeLocalEvent(RelayInventoryEvent); + SubscribeLocalEvent(RelayInventoryEvent); // WD SubscribeLocalEvent(RelayInventoryEvent); // by-ref events diff --git a/Content.Shared/Temperature/TemperatureEvents.cs b/Content.Shared/Temperature/TemperatureEvents.cs index ac12224868..73ad1a86f2 100644 --- a/Content.Shared/Temperature/TemperatureEvents.cs +++ b/Content.Shared/Temperature/TemperatureEvents.cs @@ -13,3 +13,17 @@ public sealed class ModifyChangedTemperatureEvent : EntityEventArgs, IInventoryR TemperatureDelta = temperature; } } + +// WD START +public sealed class AdjustTemperatureEvent : EntityEventArgs, IInventoryRelayEvent +{ + public SlotFlags TargetSlots => ~SlotFlags.POCKET; + + public float Temperature; + + public AdjustTemperatureEvent(float temperature) + { + Temperature = temperature; + } +} +// WD END diff --git a/Content.Shared/Weapons/Ranged/Components/TwoModeEnergyAmmoProviderComponent.cs b/Content.Shared/Weapons/Ranged/Components/TwoModeEnergyAmmoProviderComponent.cs index bc03fc4aba..f637c1dc94 100644 --- a/Content.Shared/Weapons/Ranged/Components/TwoModeEnergyAmmoProviderComponent.cs +++ b/Content.Shared/Weapons/Ranged/Components/TwoModeEnergyAmmoProviderComponent.cs @@ -40,6 +40,12 @@ public sealed partial class TwoModeEnergyAmmoProviderComponent : BatteryAmmoProv public SoundSpecifier? ToggleSound = new SoundPathSpecifier("/Audio/Weapons/Guns/Misc/egun_toggle.ogg"); [ViewVariables(VVAccess.ReadOnly)] public bool InStun = true; + + [DataField("modeNames")] public Dictionary ModeNames = new() + { + {EnergyModes.Stun, "Stun"}, + {EnergyModes.Laser, "Laser"} + }; } public enum EnergyModes diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs index 1cd3162e0d..749961def2 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs @@ -25,13 +25,13 @@ public abstract partial class SharedGunSystem return; args.PushMarkup(Loc.GetString("gun-twomode-mode-examine", ("color", TwoModeExamineColor), - ("mode", GetLocMode(comp.CurrentMode)))); + ("mode", GetLocMode(comp)))); } } - private object GetLocMode(EnergyModes mode) + private object GetLocMode(TwoModeEnergyAmmoProviderComponent comp) { - return Loc.GetString($"gun-twomode-{mode.ToString()}"); + return Loc.GetString($"gun-twomode-{comp.ModeNames[comp.CurrentMode]}"); } private string GetLocSelector(SelectiveFire mode) diff --git a/Resources/Locale/ru-RU/weapons/ranged/gun.ftl b/Resources/Locale/ru-RU/weapons/ranged/gun.ftl index 8b0a0875f1..5327e8c7e7 100644 --- a/Resources/Locale/ru-RU/weapons/ranged/gun.ftl +++ b/Resources/Locale/ru-RU/weapons/ranged/gun.ftl @@ -54,3 +54,5 @@ gun-speedloader-empty = Спидлоадер пуст gun-twomode-mode-examine = Выбран тип огня [color={ $color }]{ $mode }[/color]. gun-twomode-Stun = шокер gun-twomode-Laser = лазер +gun-twomode-Cool = охлаждение +gun-twomode-Heat = нагрев diff --git a/Resources/Locale/ru-RU/white/tempgun.ftl b/Resources/Locale/ru-RU/white/tempgun.ftl new file mode 100644 index 0000000000..2ccf2cbc10 --- /dev/null +++ b/Resources/Locale/ru-RU/white/tempgun.ftl @@ -0,0 +1,4 @@ +ent-WeaponTempGun = температурная пушка + .desc = Пушка, изменяющая температуру. + +research-technology-temperature-weaponry = Температурное вооружение diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/security.yml b/Resources/Prototypes/Catalog/Fills/Lockers/security.yml index 909c42719e..8754919afd 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/security.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/security.yml @@ -71,6 +71,7 @@ - id: WeaponDisabler - id: HoloprojectorSecurity prob: 0.6 + - id: WeaponTempGun - type: entity id: LockerBrigmedicFilled @@ -235,3 +236,13 @@ contents: - id: WeaponLaserCarbine amount: 3 + +- type: entity + parent: GunSafe + id: GunSafeTempGun + name: temperature gun safe + components: + - type: StorageFill + contents: + - id: WeaponTempGun + amount: 3 diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml index 24672b39b8..4d6a8a4aed 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml @@ -114,6 +114,7 @@ tags: - Hardsuit - WhitelistChameleon + - type: ClothingTemperatureAdjust - type: entity abstract: true diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml index 3be7b3fd9d..ae5efa75e1 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml @@ -63,6 +63,8 @@ - type: MobPrice price: 1000 # Living critters are valuable in space. - type: Perishable + - type: Temperature + slowdown: false - type: entity parent: @@ -106,3 +108,5 @@ price: 150 - type: FloatingVisuals - type: Penetrated + - type: Temperature + slowdown: true diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml index 1310578ef1..8eb5fb26bf 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml @@ -1324,3 +1324,56 @@ - type: Reflective reflective: - Energy + +- type: entity + name: heat beam + id: BulletHeat + parent: BaseBullet + noSpawn: true + components: + - type: FlyBySound + sound: + collection: EnergyMiss + params: + volume: 5 + - type: Sprite + sprite: White/Objects/Projectiles/temperature.rsi + layers: + - state: heat + shader: unshaded + - type: Physics + - type: Fixtures + fixtures: + projectile: + shape: + !type:PhysShapeAabb + bounds: "-0.15,-0.3,0.15,0.3" + hard: false + mask: + - Opaque + fly-by: *flybyfixture + - type: Ammo + muzzleFlash: null + - type: ChangeTemperatureOnCollide + temperature: 20 + - type: Projectile + damage: + types: + Heat: 0 + soundHit: + collection: WeakHit + soundForce: true + +- type: entity + name: cold beam + id: BulletCold + parent: BulletHeat + noSpawn: true + components: + - type: Sprite + sprite: White/Objects/Projectiles/temperature.rsi + layers: + - state: cold + shader: unshaded + - type: ChangeTemperatureOnCollide + temperature: -20 diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index d3c505f845..cdf6ce97b1 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -319,6 +319,7 @@ - ClothingEyesNightVisionGoggles # WD EDIT - KitchenKnife # WD EDIT - ButchCleaver # WD EDIT + - WeaponTempGun # WD EDIT - DeviceQuantumSpinInverter - type: EmagLatheRecipes emagDynamicRecipes: @@ -723,6 +724,7 @@ - WeaponLaserCannon - WeaponLaserCarbine - WeaponXrayCannon + - WeaponTempGun # WD EDIT - PowerCageSmall - PowerCageMedium - PowerCageHigh diff --git a/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/tempgun.yml b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/tempgun.yml new file mode 100644 index 0000000000..7485f1a394 --- /dev/null +++ b/Resources/Prototypes/White/Entities/Objects/Weapons/Guns/tempgun.yml @@ -0,0 +1,27 @@ +- type: entity + name: temperature gun + parent: WeaponEgun + id: WeaponTempGun + description: A gun that changes temperatures. + components: + - type: Sprite + sprite: White/Objects/Weapons/Guns/Battery/tempgun.rsi + - type: Gun + soundGunshot: + path: /Audio/Weapons/Guns/Gunshots/laser.ogg + - type: TwoModeEnergyAmmoProvider + stunPrototype: BulletCold + fireCost: 64 + stunFireCost: 64 + laserPrototype: BulletHeat + laserFireCost: 64 + stunProjectileSpeed: 48 + laserProjectileSpeed: 48 + projSound: "/Audio/Weapons/Guns/Gunshots/laser.ogg" + hitscanSound: "/Audio/Weapons/Guns/Gunshots/laser.ogg" + modeNames: + Stun: Cool + Laser: Heat + - type: BatterySelfRecharger + autoRecharge: true + autoRechargeRate: 20 diff --git a/Resources/Prototypes/White/Recipes/lathe_recipes.yml b/Resources/Prototypes/White/Recipes/lathe_recipes.yml index cb7124a2bd..5cffc8d6c3 100644 --- a/Resources/Prototypes/White/Recipes/lathe_recipes.yml +++ b/Resources/Prototypes/White/Recipes/lathe_recipes.yml @@ -11,6 +11,7 @@ completetime: 5 materials: Steel: 1500 + - type: latheRecipe id: ClothingEyesNightVisionGoggles result: ClothingEyesNightVisionGoggles @@ -21,3 +22,11 @@ Silver: 100 Gold: 100 +- type: latheRecipe + id: WeaponTempGun + result: WeaponTempGun + completetime: 8 + materials: + Steel: 1500 + Glass: 1000 + Silver: 200 diff --git a/Resources/Prototypes/White/Research/arsenal.yml b/Resources/Prototypes/White/Research/arsenal.yml new file mode 100644 index 0000000000..2cd1580ef0 --- /dev/null +++ b/Resources/Prototypes/White/Research/arsenal.yml @@ -0,0 +1,11 @@ +- type: technology + id: TemperatureWeaponry + name: research-technology-temperature-weaponry + icon: + sprite: White/Objects/Weapons/Guns/Battery/tempgun.rsi + state: icon + discipline: Arsenal + tier: 2 + cost: 7500 + recipeUnlocks: + - WeaponTempGun diff --git a/Resources/Textures/White/Objects/Projectiles/temperature.rsi/cold.png b/Resources/Textures/White/Objects/Projectiles/temperature.rsi/cold.png new file mode 100644 index 0000000000000000000000000000000000000000..5b56c42818361b26976e138a31b66bc1f95d1099 GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}J3L(+Ln2y} z6C_xtFidwYn<914r787Mgsyuz%Py-`mJMzVChQNsnU)o;cRHPZ;9-jy0Atm>yWc>?Ui_ zBD3N6JJryu6W=g&JZ#sPwEPBR#)Hq_|4+$Seuwc2!xC!-%^C6ge>Q~9u{-ee0$baJ ya&?IqzT5>zW-#_MonmO+m!2T;Nzp)tf#Ft=#>@2Q8s0!ZFnGH9xvXpfi@Ln2z= zPITmIHV|-~f0sLNiET^zhk$u!j8m?z7Fj4_({MLrf&lkRd0x%R)1F43pRsc>@l|a- zu9|ei)a1_e5ASDk%D7HBFnw)vX>sF$35m<=<}{dg9k_6?*Ox1ud&Y;=2X@(Jaotp7 zaJalJlT~K|%c@;|+6j(=8caVqzI@oQM_l(q=DR7ykq6Rera#@Om*BYNfZ4O_CakZQ tKS-!KbobzjFP{Hcg)PUrZ2-}~OX za|Hck+#{E2ek9I^C|So>3~5r05$<*XhH@?Zh+F9wTxs6kNR*TUd^gL7}O72m?8Wu(iLh z1`c-v;`+u*YA(ztNU&G0&r!eM|3v_Vi-`%L5@WFTS}iJAKijX9vq+tsf#)FVjktsP z0=cPuXqz}Y^VLSX-JwFkqRDbuRt1F&FCIM8F)PKc0cmrhw-p62qyt=;b8ukcNP5E| zee;7TGtuhGJ$f76dTHbUp8&K5Rbk5ca^k3y>Ujj8Yu;cHSYsefebsSg#tw@@P~iKj zH5e{aG`%lI6|o4!$eoZKLUj;|573vMV}TeO)#+(EIy_SE==nxts(>_TFDi$sQ}WUZ z5l=jiPND(R$+P0OK1O;47|vp`D9N+l`{x#rCgxAz;{7Aa1>^$$I|1JT--LQru{FwG P00000NkvXXu0mjf-zG0r literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/icon.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..03aa2a1c2acb63a005273b751aea702c19ca385e GIT binary patch literal 681 zcmV;a0#^NrP))PUrZ2-}~OX za|Hck+#{E2ek9I^C|So>3~5r05$<*XhH@?Zh+F9wTxs6kNR*TUd^gL7}O72m?8Wu(iLh z1`c-v;`+u*YA(ztNU&G0&r!eM|3v_Vi-`%L5@WFTS}iJAKijX9vq+tsf#)FVjktsP z0=cPuXqz}Y^VLSX-JwFkqRDbuRt1F&FCIM8F)PKc0cmrhw-p62qyt=;b8ukcNP5E| zee;7TGtuhGJ$f76dTHbUp8&K5Rbk5ca^k3y>Ujj8Yu;cHSYsefebsSg#tw@@P~iKj zH5e{aG`%lI6|o4!$eoZKLUj;|573vMV}TeO)#+(EIy_SE==nxts(>_TFDi$sQ}WUZ z5l=jiPND(R$+P0OK1O;47|vp`D9N+l`{x#rCgxAz;{7Aa1>^$$I|1JT--LQru{FwG P00000NkvXXu0mjf-zG0r literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/inhand-left.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..a847c0f57c63904526d9ed834e2c57819f7c99ce GIT binary patch literal 876 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|T?1 zr;B4q#hkaZ4th&FiX4l-6cC&&&~w$)qxX{c6fvD?a<`l7w@vvLaVyySYtW|76-OR% zB`vbt;`4mA#mh~e%XZH;Z#4Sscw>Y0?@#yg@4ri#x!$GkG_%6-r;HOGe_}XMSjq5Y zhYdqfj2wfd9)E*%!qOnYzjgZ^{&z+&F8E=-p8v()_Ws4S)$Q#{zrIb~HQoN^f&!;B z)_~YmD{?pNQ!6>BQMdi(k?@J4PBwfkhvu)lmXTgP+phNCA*RN^VitCmlC|!PTcdiT z5@$#r z(0Rnq#=LFLO>2dDcOE?w4n1-9y;*48RnKNm<(|7dOcU?OyH4!tTzBZL!oo9C)?dvO z@I3W9EN&Ou-3zR_Y^8_~t9Jj-WVo>8YP!#w6quA&XMZ_BYB-1Vwui@>9!{O38{ z9Rh8hmvBYCY&dc?@Z|rD)-N^b9Eqj5&Tsvl96mbMHm_Th_|and{nx#H#p3*t|Fvae z<5w?PeO2}2c3~$iT^l)nw|BcI@mtz1i;$S7Z-4F6?AyB=-f>xaujrd$rkW&n@JssR zEdNV);@f;$3vF*~Iv3rR7I3}9Xt0(K7qY~<^8*N#lM++F3n>+ z(#yvD)c$}_%^jDG+i#0RIQeU9^9eefc+G9#Sp_Y>cH+tLs0=a~o&6-)jH{O_;us91cC+ycx#44$rjF6*2UngDY2jtu|+ literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/inhand-right.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..dbcbc9b51b939412cbe08925d94554460b696874 GIT binary patch literal 878 zcmV-!1CjiRP)ad)sw8-#j#z0RYWq06=pY z0MJ|p05q2Y0L^6pKyw)YNp>z4i%!4a&*26s5`eX`?3AB8#o_L*Z}{blZG8B+mq`ed zPEIHQnt!ylh5Et%wQc-eS}4Lj5wawj=j1e7E$9204H*RM?w)>&1TzA_Gw&V@<#L&u z`~%b*4P;H8d3R;v{!)2loL(S#2xP;^SL?Lg8^#mHMsxGSFX1Hz-f2BWN!IW zT$wHm1nZ+0dWzBr03M)fSx!Iy758q{Fh76S9~-zpvL?V6J$-n*=4PJpFWFiZ(hH0 znynfx5Dmcx5M{pGJw>UsAodw|H_d|n)aQ5;Mh`0C*Af+js9n$7x;_ zLr$`v@31qzNIcPk}$uUS+W_0p{=Q4>+th`~q0u)zuHQJ8cm| ztFrhc3hPr~RL@?8G^GSEE`Mi%gutT zF?3Re^(jo_CY$(eP|n{8gvGIGN)xrvLx|07*qoM6N<$ Eg6i##VE_OC literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/laser-inhand-left.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/laser-inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..eea62ffe3e07659791f8016082e35b1231a4a127 GIT binary patch literal 871 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9F5M?jcysy3fA0|T?9 zr;B4q#hkaZ;U09MCuq!KkqFL;(Nn%I6j+VbXuD7Uvk$>0Q?kDoPOCE_W z^_;xD^qh+Dv|OWiIqz6fo;mDJEPwv&-u-j$Qg$wP>O0M>aQrFbgvXy4P83!$JlSEx zP!uD_V5!I7V4bix&fjfuVCO&KjZ6+7^Y6=C{>?A{{5PM!-=rV6!=+;WrZgYooGI#% zyjgGi!*7#aM0+0bN9or1_$V%U?4a@I&%(m#p(N*{Ofb1YiWeNaK1MdZGG|H?fNBpxKF6+FpcJ@E0h^2|FCXV_vCZMG;eD(ka^ z)_nQExYxRBYDehOC6D4_;!YL&q)qmF!|*{yAUK3+$4<#0iM-P@Cx|=ks^~cw!76gJ zSa11+sge_RS{eP6f6MpQJ(y!*gyaT$ZpNeS=jR2fyek&zH(dO%pl;6YiW9&5AO83i zrFJ(XM=eV&A$n*1`#hth`|Be=S}c#5)hAwm?Njva-3_xulcr8EPP#d%Bb4Rz{NB}j zJ+kX1FNq%enqWM!URni5JjqOFcYsIZCbk1@`VO9DbL00cdB1!)ck=8X>}wb!j*2gs zoHcuX=a17Vm#os+8(22#zT*B7o^!DO4!hPeS}pB%uMye# z;+hfTIWC8>rQ7GH4L=sd$2@t4=Ex4DK%nK8_K)LX-Ni)DHR+ok7gK26yAFW6$ezJvPg ud5v55a*O!h+m?P{KhH#Py0zqgpdT79vZHOy`Psmn!{F)a=d#Wzp$P!(#Er55 literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/laser-inhand-right.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/laser-inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..ff78b4fc5e13ff58223cea7ba3c9bc269a579828 GIT binary patch literal 877 zcmV-z1CsoSP)6Y&9fvz-{Cii^qa!L1m%cQvs0Mc9r0BJ4* zfHao@K$^<{AkAd}kmfP~vg}-|)x6PYRH9p?SOE6gBhPyAl8*QHeZz0x?9!L72Ze+% z>)=EJfca-TJJdWn{BIlH>nk;4C!!(=<}oo!>%EG;YYheqv4P) zFNfq_T$I?07Da%-)&mXz{fC#Q&OZqD^sXjD-~h^Z@6h?wJg6m*Ufa7M%?*KY@bv34Lugha- zRTiH`QFRK4>QSqZr<4Ga@^^F)5YW~}_*kvx7P3UuDa@lnMF~JQ6wKd65Q!AoVV{#? z=&XvWQ<%phoB1{<=kEZ5&Y@^Z6+>rHTvU(qZLF`8IDa0>1R$8dce*`ZKVaKysj~Pq zN~%*3=gd=?XMmi)OA$K%tjgk5Qq?Jl{jAkhFR%E1rYFJRLMJ+-%HoxsNm-|mXYE3+ zkHV@fK8>!sPGK&;1!nF1P1GrvA48EaktG3V_KL%s$Dp4Nx%Ni+8JmR~yf+oC`{@9>eP7t0ETl(PP9FL^V4i}&r7g+MI~ z56l!!E?e3^tJz1mA<%?N>s-0}ho}SFr2PUHuUYqM$>Vb&>~D5YG=7>E{&mj(UXTt1 wkYny~wqxG=Y47zH_77?zA167iMMyGiVEXe&x*~M$w;qt7r>mdKI;Vst00y2+-~a#s literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-1.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-1.png new file mode 100644 index 0000000000000000000000000000000000000000..84b5b0b1b43c6355552c03fffbcb81d9d50f9f53 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}TAnVBArY-_ z&lw6bDDbdsh!;4}7j)$EsRs{)SUnjYm>17Ib))n*Bg2P2wmUJ*D-}6}oq)O+JYD@< J);T3K0RSz2ApZaW literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-2.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-2.png new file mode 100644 index 0000000000000000000000000000000000000000..06a3d4ff1e520dff79fe5a87f60336fc33137d90 GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}x}GkMArY-_ z&utWB5D;NKI9Ej;y3^SMXRkg`1Juai M>FVdQ&MBb@0H)U?XaE2J literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-3.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-3.png new file mode 100644 index 0000000000000000000000000000000000000000..5b9e8cb0c359d0b0201c4ce83861d39539e161c3 GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}x}GkMArY-_ z&utWB5D;NKI9o@N M)78&qol`;+0IL}zQvd(} literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-4.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode1-4.png new file mode 100644 index 0000000000000000000000000000000000000000..ee1f8f5007676e967022551315d672a41524bb7e GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}x}GkMArY-_ z&utWB5D;NKI9F7AW$QN Mr>mdKI;Vst0HEn3Y5)KL literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-0.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-0.png new file mode 100644 index 0000000000000000000000000000000000000000..3459d1c82b88827e3f3e227002e04f628ef51552 GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^3P9|@!3HF&`%2dVDb50q$YKTtz9S&aI8~cZ8YtNB z>EaktG3V_KL%s$Dp4Nx%Ni+8JmR~yf+oC`{@9>eP7t0ETl(PP9FL^V4i}&r7g+MI~ z56l!!E?e3^tJz1mA<%?N>s-0}ho}SFr2PUHuUYqM$>Vb&>~D5YG=7>E{&mj(UXTt1 wkYny~wqxG=Y47zH_77?zA167iMMyGiVEXe&x*~M$w;qt7r>mdKI;Vst00y2+-~a#s literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-1.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-1.png new file mode 100644 index 0000000000000000000000000000000000000000..38908909405b7b31b6426abf6c5b9437a4878f37 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}>Ygr+ArY-_ z&oK%DRk3WycZfgSZD_MY_n;8Njb~wBJ%4>?W=QB`SJPphdiB>E8=w{jPgg&ebxsLQ E0G>)8wEzGB literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-2.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-2.png new file mode 100644 index 0000000000000000000000000000000000000000..f8546780b1c3e4fc2b72ddd13387f992bd0b7384 GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}+MX_sArY-_ z&u!#oP~c(NcwgbSkv2pB`)`KsowRT6KSqX%`;784*foD}{p$p3WAJqK Kb6Mw<&;$TftRfBo literal 0 HcmV?d00001 diff --git a/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-3.png b/Resources/Textures/White/Objects/Weapons/Guns/Battery/tempgun.rsi/mag-twomode2-3.png new file mode 100644 index 0000000000000000000000000000000000000000..f983aab80e455ef06f1f7d97da961900d1492e3f GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}+MX_sArY-_ z&u!#oP~c(NcwgbSkv2pB`)`KsowU#TFDt``bv2pB`)`KsowTp?7eB)TTlPJTe1S(){-^`BF?hQA KxvX