mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
8562289765
* **You must update all of your mission files; the mission message system as well as the calling parameters for DMS_fnc_FindSafePos have been overhauled and will be incompatible with previous versions.** * NEW CONFIG VALUES: |DMS_ThrottleBlacklists| |DMS_AttemptsUntilThrottle| |DMS_ThrottleCoefficient| |DMS_MinThrottledDistance| * Decreased "DMS_TraderZoneNearBlacklist","DMS_MissionNearBlacklist","DMS_WaterNearBlacklist" * Changed "DMS_dynamicText_Color" to "#FFFFFF" (white) * Replaced weapon classes in "DMS_CrateCase_Sniper" to the base classes; all attachments should now spawn in the box separately. * New function DMS_fnc_IsValidPosition (uses logic that was previously from "DMS_fnc_FindSafePos"). * You can now manually define every individual parameter for DMS_fnc_findSafePos per-mission, instead of using global parameters. * AI will now be offloaded to an HC even with "DMS_ai_offload_to_client" set to false. * All of the previously "supported" values for "DMS_PlayerNotificationTypes" are now PROPERLY supported. DMS_PlayerNotificationTypes is now set to default "dynamicTextRequest" and "systemChatRequest". * Tweaked "cardealer" mission, the cars should no longer spawn inside of each other.
74 lines
1.9 KiB
Plaintext
74 lines
1.9 KiB
Plaintext
/*
|
|
DMS_fnc_BroadcastMissionStatus
|
|
Created by eraser1
|
|
|
|
Usage:
|
|
_message call DMS_fnc_BroadcastMissionStatus;
|
|
|
|
Requires "DMS_PlayerNotificationTypes".
|
|
|
|
Notification type "dynamicTextRequest" requires "DMS_dynamicText_Size" and "DMS_dynamicText_Color".
|
|
*/
|
|
|
|
|
|
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='1.25'>%2</t><br/> %3",_titleColor,_missionName,_message]]] call ExileServer_system_network_send_broadcast;
|
|
};
|
|
|
|
case "dynamictextrequest":
|
|
{
|
|
//Unfortunately that doesn't work, so I have to do some funky stuff...
|
|
//[_x, [format ["%1<br/>%2",toUpper _missionName,_message], 0, DMS_dynamicText_Size, DMS_dynamicText_Color]] call ExileServer_system_network_send_broadcast;
|
|
|
|
[
|
|
format ['<t color="%1" size="1" >%2</t><br/><t color="%3" size="%4" >%5</t>',_titleColor,_missionName,DMS_dynamicText_Color,DMS_dynamicText_Size,_message],
|
|
0,
|
|
0,
|
|
10,
|
|
1
|
|
] remoteExec ["BIS_fnc_dynamicText", -2];
|
|
};
|
|
|
|
default { diag_log format ["DMS ERROR :: Unsupported Notification Type in DMS_PlayerNotificationTypes: %1 | Calling parameters: %2",_x,_this]; };
|
|
};
|
|
} forEach DMS_PlayerNotificationTypes; |