diff --git a/Content.Server/Abilities/Firestarter/FirestarterSystem.cs b/Content.Server/Abilities/Firestarter/FirestarterSystem.cs new file mode 100644 index 0000000000..9ad8bdac7c --- /dev/null +++ b/Content.Server/Abilities/Firestarter/FirestarterSystem.cs @@ -0,0 +1,61 @@ +using Content.Shared.Actions.Events; +using Robust.Shared.Containers; +using Robust.Shared.Map; +using Content.Server.Atmos.Components; +using Content.Server.Atmos.EntitySystems; +using Robust.Shared.Audio.Systems; +using Content.Shared.Abilities.Firestarter; + +/// +/// Adds an action ability that will cause all flammable targets in a radius to ignite, also heals the owner +/// of the component when used. +/// +namespace Content.Server.Abilities.Firestarter; + +public sealed class FirestarterSystem : EntitySystem +{ + [Dependency] private readonly EntityLookupSystem _lookup = default!; + [Dependency] private readonly FlammableSystem _flammable = default!; + [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly SharedContainerSystem _container = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnStartFire); + } + + /// + /// Checks Radius for igniting nearby flammable objects . + /// + private void OnStartFire(EntityUid uid, FirestarterComponent component, FireStarterActionEvent args) + { + + if (_container.IsEntityOrParentInContainer(uid)) + return; + + var xform = Transform(uid); + var ignitionRadius = component.IgnitionRadius; + IgniteNearby(uid, xform.Coordinates, args.Severity, ignitionRadius); + _audio.PlayPvs(component.IgniteSound, uid); + + args.Handled = true; + } + + /// + /// Ignites flammable objects within range. + /// + public void IgniteNearby(EntityUid uid, EntityCoordinates coordinates, float severity, float radius) + { + var flammables = new HashSet>(); + _lookup.GetEntitiesInRange(coordinates, radius, flammables); + + foreach (var flammable in flammables) + { + var ent = flammable.Owner; + var stackAmount = 2 + (int) (severity / 0.15f); + _flammable.AdjustFireStacks(ent, stackAmount, flammable); + _flammable.Ignite(ent, uid, flammable); + } + } +} diff --git a/Content.Shared/Abilities/Firestarter/FirestarterComponent.cs b/Content.Shared/Abilities/Firestarter/FirestarterComponent.cs new file mode 100644 index 0000000000..d236b5cba6 --- /dev/null +++ b/Content.Shared/Abilities/Firestarter/FirestarterComponent.cs @@ -0,0 +1,34 @@ +using Robust.Shared.Prototypes; +using Robust.Shared.Audio; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; +using Robust.Shared.GameStates; + +namespace Content.Shared.Abilities.Firestarter; + +/// +/// Lets its owner entity ignite flammables around it and also heal some damage. +/// +[RegisterComponent, NetworkedComponent, Access(typeof(SharedFirestarterSystem))] +public sealed partial class FirestarterComponent : Component +{ + /// + /// Radius of objects that will be ignited if flammable. + /// + [DataField("ignitionRadius")] + public float IgnitionRadius = 4f; + + /// + /// The action entity. + /// + [DataField("fireStarterAction", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string? FireStarterAction = "ActionFireStarter"; + + [DataField("fireStarterActionEntity")] public EntityUid? FireStarterActionEntity; + + + /// + /// Radius of objects that will be ignited if flammable. + /// + [DataField("igniteSound")] + public SoundSpecifier IgniteSound = new SoundPathSpecifier("/Audio/Magic/rumble.ogg"); +} diff --git a/Content.Shared/Abilities/Firestarter/SharedFirestarterSystem.cs b/Content.Shared/Abilities/Firestarter/SharedFirestarterSystem.cs new file mode 100644 index 0000000000..5e4d4347d1 --- /dev/null +++ b/Content.Shared/Abilities/Firestarter/SharedFirestarterSystem.cs @@ -0,0 +1,22 @@ +using Content.Shared.Actions; + +namespace Content.Shared.Abilities.Firestarter; + +public sealed class SharedFirestarterSystem : EntitySystem +{ + [Dependency] private readonly SharedActionsSystem _actionsSystem = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnComponentInit); + } + + /// + /// Adds the firestarter action. + /// + private void OnComponentInit(EntityUid uid, FirestarterComponent component, ComponentInit args) + { + _actionsSystem.AddAction(uid, ref component.FireStarterActionEntity, component.FireStarterAction, uid); + } +} diff --git a/Content.Shared/Actions/Events/FireStarterActionEvent.cs b/Content.Shared/Actions/Events/FireStarterActionEvent.cs new file mode 100644 index 0000000000..21a2acbb1b --- /dev/null +++ b/Content.Shared/Actions/Events/FireStarterActionEvent.cs @@ -0,0 +1,10 @@ +namespace Content.Shared.Actions.Events; + +public sealed partial class FireStarterActionEvent : InstantActionEvent +{ + /// + /// Increases the number of fire stacks when a flammable object is ignited. + /// + [ViewVariables(VVAccess.ReadWrite)] + public float Severity = 0.3f; +} diff --git a/Resources/Audio/Effects/Footsteps/attributions.yml b/Resources/Audio/Effects/Footsteps/attributions.yml index ef91a34d36..756f8c8408 100644 --- a/Resources/Audio/Effects/Footsteps/attributions.yml +++ b/Resources/Audio/Effects/Footsteps/attributions.yml @@ -33,6 +33,12 @@ copyright: "Taken and modified from tgstation (clownstep 1 and 2) by brainfood1183 (github)" source: "https://github.com/tgstation/tgstation/tree/f8ee37afc00bce1ad421615eaa0e4cbddd5eea90/sound/effects" +- files: + - largethud.ogg + license: "CC0-1.0" + copyright: "Made by philRacoIndie freesound.org, modified by brainfood1183 (github)" + source: "https://freesound.org/people/philRacoIndie/sounds/512483/" + - files: - snake1.ogg - snake2.ogg diff --git a/Resources/Audio/Effects/Footsteps/largethud.ogg b/Resources/Audio/Effects/Footsteps/largethud.ogg new file mode 100644 index 0000000000..b9983d6159 Binary files /dev/null and b/Resources/Audio/Effects/Footsteps/largethud.ogg differ diff --git a/Resources/Audio/Magic/attributions.yml b/Resources/Audio/Magic/attributions.yml index 9efaf8ff91..cedda32286 100644 --- a/Resources/Audio/Magic/attributions.yml +++ b/Resources/Audio/Magic/attributions.yml @@ -1,3 +1,8 @@ +- files: [rumble.ogg] + copyright: "Made by Uzbazur freesound.org, modified by brainfood1183 (github)" + license: "CC-BY-4.0" + source: "https://freesound.org/people/Uzbazur/sounds/221872/" + - files: [fireball.ogg] copyright: '"fireball.ogg" by /tg/station' license: CC-BY-SA-3.0 @@ -15,4 +20,3 @@ copyright: '"ForceWall.ogg", "Knock.ogg", and "blink.ogg" by Citadel Station 13' license: CC-BY-SA-3.0 source: https://github.com/Citadel-Station-13/Citadel-Station-13/commit/35a1723e98a60f375df590ca572cc90f1bb80bd5 - diff --git a/Resources/Audio/Magic/rumble.ogg b/Resources/Audio/Magic/rumble.ogg new file mode 100644 index 0000000000..3271e9dd93 Binary files /dev/null and b/Resources/Audio/Magic/rumble.ogg differ diff --git a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl index 37e7d2e2ea..a42ce6df56 100644 --- a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl +++ b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl @@ -188,6 +188,10 @@ ghost-role-information-loneop-rules = You are a syndicate operative tasked with ghost-role-information-behonker-name = Behonker ghost-role-information-behonker-description = You are an antagonist, bring death and honks to those who do not follow the honkmother. + +ghost-role-information-hellspawn-name = Hellspawn +ghost-role-information-hellspawn-description = You are an antagonist, bring death to those who do not follow the great god Nar'Sie. + ghost-role-information-Death-Squad-name = Death Squad Operative ghost-role-information-Death-Squad-description = One of Nanotrasen's top internal affairs agents. Await orders from CentComm or an official. diff --git a/Resources/Prototypes/Actions/types.yml b/Resources/Prototypes/Actions/types.yml index 8151cf422e..f301589879 100644 --- a/Resources/Prototypes/Actions/types.yml +++ b/Resources/Prototypes/Actions/types.yml @@ -291,6 +291,18 @@ event: !type:ActivateImplantEvent useDelay: 1 +- type: entity + id: ActionFireStarter + name: Ignite + description: Ignites enemies in a radius around you. + noSpawn: true + components: + - type: InstantAction + priority: -1 + useDelay: 30 + icon: Interface/Actions/firestarter.png + event: !type:FireStarterActionEvent + - type: entity id: ActionToggleEyes name: Open/Close eyes @@ -302,3 +314,4 @@ iconOn: Interface/Actions/eyeclose.png event: !type:ToggleEyesActionEvent useDelay: 1 # so u cant give yourself and observers eyestrain by rapidly spamming the action + diff --git a/Resources/Prototypes/Damage/modifier_sets.yml b/Resources/Prototypes/Damage/modifier_sets.yml index 71871405c3..92ba63d4eb 100644 --- a/Resources/Prototypes/Damage/modifier_sets.yml +++ b/Resources/Prototypes/Damage/modifier_sets.yml @@ -237,6 +237,14 @@ Radiation: 0.2 Caustic: 0.0 +- type: damageModifierSet + id: HellSpawn + coefficients: + Heat: 0.0 + Radiation: 0.0 + Shock: 0.8 + Bloodloss: 0.4 + - type: damageModifierSet id: Cockroach coefficients: diff --git a/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml b/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml index 12f735e14d..b794d5a4f9 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml @@ -778,7 +778,22 @@ - type: ConditionalSpawner prototypes: - MobPenguin - + + +- type: entity + name: Hellspawn Spawner + id: SpawnMobHellspawn + parent: MarkerBase + components: + - type: Sprite + layers: + - state: green + - state: hellspawn + sprite: Markers/mobs.rsi + - type: ConditionalSpawner + prototypes: + - MobHellspawn + - type: entity name: ore crab spawner id: SpawnMobOreCrab diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/hellspawn.yml b/Resources/Prototypes/Entities/Mobs/NPCs/hellspawn.yml new file mode 100644 index 0000000000..5511c40baa --- /dev/null +++ b/Resources/Prototypes/Entities/Mobs/NPCs/hellspawn.yml @@ -0,0 +1,99 @@ +- type: entity + name: hellspawn + parent: + - BaseSimpleMob + - MobCombat + - MobBloodstream + id: MobHellspawn + description: An unstoppable force of carnage. + components: + - type: GhostRole + allowMovement: true + makeSentient: true + name: ghost-role-information-hellspawn-name + description: ghost-role-information-hellspawn-description + - type: RotationVisuals + defaultRotation: 90 + horizontalRotation: 90 + - type: GhostTakeoverAvailable + - type: HTN + rootTask: + task: SimpleHostileCompound + - type: NpcFactionMember + factions: + - SimpleHostile + - type: Body + prototype: Animal + - type: Damageable + damageContainer: Biological + damageModifierSet: HellSpawn + - type: MovementSpeedModifier + baseWalkSpeed: 2 + baseSprintSpeed: 3 + - type: Sprite + sprite: Mobs/Demons/hellspawn.rsi + layers: + - map: [ "enum.DamageStateVisualLayers.Base" ] + state: alive + - type: DamageStateVisuals + states: + Alive: + Base: alive + Dead: + Base: dead + - type: Firestarter + - type: NameIdentifier + group: GenericNumber + - type: SlowOnDamage + speedModifierThresholds: + 60: 0.7 + 80: 0.5 + - type: MobPrice + price: 1000 # Living critters are valuable in space. + - type: Perishable + - type: Reflect + reflectProb: 0.7 + reflects: + - Energy + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeCircle + radius: 0.9 + density: 300 + mask: + - MobMask + layer: + - MobLayer + - type: MobState + - type: Tag + tags: + - CannotSuicide + - DoorBumpOpener + - FootstepSound + - type: MobThresholds + thresholds: + 0: Alive + 450: Dead + - type: Butcherable + spawned: + - id: ArtifactFragment + amount: 4 + - type: MeleeWeapon + attackRate: 0.6 + hidden: true + soundHit: + path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg + damage: + types: + Blunt: 150 + Structural: 70 + - type: FootstepModifier + footstepSoundCollection: + collection: FootstepThud + - type: PointLight + radius: 2 + energy: 4.5 + color: "#ff4242" + castShadows: false diff --git a/Resources/Prototypes/SoundCollections/footsteps.yml b/Resources/Prototypes/SoundCollections/footsteps.yml index e5b7210262..296e638650 100644 --- a/Resources/Prototypes/SoundCollections/footsteps.yml +++ b/Resources/Prototypes/SoundCollections/footsteps.yml @@ -159,6 +159,11 @@ - /Audio/Effects/Footsteps/clownspiderstep1.ogg - /Audio/Effects/Footsteps/clownspiderstep2.ogg +- type: soundCollection + id: FootstepThud + files: + - /Audio/Effects/Footsteps/largethud.ogg + - type: soundCollection id: FootstepSnake files: diff --git a/Resources/Textures/Interface/Actions/firestarter.png b/Resources/Textures/Interface/Actions/firestarter.png new file mode 100644 index 0000000000..8371191de1 Binary files /dev/null and b/Resources/Textures/Interface/Actions/firestarter.png differ diff --git a/Resources/Textures/Interface/Actions/meta.json b/Resources/Textures/Interface/Actions/meta.json index 1779d2e9ca..886484c333 100644 --- a/Resources/Textures/Interface/Actions/meta.json +++ b/Resources/Textures/Interface/Actions/meta.json @@ -19,6 +19,9 @@ { "name": "disarm" }, + { + "name": "firestarter" + }, { "name": "harm" }, diff --git a/Resources/Textures/Markers/mobs.rsi/hellspawn.png b/Resources/Textures/Markers/mobs.rsi/hellspawn.png new file mode 100644 index 0000000000..0dc77889be Binary files /dev/null and b/Resources/Textures/Markers/mobs.rsi/hellspawn.png differ diff --git a/Resources/Textures/Markers/mobs.rsi/meta.json b/Resources/Textures/Markers/mobs.rsi/meta.json new file mode 100644 index 0000000000..611deb0b18 --- /dev/null +++ b/Resources/Textures/Markers/mobs.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "hellspawn made by rainfood1183 (github)", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "hellspawn" + } + ] +} diff --git a/Resources/Textures/Mobs/Demons/hellspawn.rsi/alive.png b/Resources/Textures/Mobs/Demons/hellspawn.rsi/alive.png new file mode 100644 index 0000000000..9f954e82dc Binary files /dev/null and b/Resources/Textures/Mobs/Demons/hellspawn.rsi/alive.png differ diff --git a/Resources/Textures/Mobs/Demons/hellspawn.rsi/dead.png b/Resources/Textures/Mobs/Demons/hellspawn.rsi/dead.png new file mode 100644 index 0000000000..75e952c4cf Binary files /dev/null and b/Resources/Textures/Mobs/Demons/hellspawn.rsi/dead.png differ diff --git a/Resources/Textures/Mobs/Demons/hellspawn.rsi/meta.json b/Resources/Textures/Mobs/Demons/hellspawn.rsi/meta.json new file mode 100644 index 0000000000..060526ee3b --- /dev/null +++ b/Resources/Textures/Mobs/Demons/hellspawn.rsi/meta.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "size": { + "x": 64, + "y": 64 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Made by brainfood1183 (github) for ss14", + "states": [ + { + "name": "dead" + }, + { + "name": "alive", + "directions": 4 + } + ] +} \ No newline at end of file