Potassium API
  • Environment
    • Cache
    • Closures
    • Console
    • Crypt
    • Debug
    • Drawing
    • File System
    • Input
    • Instance
    • Metatable
    • Miscellaneous
    • Scripts
    • Web Sockets
    • Actor
Powered by GitBook
On this page
  • getrawmetatable
  • hookmetamethod
  • getnamecallmethod
  • setnamecallmethod
  • isreadonly
  • setrawmetatable
  • setreadonly
  • makewriteable
  • makereadonly
  1. Environment

Metatable

getrawmetatable

<table> getrawmetatable(<table> object)

Returns the metatable of object, where the __metatable field would normally lock the metatable.


hookmetamethod

<function> hookmetamethod(<table> object, <string> method, <function> hook)

Replaces func with hook internally, where hook will be invoked in place of func when called.

Returns a new function that can be used to access the original definition of func.


getnamecallmethod

<string> getnamecallmethod()

Returns the name of the method that invoked the __namecall metamethod.


setnamecallmethod

<nil> setnamecallmethod(<string> method)

Changes the name of the method that invoked __namecall metamethod.


isreadonly

<boolean> isreadonly(<table> object)

Returns whether object is read-only or not.


setrawmetatable

<nil> setrawmetatable(<table> object, <table> metatable)

Sets the metatable of object to metatable, where the __metatable field would normally lock the metatable.


setreadonly

<nil> setreadonly(<table> object, <boolean> readonly)

Sets whether object is read-only or not.


makewriteable

<nil> makewriteable(<table> object)

Unfreezes object .


makereadonly

<nil> makereadonly(<table> object)

Freezes object , where table.freeze would normally check for __metatable.


PreviousInstanceNextMiscellaneous

Last updated 2 months ago