Llamar como
Platform.glyphs.integer(value, minimum)
Registra la dependencia Platform.glyphs.integer y después llámala con ese nombre. Una llamada con espacio de nombres no pasa self: usa una llamada con dos puntos o pasa el objeto tú mismo.
Qué hace
Returns true when value is a finite whole number no smaller than minimum, and false for anything else (including NaN and infinity).
Argumentos
| Nombre | Tipo | Qué hace |
|---|---|---|
value | any | Value to test. |
minimum | number | Smallest accepted value. |
Retornos
| 1 | boolean | True when value is an integer of at least minimum. |
|---|
Ediciones
Las funciones auxiliares integradas se registran en todas las ediciones. Lo que cambia es la API del juego que leen; donde falta alguna, la función auxiliar usa una alternativa o devuelve nil con un motivo.
No lee directamente ninguna API del juego.
Cómo la llama el addon
Platform.glyphs.GetGlyphItemInfoif not integer(itemID,1) then return nil,'invalid-item' endPlatform.glyphs.GetGlyphSocketSnapshotif not integer(count,0) or count>64 then return nil,'invalid-api-result' endPlatform.glyphs.socketif not integer(kind,1) or enabled~=nil and type(enabled)~='boolean' then return {slot=index,reason='invalid-api-result'} end
Código fuente
Platform/glyphs.lua, línea 16. Solo lectura en el juego; Duplicar crea una copia editable.
Platform.glyphs.integer(value, minimum)
return type(value)=='number' and value==value and value>=minimum and value<math.huge and value%1==0