mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-09 04:13:00 +08:00
Add debug property to log missing ability actions
This commit is contained in:
parent
93460ab0aa
commit
bf3e390ce6
@ -6,6 +6,7 @@ public final class DebugConstants {
|
||||
public static boolean LOG_QUEST_START = false;
|
||||
public static boolean LOG_MISSING_ABILITIES = false;
|
||||
public static boolean LOG_MISSING_LUA_SCRIPTS = false;
|
||||
public static boolean LOG_MISSING_ABILITY_HANDLERS = true;
|
||||
|
||||
/**
|
||||
* WARNING: THIS IS A DANGEROUS SETTING. DO NOT ENABLE UNLESS YOU KNOW WHAT YOU ARE DOING.
|
||||
|
@ -91,9 +91,9 @@ public final class AbilityManager extends BasePlayerManager {
|
||||
Ability ability, AbilityModifierAction action, ByteString abilityData, GameEntity target) {
|
||||
var handler = actionHandlers.get(action.type);
|
||||
if (handler == null || ability == null) {
|
||||
if (DebugConstants.LOG_ABILITIES) {
|
||||
if (DebugConstants.LOG_MISSING_ABILITY_HANDLERS) {
|
||||
Grasscutter.getLogger()
|
||||
.debug("Could not execute ability action {} at {}", action.type, ability);
|
||||
.debug("Missing ability action handler for {} (invoker: {}).", action.type, ability);
|
||||
}
|
||||
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user