Index: binaries/data/mods/public/simulation/components/interfaces/AIProxy.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/AIProxy.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/AIProxy.js	(copie de travail)
@@ -1,5 +1,7 @@
 Engine.RegisterInterface("AIProxy");
 
-// Message of the form { "id": XXXX, "medatada", "owner": whatever }.
-// created to register metadata for buildings.
+/**
+ * Message of the form { "id": number, "metadata": object, "owner": number }
+ * sent from Commands to register metadata for buildings.
+ */
 Engine.RegisterMessageType("AIMetadata");
Index: binaries/data/mods/public/simulation/components/interfaces/Attack.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/Attack.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/Attack.js	(copie de travail)
@@ -1,6 +1,7 @@
 Engine.RegisterInterface("Attack");
 
-// Message sent from Attack to the target entity, each
-// time the target is damaged.
-// Data: { attacker: 123, target: 234, type: "Melee", damage: 123 } 
+/**
+ * Message of the form { "attacker": number, "target": number, "type": string, "damage": number }
+ * sent from Attack component and by Damage to the target entity, each time the target is attacked or damaged.
+ */
 Engine.RegisterMessageType("Attacked");
Index: binaries/data/mods/public/simulation/components/interfaces/AttackDetection.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/AttackDetection.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/AttackDetection.js	(copie de travail)
@@ -1,5 +1,7 @@
 Engine.RegisterInterface("AttackDetection");
 
-// Message of the form { "player": 1, "event": { "target": 123 , "position": { "x": 123, "z": 456 }, "time": 1, }.
-// sent when a new attack is detected.
+/**
+ * Message of the form { "player": number, "event": { "target": number , "position": { "x": number, "z": number }, "time": number, "targetIsDomesticAnimal": boolean } }
+ * sent from AttackDetection component when a new attack is detected.
+ */
 Engine.RegisterMessageType("AttackDetected");
Index: binaries/data/mods/public/simulation/components/interfaces/BattleDetection.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/BattleDetection.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/BattleDetection.js	(copie de travail)
@@ -1,5 +1,7 @@
 Engine.RegisterInterface("BattleDetection");
 
-// Message of the form { "to": "STATE" }.
-// sent whenever the battle state changes
+/**
+ * Message of the form { "player": number, "to": string }
+ * sent from BattleDetection component whenever the battle state changes.
+ */
 Engine.RegisterMessageType("BattleStateChanged");
Index: binaries/data/mods/public/simulation/components/interfaces/Capturable.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/Capturable.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/Capturable.js	(copie de travail)
@@ -1,8 +1,17 @@
 Engine.RegisterInterface("Capturable");
 
-// Message in the form of {"capturePoints": [gaia, p1, p2, ...]}
+/**
+ * Message of the form { "capturePoints": number[] }
+ * where "capturePoints" value is an array indexed by players id,
+ * sent from Capturable component.
+ */
 Engine.RegisterMessageType("CapturePointsChanged");
-// Message in the form of {"regenerating": Boolean, "rate": Number}
-// Where rate is always zero when not decaying
+
+/**
+ * Message in the form of { "regenerating": boolean, "rate": number, "territoryDecay": number }
+ * or in the form { "ticking": boolean, "rate": number, "territoryDecay": number }
+ * where "rate" value is always zero when not decaying,
+ * sent from Capturable component.
+ */
 Engine.RegisterMessageType("CaptureRegenStateChanged");
 
Index: binaries/data/mods/public/simulation/components/interfaces/CeasefireManager.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/CeasefireManager.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/CeasefireManager.js	(copie de travail)
@@ -1,4 +1,11 @@
 Engine.RegisterInterface("CeasefireManager");
 
+/**
+ * Message sent from CeasefireManager component.
+ */
 Engine.RegisterMessageType("CeasefireStarted");
-Engine.RegisterMessageType("CeasefireEnded");
\ Pas de fin de ligne à la fin du fichier
+
+/**
+ * Message sent from CeasefireManager component.
+ */
+Engine.RegisterMessageType("CeasefireEnded");
Index: binaries/data/mods/public/simulation/components/interfaces/EndGameManager.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/EndGameManager.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/EndGameManager.js	(copie de travail)
@@ -1,4 +1,19 @@
 Engine.RegisterInterface("EndGameManager");
+
+/**
+ * Message of the form { "playerID": number }
+ * sent from Player component when the player is defeated.
+ */
 Engine.RegisterMessageType("PlayerDefeated");
+
+/**
+ * Message of the form { "playerID": number }
+ * sent from Player component when the player has won.
+ */
 Engine.RegisterMessageType("PlayerWon");
+
+/**
+ * Message of the form {}
+ * sent from EndGameManager component.
+ */
 Engine.RegisterMessageType("GameTypeChanged");
Index: binaries/data/mods/public/simulation/components/interfaces/Foundation.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/Foundation.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/Foundation.js	(copie de travail)
@@ -1,14 +1,22 @@
 Engine.RegisterInterface("Foundation");
 
-// Message sent from Foundation to its own entity when construction
-// has been completed.
-// Units can watch for this and change task once it's complete.
-// Data: { entity: 123, newentity: 234 }
+/**
+ * Message of the form { "entity": number, "newentity": number }
+ * sent from Foundation and Repairable components to its own entity when construction has been completed.
+ * Units can watch for this and change task once it's complete.
+ */
 Engine.RegisterMessageType("ConstructionFinished");
 
-// Message of the form { "to", 59 }, as the percentage complete
-// sent whenever the foundations progress changes.
+/**
+ * Message of the form { "to": number }
+ * as the percentage complete,
+ * sent from Foundation component whenever the foundations progress changes.
+ */
 Engine.RegisterMessageType("FoundationProgressChanged");
 
-// Message of the form { "to", [builders] }, as the builders change
+/**
+ * Message of the form { "to": number[] }
+ * where "to" value is an array of builders entity id,
+ * sent from Foundation component whenever the foundation builders changes.
+ */
 Engine.RegisterMessageType("FoundationBuildersChanged");
Index: binaries/data/mods/public/simulation/components/interfaces/GarrisonHolder.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/GarrisonHolder.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/GarrisonHolder.js	(copie de travail)
@@ -1,9 +1,13 @@
 Engine.RegisterInterface("GarrisonHolder");
 
-// Message of the form { "added":[], "removed":[] } (and use GetEntities if you want the current details),
-// sent to the current entity whenever the garrisoned units change.
+/**
+ * Message of the form { "added": number[], "removed": number[] }
+ * sent from the GarrisonHolder component to the current entity whenever the garrisoned units change.
+ */
 Engine.RegisterMessageType("GarrisonedUnitsChanged");
 
-// Message of the form { "holder": this.entity, "unit" : unit } sent to the AlertRaiser
-// which ordered the unit "unit" to garrison.
+/**
+ * Message of the form { "holder": number, "unit" : number }
+ * sent to the AlertRaiser which ordered the unit "unit" to garrison.
+ */
 Engine.RegisterMessageType("UnitGarrisonedAfterAlert");
Index: binaries/data/mods/public/simulation/components/interfaces/Guard.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/Guard.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/Guard.js	(copie de travail)
@@ -1,5 +1,8 @@
 Engine.RegisterInterface("Guard");
 
-// Message of the form { "guarded": entity, "data": msg },
-// sent whenever a guarded/escorted unit is attacked
+/**
+ * Message of the form { "guarded": number, "data": object }
+ * where "data" value is a valid MT_Attacked message,
+ * sent from Guard component whenever a guarded/escorted unit is attacked.
+ */
 Engine.RegisterMessageType("GuardedAttacked");
Index: binaries/data/mods/public/simulation/components/interfaces/Health.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/Health.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/Health.js	(copie de travail)
@@ -1,5 +1,7 @@
 Engine.RegisterInterface("Health");
 
-// Message of the form { "from": 100, "to", 90 },
-// sent whenever health changes.
+/**
+ * Message of the form { "from": number, "to": number }
+ * sent from Health component whenever health changes.
+ */
 Engine.RegisterMessageType("HealthChanged");
Index: binaries/data/mods/public/simulation/components/interfaces/Messages.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/Messages.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/Messages.js	(copie de travail)
@@ -1,18 +1,30 @@
 /**
- * Broadcast message 
+ * Message of the form { entity: number, newentity: number }
  * sent when one entity is changed to other:
- * - from Foundation component when building construction is done
+ * - from Foundation component when building construction
+ * - from Formation component
+ * - from Health component
  * - from Promotion component when unit is promoted
  * - from Mirage component when a fogged entity is re-discovered
- * Data: { entity: <integer>, newentity: <integer> }
+ * - from SkirmishReplacer component
+ * - from Transform
  */
 Engine.RegisterMessageType("EntityRenamed");
 
+/**
+ * Message of the form { "player": number, "otherPlayer": number }
+ * sent from Player component when diplomacy changed for one player or between two players.
+ */
 Engine.RegisterMessageType("DiplomacyChanged");
 
-// Message of the form { "to": receiver, "from": sender, "amounts": amounts }.
-// sent whenever a tribute is sent
+/**
+ * Message of the form { "to": number, "from": number, "amounts": object }
+ * sent from Player component whenever a tribute is sent.
+ */
 Engine.RegisterMessageType("TributeExchanged");
 
-// Message sent by InitGame for component map-dependent initialization
+/**
+ * Message of the form {}
+ * sent from InitGame for component map-dependent initialization.
+ */
 Engine.RegisterMessageType("InitGame");
Index: binaries/data/mods/public/simulation/components/interfaces/Pack.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/Pack.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/Pack.js	(copie de travail)
@@ -1,9 +1,13 @@
 Engine.RegisterInterface("Pack");
 
-// Message of the form { "progress": 0.5 },
-// sent whenever packing progress is updated.
+/**
+ * Message of the form { "progress": number }
+ * sent from Pack component whenever packing progress is updated.
+ */
 Engine.RegisterMessageType("PackProgressUpdate");
 
-// Message of the form { "packed": true },
-// sent whenever packing finishes.
+/**
+ * Message of the form { "packed": boolean }
+ * sent from Pack component whenever packing finishes.
+ */
 Engine.RegisterMessageType("PackFinished");
Index: binaries/data/mods/public/simulation/components/interfaces/Player.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/Player.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/Player.js	(copie de travail)
@@ -1,5 +1,6 @@
 /**
- * Warn other components when a player changed civs
+ * Message of the form { "player": number, "from": string, "to": string }
+ * sent from Player component to warn other components when a player changed civs.
  * This should only happen in Atlas
  */
 Engine.RegisterMessageType("CivChanged");
Index: binaries/data/mods/public/simulation/components/interfaces/ProductionQueue.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/ProductionQueue.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/ProductionQueue.js	(copie de travail)
@@ -1,13 +1,19 @@
 Engine.RegisterInterface("ProductionQueue");
 
-// Message of the form { } (use GetQueue if you want the current details),
-// sent to the current entity whenever the training queue changes.
+/**
+ * Message of the form {}
+ * sent from ProductionQueue component to the current entity whenever the training queue changes.
+ */
 Engine.RegisterMessageType("ProductionQueueChanged");
 
-// Message of the form { entity: id }
-// sent to the current entity whenever a unit is about to be trained.
+/**
+ * Message of the form { "entity": number }
+ * sent from ProductionQueue component to the current entity whenever a unit is about to be trained.
+ */
 Engine.RegisterMessageType("TrainingStarted");
 
-// Message of the form { entities: [id, ...], metadata: ... }
-// sent to the current entity whenever a unit has been trained.
+/**
+ * Message of the form { "entities": number[], "owner": number, "metadata": object }
+ * sent from ProductionQueue component to the current entity whenever a unit has been trained.
+ */
 Engine.RegisterMessageType("TrainingFinished");
Index: binaries/data/mods/public/simulation/components/interfaces/ResourceDropsite.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/ResourceDropsite.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/ResourceDropsite.js	(copie de travail)
@@ -1,4 +1,7 @@
 Engine.RegisterInterface("ResourceDropsite");
 
-// Message of the form { "shared": true },
+/**
+ * Message of the form { "shared": boolean }
+ * sent from ResourceDropsite component.
+ */
 Engine.RegisterMessageType("DropsiteSharingChanged");
Index: binaries/data/mods/public/simulation/components/interfaces/ResourceGatherer.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/ResourceGatherer.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/ResourceGatherer.js	(copie de travail)
@@ -1,5 +1,7 @@
 Engine.RegisterInterface("ResourceGatherer");
 
-// Message of the form { "to", [ {"type":"wood", "amount":7, "max":10} ] },
-// sent whenever carrying amount changes.
+/**
+ * Message of the form { "to": [{ "type": string, "amount": number, "max":number }] }
+ * sent from ResourceGatherer component whenever carrying amount changes.
+ */
 Engine.RegisterMessageType("ResourceCarryingChanged");
Index: binaries/data/mods/public/simulation/components/interfaces/ResourceSupply.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/ResourceSupply.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/ResourceSupply.js	(copie de travail)
@@ -1,9 +1,13 @@
 Engine.RegisterInterface("ResourceSupply");
 
-// Message of the form { "from": 100, "to", 90 },
-// sent whenever supply level changes.
+/**
+ * Message of the form { "from": number, "to": number }
+ * sent from ResourceSupply component whenever supply level changes.
+ */
 Engine.RegisterMessageType("ResourceSupplyChanged");
 
-// Message of the form { "to": 10 },
-// sent whenever the number of gatherer changes
+/**
+ * Message of the form { "to": number }
+ * sent from ResourceSupply component whenever the number of gatherer changes.
+ */
 Engine.RegisterMessageType("ResourceSupplyNumGatherersChanged");
Index: binaries/data/mods/public/simulation/components/interfaces/SkirmishReplacer.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/SkirmishReplacer.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/SkirmishReplacer.js	(copie de travail)
@@ -1,2 +1,7 @@
 Engine.RegisterInterface("SkirmishReplacer");
+
+/**
+ * Message of the form {}
+ * sent from InitGame.
+ */
 Engine.RegisterMessageType("SkirmishReplace");
Index: binaries/data/mods/public/simulation/components/interfaces/TechnologyManager.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/TechnologyManager.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/TechnologyManager.js	(copie de travail)
@@ -1,4 +1,7 @@
 Engine.RegisterInterface("TechnologyManager");
 
+/**
+ * Message of the form { "player": number, "tech": string }
+ * sent from TechnologyManager component whenever a technology research is finished.
+ */
 Engine.RegisterMessageType("ResearchFinished");
-
Index: binaries/data/mods/public/simulation/components/interfaces/TerritoryDecay.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/TerritoryDecay.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/TerritoryDecay.js	(copie de travail)
@@ -1,5 +1,7 @@
 Engine.RegisterInterface("TerritoryDecay");
 
-// Message of the form { "entity": this.entity, "to": decaying }.
-// sent whenever the decay state changes
+/**
+ * Message of the form { "entity": number, "to": boolean, "rate": number }
+ * sent from TerritoryDecay component whenever the decay state changes.
+ */
 Engine.RegisterMessageType("TerritoryDecayChanged");
Index: binaries/data/mods/public/simulation/components/interfaces/Trigger.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/Trigger.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/Trigger.js	(copie de travail)
@@ -1,5 +1,13 @@
 Engine.RegisterInterface("Trigger");
 
+/**
+ * Message of the form {}
+ * sent from Player component.
+ */
 Engine.RegisterMessageType("DisabledTemplatesChanged");
 
+/**
+ * Message of the form {}
+ * sent from Player component.
+ */
 Engine.RegisterMessageType("DisabledTechnologiesChanged");
Index: binaries/data/mods/public/simulation/components/interfaces/UnitAI.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/UnitAI.js	(révision 18580)
+++ binaries/data/mods/public/simulation/components/interfaces/UnitAI.js	(copie de travail)
@@ -1,21 +1,33 @@
 Engine.RegisterInterface("UnitAI");
 
-// Message of the form { "idle": true },
-// sent whenever the unit's idle status changes.
+/**
+ * Message of the form { "idle": boolean }
+ * sent from UnitAI whenever the unit's idle status changes.
+ */
 Engine.RegisterMessageType("UnitIdleChanged");
 
-// Message of the form { "to": "STATE.NAME" }.
-// sent whenever the unit changes state
+/**
+ * Message of the form { "to": string }
+ * where "to" value is a UnitAI state.
+ * sent from UnitAI whenever the unit changes state.
+ */
 Engine.RegisterMessageType("UnitAIStateChanged");
 
-// Message of the form { "to": orderData }.
-// sent whenever the unit changes state
+/**
+ * Message of the form { "to": number[] }
+ * where "to" value is an array of data orders given by GetOrderData,
+ * sent from UnitAI whenever the unit order data changes.
+ */
 Engine.RegisterMessageType("UnitAIOrderDataChanged");
 
-// Message of the form { "entity": entity },
-// sent whenever a pickup is requested
+/**
+ * Message of the form { "entity": number }
+ * sent from UnitAI whenever a pickup is requested.
+ */
 Engine.RegisterMessageType("PickupRequested");
 
-// Message of the form { "entity": entity },
-// sent whenever a pickup is no more needed
+/**
+ * Message of the form { "entity": number }
+ * sent from UnitAI whenever a pickup is no more needed.
+ */
 Engine.RegisterMessageType("PickupCanceled");
