feat: started implementing infrared and laser

This commit is contained in:
Pax1601
2025-01-29 08:03:32 +01:00
parent 79f9905413
commit 5a4a202805
10 changed files with 231 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ import {
faClone,
faExplosion,
faHand,
faLightbulb,
faLocationCrosshairs,
faLocationDot,
faMapLocation,
@@ -887,6 +888,32 @@ export namespace ContextActions {
{ type: ContextActionType.ENGAGE, code: "KeyV", ctrlKey: false, shiftKey: false }
);
export const FIRE_LASER = new ContextAction(
"fire-laser",
"Shine laser at point",
"Click on a point to shine a laser with the given code from the unit to the ground.",
faLightbulb,
ContextActionTarget.POINT,
(units: Unit[], _, targetPosition: LatLng | null) => {
if (targetPosition)
getApp().getUnitsManager().fireLaser(targetPosition, getApp().getMap().getKeepRelativePositions(), getApp().getMap().getDestinationRotation(), units);
},
{ type: ContextActionType.ENGAGE, code: "KeyL", ctrlKey: true, shiftKey: false }
);
export const FIRE_INFRARED = new ContextAction(
"fire-infrared",
"Shine infrared at point",
"Click on a point to shine a infrared beam from the unit to the ground.",
faLightbulb,
ContextActionTarget.POINT,
(units: Unit[], _, targetPosition: LatLng | null) => {
if (targetPosition)
getApp().getUnitsManager().fireInfrared(targetPosition, getApp().getMap().getKeepRelativePositions(), getApp().getMap().getDestinationRotation(), units);
},
{ type: ContextActionType.ENGAGE, code: "KeyL", ctrlKey: true, shiftKey: false }
);
export const SIMULATE_FIRE_FIGHT = new ContextAction(
"simulate-fire-fight",
"Simulate fire fight",