Kapakları inceleyin, oluşturun, klonlayın ve değiştirin.
Kullanılabilir fonksiyonlar
checkcaller
Current Luau thread değerinin Real caller context içinde bulunup bulunmadığını döndürür. Function arguments almaz ve the current caller context boolean result değerini push eder. Function Lua call stack veya function object incelemez.
clonefunction
Creates and returns a separate function value for the function passed as the first argument. The argument must be a function.
comparefunctions
İki function values değerini function identity üzerinden karşılaştırır. İki arguments de functions olmalıdır. Function, function identity(L, 1) == function identity(L, 2) boolean result değerini döndürür. function bytecode, source, behavior, hashes, upvalues veya newcclosure mappings karşılaştırmaz. comparefunction aynı function için alias değeridir.
getfunctionhash
Returns an uppercase SHA384 hex digest derived from a Luau function. The argument must be a function, and C closures raise “Lua function expected”. If no hashable function content is available, the function returns nil.
hookfunction
Bir target function değerini replacement function ile hook eder ve original target closure için cloned copy döndürür. İki arguments de functions olmalıdır. Function önce pending C function swaps değerlerini flush eder, target değerini function cloning ile cloning yapar, replacement closure veya onun mapped newcclosure target değerini hidden stack tracking içine ekler, target ve cloned original için FixCallstack çağırır, sonra target closure değerini C closure, Luau closure veya newcclosure-specific path üzerinden patch eder. Target henüz hook records içinde değilse cloned original restorefunction için orada saklanır. Returned function cloned original closure değeridir.
hookmetamethod
Bir value üzerinde metamethod function arar ve bu function değerini hookfunction üzerinden hook eder. First argument, raw metafield lookup tarafından kabul edilen herhangi bir value olabilir. Second argument string metamethod name olmalı ve third argument function replacement olmalıdır. raw metafield lookup named metafield bulamazsa function argument 2 için “Metamethod doesn’t exist” üretir. Metafield varsa ancak function değilse argument 2 için “Metamethod isn’t a function” üretir. Metafield function olduğunda hookmetamethod, found metamethod function değerini target olarak hookfunction çağırır ve hookfunction cloned original closure değerini döndürür.
iscclosure
Returns whether the provided function is a C closure. The argument must be a function; passing any other type raises a type error. The function does not inspect executor ownership, source, bytecode, or upvalues.
isexecutorclosure
Returns whether the provided function is classified as executor-owned. The argument must be a function. The function does not inspect source text, debug names, bytecode hashes, or call stack ownership.
isfunctionhooked
Returns whether the provided function currently has a hook record. The argument must be a function.
ishiddenstack
Returns whether a function, or the function at a stack level, is marked as hidden. target must be a function or stack level number. Invalid stack levels raise “Level out of range”. isstackhidden is an alias.
islclosure
Returns whether the provided function is a Lua closure. The argument must be a function; passing a non-function raises a type error. isluaclosure is an alias.
isnewcclosure
Returns whether the provided function is a newcclosure-created C closure. The first argument must be a function; passing a non-function raises a type error. Documented usage is a single function argument; extra arguments are not part of the supported signature.
newcclosure
Returns a C closure for the provided function. If the function is already a C closure, the same function is returned. Passing a non-function raises a type error.
newlclosure
Returns a Luau closure that calls the provided function. The first argument must be a function.
restorefunction
function hook operation değerini içeride çağırarak bir function değerini restore eder veya değiştirir ve values döndürmez. First argument function olmalıdır. Tek function argument ile function the saved original function arar; entry yoksa “Function is not hooked” üretir. Sonra hooked closure ve stored original closure ile function hook operation çağırır, Lua stack temizler ve stored original kullanıldığında restored closure değerini hook records içinden kaldırır. Second argument de function ise function firstFunction değerini kurulacak original function, secondFunction değerini patch edilecek closure olarak ele alır. Bu formda saklanan hook records degerine karsi missing-original check yapilmaz; saklanan deger yalnizca final remove check sirasinda karsilastirilir. için kullanılır. Non-function second arguments branch condition tarafından yok sayılır. restorefunc ve restoreclosure aynı function için aliases değerleridir.
sethiddenstack
Marks or unmarks a function, or the function at a stack level, as hidden. target must be a function or stack level number. hidden defaults to true. Invalid stack levels raise “Level out of range”. setstackhidden is an alias.