Module StageSensors

The stage's sensors, which provide information about all events that occurred this tick.

Functions

laserHitShipEvents () Details of all lasers hitting ships.
shipDestroyedEvents () Details of all ships destroyed.
shipFiredLaserEvents () Details of all lasers fired.
shipFiredTorpedoEvents () Details of all torpedos fired.
shipHitShipEvents () Details of all ship-ship collisions.
shipHitWallEvents () Details of all ship-wall collisions.
torpedoHitShipEvents () Details of all torpedos hitting ships.

Tables

LaserHitShipEvent Details of a laser hitting a ship.
ShipDestroyedEvent Details of a ship being destroyed.
ShipFiredLaserEvent Details of a ship firing a laser.
ShipFiredTorpedoEvent Details of a ship firing a torpedo.
ShipHitShipEvent Details of a ship-ship collision.
ShipHitWallEvent Details of a ship hitting the wall.
TorpedoHitShipEvent Details of a torpedo hitting a ship.


Functions

laserHitShipEvents ()

Details of all lasers hitting ships.

Return value:

A table of all LaserHitShipEvents from this tick.

See also:

shipDestroyedEvents ()

Details of all ships destroyed.

Return value:

A table of all ShipDestroyedEvents from this tick.

See also:

shipFiredLaserEvents ()

Details of all lasers fired.

Return value:

A table of all ShipFiredLaserEvents from this tick.

See also:

shipFiredTorpedoEvents ()

Details of all torpedos fired.

Return value:

A table of all ShipFiredTorpedoEvents from this tick.

See also:

shipHitShipEvents ()

Details of all ship-ship collisions. Two versions of each event are reported, with "hitting" and "target" information reversed.

Return value:

A table of all ShipHitShipEvents tick.

See also:

shipHitWallEvents ()

Details of all ship-wall collisions.

Return value:

A table of all ShipHitWallEvents from this tick.

See also:

torpedoHitShipEvents ()

Details of all torpedos hitting ships.

Return value:

A table of all TorpedoHitShipEvents from this tick.

See also:

Tables

LaserHitShipEvent

Details of a laser hitting a ship.

Fields:

  • time: The time of the laser-ship collision.
  • srcName: The name of the ship that fired the laser.
  • targetName: The name of the ship that was hit.
  • laserX: The x coordinate of the hitting laser.
  • laserY: The y coordinate of the hitting laser.
  • laserHeading: The angle at which the laser was traveling.
ShipDestroyedEvent

Details of a ship being destroyed.

Fields:

  • time: The time that the ship was destroyed.
  • shipName: The name of the ship that was destroyed.
ShipFiredLaserEvent

Details of a ship firing a laser.

Fields:

  • time: The time that the ship fired a laser.
  • shipName: The name of the ship that fired a laser.
  • shipX: The x coordinate of the ship when it fired a laser.
  • shipY: The y coordinate of the ship when it fired a laser.
  • laserHeading: The angle at which the laser was fired.
ShipFiredTorpedoEvent

Details of a ship firing a torpedo.

Fields:

  • time: The time that the ship fired a torpedo.
  • shipName: The name of the ship that fired a torpedo.
  • shipX: The x coordinate of the ship when it fired a torpedo.
  • shipY: The y coordinate of the ship when it fired a torpedo.
  • torpedoHeading: The angle at which the torpedo was fired.
  • torpedoDistance: The distance the torpedo was fired.
ShipHitShipEvent

Details of a ship-ship collision.

Fields:

  • time: The time of the ship-ship collision.
  • targetName: The name of the ship that was hit.
  • targetX: The x coordinate of the ship that was hit.
  • targetY: The y coordinate of the ship that was hit.
  • hittingName: The name of the hitting ship.
  • hittingX: The x coordinate of the hitting ship.
  • hittingY: The y coordinate of the hitting ship.
  • inAngle: The angle from the hitting ship to the target ship.
  • inForce: The magnitude of force that the hitting ship applied to the target ship, altering its momentum.
  • outAngle: The angle from the target ship to the hitting ship.
  • outForce: The magnitude of force that the target ship applied to the hitting ship, altering its momentum.
ShipHitWallEvent

Details of a ship hitting the wall.

Fields:

  • time: The time of the ship-wall collision.
  • shipName: The name of the ship that hit the wall.
  • shipX: The x coordinate of the ship where it hit the wall.
  • shipY: The y coordinate of the ship where it hit the wall.
  • bounceAngle: The angle at which the collision exerted force against the ship.
  • bounceForce: The mangnitude of force that the wall collision applied to the target ship, altering its momentum.
TorpedoHitShipEvent

Details of a torpedo hitting a ship.

Fields:

  • time: The time of the torpedo-ship collision.
  • srcName: The name of the ship that fired the torpedo.
  • targetName: The name of the ship that was hit.
  • hitAngle: The angle from the blast center to the target ship.
  • hitForce: The magnitude of force that the torpedo blast applied to the target ship, altering its momentum.
  • hitDamage: The damage done by the torpedo blast to the target ship, decreasing its energy.