mirror of
https://gitgud.io/Vrelnir/degrees-of-lewdity.git
synced 2026-09-15 06:04:27 +08:00
503 lines
14 KiB
JavaScript
503 lines
14 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
|
|
// Keep variables sorted within groups (separated by "// ..." comment lines)
|
|
globals: {
|
|
// SugarCube APIs
|
|
Browser: "readonly",
|
|
Config: "readonly",
|
|
DebugView: "readonly",
|
|
Dialog: "readonly",
|
|
Engine: "readonly",
|
|
Fullscreen: "readonly",
|
|
L10n: "readonly",
|
|
l10nStrings: "readonly",
|
|
LoadScreen: "readonly",
|
|
Macro: "readonly",
|
|
Save: "readonly",
|
|
Scripting: "readonly",
|
|
Setting: "readonly",
|
|
setup: "readonly",
|
|
State: "readonly",
|
|
Story: "readonly",
|
|
SugarCube: "readonly",
|
|
Template: "readonly",
|
|
UI: "readonly",
|
|
UIBar: "readonly",
|
|
PRNGWrapper: "readonly",
|
|
idb: "readonly",
|
|
wikifier: "readonly",
|
|
// SugarCube functions
|
|
clone: "readonly",
|
|
either: "readonly",
|
|
forget: "readonly",
|
|
hasVisited: "readonly",
|
|
importScripts: "readonly",
|
|
importStyles: "readonly",
|
|
lastVisited: "readonly",
|
|
memorize: "readonly",
|
|
passage: "readonly",
|
|
previous: "readonly",
|
|
random: "readonly",
|
|
randomFloat: "readonly",
|
|
recall: "readonly",
|
|
setPageElement: "readonly",
|
|
tags: "readonly",
|
|
temporary: "readonly",
|
|
time: "readonly",
|
|
turns: "readonly",
|
|
variables: "readonly",
|
|
visited: "readonly",
|
|
visitedTags: "readonly",
|
|
throwError: "writeable",
|
|
// DoL shortcuts
|
|
C: "readonly",
|
|
DeserializeGame: "readonly",
|
|
F: "readonly", // setup.foodstuff
|
|
globals: "readonly",
|
|
T: "readonly",
|
|
V: "readonly",
|
|
statChange: "readonly",
|
|
// DoL main namespaces
|
|
DOL: "readonly",
|
|
defineGlobalNamespaces: "readonly",
|
|
Errors: "readonly",
|
|
Versions: "readonly",
|
|
Perflog: "readonly",
|
|
Stack: "readonly",
|
|
Wikifier: "readonly",
|
|
// DoL other namespaces/objects
|
|
ClothesItem: "readonly",
|
|
Constants: "readonly",
|
|
ConstantsLoader: "readonly",
|
|
Cooker: "readonly",
|
|
currentlyLoadingMap: "readonly",
|
|
ColourUtils: "readonly",
|
|
DateTime: "readonly",
|
|
DolSettingsExport: "readonly",
|
|
Dynamic: "readonly",
|
|
EventSystem: "readonly",
|
|
ExecutionContext: "readonly",
|
|
StackMacroMeta: "readonly",
|
|
StackWidgetMeta: "readonly",
|
|
TweeDebugger: "readonly",
|
|
JsonCompressor: "readonly",
|
|
JsonDecompressor: "readonly",
|
|
IronMan: "readonly",
|
|
Links: "readonly",
|
|
playerDoll: "readonly",
|
|
statDisplay: "readonly",
|
|
Renderer: "readonly",
|
|
SexTypes: "readonly",
|
|
StartConfig: "readonly",
|
|
Time: "readonly",
|
|
PregnancyConstants: "readonly",
|
|
TimeConstants: "readonly",
|
|
Utils: "readonly",
|
|
ZIndices: "readonly",
|
|
Packer: "readonly",
|
|
Weather: "readonly",
|
|
BaseCanvas: "readonly",
|
|
Orbital: "readonly",
|
|
Fadable: "readonly",
|
|
Skin: "readonly",
|
|
Sunscreen: "readonly",
|
|
Theme: "readonly",
|
|
// DoL SC2 functions
|
|
compressionVerifier: "readonly",
|
|
DefineMacro: "readonly",
|
|
DefineMacroS: "readonly",
|
|
DoLCompressorDictionaries: "readonly",
|
|
DoLSave: "readonly",
|
|
// DoL functions
|
|
tendingDay: "readonly",
|
|
ampm: "readonly",
|
|
assignDefaults: "readonly",
|
|
calculatePenisBulge: "readonly",
|
|
calchairlengthstage: "readonly",
|
|
cheatsUpdateSlider: "readonly",
|
|
closeOverlay: "readonly",
|
|
clothesDataTrimmer: "readonly",
|
|
clothesIndex: "readonly",
|
|
clothingData: "readonly",
|
|
combatListColor: "readonly",
|
|
currentSkillValue: "readonly",
|
|
dangerEvent: "readonly",
|
|
eCheckbox: "readonly",
|
|
earnHourlyFeats: "readonly",
|
|
eInput: "readonly",
|
|
elechild: "readonly",
|
|
elechildren: "readonly",
|
|
element: "readonly",
|
|
endPlayerPregnancy: "readonly",
|
|
ensure: "readonly",
|
|
ensureIsArray: "readonly",
|
|
eSelect: "readonly",
|
|
getTimeString: "readonly",
|
|
generateBabyName: "readonly",
|
|
getBirdBurnTime: "readonly",
|
|
getCustomClothesColourCanvasFilter: "readonly",
|
|
getCustomColourRGB: "readonly",
|
|
getCustomColourStyle: "readonly",
|
|
getFormattedDate: "readonly",
|
|
getKylarLibraryState: "readonly",
|
|
getParasiteObject: "readonly",
|
|
getRandomIntInclusive: "readonly",
|
|
getRobinLocation: "readonly",
|
|
getSexesFromRandomGroup: "readonly",
|
|
getSpecialSets: "readonly",
|
|
getUnlockedSpecialSets: "readonly",
|
|
getSydneyLoveNorm: "readonly",
|
|
getTrueWarmth: "readonly",
|
|
getVisibleClothesList: "readonly",
|
|
gwylanHypnoMax: "readonly",
|
|
hairLengthStringToNumber: "readonly",
|
|
hasSharpSenses: "readonly",
|
|
inDOM: "readonly",
|
|
integrityKeyword: "readonly",
|
|
ironmanAutoSave: "readonly",
|
|
isBloodmoon: "readonly",
|
|
isGwylanAbsent: "readonly",
|
|
isKylarInPlayRole: "readonly",
|
|
isKylarRehearsing: "readonly",
|
|
knowsAboutAnyPregnancy: "readonly",
|
|
listUniqueCarriedSextoys: "readonly",
|
|
loadCustomColourPreset: "readonly",
|
|
lustfulUpdate: "readonly",
|
|
maleChance: "readonly",
|
|
masturbationActions: "readonly",
|
|
masturbationAudience: "readonly",
|
|
masturbationEffects: "readonly",
|
|
masturbationSlimeControl: "readonly",
|
|
maxParasites: "readonly",
|
|
npcCompressor: "readonly",
|
|
npcDecompressor: "readonly",
|
|
npcEquipSet: "readonly",
|
|
npcMakeNaked: "readonly",
|
|
npcPregnancyCycle: "readonly",
|
|
numberOfEarSlime: "readonly",
|
|
ordinalSuffixOf: "readonly",
|
|
hasExceptionalAnalPregnancy: "readonly",
|
|
hasPregnancyTattoo: "readonly",
|
|
orificeHasParasites: "readonly",
|
|
overlayShowHide: "readonly",
|
|
painToTearsLvl: "readonly",
|
|
parasiteProgressDay: "readonly",
|
|
parasiteProgressTime: "readonly",
|
|
parseCSSFilter: "readonly",
|
|
pcAreArmsBound: "readonly",
|
|
pcGetArmsBound: "readonly",
|
|
pickRandomItemInArray: "readonly",
|
|
playerAwareTheyArePregnant: "readonly",
|
|
playerBellySize: "readonly",
|
|
playerBellyVisible: "readonly",
|
|
playerChastity: "readonly",
|
|
playerHasButtPlug: "readonly",
|
|
playerHasStrapon: "readonly",
|
|
playerHeatMinArousal: "readonly",
|
|
playerIsPregnant: "readonly",
|
|
playerNormalPregnancyTotal: "readonly",
|
|
playerNormalPregnancyType: "readonly",
|
|
playerPregnancyProgress: "readonly",
|
|
playerRutMinArousal: "readonly",
|
|
advancePregnancy: "readonly",
|
|
randomPregnancyProgress: "readonly",
|
|
registerGeneratedPattern: "readonly",
|
|
removeDiacritics: "readonly",
|
|
registerImagePattern: "readonly",
|
|
returnTimeFormat: "readonly",
|
|
rgbToHsv: "readonly",
|
|
rollKylarLibraryStalkFlag: "readonly",
|
|
selfOr: "readonly",
|
|
setKnowsAboutPregnancy: "readonly",
|
|
setLowerVisibility: "readonly",
|
|
settingsConvert: "readonly",
|
|
settingsObjects: "readonly",
|
|
shopClothCustomColorWheel: "readonly",
|
|
shopHuntCoords: "readonly",
|
|
shopHuntLoc: "readonly",
|
|
shopHuntIsHole: "readonly",
|
|
shopHuntBordering: "readonly",
|
|
shopHuntFind: "readonly",
|
|
shopHuntMannequinLocs: "readonly",
|
|
shopHuntContains: "readonly",
|
|
shopHuntEmpty: "readonly",
|
|
shopHuntWalls: "readonly",
|
|
shopHuntObstacles: "readonly",
|
|
shopHuntLocName: "readonly",
|
|
shopHuntLocNameCap: "readonly",
|
|
shopHuntItemsPresent: "readonly",
|
|
shopHuntLocsSearched: "readonly",
|
|
shopHuntSeeLoc: "readonly",
|
|
shopHuntPlayerKnownMap: "readonly",
|
|
shopHuntMapMove: "readonly",
|
|
shopHuntDirectionApply: "readonly",
|
|
shopHuntDirectionGet: "readonly",
|
|
shopHuntUntilWall: "readonly",
|
|
shopHuntCampingCount: "readonly",
|
|
shopHuntLocationsByDistance: "readonly",
|
|
shopHuntActorsPresent: "readonly",
|
|
shopHuntFootstepsHeard: "readonly",
|
|
shopHuntActorMakesFootsteps: "readonly",
|
|
shopHuntRelativeDirection: "readonly",
|
|
sliderPerc: "readonly",
|
|
statusCheck: "readonly",
|
|
storeNPC: "readonly",
|
|
sydneySchedule: "readonly",
|
|
tanned: "readonly",
|
|
updateCustomColour: "readonly",
|
|
updateExportDay: "readonly",
|
|
updateFeats: "readonly",
|
|
updateMannequin: "readonly",
|
|
updateSavesCount: "readonly",
|
|
validateValue: "readonly",
|
|
waterproofCheck: "readonly",
|
|
initializeTooltips: "readonly",
|
|
// Pregnancy functions
|
|
eyeColourCalc: "readonly",
|
|
canPlayerConceive: "readonly",
|
|
canNpcConceive: "readonly",
|
|
impregnationDisabled: "readonly",
|
|
playerCanCarryAnally: "readonly",
|
|
menstrualOutlook: "readonly",
|
|
createPregnancy: "readonly",
|
|
recordPendingPregnancy: "readonly",
|
|
birdConceptionPending: "readonly",
|
|
createChild: "readonly",
|
|
pushPregnancyRecord: "readonly",
|
|
pushChildRecord: "readonly",
|
|
gestationSeconds: "readonly",
|
|
getDueDate: "readonly",
|
|
getHatchDate: "readonly",
|
|
getChildrenOf: "readonly",
|
|
getPregnancyOf: "readonly",
|
|
getActivePregnancy: "readonly",
|
|
getActivePregnancies: "readonly",
|
|
getPlayerPregnancy: "readonly",
|
|
daysAlong: "readonly",
|
|
getLabouringPregnancy: "readonly",
|
|
getLabouringLitter: "readonly",
|
|
hasTalkedAbout: "readonly",
|
|
markTalkedAbout: "readonly",
|
|
couldBeDonor: "readonly",
|
|
recordDelivery: "readonly",
|
|
recordBirth: "readonly",
|
|
beginRearing: "readonly",
|
|
beginRearingDefaults: "readonly",
|
|
migratePregnancyData: "readonly",
|
|
birthRecordedLitter: "readonly",
|
|
setPlayerLearnedFrom: "readonly",
|
|
resolvePaternity: "readonly",
|
|
pregnancyProgress: "readonly",
|
|
inseminate: "readonly",
|
|
fetishPregnancyRoll: "readonly",
|
|
playerConceptionModifier: "readonly",
|
|
hourlyPregnancyUpdate: "readonly",
|
|
rollAndRecordConception: "readonly",
|
|
legacyPregnancyChanceToPercent: "readonly",
|
|
oldDateToTimestamp: "readonly",
|
|
fertilityRamp: "readonly",
|
|
menstrualDayIn: "readonly",
|
|
menstrualNextWindowIn: "readonly",
|
|
menstrualFertility: "readonly",
|
|
menstrualExposure: "readonly",
|
|
cycleFertilityRamp: "readonly",
|
|
menstrualCycleFertility: "readonly",
|
|
loadSurvival: "readonly",
|
|
fertilityBoost: "readonly",
|
|
readyToCarry: "readonly",
|
|
fertilityOnCycleDay: "readonly",
|
|
fertilityFloor: "readonly",
|
|
contraceptiveGuard: "readonly",
|
|
doseTakenIn: "readonly",
|
|
loadAgeDay: "readonly",
|
|
npcMenstrualFertility: "readonly",
|
|
npcConceptionModifier: "readonly",
|
|
offspringSpecies: "readonly",
|
|
childBaseSpecies: "readonly",
|
|
generateChildren: "readonly",
|
|
rollLitterSize: "readonly",
|
|
resolveChildParent: "readonly",
|
|
rollChildGender: "readonly",
|
|
pcHeritage: "readonly",
|
|
washLoads: "readonly",
|
|
takeMorningAfterPill: "readonly",
|
|
knowsPregnancy: "readonly",
|
|
knowsChild: "readonly",
|
|
setKnowsPregnancy: "readonly",
|
|
setKnowsDonor: "readonly",
|
|
setKnowsCarrier: "readonly",
|
|
childIsBorn: "readonly",
|
|
childIsUnhatchedEgg: "readonly",
|
|
getBornChildren: "readonly",
|
|
getChildrenAt: "readonly",
|
|
childAgeOf: "readonly",
|
|
checkLabour: "readonly",
|
|
migrateChildrenToRecords: "readonly",
|
|
migrateChildFeatures: "readonly",
|
|
migrateInflightPregnanciesToRecords: "readonly",
|
|
// DoL math functions
|
|
round: "readonly",
|
|
normalise: "readonly",
|
|
categorise: "readonly",
|
|
randomExp: "readonly",
|
|
expCurve: "readonly",
|
|
between: "readonly",
|
|
nCr: "readonly",
|
|
formatDecimals: "readonly",
|
|
inverseLerp: "readonly",
|
|
lerp: "readonly",
|
|
interpolate: "readonly",
|
|
interpolateObject: "readonly",
|
|
boundedRandom: "readonly",
|
|
calculateBinomial: "readonly",
|
|
weightedRandom: "readonly",
|
|
degToRad: "readonly",
|
|
normAngle: "readonly",
|
|
shortestDelta: "readonly",
|
|
doArraysMatch: "readonly",
|
|
countMatchesInArray: "readonly",
|
|
arrayIntersect: "readonly",
|
|
countMatchesInNestedArray: "readonly",
|
|
applyArrays: "readonly",
|
|
bubbleSort: "readonly",
|
|
arrayClamp: "readonly",
|
|
// DoL object functions
|
|
formatList: "readonly",
|
|
stringFrom: "readonly",
|
|
toTitleCase: "readonly",
|
|
resolveValue: "readonly",
|
|
// DoL A* pathfinding functions
|
|
aStarMovement: "readonly",
|
|
aStar: "readonly",
|
|
aStarConsoleLine: "readonly",
|
|
aStarGenerateNextSteps: "readonly",
|
|
aStarHeuristic: "readonly",
|
|
aStarPathIntersectsObstacle: "readonly",
|
|
aStarGetPath: "readonly",
|
|
aStarGetObstacles: "readonly",
|
|
aStarIsObstacle: "readonly",
|
|
// DoL classes
|
|
ObservableValue: "readonly",
|
|
CanvasModel: "readonly",
|
|
PRNG: "readonly",
|
|
// Third-party
|
|
define: "readonly",
|
|
iro: "readonly",
|
|
LZString: "readonly",
|
|
md5: "readonly",
|
|
tinycolor: "readonly",
|
|
Mousetrap: "readonly",
|
|
// Unknown (Can't find declaration either in SugarCube docs nor in codebase)
|
|
config: "readonly",
|
|
saveAs: "readonly",
|
|
schemaVersion: "readonly",
|
|
session: "readonly",
|
|
Util: "readonly",
|
|
version: "readonly",
|
|
getClothingCost: "readonly",
|
|
isLoveInterest: "readonly",
|
|
nullable: "readonly",
|
|
combat: "readonly",
|
|
condomState: "readonly",
|
|
isPossibleLoveInterestVirginity: "readonly",
|
|
wearingCondom: "readonly",
|
|
npcHasStrapon: "readonly",
|
|
},
|
|
|
|
ignorePatterns: [
|
|
"**/*.*",
|
|
"!**/*.js",
|
|
"!**/*.cjs",
|
|
// Format config file
|
|
"!.eslintrc.cjs",
|
|
"node_modules",
|
|
"devTools",
|
|
"dist",
|
|
"game/03-JavaScript/external",
|
|
"game/03-JavaScript/00-libs/renderer.js",
|
|
],
|
|
|
|
parserOptions: {
|
|
sourceType: "module",
|
|
},
|
|
|
|
env: {
|
|
browser: true,
|
|
es2022: true,
|
|
jquery: true,
|
|
},
|
|
|
|
plugins: ["es-x"],
|
|
|
|
extends: ["eslint:recommended", "plugin:jsdoc/recommended", "prettier-standard/prettier-file", "plugin:es-x/restrict-to-es2022"],
|
|
|
|
settings: {
|
|
jsdoc: {
|
|
mode: "jsdoc",
|
|
},
|
|
},
|
|
|
|
// Keep rules grouped by plugin and sorted alphabetically
|
|
rules: {
|
|
"object-shorthand": ["error", "always"],
|
|
|
|
// SugarCube extends native objects and we follow it
|
|
"no-extend-native": "off",
|
|
|
|
/* hasOwn */
|
|
// No need for this, since we're overriding hasOwn for older browers (01-compatibility.js)
|
|
// Warn for the hasOwnProperty instead
|
|
"es-x/no-object-hasown": "off",
|
|
"prefer-object-has-own": "warn",
|
|
|
|
/* eslint-plugin-jsdoc */
|
|
|
|
// Descriptions should be sentence-like not comment-like
|
|
"jsdoc/require-description-complete-sentence": "off",
|
|
"jsdoc/require-hyphen-before-param-description": ["error", "never", { tags: { property: "never" } }],
|
|
// Adding JSDoc is preferable but not required
|
|
"jsdoc/require-jsdoc": "off",
|
|
"jsdoc/require-param-description": "off",
|
|
"jsdoc/require-property-description": "off",
|
|
"jsdoc/require-returns-description": "off",
|
|
"jsdoc/require-returns": "off",
|
|
|
|
"jsdoc/no-undefined-types": [
|
|
1,
|
|
{
|
|
definedTypes: [
|
|
"EventNpc",
|
|
"ClothesItem",
|
|
"Penetrator",
|
|
"TentacleState",
|
|
"CompositeLayerParams",
|
|
"CompositeLayerSpec",
|
|
"CanvasModelOptions",
|
|
"CanvasModelLayer",
|
|
"AnimatingCanvas",
|
|
"Options",
|
|
"Npc",
|
|
"NpcOptions",
|
|
"Pregnancy",
|
|
"Child",
|
|
"PossibleDonor",
|
|
"Features",
|
|
"Load",
|
|
"PendingPregnancy",
|
|
"Menstruation",
|
|
"TrackedNpc",
|
|
"NpcNames",
|
|
"ChildParent",
|
|
"DonorSpecies",
|
|
"ChildSpecies",
|
|
],
|
|
},
|
|
],
|
|
|
|
/* eslint-plugin-prettier */
|
|
|
|
"prettier/prettier": "warn",
|
|
},
|
|
};
|