Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast Travel - Add Icon support #177

Merged
merged 1 commit into from
May 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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