Commit Graph

148 Commits

Author SHA1 Message Date
keronshb
f885075d2e DoAfter support for Actions (#38253)
* Adds Action DoAfter Events

* Adds DoAfterArgs fields to DoAfterComp

* Adds a base doafter action

* Adds Attempt action doafter logic

* Adds doafter logic to actions

* Changes Action Attempt Doafter and action doafter to take in Performer and the original use delay. Use delay now triggers when a repeated action  is cancelled.

* Readds the TryPerformAction method and readds request perform action into the action doafter events

* Adds a force skip to DoAfter Cancel so we can skip the complete check

* Adds a Delay Reduction field to the comp and to the comp state

* Fixes doafter mispredict, changes doafter comp check to a guard clause, sets delay reduction if it exists.

* Cancels ActionDoAfter if charges is 0

* Serializes Attempt Frequency

* Comment for rework

* Changes todo into a comment

* Moves doafterargs to doafterargscomp

* Adds DoAfterArgs comp to BaseDoAfterAction

* Removes unused trycomp with actionDoAfter

* Replaces DoAfterRepateUseDelay const with timespan.zero

* Removes unused usings

* Makes SharedActionsSystem partial, adds DoAfter partial class to ActionSystem, moves ActionDoAfter logic to the SharedActionsSystem.DoAfter class

* Cleanup and prediction

* Renames OnActionDoAfterAttempt to OnActionDoAfter, moves both to Shared Action DoAfter

* Removes ActionAttemptDoAfterEvent and moves its summaries to ActionDoAfterEvent. Converts OnActionDoAfterAttempt into TryStartActionDoAfter

* Removes Extra check for charges and actiondoafters

* Sloptimization

* Cleanup

* Cleanup

* Adds param descs

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-09-08 12:55:13 +03:00
slarticodefast
d1916fa4d3 Revert "Fix: Untoggle removed actions" (#39776)
Revert "Fix: Untoggle removed actions (#39526)"

This reverts commit e90fac14eb.
2025-08-20 09:33:14 -07:00
Winkarst-cpu
e90fac14eb Fix: Untoggle removed actions (#39526)
* Fix

* Update Content.Shared/Actions/SharedActionsSystem.cs

Co-authored-by: LaCumbiaDelCoronavirus <90893484+LaCumbiaDelCoronavirus@users.noreply.github.com>

---------

Co-authored-by: LaCumbiaDelCoronavirus <90893484+LaCumbiaDelCoronavirus@users.noreply.github.com>
2025-08-19 15:30:55 -07:00
DrSmugleaf
21eb662377 Fix ActionsSystem.IsCooldownActive always returning false if curTime is null (#39329) 2025-08-03 00:59:48 +02:00
Perry Fraser
1ee7dffe6d fix: fix non-access checking EntityTargetActions (#38731) 2025-07-22 21:34:39 +02:00
Голубь
114ec579f5 JumpBoots Attempt №2 (#36862)
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Co-authored-by: unknown <wainzor1337@gmail.com>
Co-authored-by: ScarKy0 <scarky0@onet.eu>
2025-07-07 21:19:28 +02:00
B_Kirill
7ea3120a07 Cleanup warnings: CS0414 (#38793)
Cleanup
2025-07-06 12:28:29 +02:00
Tayrtahn
75db49f9c0 Clean up all missing EntitySystem proxy method uses (#38353) 2025-06-26 16:50:49 -07:00
Tayrtahn
c1de936c4b Forbid string literals for SharedActionsSystem methods (#38472)
Forbid string literals for SharedActionsSystem methods
2025-06-21 00:11:12 +02:00
slarticodefast
5a69b7e2fb Merge stable into master (#38395) 2025-06-17 17:25:30 +02:00
slarticodefast
d25046461e Fix SharedActionSystem spamming errors (#38358) 2025-06-17 15:18:13 +10:00
ScarKy0
4cc6cb95dc Commands for adding and removing actions (#38317) 2025-06-16 13:25:44 +03:00
deltanedas
7aa1986209 fix dragon devour action (#37968)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2025-05-31 22:29:51 +02:00
DrSmugleaf
b86c1ea01d Allow actions to specify if they want to rotate the user when targeting (#37958) 2025-05-30 08:56:16 -04:00
Princess Cheeseballs
f6c9ef344e [Action Refactor Fix] Action blockers now work on Actions (#37948) 2025-05-30 00:30:26 -04:00
deltanedas
b3825dce97 action refactor proper ecs edition (#27422) 2025-05-28 15:52:11 -04:00
J
ded94ebc3d Various sharedsystem spring cleaning (#36200)
* Various shared system warnings cleanup

* More shared system warnings cleanup

* Rearranging changes

* Using correct transform for unbuckle

* Small changes

* Revert buckle change

* Update Content.Shared/Ghost/SharedGhostSystem.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-04-21 20:40:31 +02:00
metalgearsloth
8ab0e59db6 Refactor disarms (#36546)
* Refactor disarms

- Move client stuff to shared
- Cleanup a bunch of stuff
- Ref events
- Fix the swing sound mispredict (I noticed it on target dummies).

* Revert this change

* minor review

* Rebiew

---------

Co-authored-by: Milon <milonpl.git@proton.me>
2025-04-19 11:38:22 +10:00
metalgearsloth
7d2ef2bd47 Action charges refactor (#33993)
* Action charges refactor

- Fixes the slight godmoding of baseactioncomponent.
- Gets back 1ms of server time.

* chorg

* Remove FrameUpdate

* Fixes

* More fixes

* Combine

* Fixes

* Updates

* weh

* Last fixes

* weh

* Fix naughty

* YAML fixes

* This one too

* Merge conflicts

* This thing

* Review

* Fix this as well

* Icon fix

* weh

* Review

* Review

* seamless

* Review
2025-04-18 13:45:48 +10:00
ActiveMammmoth
9fad86342f Wizard Staff of Animation (#34649) 2025-02-12 23:46:02 -05:00
ScarKy0
bf6fd4d581 Wizard Item Recall Spell (#34411) 2025-02-08 16:56:08 -05:00
lzk
dc3a2f6d28 add StartDelay bool to actions (#33026)
* add StartDelay bool to actions

* forgot summary
2024-10-28 23:21:14 +01:00
keronshb
7168959929 Adds real-time charge & disabled action information to Actions (#31821) 2024-09-25 10:27:28 -04:00
metalgearsloth
2e029a7d5b Action stuff (#31305)
* Action stuff

- Cleanup some event stuff
- Avoid dirtying entity unnecessarily
- Add ActionGrant as an easy way to apply / remove actions via compregistry.

* Fix merge
2024-08-25 22:43:31 +10:00
Nemanja
a540b8840e Goliath mob (#30839)
* Goliath mob

* Update asteroid.yml

* mcfuck yourself

* add cloak

* fixes

* Update materials.yml
2024-08-18 12:22:36 -04:00
ShadowCommander
1df84515c7 Add EntityWorldTargetAction (#29819)
* Add EntityWorldTargetAction initial implementation

* Update obsolete methods

* Partially working EntityWorldTargetAction

* Fix entity selection

* Move and clean up AfterInteract

* Fix building new walls

* Readd no entity or coordinates error

* Consolidate action validation code

* Add summaries to component

---------

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
2024-08-08 12:47:08 +03:00
DrSmugleaf
78f3ffc2a4 Make ActionsSystem.UpdateAction public (#30056) 2024-07-19 23:03:43 -04:00
Cojoke
b57174007c Remove all Assigned Values that are Never Used (#30110)
Remove all Assigned Values that are never used
2024-07-18 20:22:23 -04:00
Plykiya
b7aa97e203 Replace obsolete EntityCoordiates.InRange() with TransformSystem.InRange() (#29993)
* Replace EntityCoordiates.InRange() with TransformSystem.InRange()

* nullspace

* I figured it out

* man I have no clue how client side sutff works

* please have mercy

* remove RadiationPulseOverlay changes

* nullspace

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-07-13 23:25:51 +02:00
Plykiya
a03b88979e Replace obsolete xform.ToMap() with xformSystem.ToMapCoordinates() (#30010)
* Get rid of a bunch of obsolete usages

* position

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-07-13 23:05:22 +02:00
Plykiya
6c1d1057d5 Replace DetachParentToNull() with DetachEntity() (#29992)
DETACH PARENT TO ENTITY

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-07-13 20:59:33 +10:00
ShadowCommander
b94b52396e Add doc comments to target action components (#29982) 2024-07-13 14:04:53 +10:00
Plykiya
c5ff647ca6 Replace obsolete EntityWhitelist IsValid usages part 2 (#28506) 2024-06-03 17:40:03 -04:00
Leon Friedrich
6235fa1ac6 Content changes for entity categories PR (#27232)
* Content changes for entity categories PR

* Poke tests

* Why are tests suddenly working?
2024-06-02 14:08:15 +10:00
ShadowCommander
c6b22fb01c Fix TryGetActionData error triggering when run on deleting entities (#27839)
* Fix TryGetActionData error triggering when run on deleting entities

* Only get metadata once
2024-05-31 10:25:13 +10:00
Leon Friedrich
76e13eed35 Improve InteractionSystem range & BUI checks (#27999)
* Improve InteractionSystem range & BUI checks

* Ghost fixes

* AAA

* Fix test

* fix nullable

* revert to broadcast event

* Fixes for eengine PR

* Ah buckle code

* )
2024-05-24 15:03:03 +10:00
keronshb
999d044139 Magic Refactor + Wizard Grimoire (#22568)
* Brings over changes from the original magic refactor PR

* Adds Master Spellbook, spellbook categories, WizCoin currency, and locale

* Wiz€oin™

* Adds currency whitelist to Spellbook preset, grants contained actions on action added.

* Adds grant contained action and remove provided action.

* adds a way for actions to be upgraded to the store

* Adds Fireball 3 and fixes action upgrade logic so that it checks if the action can level or if the action can upgrade separately

* Fixes upgrade logic in ActionUpgradeSystem to allow for level ups without an actual upgrade. Fixed action upgrade logic in store system as well

* Removes current action entity from the bought entities list and adds new or old action entity

* Removes Current Entity

* Removes old comments, fixes TransferAllActionsWithNewAttached

* Removes TODO

* Removes Product Action Upgrade Event

* reverts changes to immovablerodrule

* Removes stale event reference

* fixes mind action grant logic

* reverts shared gun system change to projectile anomaly system

* forgor to remove the using

* Reverts unintended changes to action container

* Adds refund button to the store

* Refreshes store back to origin.

* Refund with correct currency

* Init refund

* Check for terminating and update interface

* Disables refund button

* Removes preset allow refund

* dont refund if map changed

* adds refunds to stores

* Adds method to check for starting map

* comments, datafields, some requested changes

* turns event into ref event

* Adds datafields

* Switches to entity terminating event

* Changes store entity to be nullable and checks if store is terminating to remove reference.

* Tryadd instead of containskey

* Adds a refund disable method, disables refund on bought ent container changes if not an action

* Removes duplicate refundcomp

* Removes unintended merges

* Removed another unintended change from merge

* removes extra using statement

* readds using statement

* might as well just remove both usings since it won't leave the PR

* Fixes Action upgrades from stores

* Changes to non obsolete method uses

* Shares spawn code between instant and world

* Adds action entity to action event, adds beforecastspellevent, adds spell requirements to magic component

* puts prereq check in spell methods, sets up template code for before cast event

* checks for required wizard clothes

* Networks Magic Comp and Wizard Clothes Comp. Renames MagicSpawnData to MagicInstantSpawnData.

* Removes posdata from projectiles

* Speech > RequiresSpeech

* Fixes ActionOnInteract

* checks for muted

* popup for missing reqs

* Validate click loc for blink spell

* Checks if doors are in range and not obstructed before opening

* Check ents by map coords

* Adds speak event

* Comments spellbooks

* Removes comments

* Unobsoletes smite spell

* Invert if

* Requirements loc

* Fixes spell reqs

* Inverts an if

* Comment updates

* Starts doafter work

* Removes doafter references

* Balances fireball upgrades to be more reasonable

* Enables refund on master spellbooks

* Spells to do

* update spellbook doafter

* knock toggles bolts

* Touch Spell comments

* Comments for pending spells

* more comments

* adds spider polymorph to spellbook

* TODOs for spells

* reorganizes spellbook categories and adds wands

* fixes spacing and adds limited conditions

* commented owner only for future store PR

* reenables owner only for the grimoire

* fixes grimoire sprite

* Adds wizard rod polymorph

* summon ghosts event

* Moves rod form to offensive category

* Adds charge spell and loc for rod polymorph

* Oops forgor the actual chages

* Item Recall comment

* Fixes UI

* removes extra field for wizard rod

* Cleanup

* New Condition (INCOMPLETE)

* Fix linter

* Fix linter (for real)

* fixed some descriptions

* adds regions to magic

* Adds a non-refund wizard grimoire, fixes blink to deselect after teleporting, reduces force wall despawn time to 12 seconds

* removes limited upgrade condition

---------

Co-authored-by: AJCM <AJCM@tutanota.com>
2024-05-11 19:06:49 -04:00
DrSmugleaf
9741fda672 Add ActionPerformedEvent, ActionsSystem.SetIfBiggerCooldown, action id to action events and BackgroundOn field (#27682)
* Add ActionPerformedEvent and ActionsSystem.SetIfBiggerCooldown

* Add action id to action events and backgroundon field to action component
2024-05-10 20:04:01 -04:00
Leon Friedrich
a466b35b27 Move UnpoweredFlashlight to shared (#27449) 2024-04-29 13:22:11 +10:00
DrSmugleaf
b0e6ff6779 Add events for custom action target validation (#27230) 2024-04-22 01:39:50 -07:00
Leon Friedrich
92a444311f Add stacktrace to action error logs (#26486)
Add trace to action error logs
2024-03-28 12:16:13 +11:00
nikthechampiongr
22e9d6562f Fix SCRAM implant not working while cuffed. Incidentally fix freedom implant working while dead/crit (#25978)
* Fix SCRAM implant not being usable while in cuffs. Also fix freedom implant from working while dead/crit as a side effect

* Move check up to apply to all actions and do thing I forgor to do before

* Change check into an ActionBlocker check that also checks whether the user is sleeping.

* Make checking for Consciousness the default for actions

Went through and chose what I believe to be sensible defaults for actions that had CheckCanInteract.

* Fix typos my beloved

I had an unbelievable skill issue

* Fix major skill issue
2024-03-18 23:35:46 +01:00
deltanedas
ad3f3a5d36 make suicide actions require confirming (#24609)
* add ActionAttemptEvent

* add ConfirmableAction compsys

* make suicide actions confirmable

* use new trolling techniques

* better query and dirty them

* death

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2024-03-01 13:48:43 +11:00
Leon Friedrich
bd4597c5ca Fix action state handling bug (#25395)
* Rejig action state handling

* Fix entity arg

* Fix deserialization
2024-02-20 13:08:41 +11:00
Pieter-Jan Briers
68ce53ae17 Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper

Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.

This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.

* Fix a bunch of warnings

* More warning fixes

* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.

* Get rid of some more ISerializationHooks for enums

* And a little more

* Apply suggestions from code review

Co-authored-by: 0x6273 <0x40@keemail.me>

---------

Co-authored-by: 0x6273 <0x40@keemail.me>
2024-02-13 16:48:39 -05:00
keronshb
c8466055ef Action, Action Container, and Action Upgrade changes (#24005)
* Added TransferActionWithNewAttached and TransferAllActionsWithNewAttached and OnActionAdded event method to ActionContainerSystem. These are needed where the action needs to have a different attached entity for usage.  Fixed a bug with not being able to upgrade actions between levels.  Added a way to grant and remove a singular action.

* adds an action container component to mind on action added to fix tests

* Swaps trycomp for hascomp

* Maybe this will fix the thests

* Grants action container to performer as well

* Wait that makes no sense, removing that

* fixes mind action grant logic

* Changes ent check back to netent check

* Reverts unintended container changes
2024-01-14 23:37:38 -07:00
Morb
9063cfe454 Tail wagging (#19573)
* MVP

* Uncomment animated prototypes

* Disable wagging on death

* Move component to server

* Looped tail animation

* Apply front tail template

* Disable animated markings globally

* Add emote sending

* Update documentation

* Move locale

* Use static instantAction & remove action on comp del

* Use fluent POSS-ADJ

* Update docs

* Add copyright

* Update copyright

* Update license & copyright

* Move to main directory & format meta.json

* Fix path

* Change namespace

* Remove empty meta.json

* Update

* REMOVE unnecessary IsNullOrWhiteSpace check

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>

* Move animated markings to main file

* Use emotes

* new

* fix

* fix

* Tests, pls

* fix dixel

* Remove networked from wagging comp

* Remove unused import

* Remove unused imports

* Move wagging comp to shared

* Revert the emotes

If we're getting it the action is better.

---------

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-01-14 18:52:07 +11:00
brainfood1183
b06d9cb64a Adds Hellspawn (Nar'Sie demon mob) (#20291)
* HellSpawn Mob

* added spawner

* summary for the namespace

* larger collider, cannot enter single tile corridors.

* fix

* remove duplicate from yml, fix attributions.

* moved action to shared, moved comp to shared, networked comp, separated heal, fixed attributions

* removed flammable from hellspawn
removed the healing effect from firestarter ability (healing can be separate ability).

* Update attributions.yml

fix attributions

* fix

* fix
2024-01-04 05:53:15 -07:00
TemporalOroboros
7a77d6d5dd Content ecs containers (#22484) 2023-12-28 01:30:03 -04:00
keronshb
2d692f47da Action Upgrade System (#22277)
* Adds uses before delay so actions can be used multiple times before cooldown

* adds methods to get remaining charges, to set uses before delay, and to set use delay

* adds method to change action name

* moves set usedelay

* action upgrade ECS

* adds method to reset remaining uses

* adds upgrade events

* refactors action upgrade event and adds logic to parse it

* fix serialization issue

* adds level up draft method

* adds action commands and a command to upgrade an action

* more warning lines to help

* Gets action to upgrade properly

* Removes unneeded fields from the action upgrade component and now properly raises the level of the new action

* Cleans up dead code and comments

* Fixes punctuation in actions-commands and adds a TryUpgradeAction method.

* removes TODO comment

* robust fix

* removes RT

* readds RT

* update RT to 190

* removes change name method

* removes remaining uses & related fields and adds that functionality to charges

* Adds Charges to action tooltips that require it
2023-12-15 02:41:44 -07:00