Skip to content

Commit

Permalink
Add ability to change the display name of the ACE interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjydev committed Aug 31, 2024
1 parent f085fe7 commit 8872c44
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
Binary file modified .hemtt/missions/tptest.vr/mission.sqm
Binary file not shown.
18 changes: 15 additions & 3 deletions addons/teleporter/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,28 @@ class CfgVehicles {
curatorInfoType = "RscDisplayAttributeAudioModule";
class Attributes : AttributesBase {
class Target : Edit {
property = "pmcs_mod_teleport_target";
property = QUOTE(GVAR(moduleTeleport)_target);
displayName = CSTRING(TeleportTarget);
description = CSTRING(TeleportTargetTooltip);
tooltip = CSTRING(TeleportTargetTooltip);
typeName = "STRING";
defaultValue = """""";
};

class Display : Edit {
property = QUOTE(GVAR(moduleTeleport)_display);
displayName = CSTRING(TeleportDisplay);
tooltip = CSTRING(TeleportDisplayTooltip);
typeName = "STRING";
defaultValue = """Teleport""";
};

class ModuleDescription : ModuleDescription {};
};
class ModuleDescription : ModuleDescription {
description = CSTRING(Teleport_Description);
description[] = {
CSTRING(Teleport_Description1),
CSTRING(Teleport_Description2),
};
};
};
};
3 changes: 2 additions & 1 deletion addons/teleporter/functions/fnc_moduleTeleport.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
params ["_logic"];

private _destination = _logic getVariable ["Target", ""];
private _display = _logic getVariable ["Display", "Teleport"];

private _synced = (synchronizedObjects _logic);
private _trigger = _synced select 0;

private _action = [
"PMCS_Teleporter_TeleportTo",
"Teleport",
_display,
"",
{
params ["_target", "_player", "_params"];
Expand Down
16 changes: 11 additions & 5 deletions addons/teleporter/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@
<Key ID="STR_PMCS_Teleporter_Teleport">
<English>ACE Teleport</English>
</Key>
<Key ID="STR_PMCS_Teleporter_Teleport_Description">
<English>ACE Teleport sets up an ACE interaction to teleport the player to an invisible helipad stored in a variable.</English>
<Key ID="STR_PMCS_Teleporter_Teleport_Description1">
<English>ACE Teleport sets up an ACE interaction to teleport the player to the position of an object stored in a variable.</English>
</Key>
<Key ID="STR_PMCS_Teleporter_Teleport_DescriptionShort">
<English>ACE Teleport sets up an ACE interaction to teleport the player.</English>
<Key ID="STR_PMCS_Teleporter_Teleport_Description2">
<English>To configure it, sync an object that will become the trigger (have the ACE interaction added to it), and then create an invisible helipad where you want the player to teleport to. Give it a variable name under 'Init', and store that in this module's 'Target' field.</English>
</Key>
<Key ID="STR_PMCS_Teleporter_TeleportTarget">
<English>Target Name</English>
<English>Target</English>
</Key>
<Key ID="STR_PMCS_Teleporter_TeleportTargetTooltip">
<English>The variable name of the invisible helipad to teleport to.</English>
</Key>
<Key ID="STR_PMCS_Teleporter_TeleportDisplay">
<English>Menu text</English>
</Key>
<Key ID="STR_PMCS_Teleporter_TeleportDisplayTooltip">
<English>The text to display in the ACE interact menu.</English>
</Key>
</Package>
</Project>

0 comments on commit 8872c44

Please sign in to comment.