Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vanilla BUG] call onCombatStarted for armor upgrades #347

Open
Darxo opened this issue Apr 21, 2024 · 2 comments
Open

[Vanilla BUG] call onCombatStarted for armor upgrades #347

Darxo opened this issue Apr 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Darxo
Copy link

Darxo commented Apr 21, 2024

Versions

  • Game: 1.5.0-15
  • MSU: 1.3.0-reforged.11

Describe the bug
Currently the function onCombatStarted() is not called for armor upgrades. This is because they are hidden inside the armor.nut they are attached to and the armor.nut needs to pass that event on. But unlike many other events, this is not passed on in Vanilla.

To Reproduce

  1. Hook an armor upgrade or create a new armor upgrade and utilize their function onCombatStarted(), e.g. by printing an error message.
  2. Add that upgrade to your invenotory, use it and start a battle
  3. The log is not printed

Expected behavior
onCombatStarted() is called so it can be used for armor upgrades. For example by adding a dummy effect at combat start which implements the effect of that attachement.

Screenshots
Example implementation:
image

@Darxo Darxo added the bug Something isn't working label Apr 21, 2024
@Darxo Darxo changed the title [BUG] call onCombatStarted for armor upgrades [Vanilla BUG] call onCombatStarted for armor upgrades Apr 22, 2024
@Enduriel
Copy link
Member

This is important and we should definitely fix it, we could do this in 1.3.1 as it's a vanilla fix

@Enduriel
Copy link
Member

Enduriel commented Apr 23, 2024

Actually I suspect this may be the case for other functions we have added to items and we should probably patch all of those.

ETA: That might cause issues with layered items systems... Not sure how to handle this generically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants