Rename ValidLock to IsLockDefined (more descriptive).

This commit is contained in:
Marisa the Magician 2022-12-23 18:22:13 +01:00 committed by Christoph Oelckers
parent b85add01c7
commit 6f8901ea87
4 changed files with 5 additions and 5 deletions

View File

@ -517,7 +517,7 @@ int P_CheckKeys (AActor *owner, int keynum, bool remote, bool quiet)
}
// [MK] for ZScript, simply returns if a lock is defined or not
int P_ValidLock(int keynum)
int P_IsLockDefined(int keynum)
{
return !!Locks.CheckKey(keynum);
}

View File

@ -5,7 +5,7 @@ class AActor;
class PClassActor;
int P_CheckKeys (AActor *owner, int keynum, bool remote, bool quiet = false);
int P_ValidLock (int lock);
int P_IsLockDefined (int lock);
void P_InitKeyMessages ();
int P_GetMapColorForLock (int lock);
int P_GetMapColorForKey (AActor *key);

View File

@ -1749,11 +1749,11 @@ DEFINE_ACTION_FUNCTION_NATIVE(AInventory, PrintPickupMessage, PrintPickupMessage
//
//=====================================================================================
DEFINE_ACTION_FUNCTION_NATIVE(AKey, ValidLock, P_ValidLock)
DEFINE_ACTION_FUNCTION_NATIVE(AKey, IsLockDefined, P_IsLockDefined)
{
PARAM_PROLOGUE;
PARAM_INT(locknum);
ACTION_RETURN_BOOL(P_ValidLock(locknum));
ACTION_RETURN_BOOL(P_IsLockDefined(locknum));
}
DEFINE_ACTION_FUNCTION_NATIVE(AKey, GetMapColorForLock, P_GetMapColorForLock)

View File

@ -37,7 +37,7 @@ class Key : Inventory
Inventory.PickupSound "misc/k_pkup";
}
static native clearscope bool ValidLock(int locknum);
static native clearscope bool IsLockDefined(int locknum);
static native clearscope Color GetMapColorForLock(int locknum);
static native clearscope Color GetMapColorForKey(Key key);
static native clearscope int GetKeyTypeCount();