diff --git a/Content.Server/_White/Explosion/TriggerOnLandComponent.cs b/Content.Server/_White/Explosion/TriggerOnLandComponent.cs new file mode 100644 index 0000000000..7b98d13a38 --- /dev/null +++ b/Content.Server/_White/Explosion/TriggerOnLandComponent.cs @@ -0,0 +1,8 @@ +namespace Content.Server._White.Explosion; + +[RegisterComponent] +public sealed partial class TriggerOnLandComponent : Component +{ + [DataField] + public float Delay = 0.3f; +} diff --git a/Content.Server/_White/Explosion/TriggerOnLandSystem.cs b/Content.Server/_White/Explosion/TriggerOnLandSystem.cs new file mode 100644 index 0000000000..935b270d5f --- /dev/null +++ b/Content.Server/_White/Explosion/TriggerOnLandSystem.cs @@ -0,0 +1,19 @@ +using Content.Server.Explosion.EntitySystems; +using Content.Shared.Throwing; + +namespace Content.Server._White.Explosion; + +public sealed class TriggerOnLandSystem : EntitySystem +{ + [Dependency] private readonly TriggerSystem _timer = default!; + + public override void Initialize() + { + SubscribeLocalEvent(OnLand); + } + + private void OnLand(EntityUid uid, TriggerOnLandComponent component, ref LandEvent args) + { + _timer.HandleTimerTrigger(uid, null, component.Delay, 1, null, null); + } +} diff --git a/Content.Shared/Damage/Systems/StaminaSystem.cs b/Content.Shared/Damage/Systems/StaminaSystem.cs index 883046b38a..1324e4f822 100644 --- a/Content.Shared/Damage/Systems/StaminaSystem.cs +++ b/Content.Shared/Damage/Systems/StaminaSystem.cs @@ -9,6 +9,7 @@ using Content.Shared.Damage.Events; using Content.Shared.Database; using Content.Shared.Effects; using Content.Shared.IdentityManagement; +using Content.Shared.Item.ItemToggle.Components; using Content.Shared.Popups; using Content.Shared.Projectiles; using Content.Shared.Rejuvenate; @@ -258,11 +259,19 @@ public sealed partial class StaminaSystem : EntitySystem return; // Have we already reached the point of max stamina damage? - if (component.Critical) + if (component.Critical) // WD EDIT { - if (TryComp(with, out _)) // WD EDIT + if (TryComp(with, out _)) + { + if (TryComp(with, out var toggle) && !toggle.Activated) + return; _stunSystem.TryParalyze(uid, component.StunTime, true); - return; + if (visual) + _color.RaiseEffect(Color.Aqua, new List() { uid }, Filter.Pvs(uid, entityManager: EntityManager)); + if (_net.IsServer) + _audio.PlayPvs(sound, uid); + return; + } } var oldDamage = component.StaminaDamage; diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/riotgrenadelauncher.txt b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/riotgrenadelauncher.txt new file mode 100644 index 0000000000..557417f1be --- /dev/null +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/riotgrenadelauncher.txt @@ -0,0 +1,5 @@ +- type: entity + name: BaseWeaponLauncher + parent: BaseItem + id: BaseWeaponLauncher + description: A rooty tooty point and shooty. \ No newline at end of file diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/riotgrenadelauncher.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/riotgrenadelauncher.yml new file mode 100644 index 0000000000..9b656dabd2 --- /dev/null +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/riotgrenadelauncher.yml @@ -0,0 +1,147 @@ +- type: entity + name: Riot Launcher + parent: BaseItem + id: RiotWeaponLauncher + description: ShitSec Launcher + components: + - type: Sprite + sprite: White/Objects/Weapons/Guns/Launchers/china_lake-icons.rsi + layers: + - state: icon + map: ["enum.GunVisualLayers.Base"] + - type: Item + sprite: White/Objects/Weapons/Guns/Launchers/china_lake-inhands.rsi + - type: Clothing + sprite: White/Objects/Weapons/Guns/Launchers/china_lake-inhands.rsi + slots: + - Back + - suitStorage + - type: AmmoCounter + - type: Gun + fireRate: 1 + selectedMode: SemiAuto + projectileSpeed: 10 + projectileSpeedModified: 10 + availableModes: + - SemiAuto + soundGunshot: + path: /Audio/Weapons/Guns/Gunshots/grenade_launcher.ogg + - type: BallisticAmmoProvider + whitelist: + tags: + - RiotGrenade + capacity: 1 + proto: RiotGrenadeFlash + soundInsert: + path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg + autoCycle: false + +- type: entity + id: BaseRiotGrenade + name: base riot grenade + parent: BaseItem + abstract: true + components: + - type: Tag + tags: + - RiotGrenade + - type: Item + size: Small + - type: Sprite + +- type: entity + id: RiotGrenadeFlash + name: riot flash grenade + parent: BaseRiotGrenade + components: + - type: CartridgeAmmo + proto: RiotBulletGrenadeFlash + - type: Sprite + sprite: Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi + layers: + - state: blast + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + state: flash + suffix: false + +- type: entity + id: RiotGrenadeSmoke + name: riot smoke grenade + parent: BaseRiotGrenade + components: + - type: CartridgeAmmo + proto: RiotBulletGrenadeSmoke + - type: Sprite + sprite: Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi + layers: + - state: blast + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + state: smoke + suffix: false + +- type: entity + id: BaseBulletRiotGranade + name: base roit granade + abstract: true + components: + - type: MovedByPressure + - type: FlyBySound + - type: Clickable + - type: Sprite + noRot: false + sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi + layers: + - state: grenade + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 20 + mask: + - ItemMask + restitution: 0.3 # fite me + friction: 0.2 + - type: DeleteOnTrigger + - type: Physics + bodyType: Dynamic + - type: TimedDespawn + lifetime: 10 + - type: TriggerOnLand + +- type: entity + id: RiotBulletGrenadeFlash + name: flash riot grenade + parent: BaseBulletRiotGranade + noSpawn: true + components: + - type: Sprite + sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi + layers: + - state: grenade + - type: FlashOnTrigger + range: 7 + forceStun: true + - type: SpawnOnTrigger + proto: GrenadeFlashEffect + +- type: entity + id: RiotBulletGrenadeSmoke + name: smoke riot grenade + parent: BaseBulletRiotGranade + noSpawn: true + components: + - type: Sprite + sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi + layers: + - state: grenade + - type: SmokeOnTrigger + duration: 30 + spreadAmount: 50 + - type: SoundOnTrigger + sound: /Audio/Items/smoke_grenade_smoke.ogg \ No newline at end of file