Commit Graph

59 Commits

Author SHA1 Message Date
Tayrtahn
75db49f9c0 Clean up all missing EntitySystem proxy method uses (#38353) 2025-06-26 16:50:49 -07:00
SlamBamActionman
43d08100b9 "New player" admin logging improvements (#35961)
* Initial commit

* Adjust a whoooole bunch of logs

* Also spears

* Track going crit

* Review fix

* Review fixes
2025-03-20 20:56:51 +01:00
SlamBamActionman
3200ba88a5 Add ability for +VVEDIT users to scale damage/healing in the game (#35255)
* Initial commit

* Add universal modifier for all damage/heals, make guidebooks work.

* help text
2025-02-18 08:28:42 +01:00
SlamBamActionman
e58d031300 Hristov & .60 changes - Hristov Rework, Part 2 (#31662)
* Initial commit

* Updated values to reflect new resistances

* Review fixes

* Review fixes

* LINQ BEGONETH
2025-02-04 22:55:09 +01:00
Winkarst
ce672acf91 Fix meteor's ArithmeticException (#33556)
Co-authored-by: Winkarst <74284083+Winkarst-cpu@users.noreply.github.co>
2024-12-05 13:20:27 +01: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
0f6e1196d8 Use non-generic TryComp() for metadata & transform (#28133) 2024-05-20 22:40:35 -07:00
metalgearsloth
d204896bf5 Fix projectiles (#25636) 2024-02-28 00:04:32 +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
LordCarve
c77eb8691d DamageSpecifier Total => GetTotal (#24160)
* DamageSpecifier [Obsolete] Total => GetTotal()

* Remove obsolete Total member from DamageSpecifier.
2024-01-21 18:59:14 -07:00
Arendian
04a8761bb6 decelerator nerf and projectile penetration mini refactor (#24032)
* decelerator nerf and projectile fix

* datafield name difference

* forgot to add component

* missed datafield styling

* comment made summary

* CanPenetrateComponent and CollisionLayer check.

* Small comment changes
2024-01-14 15:39:09 -08:00
Nemanja
aea68b942a Fix PA particles (#23719) 2024-01-07 23:22:46 -07:00
Arendian
3e766402b9 Cluster grenades for uplink and security (#22029)
* clustergrenades go boom

* Small tweaks

* Some tweaks and soaplet

* clustergrenadesystem changes and launcher types

* small tweaks

* typo

* whitespace

* rsi edit

* another typo

* add containers

* Some changes related to merge

* Forgot to change name

* Made changes based on review

* Removed new china lake ammo based on feedback in other PR

* Unneeded nested loop moment

* Nested loop needed after all moment
2023-12-13 22:30:42 -05:00
DrSmugleaf
c72b95db6b Fix debug assert when shooting guns (#21070) 2023-10-18 15:45:35 +11:00
Leon Friedrich
364c9b7f0a DamageableSystem cleanup & performance improvements (#20820) 2023-10-09 03:27:41 +11:00
Kara
f8d194b117 Bows & arrows (#19771) 2023-09-22 02:45:21 -07:00
metalgearsloth
5a0fc68be2 Content update for NetEntities (#18935) 2023-09-11 09:42:41 +10:00
PixelTK
9fef38ab60 Projectile and damage events now include the origin (#19322) 2023-08-27 12:28:59 -04:00
metalgearsloth
735626654a Remove FixtureId (#19280) 2023-08-23 18:55:58 +10:00
metalgearsloth
0f917d22d7 Color flash effect fixes (#18952) 2023-08-10 10:44:52 -07:00
Slava0135
b49f0df05e fix reflected projectiles dealing stamina damage (#17648) 2023-08-06 23:44:41 +10:00
Slava0135
d4c8065e8a Move and rename damage effect to color flash effect (#18263)
* move damage effect to different package

* rename to ColorFlashEffect

* renaming some other things
2023-08-01 19:02:54 +03:00
metalgearsloth
68480af109 Update content vectors to numerics (#17759) 2023-07-08 14:08:32 +10:00
metalgearsloth
347dcfbeb5 Add reflection for crystals (#16426) 2023-05-15 15:21:05 +10:00
metalgearsloth
6417bb4fa0 Proto-kinetic crusher (#16277)
Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
2023-05-14 13:15:18 +10:00
Leon Friedrich
2bd5fb3736 Remove obsolete Fixture.Body references (#16259) 2023-05-09 17:21:26 +10:00
Slava0135
6412289334 Make energy sword reflect projectiles and hitscan shots (#14029) 2023-04-02 23:48:32 +10:00
metalgearsloth
4e2b94199e Bullet flyby sounds (#8317) 2022-05-21 01:04:47 -07:00
wrexbe
bc68ac96dd Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
Vera Aguilera Puerto
a67b846786 Fix deletion check in ProjectileSystem.
Another casualty from the IEntity removal.
2022-03-05 01:29:08 +01:00
Acruid
b3b171da7f ECSatize CameraRecoilSystem (#5448)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2021-12-27 17:50:12 +11:00
Paul
7757b94333 adds a few logitems & bumps bullethit to high/extreme, depending on if a player was hit 2021-12-20 15:17:40 +01:00
Leon Friedrich
7f81f0b8b8 Add more pretty strings to logs (#5768) 2021-12-13 12:22:58 +01:00
Vera Aguilera Puerto
f6371c6e62 Make all current admin logs use ToPrettyString 2021-12-11 16:00:10 +01:00
Vera Aguilera Puerto
c8b65be747 Replace IEntityManager resolves in systems for cached EntityManager 2021-12-08 13:00:43 +01:00
DrSmugleaf
215cae5655 Fix more errors 2021-12-06 00:52:58 +01:00
DrSmugleaf
2a3b7d809d Fix 3000 errors 2021-12-05 18:09:01 +01:00
Vera Aguilera Puerto
5cd42c9ad6 Inline UID 2021-12-03 15:53:09 +01:00
Vera Aguilera Puerto
a5b57c8e10 Inline Transform 2021-12-03 14:20:34 +01:00
Vera Aguilera Puerto
69b270017b Inline TryGetComponent completely, for real 2021-12-03 14:17:01 +01:00
Vera Aguilera Puerto
0feebbff00 Inline HasComponent entirely 2021-12-03 12:23:18 +01:00
Vera Aguilera Puerto
e3227546b3 Inline Delete 2021-12-03 11:43:03 +01:00
Vera Aguilera Puerto
b2035543e2 Inline Deleted 2021-12-03 11:30:03 +01:00
Pieter-Jan Briers
64861ff034 Add Content.Shared.Database (#5588) 2021-11-28 14:56:53 +01:00
Leon Friedrich
0de4b7bc9f Modify damage logging. (#5579) 2021-11-28 14:34:44 +01:00
Moony
c576eb91d3 Adds like 17 new logs (#5499)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2021-11-24 23:52:31 +01:00
Vera Aguilera Puerto
0be5ff829b Gets rid of all ComponentManager usages. (#4707) 2021-09-28 13:35:29 +02:00
Leon Friedrich
df584ad446 ECS damageable (#4529)
* ECS and damage Data

* Comments and newlines

* Added Comments

* Make TryChangeDamageEvent immutable

* Remove SetAllDamage event

Use public SetAllDamage function instead

* Undo destructible mistakes

That was some shit code.

* Rename DamageData to DamageSpecifier

And misc small edits

misc

* Cache trigger prototypes.

* Renaming destructible classes & functions

* Revert "Cache trigger prototypes."

This reverts commit 86bae15ba6616884dba75f552dfdfbe2d1fb6586.

* Replace prototypes with prototype IDs.

* Split damage.yml into individual files

* move get/handle component state to system

* Update HealthChange doc

* Make godmode call Dirty() on damageable component

* Add Initialize() to fix damage test

* Make non-static

* uncache resistance set prototype and trim DamageableComponentState

* Remove unnecessary Dirty() calls during initialization

* RemoveTryChangeDamageEvent

* revert Dirty()

* Fix MobState relying on DamageableComponent.Dirty()

* Fix DisposalUnit Tests.

These were previously failing, but because the async was not await-ed, this never raised the exception.

After I fixed MobState component, this exception stopped happening and instead the assertions started being tested & failing

* Disposal test 2: electric boogaloo

* Fix typos/mistakes

also add comments and fix spacing.

* Use Uids instead of IEntity

* fix merge

* Comments, a merge issue, and making some damage ignore resistances

* Extend DamageSpecifier and use it for DamageableComponent

* fix master merge

* Fix Disposal unit test. Again.

Snapgrids were removed in master

* Execute Exectute
2021-09-14 10:07:37 -07:00
Leon Friedrich
32d99eaba9 Damageable Refactor 3: Revenge of the Instamerge (#4524)
* Add DamageType And DamageGroup Prototypes

* Remove DamageTypePrototype Field "name" as its redundant

* Change I/DamageableComponent to use prototypes

* Update DamageContainer, ReisistanceSet and DamageChangeData

* Change Barotrauma Component to use DamageType from DamageSystem

* Update AsteroidRockComponent

* update some more components

* update some more components

* Fix m o r e c o m p o n e n t s and their damageType

* all thats left is bug/missing node hunting then verification.

* push changes

* update submodule

* Merge fixes

* push DGP for example

* update damagecomponent across shared and server

* fix a few bugs

* Fix Merge issues

* Refactor damageablecomponent update (#4406)

* Fixing merge.

I messed up part of the merge. this should fix it?

* Barotrauma now uses prototypeManager

As System.Runtime.CompilerServices also has a [Dependency], I think I had to use the full path [Robust.Shared.IoC.Dependency]

* FlammableComponent now uses prototypeManager

* SuicideCommands now use prototypeManager

* Changed  many files to use prototypeManager to resolve damaege prototypes

Yeah.... prototype references would be very nice. maybe this was all a waste of time.

* Grouping prototypeManager.Index with datafield definitions

This will make it easier to eventually add prototype references

* removed unused variable

* Moved lines around.

Lines now consistent with other TODO PROTOTYPE blocks

* Grouping more prototypeManager.Index with datafield definitions

* Removed unnecessary code

* Added more prototypeManager indexing

These ones weren't pointed out by DrSmug. But I think this is all of them? That or my regex is shit.

* Remove redundant _damage field

* Remove redundant _currentTemperature

* Moved variables down

* Added prototypeManager indexing to TemperatureComponent

* WeaponComponent/System now use ProtptypeManager

And as far as I can tell damageType is required, and therefore should never have been null anyway?

* Make ranged weapon clumsy fire effects datafields

And yes, the order in which the clumsy effects occur is very important.

* Made damage on vital body part loss a datafield

* Renamed several damageGroup variables to group

* Capitalised DamageListToDamageGroup

* Make radiation and explosion damage types datafields

* Renamed _supportedDamageGroupIDs and _supportedDamageTypeIDs

* Fixed mistakes

Frogot to remove prototypeManager index DamageTypeTrigger, and wrong variable visibility in TemperatureComponent

* Added necessary code

Is something tragically wrong?

* MeleeWeapon damageType is not actually required

* Fixing someone else's mistakes

A search comes up with nothing in the yaml files, and its not a required field. So no one uses it? Hopefully?

* Changed and renamed damageTypeToDamageGroup

Previously would incorrectly return the total container damage for each group, not the total in the group

* renaming varitables

* Renamed variable DamageClasses

* Added dictionary converting functions

* Added ID-keyed dictionaries

* Making MedicalScanner use ID dictionaries, instead of prototype dictionaries

Oh oh no. I've been able to avoid UI & networking up until now. I have no Idea what I am doing.

* Fix Medical Scanner

* Summary (required)

The joke here is that this fixes the empty summary.

* Removed DamageableComponent.GetDamageGroup/Type

* Renamed "damage classes" to groups.

* Update ChangeDamage description

* Replaced Heal() with SettAllDamage()

Heal() was just a confusing name,

* More Class -> Group renaming

* Replace Class with Group in yaml files

DamageClassTrigger does not appear in any yaml? only in testing?
DamageTypeTrigger appears only in human.yaml?
HealthChangeMetabolism is Mostly in medicine.yml and one in soad.yaml

Why the hell is Cola metabolizable by plants? Who is pouring cola on their plants!?!?

* Fix _prototypeManager being null errors.

* Changing comments

Where are the prototype references

* MetabolismComponent doesn't give free heals anymore.

* Changes HungerComponent healing.

Previously I think it would actually damage you.  Only did this as I though it was causing the fast healing. Turns out that was just BREATHING.

* Generalised a function in DamageableComponent and moved it to DamageGroupPrototype

previously DamageTypesDictToDamageGroupDict was private to DamageableComponent, but was also quite general (nearly a static function). As this sort of function may be needed by other components using DamageGroupPrototypes in the future, I moved it there as a static function instead.

* modified DamageableComponent.ChangeDamage()

ignoreResistances was renamed to ignoreDamageResistances to make it clearer that it had no effect on healing.

Now uses default argument for ignoreDamageResistances, so when healing you are not forced to specify an argument that does nothing.

Also made some general changes to ignoreResistances()

* Changed class->group and added missing damage type functionality to DamageContainerPrototypes

* Added Comments to damage.yml

* Misc Changes to DamageableComponent

* Differentiated between group support and group applicability

So far, every damage type is a member of one, and only one, damage group. So this change has no real effect so far.

* Added proposed alternative to ChangeDamage()

* fixed error in DamageGroupPrototype

* Changes to DamageableComponent

Lots of changes to comments.
Some variables renamed in IDamageableComponent and DamageableComponent (also required renaming in other files)

Some minor logic changes, mostly for incorrect descirptions of boolean return values.

Also further differentiating between ApplicableGroups and SupportedGroups... if that will ever even matter

* Generalised MedicalScannerComponent

If needed, can print miscellaneous damage types now

* Fixed HealthChangeMetabolism bug

* Changing Comments around

* More questions

* Made Barotrauma default to blunt

* Fix RejuvenateTest.cs

* Comments

* Coments and variable names

* fix some master-merge issues

* Removed redundant fields

* Misc changes for readbility of PR diff

* Consistent naming

* Fixed atmos damage bug

* Removed Ranting

* Fixed Hunger after I broke it

* Fixing Bugs

* Removed stupid question

* Removed more stupid questions

* Fix potential null errors.

* Made boolean return values consistent

Also renamed several functions, to make it clear they return a bool. Docs were also updated.

* Removed IoCManager.InjectDependencies()

* Removed unnecessary 'suffocation' prefix

* Fixed Spelling

Also removed accidentally left in logger call

* Fixed Medical Scanner

* Apply suggestions from code review

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>

* Changing comments and whitespaces

* Made damage thresholds trigger  datafields required

* So many typos

* Changes to DamageableComponents

Changed documentation in IDamageableComponent

Made testing code more readable.

Relabelled groups as 'Applicable' either 'Fully Supported'

* Removed function and degeneralised

* Update DamageableComponent.cs

Removed unused parameters
Fixed Networking

* Added IoCManager.Resolve

* Now using alternative TryChangeDamage()

* Removed function from DamageGroupPrototype

* Removing comments

* Remove bad if statement?

* Fix damageChanged ordering

* Fix hurt server command

* Changed //TODO PROTOTYPE blocks

Now use PrototypeManager differently. Wherever possible, only retrieve the prototype once.

Also added default damage types to some more datafields

* Update Content.Shared/Damage/Container/DamageContainerPrototype.cs

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>

* renamed _accumulatedHealth -> _accumulatedDamage and added TODOs

* Another class-> group

* Fix bug in generalisation of damage container prototypes

* Addes Tests to make sure I dont keep adding bugs to my own code.

* Changed Return values when setting

* Removed unused class

* Added more tests, split tests into three files

* Made damage types public and VV read-write-able

* Minor changes to DamageableComponent

Replaced internal use of GetDamagePerType with _damageDict and removed some unnecessary fields

* Fix Suicide, by adding IoC Resolve()

* Fix DamageGroupTrigger bug

* Fix typos in tests

* Change comments./docstrings & spacing

* Merge tests, use test prototypes

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

* Fix merge issues

Co-authored-by: Silver <Silvertorch5@gmail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
Co-authored-by: Leon Friedrich <60421075+leonsfriedrich@users.noreply.github.com>
2021-08-24 11:06:27 -06:00