mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-13 15:34:40 +01:00
Add debug property to log missing ability actions
This commit is contained in:
@@ -6,6 +6,7 @@ public final class DebugConstants {
|
|||||||
public static boolean LOG_QUEST_START = false;
|
public static boolean LOG_QUEST_START = false;
|
||||||
public static boolean LOG_MISSING_ABILITIES = false;
|
public static boolean LOG_MISSING_ABILITIES = false;
|
||||||
public static boolean LOG_MISSING_LUA_SCRIPTS = 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.
|
* 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) {
|
Ability ability, AbilityModifierAction action, ByteString abilityData, GameEntity target) {
|
||||||
var handler = actionHandlers.get(action.type);
|
var handler = actionHandlers.get(action.type);
|
||||||
if (handler == null || ability == null) {
|
if (handler == null || ability == null) {
|
||||||
if (DebugConstants.LOG_ABILITIES) {
|
if (DebugConstants.LOG_MISSING_ABILITY_HANDLERS) {
|
||||||
Grasscutter.getLogger()
|
Grasscutter.getLogger()
|
||||||
.debug("Could not execute ability action {} at {}", action.type, ability);
|
.debug("Missing ability action handler for {} (invoker: {}).", action.type, ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user