mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
ed45b5d55c
* **NEW CONFIG VALUES**: |DMS_Show_Kill_Poptabs_Notification| |DMS_Show_Kill_Respect_Notification| |DMS_dynamicText_Duration| |DMS_dynamicText_FadeTime| |DMS_dynamicText_Title_Size| |DMS_dynamicText_Title_Font| |DMS_dynamicText_Message_Color| |DMS_dynamicText_Message_Size| |DMS_dynamicText_Message_Font| |DMS_standardHint_Title_Size| |DMS_standardHint_Title_Font| |DMS_standardHint_Message_Color| |DMS_standardHint_Message_Size| |DMS_standardHint_Message_Font| |DMS_textTiles_Duration| |DMS_textTiles_FadeTime| |DMS_textTiles_Title_Size| |DMS_textTiles_Title_Font| |DMS_textTiles_Message_Color| |DMS_textTiles_Message_Size| |DMS_textTiles_Message_Font| * "DMS_PlayerNotificationTypes" has been adjusted to include "systemChatRequest" and the brand new "textTilesRequest". **NOTE:** Due to the way "text tiles" work, a player can only have one on his screen at a time. As a result, if another text tile is created while the mission message is up, the message will immediately disappear to display the new text tile. Currently, the "Frag Messages" (the ones that say "Player Kill +100") use text tiles. I don't think it should be a major issue (especially if you use "systemChatRequest", so the player can just scroll up), but if I get reports of it being stupid, I will default to "dynamicTextRequest", which should also look pretty damn nice. * These changes should make it much easier for people to use DMS notification functions for other purposes. * Fixed AI waypoints - the AI should now properly circle the objective at the proper radius. * Tweaked "DMS_AI_WP_Radius_moderate" and "DMS_AI_WP_Radius_difficult" (reduced the radii). Due to the AI pathing fix. * Fixed a couple typos in "DMS_fnc_SpawnAISoldier". "_customGearSet" should work now (although I'm fairly certain nobody uses it since nobody ever complained :P ) * Improved "DMS_fnc_SpawnNonPersistentVehicle"; Vehicles should no longer spawn jumbled up in most cases (like cardealer). Also, it's updated to the latest Exile methods to ensure that vehicles have no nightvision/thermal if configured to do so in Exile configs. Also added the "MPKilled" EH used by Exile for non-persistent (persistent vehicles already had it). * You can now choose whether or not you want to display the poptabs or respect kill messages when killing an AI with "DMS_Show_Kill_Poptabs_Notification" and "DMS_Show_Kill_Respect_Notification". Both are enabled by default. * Fixed typos in the "OnKilled" EH (didn't really affect anything) * Fixed cases when "currentMuzzle" would return a number. Thanks to [azmodii](https://github.com/azmodii) for the reminder. * Optimized the "AI share info" function in "OnKilled"
112 lines
2.5 KiB
Plaintext
112 lines
2.5 KiB
Plaintext
/*
|
|
DMS_fnc_BroadcastMissionStatus
|
|
Created by eraser1
|
|
|
|
Usage:
|
|
[
|
|
_messageTitle,
|
|
[
|
|
_messageColor,
|
|
_message
|
|
]
|
|
] call DMS_fnc_BroadcastMissionStatus;
|
|
|
|
Returns nothing
|
|
*/
|
|
|
|
|
|
private ["_missionName", "_messageInfo", "_titleColor", "_message"];
|
|
|
|
_OK = params
|
|
[
|
|
["_missionName","",[""]],
|
|
["_messageInfo",[],[[]],[2]]
|
|
];
|
|
|
|
if (!_OK) exitWith
|
|
{
|
|
diag_log format ["DMS ERROR :: Calling DMS_fnc_BroadcastMissionStatus with invalid parameters: %1",_this];
|
|
};
|
|
|
|
_messageInfo params
|
|
[
|
|
["_titleColor","#FFFF00",[""]],
|
|
["_message","",[""]]
|
|
];
|
|
|
|
if (DMS_DEBUG) then
|
|
{
|
|
diag_log format["DMS_DEBUG BroadcastMissionStatus :: Notification types: |%1| for broadcasting mission status: %2",DMS_PlayerNotificationTypes,_message];
|
|
};
|
|
|
|
if ((typeName _message) != "STRING") then
|
|
{
|
|
_message = str _message;
|
|
};
|
|
|
|
{
|
|
private "_args";
|
|
|
|
switch (toLower _x) do
|
|
{
|
|
case "systemchatrequest":
|
|
{
|
|
[_x, [format ["%1: %2",toUpper _missionName,_message]]] call ExileServer_system_network_send_broadcast;
|
|
};
|
|
|
|
case "standardhintrequest":
|
|
{
|
|
[
|
|
_x,
|
|
[
|
|
format
|
|
[
|
|
"<t color='%1' size='%2' font='%3'>%4</t><br/><t color='%5' size='%6' font='%7'>%8</t>",
|
|
_titleColor,
|
|
DMS_standardHint_Title_Size,
|
|
DMS_standardHint_Title_Font,
|
|
_missionName,
|
|
DMS_standardHint_Message_Color,
|
|
DMS_standardHint_Message_Size,
|
|
DMS_standardHint_Message_Font,
|
|
_message
|
|
]
|
|
]
|
|
] call ExileServer_system_network_send_broadcast;
|
|
};
|
|
|
|
case "dynamictextrequest":
|
|
{
|
|
(format
|
|
[
|
|
"<t color='%1' size='%2' font='%3'>%4</t><br/><t color='%5' size='%6' font='%7'>%8</t>",
|
|
_titleColor,
|
|
DMS_dynamicText_Title_Size,
|
|
DMS_dynamicText_Title_Font,
|
|
_missionName,
|
|
DMS_dynamicText_Message_Color,
|
|
DMS_dynamicText_Message_Size,
|
|
DMS_dynamicText_Message_Font,
|
|
_message
|
|
]) remoteExecCall ["DMS_CLIENT_fnc_spawnDynamicText", -2];
|
|
};
|
|
|
|
case "texttilesrequest":
|
|
{
|
|
(format
|
|
[
|
|
"<t color='%1' size='%2' font='%3' align='center'>%4</t><br/><t color='%5' size='%6' font='%7' align='center'>%8</t>",
|
|
_titleColor,
|
|
DMS_textTiles_Title_Size,
|
|
DMS_textTiles_Title_Font,
|
|
_missionName,
|
|
DMS_textTiles_Message_Color,
|
|
DMS_textTiles_Message_Size,
|
|
DMS_textTiles_Message_Font,
|
|
_message
|
|
]) remoteExecCall ["DMS_CLIENT_fnc_spawnTextTiles", -2];
|
|
};
|
|
|
|
default { diag_log format ["DMS ERROR :: Unsupported Notification Type in DMS_PlayerNotificationTypes: %1 | Calling parameters: %2",_x,_this]; };
|
|
};
|
|
} forEach DMS_PlayerNotificationTypes; |