Commit Graph

96 Commits

Author SHA1 Message Date
Hannah Giovanna Dawson
cdbe92d37d Update DamageableSystem to modern standards (#39417)
* Update DamageableSystem to modern standards

* DamageContainerId -> DamageContainerID with lint flag

* Replace strings with protoids

* Make CVar subscription declarations all consistently whitespaced

* ChangeDamage -> TryChangeDamage, cope with C# jank

* Revert event signature changes

* Restore a comment

* Re-add two queries

* Init the queries

* Use appearanceQuery in DamageChanged

* Use damageableQuery in TryChangeDamage

* Use damageableQuery in SetDamageModifierSetId

* Final cleanup, fix sandboxing

* Rectify ExplosionSystem:::ProcessEntity's call to TryChangeDamage

* Re-organize DamageableSystem

* first big fuck you breaking change.

* THATS A LOT OF DAMAGE!!!

* Fix test fails

* test fixes 2

* push it

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-10-27 19:53:04 +00:00
Kyle Tyo
1250b388f3 Mosin be tested, Verin be breaded. (#40957)
* Create WeaponSniperTests.cs

* Update SharedGunSystem.cs

* requested changes.

* Update WeaponTests.cs

* rerun tests

* Update WeaponTests.cs

* Update WeaponTests.cs

* Update Content.IntegrationTests/Tests/Weapons/WeaponTests.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-10-21 15:40:41 +00:00
beck-thompson
492a1aa9c3 Hitscans are now entities (#38035)
* Hitscans are now entities

* Cleanup

* Cleanup

* Silly mistakes but stop sign testing helps :)

* Address most of the review

* Reviews

* perry :(

* Final reviews

* Add comments

* Split event up

* better comment

* cleanup
2025-10-18 05:42:08 +00:00
Callmore
2696fd7cd5 Automatically add trash tag to spent bullet casings (#40829)
* Automatically add trash tag to spent bullet casings

* Resolving comments

* 2

* Update Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/pistol.yml

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-10-12 18:34:20 +00:00
slarticodefast
a4368264f0 Add chasm integration tests (#40286)
* add chasm integration test

* fix assert

* fix

* more fixes

* review
2025-09-17 14:19:46 +10:00
Kyle Tyo
a8e0001f34 Cleanup of resolves and usings. (#39865)
* commit

* commit
2025-08-24 03:29:55 +02:00
Princess Cheeseballs
9de76e70c7 EVENT BASED WEIGHTLESSNESS (#37971)
* Init Commit

* Typos

* Commit 2

* Save Interaction Test Mob from failing

* ssss

* Confident I've gotten all the correct prototypes

* Whoops forgot to edit those

* aaaaa

* Better solution

* Test fail fixes

* Yaml fix

* THE FINAL TEST FIX

* Final fix(?)

* whoops

* Added a WeightlessnessChangedEvent

* Check out this diff

* Wait I'm dumb

* Final optimization and don't duplicate code

* Death to IsWeightless

* File scoped namespaces

* REVIEW

* Fix test fails

* FIX TEST FAILS REAL

* A

* Commit of doom

* borgar

* We don't need to specify on map init apparently

* Fuck it

* LOAD BEARING COMMENT

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-08-19 14:35:09 -04:00
slarticodefast
2c40a950f7 Trigger Refactor (#39034) 2025-08-03 21:20:37 +02:00
Princess Cheeseballs
391dfe4f4a Crawling Fixes 2: Salvage Nerf (NPCs can shoot downed targets) (#39085)
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-07-20 23:23:25 +02:00
Princess Cheeseballs
dec2d42a1d Crawling Part 1: The Knockdownening (#36881)
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: ScarKy0 <scarky0@onet.eu>
2025-07-20 01:54:42 +02:00
KOTOB
f3ce428165 SharedGunSystem spread bugfix (#38960)
two bytes
2025-07-12 23:59:05 -04:00
Tayrtahn
75db49f9c0 Clean up all missing EntitySystem proxy method uses (#38353) 2025-06-26 16:50:49 -07:00
Nemanja
524725d378 HandsSystem Refactor (#38438)
* checkpoint

* pt 2

* pt... i forgot

* pt 4

* patch

* More test fixes

* optimization!!!

* the REAL hand system

* fix RetractableItemActionSystem.cs oversight

* the review

* test

* remove test usage of body prototype

* Update Content.IntegrationTests/Tests/Interaction/InteractionTest.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

* hellcode

* hellcode 2

* Minor cleanup

* test

* Chasing the last of the bugs

* changes

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2025-06-25 15:13:03 +02:00
TGRCDev
79ae7e7abe Fixed stinger grenade lag spikes (#36641)
* Fixed stinger lag spikes

* Simplify nullable checks

* More cleanup of projectile grenades

* Remove null default from ShootProjectile
2025-04-26 04:12:18 +02:00
J
a89af44f56 Weapons warnings cleanup (#36164)
* Weapons warnings cleanup

* Changes to audio on Reflection stuff
2025-04-19 00:28:40 +10:00
Plykiya
96501f4966 Adds popup when firing gun while gun has no ammo (#34816)
* Adds popup when firing gun while gun has no ammo

* simplify

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-03-13 10:21:24 +03:00
slarticodefast
7283f9b6dc fix delta state in SharedGunSystem (#35510) 2025-02-26 22:11:17 +11:00
sleepyyapril
5af13ae807 Fix Double Muzzle Flash (#33981)
* Pass user to effects to properly fix double muzzle flash.

* Use gun when user is null.

* Update MuzzleFlashEvent.cs

* Update MuzzleFlashEvent.cs

* Update GunSystem.cs

* Update SharedGunSystem.cs

* Update MuzzleFlashEvent.cs

* Update SharedGunSystem.cs

* Update SharedGunSystem.cs

* Update Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

---------

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
2025-01-30 14:34:05 +01:00
metalgearsloth
9f4aa1ebe0 Implement some field-level deltas (#28242)
* Update GasTileOverlayState

* Update DecalGridState

* Update NavMapState

* poke

* poke2

* poke3

* Implement field deltas for guns

* Content done

* Update

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2024-12-21 15:54:11 +11:00
MilenVolf
8b154899b5 Allow editing angle of the fired projectile (#33254)
Add Angle datafield to `ProjectileComponent`. It allows to change the angle of the fired projectile
2024-11-12 20:11:02 +01:00
SlamBamActionman
b15d5a7f27 Changes to "Burst" firemode; Drozd, WT550 and C20-r (#31292)
* Initial commit

* Change burst fire variable to be a set value rather than a multiplier
2024-11-06 15:39:16 +01:00
metalgearsloth
b4ec629b9f Fix muzzle flash tracking (#30163)
* Fix muzzle flash tracking

User was never set on the networked event but we don't really need it anyway.

* Also this one
2024-07-21 02:09:16 -04:00
Plykiya
d6ba166d3b Replace obsolete EntityWhitelist IsValid usages (#28465)
* Replace obsolete whitelist is valid with whitelist system

* Consistency

* Fix logic

* Bork

* I figured out how to get whitelists on the client lol

* test fail

* woops

* HELP ME FUNCTIONS

* Fix errors

* simplify

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-06-01 23:10:24 -04:00
DrSmugleaf
f22e5404aa Make failing to fire a gun that requires wielding not delay the next shot (#27973)
Make failing to fire a wield-only gun not delay the next shot
2024-05-13 21:53:47 -07:00
DrSmugleaf
8b88fe4bb7 Make projectiles not hit crit mobs unless clicked on (#27905) 2024-05-11 11:42:11 -04:00
metalgearsloth
5053c8afdb Fix effects (#27533)
* Fix effects

- Fix muzzle flash rotations.
- Fix effects so they update every frame.
- Fix effects tanking client performance.

* Fix merge artifact
2024-05-02 12:40:07 +10:00
Tayrtahn
964c6d54ca Code cleanup: Purge obsoleted SharedPhysicsSystem methods (#26287)
Updated calls to SharedPhysicsSystem methods
2024-03-25 17:37:25 +11:00
Tayrtahn
4a83c36585 Code cleanup: Dirty(Comp) (#26238)
* Replaced uses of Dirty(Component) with Dirty(Uid, Component)
Modified some systems (notably pulling-related) to use uids.

* Missed a few

* Revert changes to pulling

* No
2024-03-19 23:27:02 -04:00
metalgearsloth
a9502be29e Revert "Fix chat bubbles (#25643)" (#25645)
* Revert "Fix chat bubbles (#25643)"

This reverts commit 23d2c4d924.

* Revert "Fixes obsolete Transform warnings in Content. (#25256)"

This reverts commit f284b43ff6.
2024-02-28 00:51:20 +11:00
TemporalOroboros
f284b43ff6 Fixes obsolete Transform warnings in Content. (#25256)
* Fix TransformComponent.MapPosition warnings in Content.Client

* Fix TransformComponent.MapPosition warnings in Content.IntegrationTests

* Fix TransformComponent.MapPosition warnings in Content.Shared

* Fix TransformComponent.MapPosition warnings in Content.Server

* Fix TransformComponent.WorldPosition warnings in Content.Shared

* Fix TransformComponent.WorldPosition warnings in Content.Client
Excepts ClickableComponent b/c that needs to be ECS'd entirely later

* Fix TransformComponent.WorldPosition warnings in Content.Server

* Fix TransformComponent.WorldRotation warnings in Content.*

* Fix TransformComponent.MapPosition warnings I missed

* Fix TransformComponent.WorldMatrix warnings in Content.*

* Fix TransformComponent.InvWorldMatrix warnings in Content.*

* Fix TransformComponent.GetWorldPositionRotationMatrixWithInv warnings in Content.*

* Fix TransformComponent.GetWorldPositionRotationMatrix warnings in Content.*

* Fix TransformComponent.GetWorldPositionRotation warnings in Content.*

* Fix TransformComponent.Anchored.set warnings in Content.*

* Fix TransformComponent.Coordinates.set warnings in Content.*

* Fix TransformComponent.LocalPosition.set warnings in Content.*

* Fix TransformComponent.AttachToGridOrMap warnings in Content.*

* Fix TransformComponent.AttachParent warnings in Content.*

* Preempt TransformComponent.LocalRotation.set warnings in Content.Shared

* Preempt TransformComponent.LocalRotation.set warnings in Content.Client

* Preempt TransformComponent.LocalRotation.set warnings in Content.IntegrationTests

* Preempt TransformComponent.LocalRotation.set warnings in Content.Server

* Fix/Preempt the remaining obsolete TransformComponent properties/methods in Content.*

* ECS ClickableComponent

* Fix obsolete SharedTransformSystem methods in Content.*

* Fix ExplosionOverlay `SharedTransformSystem` dependency

* Maybe fix null eye position breaking tests

* MGS requested changes
2024-02-27 12:06:20 +11:00
Pieter-Jan Briers
e00f74505c Use new ComponentPauseGenerator (#25183)
Also includes some (non critical) changes to the solution file to re-organize the Roslyn components.
2024-02-26 14:36:19 +11:00
metalgearsloth
bb0776c496 Revert "Cleanup ExecutionSystem (#24382)" (#25555)
* Revert "Cleanup ExecutionSystem (#24382)"

This reverts commit bcbe2ec1af.

* Revert "Executions (#24150)"

This reverts commit 2e83f5a0ec.

# Conflicts:
#	Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs
2024-02-25 22:36:17 +11:00
nikthechampiongr
bcbe2ec1af 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>
2024-02-25 22:07:10 +11:00
metalgearsloth
58b55ba06c BatteryWeaponFireModes refactor (#24502)
* BatteryWeaponFireModes refactor

Made the code a bit better but still needs integrating into attachments.

* murder

* Fix serialization

* weh

* weh
2024-01-29 11:09:56 +11:00
DrSmugleaf
4e8b1fb0d3 Add events for GunComponent values, muzzle flashes and cartridge spread (#24077)
* Add a modifier event for GunComponent values

* Add docs

* Add VV readwrite to modified values

* Add more docs

* More docs

* Add Gun parameter to GunRefreshModifiersEvent

* Add another event for handling cartridge spread

* Fix pneumatic speed
2024-01-29 10:32:42 +11:00
Dakamakat
7b2e382929 Use can attach check on shot attempt (#24396)
refactor(SharedGunSystem): use can attach check on shot attempt
2024-01-22 23:15:00 -05:00
metalgearsloth
9bb2781bfc Bunch of revolver fixes (#19649)
* Bunch of revolver fixes

Some stuff wasn't working with prediction so this should fix all of it.

* a

* fix weh

* Also usedelay
2024-01-21 22:16:46 +11:00
Ed
a2d5d74b46 Star Wars 14: Shuttle weapon update (#23644)
* setup codebase

* make auto-fire, but its broken

* collider problem

* fix rate, add toggle port

* add laser

* power cages

* ginormous cells

* fix inhand

* add pirate cannon

* salvage gun

* functional Nuke cannon

* rewrite to standart grenade

* fix naming, add emp sprite

* grenade cartridge

* thruster fix

* nuke cannon

* audio + visual polish

* balance tweak

* tweaks

* laser balance tweak: new Electronic damage modifier set, reduce structural cannon damage

* resprite energy cages, start implementing in game

* fix cage recharger craft

* add small laser gun

* fix colliders

* add  lasers and ptk to research and crafting

* finish implementing weapon to rnd and sec

* some fixes

* splitted grenades and cannon balls

* integrate new cannon balls

* tweaks stick

* move circuits to sectechfab, fix

* fix?

* add ability to E shoot, without signals

* fix!

* fix?!?! and naming tweak

* go!

* Lank fix

* oh

* mornings don't start with coffee.

* the morning starts with bug fixes.

* fucking bugs!

* finally

* it is now possible to craft projectiles separately from cartridges

* +2 fix

* refactor

* piu

* More weight

* add AutoShootGunComponent

* move autoshoot to partial

* SetEnabled()

* some fixes

* remove CanShootWithoutUser field

* remove null-checks ToCoordinates from AttemptShoot()

* war without reason

* return to home

* ?

* forgot remove it

* review

* Fix formatting and update path

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-01-21 19:58:40 +11:00
keronshb
2375a6cd1d Moves ShootProjectile to shared (#24007) 2024-01-13 15:52:02 +11:00
metalgearsloth
cce9bde4cd Fix gun cursor popup spam (#23732) 2024-01-08 23:10:26 +11:00
I.K
dc994f9c66 Improve visibility of gun bolts (#23711)
* add overlay

* ??????
2024-01-07 23:23:41 -07:00
metalgearsloth
269c93245d Unrevert audio (#21330)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2023-11-27 22:12:34 +11:00
metalgearsloth
5b8f3c48c4 Revert "Update submodule to 175.0.0 (#21318)" (#21319) 2023-10-29 15:29:30 +11:00
metalgearsloth
9b1b3e03ed Content audio (#20862) 2023-10-29 14:58:23 +11:00
Nemanja
170e559417 multi-gun nerf (#20194) 2023-09-14 23:15:42 -05:00
deltanedas
c25b769132 fix ninja no guns (#20184)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-09-14 23:12:14 -04:00
metalgearsloth
5a0fc68be2 Content update for NetEntities (#18935) 2023-09-11 09:42:41 +10:00
metalgearsloth
3ab346f471 Remove Ammo component references (#19537) 2023-08-31 14:33:28 -07:00
Errant
cf68d38aaf Dead mobs can no longer shoot guns (#19020)
* dead shooting hotfix

* dead shooting hotfix weh

* AttemptShoot check

* actionblocker check

---------

Co-authored-by: Errant <35878406+errant@users.noreply.github.com>
2023-08-21 14:27:08 -04:00
metalgearsloth
d7abbab082 Add gatherable break sounds (#19360) 2023-08-20 14:05:43 -07:00