mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
Fix the ispath SDQL2/Lua wrapper (and add a is_type_in_typecache wrapper) (#90207)
## About The Pull Request This fixes the `_ispath` SDQL2 / Lua wrapper: it always passed two arguments, meaning it couldn't be used to just simply check if something was a path _at all_. In addition, I just added wrapper around `is_type_in_typecache` (as it's a define), as that's the whole reason I was using `_ispath` anyways, so it can't hurt. ## Why It's Good For The Game things working properly is nice ## Changelog 🆑 fix: The _ispath SDQL2/Lua wrapper can now be used to actually check if something is a path. code: Added the _is_type_in_typecache wrapper, for SDQL2 / Lua scripts. /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -64,6 +64,8 @@
|
||||
return istype(object, type)
|
||||
|
||||
/proc/_ispath(path, type)
|
||||
if(isnull(type))
|
||||
return ispath(path)
|
||||
return ispath(path, type)
|
||||
|
||||
/proc/_length(E)
|
||||
@@ -297,3 +299,6 @@
|
||||
if(!filter_index || filter_index < 1 || filter_index > length(target.filters))
|
||||
return
|
||||
animate(target.filters[filter_index], appearance = set_vars, time, loop, easing, flags)
|
||||
|
||||
/proc/_is_type_in_typecache(thing_to_check, typecache)
|
||||
return is_type_in_typecache(thing_to_check, typecache)
|
||||
|
||||
Reference in New Issue
Block a user