| Nawigacja funkcji | Opis |
|---|---|
gethiddenproperty | Odczytuje Roblox property przez reflection metadata, wlacznie z non-scriptable properties. Pierwszy argument musi byc Instance object, a drugi argument musi byc string property name. instance reference musi byc poprawny. Jesli property descriptor nie istnieje w Roblox property metadata, function zwraca tylko nil. Jesli descriptor istnieje, ale nie rozwiazuje sie do property entry, rzuca “Not a property”. Dla reflection types Bool, Int, Float, Double, String, SystemAddress, SharedString i Vector3 function wywoluje getter i zwraca value oraz boolean rowny !IsScriptable(). SystemAddress zwraca RemoteId.PeerId jako integer. SharedString zwraca Content jako string. Vector3 czyta z instance primitive Size offset i rzuca “can’t get value”, jesli touch data nie istnieje. Inne property types sa czytane przez normal Lua field access po tymczasowym ustawieniu property scriptable flag na true; BinaryString jest tymczasowo traktowany jako String dla tego odczytu. original scriptable flag i BinaryString type sa przywracane przed zwroceniem. |
isscriptable | Sprawdza scriptable flag dla Roblox property na Instance. Function najpierw zwraca wartosc scriptable z cache, gdy istnieje dla tego samego instance reference i property name. Przy cache miss property name jest rozwiazywana przez Roblox property metadata i Instance class descriptor. Jesli descriptor nie istnieje albo rozwiazany field nie istnieje lub nie jest property entry, function zwraca nil. Gdy property entry zostanie znaleziona, function odczytuje scriptable state, zapisuje te wartosc w scriptable override cache dla instance i property, a potem zwraca boolean. Function nie zmienia scriptable flag. |
sethiddenproperty | Sets a Roblox property with reflection metadata. The first argument must be Instance object, the second argument must be a string property name, and the third argument must be present. The instance reference must be valid. If the property descriptor is missing from Roblox property metadata, the function returns nil. If the descriptor exists but does not resolve to a property entry, it raises “Not a property”. Bool values use luaL_checkboolean. Int and SystemAddress values use integer type checking, with SystemAddress writing RemoteId.PeerId. Float and Double values use number type checking. String, SharedString, and BinaryString values use string type checking before calling the setter. For other property types, the function temporarily calls setscriptable(instance, property, true), assigns instance[property] = value with normal Lua field assignment, then restores the original scriptable state with setscriptable(instance, property, isScriptable). On successful writes, the return value is a boolean equal to !IsScriptable() from before the write. |
setscriptable | Zapisuje scriptable override dla Roblox property w scriptable override cache i zwraca previous scriptable state. Pierwszy argument musi byc Instance object, drugi argument musi byc string property name, a trzeci argument musi byc boolean. Jesli cache entry istnieje juz dla tego samego instance reference i property name, cached scriptable value jest zastepowana i zwracana jest stara wartosc z cache. Przy cache miss property name jest rozwiazywana przez Roblox property metadata i Instance class descriptor. Jesli descriptor nie istnieje albo rozwiazany field nie istnieje lub nie jest property entry, function zwraca nil. Gdy property entry zostanie znaleziona, function odczytuje scriptable state, zapisuje zadany boolean oraz property reference w scriptable override cache i zwraca previous scriptable state value. GameIndexHook i GameNewIndexHook pozniej uzywaja tego cache, tymczasowo ustawiajac property field scriptable flag dla jednego indexed read lub write, a potem przywracaja previous field flag. |
Reflection
Reflection
Pomocnicy refleksji dla instancji i właściwości.
Pomocnicy refleksji dla instancji i właściwości.