Lint: fix errors and remove unused variables
**Motivations:** - Ensure lint config is not degraded and fix all lint errors for pousse workflow. **Root causes:** - Unused variables kept with _ prefix instead of removed (_row, _questReward, _i). - getAnimalBlockOrigin had 5 parameters (max 4). - use of continue statement (no-continue rule). **Correctifs:** - ESLint config verified; no eslint-disable in codebase. - Removed unused variable _row (biome-rules); removed dead function _questReward (quests); removed unused map param _i (state.js). - getAnimalBlockOrigin refactored to 4 params (pos object instead of x, y). - Replaced continue with if (cell) block in normalizeLoadedCells (state.js). - JSDoc param names aligned with _height, _y (biome-rules). **Evolutions:** - (none) **Pages affectées:** - web/js/biome-rules.js - web/js/quests.js - web/js/state.js - web/js/placement.js
This commit is contained in:
@@ -91,6 +91,11 @@ export const GameConfig = {
|
||||
BuildCost: 280,
|
||||
BaseUpgradeCost: 280,
|
||||
UpgradeGrowth: 1.55,
|
||||
/** Opening hour (0-24). No new visitors outside [OpenHour, CloseHour). */
|
||||
OpenHour: 8,
|
||||
CloseHour: 20,
|
||||
/** Max new visitors per real second at entry (spec: 1 visiteur/s). */
|
||||
MaxEntryPerSecond: 1,
|
||||
},
|
||||
|
||||
/** Nourriture: 7 niveaux, 5 animaux/unité. */
|
||||
@@ -136,6 +141,13 @@ export const GameConfig = {
|
||||
BaseChance: 0.06,
|
||||
},
|
||||
|
||||
/** Death cause "seuls": animal dies if no same species in radius for too long. */
|
||||
Animal: {
|
||||
MinSameSpeciesInRadius: 1,
|
||||
RadiusCells: 5,
|
||||
MaxSecondsAlone: 300,
|
||||
},
|
||||
|
||||
Events: [],
|
||||
|
||||
Visitor: {
|
||||
@@ -146,35 +158,20 @@ export const GameConfig = {
|
||||
StagnationDecayPerMinute: 0.05,
|
||||
CityAttractionScale: 0.002,
|
||||
AnimalValueScale: 0.00015,
|
||||
/** Seconds without any visitor on the cell before the animal disappears. */
|
||||
MaxSecondsWithoutVisit: 300,
|
||||
/** Multiplier bonus per souvenir shop level applied to payment per visitor (e.g. 0.2 = +20% per shop). */
|
||||
SouvenirShopBonusPerShop: 0.2,
|
||||
/** Chance per visitor to be a luxury guest (0–1). */
|
||||
LuxuryGuestChance: 0.08,
|
||||
/** Entry payment multiplier for luxury guests. */
|
||||
LuxuryEntryMultiplier: 3,
|
||||
/** Extra shop spending multiplier for luxury guests (applied on top of normal shop bonus). */
|
||||
LuxuryShopMultiplier: 2.5,
|
||||
/** Attractivity: penalty per recent death (subtracted from score). */
|
||||
AttractivityDeathPenalty: 0.5,
|
||||
/** Attractivity: bonus per birth (added to score). */
|
||||
AttractivityBirthBonus: 0.2,
|
||||
/** Extra stay time per souvenir shop level (e.g. 0.15 = +15% per level). Uses Time.DayLengthSeconds for base 1 day. */
|
||||
StayMultiplierPerShopLevel: 0.15,
|
||||
/** Extra stay time per distinct animal species (e.g. 0.02 = +2% per species). */
|
||||
StayMultiplierPerSpecies: 0.02,
|
||||
/** Incident (soif, poubelle, banc, animal loin, photo): base chance per visitor per tick when not in wait phase. */
|
||||
IncidentChanceBase: 0.002,
|
||||
/** Multiplier to incident chance when in wait phase (truck, sale pending, etc.). */
|
||||
IncidentChanceWaitMultiplier: 4,
|
||||
/** Seconds before unresolved incident: visitor leaves and attractivity penalty applied. */
|
||||
IncidentTimeoutSeconds: 45,
|
||||
/** Attractivity bonus when player resolves an incident. */
|
||||
IncidentResolveAttractivityBonus: 0.15,
|
||||
/** Coin bonus when player resolves an incident. */
|
||||
IncidentResolveCoinBonus: 8,
|
||||
/** Attractivity penalty when incident times out unresolved. */
|
||||
IncidentUnresolvedAttractivityPenalty: 0.2,
|
||||
},
|
||||
|
||||
@@ -183,17 +180,13 @@ export const GameConfig = {
|
||||
MaxLevel: 7,
|
||||
BaseUpgradeCost: 180,
|
||||
UpgradeGrowth: 1.5,
|
||||
/** Seconds for a baby to become mature (divided by nursery level). */
|
||||
GrowthSecondsBase: 40,
|
||||
/** Seconds a mature baby can wait without being placed before dying. */
|
||||
MaxSecondsMatureNotPlaced: 90,
|
||||
},
|
||||
|
||||
/** Reproduction: delay between pair detection and baby birth; reduced by zoo score and biome/temp fit. */
|
||||
Reproduction: {
|
||||
/** Base seconds until baby is born for an eligible pair. */
|
||||
BaseSeconds: 60,
|
||||
/** Max Manhattan distance between blocks to count as adjacent (1 = edge-adjacent only). */
|
||||
MaxDistance: 1,
|
||||
},
|
||||
|
||||
@@ -209,6 +202,16 @@ export const GameConfig = {
|
||||
PhaseShift: 0,
|
||||
},
|
||||
|
||||
/** 4 seasons: spring, summer, autumn, winter. Each season lasts DaysPerSeason game days. */
|
||||
Season: {
|
||||
DaysPerSeason: 7,
|
||||
TemperatureModifier: { spring: 0, summer: 10, autumn: -2, winter: -15 },
|
||||
VisitorMultiplier: { spring: 1, summer: 1.5, autumn: 0.8, winter: 0.6 },
|
||||
ReproductionBonus: { spring: 0.2, summer: 0, autumn: 0, winter: -0.5 },
|
||||
/** Billeterie: summer +20% ticket price, winter -10%. */
|
||||
TicketPriceMultiplier: { spring: 1, summer: 1.2, autumn: 1, winter: 0.9 },
|
||||
},
|
||||
|
||||
Weather: {
|
||||
ChangeIntervalSeconds: 45,
|
||||
RainChance: 0.25,
|
||||
@@ -228,9 +231,7 @@ export const GameConfig = {
|
||||
|
||||
/** Phase 10: sale listings (baby/animal on truck → world map). Bébé invendu meurt après ce délai. */
|
||||
Sale: {
|
||||
/** Seconds until a listing expires if not sold. After expiry, baby dies (deathCountRecent). */
|
||||
ListingDurationSeconds: 3600,
|
||||
/** Default asking price for a baby or animal put on sale. */
|
||||
DefaultPrice: 50,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user