Skip to content
Snippets Groups Projects
eye functions.md 3.99 KiB
Newer Older
  • Learn to ignore specific revisions
  • Arkerthan's avatar
    Arkerthan committed
    ## Eye Functions
    
    In all functions `side` can be `left`, `right` or `both` unless stated otherwise.
    
    
    bcy603's avatar
    bcy603 committed
    Eye types: `1`: normal; `2`: glass; `3`: cybernetic
    
    Arkerthan's avatar
    Arkerthan committed
    `0` is used as return value if there is no eye, but is never stored in the slave object.
    
    Vision: `0`: blind; `1`: nearsighted (or impaired/blurred); `2`: normal
    
    ### Read-only functions
    
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyEyes(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if slave has at least one eye.
    
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyNaturalEyes(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if slave has at least one eye that is natural.
    
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyProstheticEyes(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if slave has at least one eye that is prosthetic (cybernetic or glass).
    
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyCyberneticEyes(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if slave has at least one eye that is cybernetic.
    
    
    bcy603's avatar
    bcy603 committed
    * `hasBothEyes(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if slave has both eyes.
    
    
    bcy603's avatar
    bcy603 committed
    * `hasBothNaturalEyes(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if slave has both eyes and they are natural.
    
    * `hasBothProstheticEyes(slave)`:
        True if slave has both eyes and they are prosthetic (cybernetic or glass).
    
    
    bcy603's avatar
    bcy603 committed
    * `hasBothCyberneticEyes(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if slave has both eyes and they are cybernetic.
    
    
    bcy603's avatar
    bcy603 committed
    * `hasLeftEye(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if slave has left eye.
    
    
    bcy603's avatar
    bcy603 committed
    * `hasRightEye(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if slave has right eye.
    
    
    bcy603's avatar
    bcy603 committed
    * `getLeftEyeType(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Returns type of the left eye.
    
    
    bcy603's avatar
    bcy603 committed
    * `getRightEyeType(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Returns type of the right eye.
    
    
    bcy603's avatar
    bcy603 committed
    * `getLeftEyeVision(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Returns vision of the left eye.
    
    
    bcy603's avatar
    bcy603 committed
    * `getRightEyeVision(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Returns vision of the right eye.
    
    
    bcy603's avatar
    bcy603 committed
    * `getBestVision(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Returns highest vision of both eyes.
    
    
    bcy603's avatar
    bcy603 committed
    * `getWorstVision(slave)`:
        Returns lowest vision of both eyes.
    
    Arkerthan's avatar
    Arkerthan committed
    
    
    bcy603's avatar
    bcy603 committed
    * `anyVisionEquals(slave, vision)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if one eye has the specified vision.
    
    
    bcy603's avatar
    bcy603 committed
    * `getLeftEyeColor(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Returns color of the left eye. If there is no eye `empty` is returned.
    
    
    bcy603's avatar
    bcy603 committed
    * `getRightEyeColor(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Returns color of the right eye. If there is no eye `empty` is returned.
    
    
    bcy603's avatar
    bcy603 committed
    * `getLeftEyePupil(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Returns the shape of pupil of the left eye. If there is no eye `circular` is returned.
    
    
    bcy603's avatar
    bcy603 committed
    * `getRightEyePupil(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Returns the shape of pupil of the right eye. If there is no eye `circular` is returned.
    
    
    bcy603's avatar
    bcy603 committed
    * `hasVisibleHeterochromia(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        True if left and right eye colors are different. Does NOT relate to the genetic quirk.
    
    
    bcy603's avatar
    bcy603 committed
    * `getGeneticEyeColor(slave, side)`:
        Gives the genetic color of the specified eye.
    
    Arkerthan's avatar
    Arkerthan committed
        `both` is not allowed as value of `side`.
    
    
    bcy603's avatar
    bcy603 committed
    * `getLenseCount(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Counts the number of eyes that are not the genetic color.
    
    
    ### Description
    
    
    bcy603's avatar
    bcy603 committed
    * `App.Desc.eyesType(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Fits in a sentence like this: She has {return}.
    
    
    bcy603's avatar
    bcy603 committed
    * `App.Desc.eyeTypeToString(type)`:
        Converts an eye type to a string.
        `1` -> `natural`
        `2` -> `glass`
    
    Arkerthan's avatar
    Arkerthan committed
        `3` -> `artificial`
    
    
    bcy603's avatar
    bcy603 committed
    * `App.Desc.eyesColor(slave, adj = "", eye = "eye", eyes = "eyes")`:
        Fits in a sentence like this: She has {return}.
    
    Arkerthan's avatar
    Arkerthan committed
        `adj` is added in between color and eye like this: `brown wet eyes`.
    
    
    bcy603's avatar
    bcy603 committed
    * `App.Desc.eyeColor(slave)`:
        Fits in a sentence like this: She has {return} eyes.
    
    Arkerthan's avatar
    Arkerthan committed
        Prefer App.Desc.eyesColor if possible as it works reliably with only one eye. Example where this is better: {return}-eyed gaze
    
    
    bcy603's avatar
    bcy603 committed
    * `App.Desc.eyesVision(slave)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Fits in a sentence like this: She has {return}.
    
    
    bcy603's avatar
    bcy603 committed
    * `App.Desc.eyesToVision(slave)`:
        Converts an eye vision to a string.
        `0` -> `blind`
        `1` -> `nearsighted`
        `2` -> `normal`
    
    Arkerthan's avatar
    Arkerthan committed
    
    
    ### Modification
    
    
    bcy603's avatar
    bcy603 committed
    * `eyeSurgery(slave, side, action)`:
        Modifies a slaves eyes.
        Allowed values for `action`:
        No Existing eyes required: `normal`, `glass`, `cybernetic`
    
    Arkerthan's avatar
    Arkerthan committed
        Existing eyes required: `remove`, `blind`, `blur`, `fix`
    
    
    bcy603's avatar
    bcy603 committed
    * `setEyeColor(slave, color, side = "both")`:
    
    Arkerthan's avatar
    Arkerthan committed
        Changes the visible eye color.
    
    
    bcy603's avatar
    bcy603 committed
    * `setEyeColorFull(slave, iris, pupil, sclera, side)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Changes all visible parts of the eye.
    
    
    bcy603's avatar
    bcy603 committed
    * `setGeneticEyeColor(slave, color, heterochromia = false)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Changes the genetic eye color. WARNING: If `heterochromia` is `true`, the function will add the genetic quirk, even if the slave did not have it before.
    
    
    bcy603's avatar
    bcy603 committed
    * `resetEyeColor(slave, side)`:
        Sets the eye color to the genetic color. Takes heterochromia and albinism into account.