Commit Graph

365 Commits

Author SHA1 Message Date
Plykiya
c5ff647ca6 Replace obsolete EntityWhitelist IsValid usages part 2 (#28506) 2024-06-03 17:40:03 -04:00
eoineoineoin
b44b159431 Replace Matrix3 with System.Numerics.Matrix3x2 (#27443)
Replace Matrix3 with Matrix3x2
2024-06-02 14:07:41 +10: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
e3a66136bf Fix the client thinking it cannot shoot after mispredicting when it actually can (#28464) 2024-06-01 02:35:14 -07:00
Nemanja
a1a8f04036 Decouple interactions from hands, cleanup old events, add new fears (#28393)
* ok basic shit

* second part

* pretend it isn't real it can't hurt you.

* 👁️ 👁️

* shadowcommander review
2024-05-31 13:26:19 -07:00
Leon Friedrich
54337911d3 Only auto-enable internals when necessary (#28248)
* Only auto-enable internals when necessary

* Add toxic gas check

* Rename Any -> AnyPositive
2024-05-31 12:28:11 +10:00
Leon Friedrich
d0cf620a85 Fix weapon error logs (#28264) 2024-05-25 13:13:24 +10:00
Nemanja
8a95cb186c Remove AlertType and AlertCategory (#27933) 2024-05-23 22:43:04 -04:00
Leon Friedrich
0f6e1196d8 Use non-generic TryComp() for metadata & transform (#28133) 2024-05-20 22:40:35 -07:00
Leon Friedrich
53213a0200 Fix gun cooldown timespan overflow exception (#28136) 2024-05-19 16:07:45 -06: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
Kara
855234aa30 Resolve 'TransformComponent.MapPosition' is obsolete in content (#27939)
* Resolve `'TransformComponent.MapPosition' is obsolete: 'Use TransformSystem.GetMapCoordinates'` in content

* build?
2024-05-12 10:31:54 -04:00
DrSmugleaf
8b88fe4bb7 Make projectiles not hit crit mobs unless clicked on (#27905) 2024-05-11 11:42:11 -04:00
RiceMar1244
2287f59e8a Adds wielding for all large guns (#26970)
* Adds wielding assets

* Modifies meta.json files and adds artist credit

* Adds wieldable component to a bunch of weapons

* Moves shotgun inhands and wield inhands to their own folders (because its the only way the sprites would work)

* Removes the wieldable component from some guns

* Adds wielding sprites for wieldable guns that didnt have them

* Adds gun wielding bonuses and base innaccuracy to wieldable guns.

* Corrects wielded accuracy to be default accuracy instead of perfect

* Makes the drozd smg and bulldog shotgun wieldable

* Makes nukie c20r wieldable and adds sprites

* Adds BaseGunWieldable

* Makes all the newly wieldable gun use the base inheritable

* Adds accuracy to smgs to resolve inheritance conflict

* Makes all wieldable shotguns require wielding to fire because of a bug involving spread innacuracy

* Adds wield bonus message on examine
2024-05-09 19:58:15 -07:00
deltanedas
d6d1c9ed8a make dragons breathe fire (#26746)
* add ActionGun system

* add RepeatingTrigger

* dragons breath projectile, repeatedly explodes

* give dragon fire breathing action, fireproof it

* oop

* oop 2

* prevent troll

* proper repeating thing

* pro

* webedit ops

* realops

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2024-05-07 17:25:41 -07:00
Hannah Giovanna Dawson
b90373356e Weapon Reflection Movement Mechanic (#27219)
* Weapon Reflection Movement Mechanic

Adds a movement mechanic to deflection.
Standing still gives you your best chance of deflecting a shot.
Moving lowers this to 2/3rds. Sprinting to 1/3rd.

This allows for robust players to express better and provides
counterplay to someone finding a goober-strong deflection
weapon, giving more design space.

As part of this PR I've also touched the numbers of a few swords,
shields, etc. and modified some descriptions to make them read
better. The balance numbers are not remotely final, but as intent:

1. All the sidearm swords (katana, cutlass, captain's sabre) have the same damage. There's no good reason the "ceremonial" blade the captain has doing more damage than a katana.
2. The Captain's Sabre has a 30% reflect chance, dropping to 20% when moving and 10% when sprinting. This one is controversial due to the recent nerf, I suspect: This could easily be 15->10->5?
3. The Energy Katana has a flat 30% reflect chance.
4. The meme Throngler has a 30% reflect chance, dropping to 20% when moving and 10% when sprinting.
5. The E-Sword has a 30% reflect chance, dropping to 20% when moving and 10% when sprinting.
6. The Double E-Sword has a mighty 75% reflect chance, dropping to 50% and then 25%.
7. Both reflective shields - Mirror and Energy - have a 95% deflect chance, dropping to 63% then 31%.

* Resolve PR comments.

* Weh?

* Reign in double esword a tad

* Shield nerfs no longer real

* Improve Mirror Cult desc

* Simple alert for deflection! No art yet.

* Added a new icon for deflecting
2024-05-07 20:14:58 +02: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
Plykiya
0efcd30ac6 Hardsuits, EVA suits, Firesuits, and others now protect your feet from Glass Shards (#26764)
* Hardsuits and softsuits count as having shoes for step triggers

* Add softsuit tag prototype

* Change to suitEVA tag

* Get rid of softsuit tag, found suitEVA tag

* Full pass of ShoesRequiredStepTriggerImmune

* Adds check to outerClothing for ShoesRequiredStepTriggerImmune

* return

* fuck Dionas

* Convert to comp, space dragons immune as well

* Merge conflict

* Merge conflict

* fix leftover tags

* empty spaces

* turns out the dragon didn't need it

* minor optimization

* Add access for system, add comp to baseShoes, check slotflags for every slot besides pockets

* fix

* fuck it we ball

---------

Co-authored-by: Plykiya <plykiya@protonmail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-04-28 17:11:46 +10:00
beck-thompson
afcdc8b866 Fixed gloved weapons being able to attack when not equipped. (#26762)
* Initial commit. No evil hidden files this time :)

* Added newline because I forgot :(

* We <3 tags :)

* Fixed! Works now

* Update Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-04-17 20:10:03 +10:00
Froffy025
a7fad5d439 Wield recoil components (#26915)
* WieldRecoilComponents

* WieldRecoilComponents

* Update Content.Shared/Weapons/Ranged/Components/GunWieldBonusComponent.cs

Co-authored-by: Whisper <121047731+QuietlyWhisper@users.noreply.github.com>

* Update Content.Shared/Weapons/Ranged/Components/GunWieldBonusComponent.cs

---------

Co-authored-by: Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-04-14 20:16:23 +10:00
DrSmugleaf
13cef85a6e Fix rockets and lasers looking like they have nothing loaded (#26933) 2024-04-14 13:17:17 +10:00
Bixkitts
ae8a68b7cd MeleeHitSoundSystem (#25005)
* Began work to unscrew melee noises

* finished

* cleanup

* cleanup

* Update Content.Server/Weapons/Melee/MeleeWeaponSystem.cs

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>

* _Style

* Fix merge

---------

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-03-31 16:21:01 +11:00
Jake Huxell
59e46aab93 Reduced Warning Count By 130 For Full Rebuilds (#26518)
* remove deprecated entity coordinate extension functions. Reduces warning count by approximately 50

* final toCoords Removed

* Remove all unused variables and dead code paths

* remove always true variable, should be a cvar or something instead

* remove superfluous variables from tests
2024-03-29 16:28:16 +11:00
Tayrtahn
964c6d54ca Code cleanup: Purge obsoleted SharedPhysicsSystem methods (#26287)
Updated calls to SharedPhysicsSystem methods
2024-03-25 17:37:25 +11:00
IProduceWidgets
451890b85b Fix admin verb to set unspawned ballisic ammo count (#26411)
Don't crash if an invalid value is given.
2024-03-24 17:45:01 -07: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
nikthechampiongr
362d56981f Simplify DoAfterArgs behavior for movement and distance checks (#25226)
* Merge BreakOnWeightlessMove and BreakOnMove. Provide different theshold for weightless movement.

* Adjust WeightlessMovementThresholds. Put a thing I forgot to put in the doafterargs.

* Make DoAfterArgs only use OnMove to determine whether to check for
movement and MoveThreshold to determine the threshold regardless of
weightlessness. Gave DistanceThreshold a default value which will always
be checked now.

* Fix issue introduced by merge.

* Use interaction system for determining whether a distance is within range

* Fix incorrect doafter args introduced by previous merge.
Forgor to commit these.

* Exorcise ghost.

The execution system should have been deleted when I merged previously.
For a reason I cannot comprehend it came back, but only the execution
system.

* Exorcise ghost Pt. 2

* Allow for movement check to be overriden in zero g and adjust doafter args where needed.

You can now override checking for movement in zero g with the BreakOnWeightlessMove bool. By default it will check.
The following doafters were made to ignore the movement check in zero g:
- Healing yourself with healing items,
- Removing embedded projectiles,
- Using tools like welders and crowbars

* Adjust distance for cuffing/uncuffing to work. Make injections not break on weightless movement.

* Fix evil incorrect and uneeded comments
2024-03-19 21:09:00 +11:00
Mr. 27
3981173a15 Zombie wideswing and misc fix (#26064)
* inital

* b

* Update MeleeWeaponComponent.cs

* Update Content.Shared/Zombies/ZombieComponent.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-03-13 21:02:10 +11:00
metalgearsloth
fc0ff8fb31 Fix gun cycling ammo count update (#25635)
Doesn't update correctly when cycling.
2024-02-27 11:40:19 -05: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
Bixkitts
b98dc66974 MeleeSoundComponent Working With 0 Damage (#24872)
* made hit sound logic potentially better

* Function already tries all fallbacks, no reason to return bool

* NoDamageSound execution path
2024-02-03 12:00:14 +11:00
metalgearsloth
e1901aa6b6 Revert "Make flare gun explode, damage and stun the player when used … (#24679)
* Revert "Make flare gun explode, damage and stun the player when used with the wrong ammo (#22349)"

This reverts commit e301378114.

# Conflicts:
#	Content.Shared/Weapons/Ranged/Components/GunComponent.cs
#	Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/shotgun.yml
#	Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml

* Fix revert conflicts

* Update Content.Shared/Weapons/Ranged/Components/GunComponent.cs
2024-01-29 11:20:34 +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
Ed
a923beb21b Gravity anomaly rework (#24452)
* balance

* gorilla gauntlet fix

* magboots update

* some more buff

* randomwalk speed scales with severity

* nerf

* content

* Revert "content"
2024-01-27 04:15:05 -08: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
LordCarve
c77eb8691d DamageSpecifier Total => GetTotal (#24160)
* DamageSpecifier [Obsolete] Total => GetTotal()

* Remove obsolete Total member from DamageSpecifier.
2024-01-21 18:59:14 -07: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
Kara
818b07ecf8 Destruction & impact sound rework pass 1 (#24282)
* Various sounds ported

* Replace wall_bonk.ogg

* Metal/metalglass break sound pass

* Replace metalbreak.ogg

* Replace woodhit

* Replcae tap.ogg n some smack uses

* Fix lint

* Replace bang.ogg and some instances of hit_kick.ogg

* couple more

* fix wood sound

* i may be stupid

* le attributing

* bro what

* standardize more destruction sounds

* fix melee hit sound cutting off

* window threshold sounds and remove `destroySound` it literally doesnt exist
2024-01-19 10:33:07 -05:00
metalgearsloth
b535909a49 Fix gun bolt crash (#24283)
Deleting non-predicted entities moment.
2024-01-19 21:14:41 +11:00
Veritius
2e83f5a0ec Executions (#24150)
* Execution (you monster)
not done

* woops

* more stuff

* Melee executions

* Prevent executing those who can interact

* Better checks for if you can execute

* Scale the execution time of a knife with its attack speed

* Translations for fucking up an execution

* rename some functions

* Properly scale execution speed of melee weapons

* Fix checks in CanExecuteWithAny

* Allow executing yourself (funny)

* More versatile localisation

* Suicide with guns

* Popups for successful gun executions

* whoops

* Stop flare guns crashing the game on executions

* Various tweaks

* Remove some old usings

* Pacifists can no longer execute

* Remove unnecessary check

* Use CanShoot in gunsystem

* Capitalisation in ftl string

* Fix melee executions not playing a sound

* localisation tweaks
2024-01-17 01:45:45 -07:00
keronshb
2375a6cd1d Moves ShootProjectile to shared (#24007) 2024-01-13 15:52:02 +11:00
Nemanja
5db615af54 Autoattacking weapons (#23765)
auto attacks
2024-01-09 00:25:07 -07: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