Repository navigation
Added support for dancer/musician performance effects - #1833
Open
madsboddum wants to merge 4 commits into
Open
madsboddum wants to merge 4 commits into
madsboddum wants to merge 4 commits into
Conversation
Josh-Larson
reviewed
Sep 27, 2026
| private const val TARGET_TYPE_LOCATION = 1 | ||
| private const val TARGET_TYPE_TARGET = 2 | ||
| private const val ACTION_COST_DIVISOR = 10 | ||
| private const val MAX_LEVEL = 3 |
Collaborator
There was a problem hiding this comment.
Duplicate MAX_LEVEL, should just be set to MAX_VALUE when broadcasting if this needs to be duplicated
Josh-Larson
requested changes
Sep 27, 2026
| data class StopDanceIntent(val player: Player): Intent() | ||
| data class FlourishIntent(val performer: Player, val flourishName: String) : Intent() | ||
| data class WatchIntent(val actor: Player, val target: SWGObject, val isStartWatch: Boolean) : Intent() | ||
| data class PerformEffectIntent(val performer: Player, val effect: PerformEffect, val level: Int?) : Intent() |
Collaborator
There was a problem hiding this comment.
Spidey sense tingles when I see nullable int--should just be set to max value in this case if that's the client's implicit behavior
| override fun execute(player: Player, target: SWGObject?, args: String) { | ||
| val firstArgument = args.trim().substringBefore(' ') | ||
| val requestedLevel = firstArgument.toIntOrNull() | ||
| val level = requestedLevel?.coerceIn(MIN_LEVEL, MAX_LEVEL) |
Collaborator
There was a problem hiding this comment.
This spot in particular is where it should fallback to MAX_LEVEL if unspecified. Too much coupling between systems if the default value is set elsewhere
Member
Author
There was a problem hiding this comment.
That makes sense. Having the fallback handling here is cleaner.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's worth knowing that the musician ones are technically unreachable because playing instruments in holocore is not yet supported. The dancing ones have been tested though.