Skip to content
Snippets Groups Projects
limb functions.md 4.13 KiB
Newer Older
  • Learn to ignore specific revisions
  • Arkerthan's avatar
    Arkerthan committed
    ## Basic documentation for the limb access functions in the new limb system.
    
    
    ### ID system
    
    The new system uses new IDs instead of the old ones.
    ```
    limb       new  old
    no limb:    0    1
    natural:    1    0
    basic:      2   -1
    sex:        3   -2
    beauty:     4   -3
    combat:     5   -4
    cybernetic: 6   -5
    ```
    
    
    ### Usage example:
    
    ```
    <<if isAmputee($activeSlave)>>
    
    bcy603's avatar
    bcy603 committed
        Slave is full amputee.
    
    <</if>>
    ```
    
    Most functions can be used like this, though some are more specialized.
    
    
    ### Functions:
    
    
    Arkerthan's avatar
    Arkerthan committed
    #### Read-only functions:
    
    
    bcy603's avatar
    bcy603 committed
    * `isAmputee(slave)`:
        True if slave has no limbs, neither natural nor prosthetic.
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyNaturalLimbs(slave)`:
        True if slave has at least one natural limb.
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyProstheticLimbs(slave)`:
        True if slave has at least one prosthetic limb.
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyLegs(slave)`:
        True if slave has at least one leg.
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyArms(slave)`:
        True if slave has at least one arm.
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyNaturalLegs(slave)`:
        True if slave has at least one leg that is natural
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyNaturalArms(slave)`:
        True if slave has at least one arm that is natural
    
    bcy603's avatar
    bcy603 committed
    * `hasAnyProstheticArms(slave)`:
        True if slave has at least one arm that is prosthetic
    
    bcy603's avatar
    bcy603 committed
    * `hasBothLegs(slave)`:
        True if slave has both legs.
    
    bcy603's avatar
    bcy603 committed
    * `hasBothArms(slave)`:
        True if slave has both arms.
    
    bcy603's avatar
    bcy603 committed
    * `hasBothNaturalLegs(slave)`:
        True if slave has both legs and they are natural.
    
    bcy603's avatar
    bcy603 committed
    * `hasBothNaturalArms(slave)`:
        True if slave has both arms and they are natural.
    
    bcy603's avatar
    bcy603 committed
    * `hasAllLimbs(slave)`:
        True if slave has all limbs.
    
    bcy603's avatar
    bcy603 committed
    * `hasAllNaturalLimbs(slave)`:
        True if slave has all limbs and all are natural.
    
    bcy603's avatar
    bcy603 committed
    * `hasLeftArm(slave)`:
        True if slave has a left arm.
    
    Arkerthan's avatar
    Arkerthan committed
    
    
    bcy603's avatar
    bcy603 committed
    * `hasRightArm(slave)`:
        True if slave has a right arm.
    
    Arkerthan's avatar
    Arkerthan committed
    
    
    bcy603's avatar
    bcy603 committed
    * `hasLeftLeg(slave)`:
        True if slave has a left leg.
    
    Arkerthan's avatar
    Arkerthan committed
    
    
    bcy603's avatar
    bcy603 committed
    * `hasRightLeg(slave)`:
        True if slave has a right leg.
    
    Arkerthan's avatar
    Arkerthan committed
    
    
    bcy603's avatar
    bcy603 committed
    * `getLeftArmID(slave)`:
        Returns limb ID of the left arm.
    
    Arkerthan's avatar
    Arkerthan committed
    
    
    bcy603's avatar
    bcy603 committed
    * `getRightArmID(slave)`:
        Returns limb ID of the right arm.
    
    Arkerthan's avatar
    Arkerthan committed
    
    
    bcy603's avatar
    bcy603 committed
    * `getLeftLegID(slave)`:
        Returns limb ID of the left leg.
    
    Arkerthan's avatar
    Arkerthan committed
    
    
    bcy603's avatar
    bcy603 committed
    * `getRightLegID(slave)`:
        Returns limb ID of the right leg.
    
    Arkerthan's avatar
    Arkerthan committed
    
    
    bcy603's avatar
    bcy603 committed
    * `getLimbCount(slave, id)`:
        Returns count of specified limb ID.
        Can also be used to check for groups:
        101: any limbs that are not amputated
        102: prosthetic limbs off all kind
        103: sex-prosthetic
        104: beauty-prosthetic
        105: combat-prosthetic
    
    Arkerthan's avatar
    Arkerthan committed
        103-105 mean the sum of 3-5 and 6 respectfully.
    
    bcy603's avatar
    bcy603 committed
    * `getLegCount(slave, id)`:
        Returns count of legs with specified limb ID.
    
    bcy603's avatar
    bcy603 committed
    * `getArmCount(slave, id)`:
        Returns count of arms with specified limb ID.
    
    Arkerthan's avatar
    Arkerthan committed
    #### String functions
    
    * `idToDescription(id)`:
    
    bcy603's avatar
    bcy603 committed
        Returns a very short description of the specified limb ID.
        0: "amputated";
        1: "healthy";
        2: "modern prosthetic";
        3: "advanced, sex-focused prosthetic";
        4: "advanced, beauty-focused prosthetic";
        5: "advanced, combat-focused prosthetic";
    
    Arkerthan's avatar
    Arkerthan committed
        6: "highly advanced cybernetic";
    
    * `armsAndLegs(slave, arms, arm, legs, leg)`:
    
    bcy603's avatar
    bcy603 committed
        Returns a string depending on the limbs a slave has. By default this is a
        variation of `arms and legs`, but this can be changed via parameters.
    
        Examples:
        `armsAndLegs(slave, "hands", "hand", "feet", foot)` returns `hands and feet` for a slave with all limbs,
    
    Arkerthan's avatar
    Arkerthan committed
        `hand and foot` for a slave with one limb each and `feet` for a slave with two legs, but no arms.
    
    
    bcy603's avatar
    bcy603 committed
        Expects the slave to have at least one limb. Only the first parameter is mandatory, the rest defaults to the
    
    Arkerthan's avatar
    Arkerthan committed
        equivalent of `armsAndLegs(slave, "arms", "arm", "legs", "leg")`
    
    #### Write-only functions
    
    
    bcy603's avatar
    bcy603 committed
    * `removeLimbs(slave, limb`:
    
    Arkerthan's avatar
    Arkerthan committed
        Removes a slave's limbs. Allowed values for limb: `"left arm"`, `"right arm"`, `"left leg"`, `"right leg"`, `"all"`.
    
    bcy603's avatar
    bcy603 committed
    * `attachLimbs(slave, limb, id)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Attaches a limb of the specified id. Expects amputated limbs. Will overwrite existing limbs.
        Allowed values for limb: `"left arm"`, `"right arm"`, `"left leg"`, `"right leg"`, `"all"`.
    
    bcy603's avatar
    bcy603 committed
    * `configureLimbs(slave, limb, id)`:
    
    Arkerthan's avatar
    Arkerthan committed
        Sets the slave's limb to the specified id and sets all limb related variables to their correct values.
        Intended for use during slave generation and events.
    
    bcy603's avatar
    bcy603 committed
        Allowed values for limb: `"left arm"`, `"right arm"`, `"left leg"`, `"right leg"`, `"all"`.