Commit Graph

88 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
slarticodefast
a6dce11566 Predict damage examine (#40168)
* predict damage examine

* .

* required true

* nits

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2025-10-10 23:23:26 +00:00
Pieter-Jan Briers
0c97520276 Fix usages of TryIndex() (#39124)
* Fix usages of TryIndex()

Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)

This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)

This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.

Fixes #39115

Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.

* fix tests

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-09-09 18:17:56 +02:00
slarticodefast
2c40a950f7 Trigger Refactor (#39034) 2025-08-03 21:20:37 +02:00
Tayrtahn
4f766f199c Refactor ExaminableDamage (#38978)
* Remove prototype caching in ExaminableDamageComponent

* Replace ExaminableDamagePrototype with LocalizedDatasetPrototype

* Allow null
2025-07-13 21:35:47 -07:00
Tayrtahn
75db49f9c0 Clean up all missing EntitySystem proxy method uses (#38353) 2025-06-26 16:50:49 -07:00
SlamBamActionman
d81e82cef7 Add Diona rooting (#32782)
* Initial commit

* Add sound

* Review commets

* addressing review

* I think this is what Slart meant?

* Review fixes

* More fixes

* tiny formatting

* Review fixes

* Review fixes

* Fix small timing error

* Follow new action system

* review

---------

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Co-authored-by: ScarKy0 <scarky0@onet.eu>
2025-06-04 12:52:59 +02:00
Princess Cheeseballs
9c165cb5a0 StaminaSystem to SharedStaminaSystem (#37199)
* Init Commit

* Partial class

* Hands system slipped through
2025-05-06 12:39:05 -04:00
metalgearsloth
9d03081fda Predict DamagePopup (#36547)
* Predict DamagePopup

Pretty easy one.

* cleanup and localize

* oops

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-04-14 21:10:09 +02: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
IProduceWidgets
fe064adaec Allows pacifists to throw Items with DamageOnLand (#31060) 2025-02-09 20:24:10 -05:00
Moomoobeef
cf0d6c482e ExaminableDamage now puts its message at the bottom and in color (#32820)
* the examineableDamage component now puts its messages at the bottom, and in color

* god help us if something is priority -100 :godo:
2024-11-01 01:21:05 +01:00
Mervill
3414abb970 Remove unused IoC dependency references. (#31704)
Remove unused IoC dependencies
2024-09-01 23:22:50 +02:00
Cojoke
6c3dad4330 Fix Pacified Damage Dealing Thrown Objects (#31183) 2024-08-19 13:56:40 +02:00
Plykiya
6d18dff33d Fix for thrown items dealing damage twice to first target (#30115)
* FUCK YOU

* fine

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-07-18 21:08:52 -04:00
Nemanja
748e5831e8 Add moon boots (#29009) 2024-06-14 20:43:23 -07:00
DrSmugleaf
a7c7cd74ec Fix DamageOtherOnHit.OnDoHit when the target is terminating or deleted (#28690) 2024-06-08 15:53:54 +10:00
Verm
31eb3ed62c Welding tweaks (#27959) 2024-06-02 23:28:53 -04: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
Nemanja
a47c5561a9 add fuel costs back to finishing welding (#27030)
* add fuel costs back to welding

* ack

* meh

* eek!
2024-04-19 19:20:30 -04:00
Dae
e7fda78a18 Damage popup type can now be changed with a left click if allowed via component boolean. (#26734)
* Update DamagePopupSystem.cs

* Update DamagePopupSystem.cs

* Add ability to allow or deny type change via component bool
2024-04-05 03:19:41 -04: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
DrSmugleaf
d79ead6fb1 Make DamageOtherOnHitSystem only flash an entity red if damage was dealt (#23612) 2024-01-06 23:13:01 +11:00
themias
0235b196dc refueling lit welder explosion fix (#23469)
* refueling lit welder explosion fix

* add DamgeOnToolInteract to wall dispenser
2024-01-03 16:23:36 -05:00
metalgearsloth
2166958bd0 AutoCompState + ItemToggle fixes (#23422)
* AutoCompState + ItemToggle fixes

Fix a lot of the comp states that are never actually networked and also cleaned up ItemToggle events a bunch. ItemToggle will still need some future work for lights and sounds.

* Also catch these
2024-01-03 17:24:02 +11:00
Darkie
a3fbab84e6 ItemToggle system expansion (#22369)
* Fixed EnergySword and variants having incorrect sound on attacking when in their Off state.

* Removed the unused ItemToggle from the serverside and created a new shared ItemToggleComponent and System, now used for the e-blade family of items. Also added e-blade hum and swing sounds. Thanks Sloth for the initial code!

* Changing Stunbaton system to include the itemToggle system.

* Adapted changes that have come up in the meantime.

* Changed damagespecifier to be serializable and autoNetworked in melee weapon components. Fixes a bug that makes it so client-side, damage values are not updated on toggle.

* Made the ItemToggleSystem have both a shared and a server component. Ported the Stun Baton and Stun Prod to the new toggleable system. Added a failure to activate noise component.

* Ported the welders to the new item toggle system. Set it so deactivated damage and item size default to the item's regular options.

* Removed unnecessary usings.

* Small modification to the stun prod.

* Made the integration test use the new method to turn the welders on.

* Fixed a few testing issues, applied a few changes requested by Delta.

* Updated Stunbaton code for consistentcy when it comes to calling the itemToggle component.

* Removed a redundant return; as per Delta.
Made examining the stun baton for charge rely on the battery component instead.

* Removed the welder visualizer system, now using the generic one. Removed some unused usings. Removed the welder visuals and layers.
Ported lighters to the new system.
Added zippi (sic) lighters.

* Renamed variables used to make them less generic.

* Simplified the light update code.

* Fixed the unit test to use the itemToggle system for welders now.

* Made the name shorter. I can't tell if the welding damage when interacted with actually does anything though. I can't figure out how to trigger it.

* Fixed some YML issues.

* Added a client side item toggle system just to make the shared code run on local UID's too.

* Fixed some more Yaml.

* Made the Zippi lighter have its own parent item, so it doesnt' conflict with the random pattern on the regular lighter.

* Made the zippi lighter its own in-hand sprites.

* Added a summary for the activated property in itemtoggle component.

* Fixed a typo in the itemToggle Component.

* Fixed a typo.

* Added to the remarks for the ItemToggleComponent.

* Fixed up the lighter yaml to make it use a generic term instead of a toggle layer enum for the random skin.

* Fixed a bug I introduced accidentally with the humming sound.

* Removed 2 unnecessary events from the ItemToggleSystem and component.

* Fixed a bug by only making the server run the item activation code, since the client cannot predict whether or not the activation will be cancelled.

* Cleaned up some names and functions getting called.

* Renamed a couple of variables and removed the explicit datafields from the component. Removed "activated: false" from yml since they're already deactivated by default.

* Added an IsActivated function, used it in the welder and stun baton systems code.
Refactored welder code to remove the WelderToggle event, now using the ItemToggleActivatedEvent instead for eye protection check.

* Fixed a typo. Added some comments.

* Split the ItemToggle into smaller components.
Changed the items that used the toggle system to work with the smaller components.
Made the mirror shield reflect energy shots with a 95% chance.

* Fixed the namespaces for the server components and whatnot.

* Fixed a doubled deactivation sound from using activated wieldable items (like the double Esword).
Fixed wrong yml with the e-dagger.
Fixed the disarm malus code.

* Added the zippo lighter to the detective's trench coat.

* Removed the default hit sound for the double e-sword since it was unnecessary.

* Changed e-sword damage numbers to be in line with the changes made by Emisse.

* Made no damage sounds be autoNetworked, so it changes can be changed on activation/deactivation of items.
Made Welders and Eswords sound like themselves but quieter if they hit for 0 damage, instead of taps.
You can choose what sound to play when a weapon does 0 damage when activated now.
Fixed a bug with swing sounds.

* Typo.

* Fixed a bug where the welder would blind you if you used it while it was off.

* Created a single abstract method called when an item has completed its toggle.

* Update Content.Server/Eye/Blinding/EyeProtection/EyeProtectionSystem.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Fixed a comment.

* Made most component variables readOnly for ItemToggle. There is no need to be able to change them from within the variable viewer.

* Removed trailing white spaces.

* Made the Use a field instead of a property in the itemToggleActivation/Deactivation attempt events.

* Small fixes.

* Removed ForceToggle, just use the toggle method instead.

* Fixed a bug with item sharpness staying even after getting deactivated, if the item gained sharpness that way (esword).

* Used ProtoId in the welder component.

* Made damage NetSerializable as well.

* Added networking and data fields to a couple of components.

* Made component variables autonetworked. Added some comments.

* Moved the events that modify item components on toggle to events, handled (where possible) in the systems linked to said components.

* Made all the component variables readWrite again.

* Added the component get to the WelderStatus.

* Added a predictable bool to the item toggle component.

* Replaced the Activated/Deactivated events with ToggleDone, with an Activated argument. Used that to simplify some systems.

* Added a reflect update raise event.

* Removed the Zippo changes. To add in a later PR.

* Removed the zippo from meta.json too.

* Small fix.

* Another small fix.

* Fixed the wieldable system thing in ItemToggle.

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2023-12-24 17:11:05 +11:00
KP
d0085f9428 Prevent pacified players from throwing dangerous stuff (#22268) 2023-12-11 15:40:22 -08:00
brainfood1183
8be97a20c5 Roller Skates fixes (#21542) 2023-11-08 18:43:27 -07:00
brainfood1183
40b36d1dc5 Roller Skates (#20257)
* adds roller skates

* removed hascomp and changed addcomp to ensurecomp, modified to _random, _stun

* remove icon from type: sprite

* sorted dependencies

* skates no longer added skater component to user, movmeentspeedmodifier and damagehighspeedimpact had access removed.

* fixes

* fixes
2023-11-05 19:42:37 -07: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
Ed
9bb62181de Added fun: Darts (#20582)
* add textures

* fix cargo/cargo-fun.ftl

* fix cargo/cargo-fun.ftl again

* update icons and resize hitbox

* really fixed cargo.ftl

* fix soundSpecifier

* balance changes: solution transfer has been reduced from 2 to 1. Now the transfer does not work on targets wearing anything in the outerclothing slot

* add hypodart to uplink

* return of darts solution capacity to 2u

* Update uplink-catalog.ftl

* Update uplink_catalog.yml

* Update darts.yml

* remove hypodart sprite

* Update darts.yml

* Update fun.yml

* add random popups component, resprite dartboard

* localize darts

* fix

* Update darts.yml
2023-10-18 23:55:30 -04:00
Visne
c7b21b631b Remove unused dependencies (#19490) 2023-08-24 09:55:15 -08:00
DrSmugleaf
35107f7c2b Fix component generic usages where IComponent would not be valid (#19482) 2023-08-24 20:10:55 +10:00
metalgearsloth
a13da27905 Throwing fixes (#18576)
* Throwing fixes

- Status should always be reset.
- ResetDynamics when I meant ResetMassData but didn't matter anyway.

* a
2023-08-14 19:49:59 -04:00
metalgearsloth
0f917d22d7 Color flash effect fixes (#18952) 2023-08-10 10:44:52 -07:00
Slava0135
53db6bc265 Examine throwable damage (#18580) 2023-08-07 19:09:35 +10:00
metalgearsloth
94e2c7a4b0 Fix godmode mispredicts (#18524)
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
2023-08-04 14:53:07 +10:00
Slava0135
86f222be9f Fix damaging thrown item phasing through walls (#18574) 2023-08-02 15:44:27 +03:00
Slava0135
52a60f698f Damage on high speed effect (#18566) 2023-08-02 19:32:44 +10:00
Slava0135
e6159d8581 Damage other on hit player feedback (#18539) 2023-08-02 19:30:04 +10:00
metalgearsloth
68480af109 Update content vectors to numerics (#17759) 2023-07-08 14:08:32 +10:00
LankLTE
82b33bc12a DamageOnHit only damages on successful hits. (#17758) 2023-07-01 12:01:50 -07:00
LankLTE
b10a7da5d8 Guitar Smashing (#17724) 2023-06-29 15:27:08 -04:00
Leon Friedrich
2bd5fb3736 Remove obsolete Fixture.Body references (#16259) 2023-05-09 17:21:26 +10:00
Dawid Bla
b6c2a7ca47 Fixed godmode persisting (#14934) 2023-03-29 10:59:59 +11:00
Kara
48cefca4e4 Godmode refactor (#14651) 2023-03-23 14:57:15 -04:00
metalgearsloth
49c7c0f9a7 Remove stamina + damageable .Owner (#14602)
* Remove stamina + damageable .Owner

* More
2023-03-12 09:19:05 -04:00
metalgearsloth
6c9ce79387 Add lava (#13438) 2023-01-17 11:25:32 -07:00
Jezithyr
eeb5b17b34 Mobstate Refactor (#13389)
Refactors mobstate and moves mob health thresholds to their own component

Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
2023-01-13 16:57:10 -08:00