Skip to content

Commit

Permalink
Rename ValidLock to IsLockDefined (more descriptive).
Browse files Browse the repository at this point in the history
  • Loading branch information
Marisa the Magician authored and coelckers committed Dec 23, 2022
1 parent b85add0 commit 6f8901e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/gamedata/a_keys.cpp
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/gamedata/a_keys.h
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/scripting/vmthunks_actors.cpp
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion wadsrc/static/zscript/actors/inventory/inv_misc.zs
Expand Up @@ -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();
Expand Down

0 comments on commit 6f8901e

Please sign in to comment.