-
Notifications
You must be signed in to change notification settings - Fork 19
Improvements for Ninjago Monastery #239
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
Conversation
This fixes the smashables on the siege battleground in Ninjago Monastery
There are multiple item sets with matching items. This change is not as large as git diff makes it seem, I've only added a `foreach`.
Used for Skeleton-specific attack and defense. Also used for a couple other things, such as damage-over-time when holding 14472 (maelstrom dagger). Damage over time buffs like that don't work yet.
Has issues; rails don't show correct camera path, Bonezai bouncer does not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll start playing this locally to test out the changes. Got a few questions in the meantime.
Uchu.World/Objects/Components/ReplicaComponents/RailActivatorComponent.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still a few leftover logger statements, overall nice work :)
// this looks ugly, maybe there's a better way to listen once | ||
Delegate cancelOnDamaged1 = null; | ||
Delegate cancelOnDamaged2 = null; | ||
cancelOnDamaged1 = Listen(destroyable.OnArmorChanged, (newValue, delta) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't really think of anything than changing the api of Listen to include a once = false
parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to do a bit more for this, like create a listener group that allows storing a set of listeners that can be disconnected at once. For this case, we listen to 2 listeners and disconnect both when received.
Example:
var listenerGroup = new ListenerGroup(maxCalls = 1); // MaxCalls may make it more clear this event can only be called once.
listenerGroup.Listen(event1, (...) => {
...
});
listenerGroup.Listen(event2, (...) => {
...
});
Uh oh!
There was an error while loading. Please reload this page.