Skip to content

Commit

Permalink
Fast Travel - Add Icon support (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-MF authored May 16, 2023
1 parent ff61b83 commit 3e4b44a
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions Olympus.Stratis/functions/fn_fastTravel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,34 @@

// Define teleport locations here
private _teleportLocations = [
// ["Category", objectVarName, "Display Name"]
["Hubs", tpPosAirport, "Airport"],
["Hubs", tpPosBase, "Base"],
["Hubs", tpPosMOUT, "MOUT"],
["Hubs", tpPosShootingRange, "Shooting Range"],
["Core", tpPosWeaponsHandling, "Weapons Handling Base"],
["Core", tpPosWeaponsHandlingRifle, "Weapons Handling Rifle"],
["Core", tpPosWeaponsHandlingPistol, "Weapons Handling Pistol"],
["Core", tpPosWeaponsHandlingGrenades, "Weapons Handling Grenades"],
["Core", tpPosWeaponsHandlingLaunchers, "Weapons Handling Launchers"],
["Core", tpPosDriving, "Driving Course"],
["Specialist", tpPosEngineer, "Engineer"],
["Specialist", tpPos40mm, "Grenadier"],
["Specialist", tpPosMachineGun, "Machine Gun"],
["Specialist", tpPosMarksman, "Marksman"],
["Specialist", tpPosMedical, "Medic"]
// ["Category", objectVarName, "Display Name", "Icon Path"]
["Hubs", tpPosAirport, "Airport", "ca\misc\data\icons\i_h_ca.paa"],
["Hubs", tpPosBase, "Base", "a3\modules_f_curator\data\iconcuratorsetobjectcosts_ca.paa"],
["Hubs", tpPosMOUT, "MOUT", "a3\missions_f_gamma\data\img\icon_exit_big_ca.paa"],
["Hubs", tpPosShootingRange, "Shooting Range", "x\zen\addons\modules\ui\target_ca.paa"],
["Core", tpPosWeaponsHandling, "Weapons Handling Base", "z\ace\addons\zeus\ui\icon_module_zeus_garrison_ca.paa"],
["Core", tpPosWeaponsHandlingRifle, "Weapons Handling Rifle", "a3\ui_f\data\gui\cfg\hints\rifle_ca.paa"],
["Core", tpPosWeaponsHandlingPistol, "Weapons Handling Pistol", "a3\ui_f\data\gui\cfg\hints\handgun_ca.paa"],
["Core", tpPosWeaponsHandlingGrenades, "Weapons Handling Grenades", "a3\weapons_f\data\ui\icon_gl_ca.paa"],
["Core", tpPosWeaponsHandlingLaunchers, "Weapons Handling Launchers", "a3\structures_f_bootcamp\vr\helpers\data\vr_symbol_launchers_ca.paa"],
["Core", tpPosDriving, "Driving Course", "x\tacs\addons\arcadian\ui\icon_arcadian.paa"],
["Specialist", tpPosEngineer, "Engineer", "a3\ui_f\data\igui\cfg\cursors\iconrepairat_ca.paa"],
["Specialist", tpPos40mm, "Grenadier", "z\ace\addons\arsenal\data\iconsecondarymuzzle.paa"],
["Specialist", tpPosMachineGun, "Machine Gun", "a3\weapons_f\data\ui\icon_mg_ca.paa"],
["Specialist", tpPosMarksman, "Marksman", "a3\data_f_heli\logos\arma3_mark_icon_ca.paa"],
["Specialist", tpPosMedical, "Medic", "a3\ui_f\data\map\vehicleicons\pictureheal_ca.paa"]
];

params ["_controller"];

private _createdCategories = [];
{
_x params ["_category", "_teleportObject", "_text"];
_x params ["_category", "_teleportObject", "_text", "_iconPath"];

private _action = [
format [QGVAR(%1), _teleportObject],
["Fast travel to", _text] joinString " ",
"",
_iconPath,
{
(_this select 2) params ["_teleportObject", "_text"];
titleText [["Fast travelling to", _text, "..."] joinString " ", "BLACK IN", 2];
Expand All @@ -54,7 +54,7 @@ private _createdCategories = [];
ACE_player distance _teleportObject > 10
},
{},
[_teleportObject, _text]
[_teleportObject, _text, _iconPath]
] call ACEFUNC(interact_menu,createAction);

if (_category == "") then {
Expand Down

0 comments on commit 3e4b44a

Please sign in to comment.