Skip to content

Commit

Permalink
Fix localized hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Timi007 committed Jan 17, 2025
1 parent fcc317c commit 8c469ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions addons/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#include "script_component.hpp"

if (hasInterface) then {
[QGVAR(hint), {
params ["_message"];
_message = if (isLocalized _message) then {localize _message} else {_message};
hint _message;
}] call CBA_fnc_addEventHandler;
};

call FUNC(arsenalPBWFix);
call FUNC(addChatCommands);
4 changes: 2 additions & 2 deletions addons/common/functions/fnc_addChatCommands.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if (isServer) then {
_curator addCuratorEditableObjects [(allMissionObjects "" - entities [["Logic"], []]), true];
_unit assignCurator _curator;

[LLSTRING(chatCommands_zeusCreated)] remoteExecCall ["hint", _unit];
[QGVAR(hint), [LSTRING(chatCommands_zeusCreated)], _unit] call CBA_fnc_targetEvent;
}] call CBA_fnc_addEventHandler;
};

Expand All @@ -71,7 +71,7 @@ CHECK(!hasInterface);
_unit = _name call FUNC(parseNameToPlayer);
};
};
if (isNull _unit) exitWith {};
if (isNull _unit || {!isNull getAssignedCuratorLogic _unit}) exitWith {};

[QGVAR(createZeus), [_unit]] call CBA_fnc_serverEvent;
}, "adminLogged"] call CBA_fnc_registerChatCommand;
Expand Down

0 comments on commit 8c469ad

Please sign in to comment.