Commit Graph

58 Commits

Author SHA1 Message Date
SlamBamActionman e4e238f7b0 "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-23 16:17:16 +00:00
SlamBamActionman e773d33e31 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-03-01 13:35:33 +00:00
SlamBamActionman e0619d96b1 Hristov & .60 changes - Hristov Rework, Part 2 (#31662)
* Initial commit

* Updated values to reflect new resistances

* Review fixes

* Review fixes

* LINQ BEGONETH
2025-02-14 16:09:58 +00:00
Winkarst 566e840e70 Fix meteor's ArithmeticException (#33556)
Co-authored-by: Winkarst <74284083+Winkarst-cpu@users.noreply.github.co>
2024-12-07 22:02:39 +00:00
Leon Friedrich 65a712700c
Only auto-enable internals when necessary (#28248)
* Only auto-enable internals when necessary

* Add toxic gas check

* Rename Any -> AnyPositive
2024-06-01 17:55:05 +02:00
Leon Friedrich 74308b008f
Use non-generic `TryComp()` for metadata & transform (#28133) 2024-06-01 16:53:51 +02:00
metalgearsloth 0c65749187
Fix projectiles (#25636)
(cherry picked from commit d204896bf57fe6a9e90ae276d16c282bf0037126)
2024-03-07 01:03:19 +01:00
Debug b1958e9ac6
Revert "Cleanup ExecutionSystem (#24382)"
This reverts commit dc56c5992f.
2024-03-07 00:51:07 +01:00
nikthechampiongr dc56c5992f
Cleanup ExecutionSystem (#24382) 2024-03-05 09:55:50 +01:00
LordCarve 3dfd479199
DamageSpecifier Total => GetTotal (#24160)
* DamageSpecifier [Obsolete] Total => GetTotal()

* Remove obsolete Total member from DamageSpecifier.

(cherry picked from commit c77eb8691dc08d384a88ddaf3b734f7777d741b5)
2024-01-27 23:42:35 +01:00
Arendian deaeb6dff3
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

(cherry picked from commit 04a8761bb6c0a12fc8f07ccf3a24615c8bb8b591)
2024-01-26 22:51:16 +01:00
Nemanja 9a43fd6a75
Fix PA particles (#23719)
(cherry picked from commit aea68b942ab8373f0f18b99ee702a4ebb087215d)
2024-01-26 22:11:46 +01:00
Arendian 2ace099252 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-16 20:19:56 +01:00
DrSmugleaf 626ee38ecb Fix debug assert when shooting guns (#21070) 2023-10-20 15:30:20 +02:00
Leon Friedrich 549a7fe891 DamageableSystem cleanup & performance improvements (#20820) 2023-10-08 19:58:57 +02:00
Kara b8f401d664 Bows & arrows (#19771) 2023-09-27 21:59:12 +02:00
metalgearsloth c9648da984 Content update for NetEntities (#18935) 2023-09-27 21:59:12 +02: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
Silver e708091518
Revert "Refactor Damage to use Protoypes (#4262)"
This reverts commit 20bf5739a9.
2021-08-24 01:06:32 -06:00