]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Cleanup ExecutionSystem (#24382)
authornikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Sun, 25 Feb 2024 11:07:10 +0000 (13:07 +0200)
committerGitHub <noreply@github.com>
Sun, 25 Feb 2024 11:07:10 +0000 (22:07 +1100)
commitbcbe2ec1af39ad1fea286fd27a40bc3794a2ce34
tree71d630bf09dd0ae4f6b03672c2a21f90738cd10d
parentec5edc362656440373cba7aa8ef63c87af85911b
Cleanup ExecutionSystem (#24382)

* Creat Execution Component and add to sharp items

* Kill Server ExecutionSystem. Create ExecutionSystem in shared. Create ActiveExecution Component.
Transferred the Execution system into shared. Heavily re-wrote the system in order to reduce duplication,
and remove gun code from the system.
The melee weapon modifier which was dependant on swing rate was removed.

The ActiveExecutionComponent was created in order to apply the damage modifier to the shot from a gun execution.
It is added just before the gun fires and removed after an attempt is made.

* Fix bugs

The execution completed text will now only show up if the gun fires.

The client also no longer crashes because I forgot to network the component.

* Remove clumsy text

* Make BaseSword abstract

* Add ExecutionComponent to every weapon

* Fix bug

* Remove execution comp from battery weapons

Currently the gun system does not have a way to alter hitscan damage like it does with projectiles.

* Cleanup

* Revert "Remove clumsy text"

This reverts commit a46da6448d5d179a4e936f9213d5622bedb58a16.

* Actually fix the ExecutionSystem

Everything about the shot goes through the gun system now.
The Damage multiplier is only applied when a projectile impacts the target so people that get in the way don't get hit
with 9 times damage for no reason.

In order to make suicides work I needed to create fake EntityCoordinates because the gun system and the projectile
system do not play well with a projectile that has the same start and end position.

* Make launchers able to execute

* Fix prediction bug

The OnAmmoShotEvent is only raised on the server.

* Readd ability for clowns to accidentally shoot themselves while executing

* Cleanup

* Reset melee cooldown to initial value

* Address reviews fix bug

Addressed reviews on overriding messages.
Now I actually mark doafters as handled.
Return normal cooldown to some meleeweapons I forgot on the previous commit.

* Address Reviews

Remove duplication

* Exorcise codebase

Remove evil null coercion that I was sure I removed a while ago

* Address reviews again

* Remove melee weapon attack logic and rely on the system. Remove gun and
melee checks.

* Make system functional again and cleanup

* Remove code I forgot to remove

* Cleanup

* stalled

* Selectively revert gun penetration

The collision layer check doesn't work and I don't have time to fix it.

* Fixes

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
27 files changed:
Content.Server/Execution/ExecutionSystem.cs [deleted file]
Content.Server/Projectiles/ProjectileSystem.cs
Content.Server/Weapons/Ranged/Systems/GunSystem.cs
Content.Shared/Execution/ExecutionComponent.cs [new file with mode: 0644]
Content.Shared/Execution/ExecutionSystem.cs [new file with mode: 0644]
Content.Shared/Projectiles/SharedProjectileSystem.cs
Content.Shared/Weapons/Ranged/Events/ShotAttemptedEvent.cs
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs
Resources/Locale/en-US/execution/execution.ftl
Resources/Locale/en-US/kitchen/components/butcherable-component.ftl
Resources/Prototypes/Entities/Objects/Materials/crystal_shard.yml
Resources/Prototypes/Entities/Objects/Materials/shards.yml
Resources/Prototypes/Entities/Objects/Misc/broken_bottle.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/HMGs/hmgs.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Pistols/pistols.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Shotguns/shotguns.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/flare_gun.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/pneumatic_cannon.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/armblade.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/fireaxe.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml