add "exists_as_package" script function

This commit is contained in:
GenevensiS
2026-05-11 09:32:13 +02:00
parent 19b144f37b
commit 24abf8fe86
3 changed files with 26 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
Function: exists_as_package
--Usage--
> exists_as_package("package")
Check if a package exists in the data folder.
Returns the package's version number as major-minor-patch, or nil if the package does not exists.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] Full name of the package folder, including game and extension.
--Examples--
> exists_as_package("magic-modules.mse-include") == "2026-02-28"
> exists_as_package("magic-quadruple-faced-leveler.mse-style") == nil