From 6f8901ea87601050c2b35ef5838992d50ed40e4e Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Fri, 23 Dec 2022 18:22:13 +0100 Subject: [PATCH] Rename ValidLock to IsLockDefined (more descriptive). --- src/gamedata/a_keys.cpp | 2 +- src/gamedata/a_keys.h | 2 +- src/scripting/vmthunks_actors.cpp | 4 ++-- wadsrc/static/zscript/actors/inventory/inv_misc.zs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gamedata/a_keys.cpp b/src/gamedata/a_keys.cpp index 86b01306f..e3defc739 100644 --- a/src/gamedata/a_keys.cpp +++ b/src/gamedata/a_keys.cpp @@ -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); } diff --git a/src/gamedata/a_keys.h b/src/gamedata/a_keys.h index 40385a93f..7eee7e3df 100644 --- a/src/gamedata/a_keys.h +++ b/src/gamedata/a_keys.h @@ -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); diff --git a/src/scripting/vmthunks_actors.cpp b/src/scripting/vmthunks_actors.cpp index f91bb51b2..e661f9856 100644 --- a/src/scripting/vmthunks_actors.cpp +++ b/src/scripting/vmthunks_actors.cpp @@ -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) diff --git a/wadsrc/static/zscript/actors/inventory/inv_misc.zs b/wadsrc/static/zscript/actors/inventory/inv_misc.zs index 09ce6436f..1d31022ad 100644 --- a/wadsrc/static/zscript/actors/inventory/inv_misc.zs +++ b/wadsrc/static/zscript/actors/inventory/inv_misc.zs @@ -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();