From b6555adca04b2478d176234b9a72ee4d70ba6105 Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Sun, 22 Sep 2019 13:15:00 +0200 Subject: [PATCH] update limb documentation --- devNotes/limb functions.md | 104 ++++++++++++++++++++++--------------- 1 file changed, 62 insertions(+), 42 deletions(-) diff --git a/devNotes/limb functions.md b/devNotes/limb functions.md index 94bf3478a9b..891727b6b15 100644 --- a/devNotes/limb functions.md +++ b/devNotes/limb functions.md @@ -1,4 +1,4 @@ -## Basic documentation for the limb access functions coming with the new limb system. +## Basic documentation for the limb access functions in the new limb system. ### ID system @@ -28,83 +28,75 @@ Most functions can be used like this, though some are more specialized. ### Functions: -`isAmputee(slave)`: +#### Read-only functions: + +* `isAmputee(slave)`: True if slave has no limbs, neither natural nor prosthetic. -`hasAnyNaturalLimbs(slave)`: +* `hasAnyNaturalLimbs(slave)`: True if slave has at least one natural limb. -`hasAnyProstheticLimbs(slave)`: +* `hasAnyProstheticLimbs(slave)`: True if slave has at least one prosthetic limb. -`hasAnyLegs(slave)`: +* `hasAnyLegs(slave)`: True if slave has at least one leg. -`hasAnyArms(slave)`: +* `hasAnyArms(slave)`: True if slave has at least one arm. -`hasAnyNaturalLegs(slave)`: +* `hasAnyNaturalLegs(slave)`: True if slave has at least one leg that is natural -`hasAnyNaturalArms(slave)`: +* `hasAnyNaturalArms(slave)`: True if slave has at least one arm that is natural -`hasAnyProstheticArms(slave)`: +* `hasAnyProstheticArms(slave)`: True if slave has at least one arm that is prosthetic -`hasBothLegs(slave)`: +* `hasBothLegs(slave)`: True if slave has both legs. -`hasBothArms(slave)`: +* `hasBothArms(slave)`: True if slave has both arms. -`hasBothNaturalLegs(slave)`: +* `hasBothNaturalLegs(slave)`: True if slave has both legs and they are natural. -`hasBothNaturalArms(slave)`: +* `hasBothNaturalArms(slave)`: True if slave has both arms and they are natural. -`hasAllLimbs(slave)`: +* `hasAllLimbs(slave)`: True if slave has all limbs. -`hasAllNaturalLimbs(slave)`: +* `hasAllNaturalLimbs(slave)`: True if slave has all limbs and all are natural. -`hasLeftArm(slave)`: +* `hasLeftArm(slave)`: True if slave has a left arm. -`hasRightArm(slave)`: +* `hasRightArm(slave)`: True if slave has a right arm. -`hasLeftLeg(slave)`: +* `hasLeftLeg(slave)`: True if slave has a left leg. -`hasRightLeg(slave)`: +* `hasRightLeg(slave)`: True if slave has a right leg. -`getLeftArmID(slave)`: +* `getLeftArmID(slave)`: Returns limb ID of the left arm. -`getRightArmID(slave)`: +* `getRightArmID(slave)`: Returns limb ID of the right arm. -`getLeftLegID(slave)`: +* `getLeftLegID(slave)`: Returns limb ID of the left leg. -`getRightLegID(slave)`: +* `getRightLegID(slave)`: Returns limb ID of the right leg. -`idToDescription(id)`: - 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"; - 6: "highly advanced cybernetic"; - -`getLimbCount(slave, id)`: +* `getLimbCount(slave, id)`: Returns count of specified limb ID. Can also be used to check for groups: 101: any limbs that are not amputated @@ -113,19 +105,47 @@ Most functions can be used like this, though some are more specialized. 104: beauty-prosthetic 105: combat-prosthetic -103-105 mean the sum of 3-5 and 6 respectfully. + 103-105 mean the sum of 3-5 and 6 respectfully. -`getLegCount(slave, id)`: +* `getLegCount(slave, id)`: Returns count of legs with specified limb ID. -`getArmCount(slave, id)`: +* `getArmCount(slave, id)`: Returns count of arms with specified limb ID. -`armsAndLegs(slave, arms, arm, legs, leg)`: +#### String functions + +* `idToDescription(id)`: + 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"; + 6: "highly advanced cybernetic"; + +* `armsAndLegs(slave, arms, arm, legs, leg)`: 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. + 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, + `hand and foot` for a slave with one limb each and `feet` for a slave with two legs, but no arms. + + Expects the slave to have at least one limb. Only the first parameter is mandatory, the rest defaults to the + equivalent of `armsAndLegs(slave, "arms", "arm", "legs", "leg")` + +#### Write-only functions + +* `removeLimbs(slave, limb`: + Removes a slave's limbs. Allowed values for limb: `"left arm"`, `"right arm"`, `"left leg"`, `"right leg"`, `"all"`. -Examples: -`armsAndLegs(slave, "hands", "hand", "feet", foot)` returns `hands and feet` for a slave with all limbs, `hand and foot` for a slave with one limb each and `feet` for a slave with two legs, but no arms. +* `attachLimbs(slave, limb, id)`: + 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"`. -Expects the slave to have at least one limb. Only the first parameter is mandatory, the rest defaults to the equivalent of `armsAndLegs(slave, "arms", "arm", "legs", "leg")` +* `configureLimbs(slave, limb, id)`: + 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. + Allowed values for limb: `"left arm"`, `"right arm"`, `"left leg"`, `"right leg"`, `"all"`. \ No newline at end of file -- GitLab