mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Option to overwrite Marker Text
Added Option to overwrite marker text and use it for Service Points
This commit is contained in:
parent
6216fecf6a
commit
96f72fc98a
@ -28,7 +28,7 @@
|
||||
*/
|
||||
private["_config", "_markerArray", "_markerName", "_ccText"];
|
||||
|
||||
params [ ["_mClass",""], ["_mPos",[0,0,0]], ["_data",[]] ];
|
||||
params [ ["_mClass",""], ["_mPos",[0,0,0]], ["_OverrideTxt",""] ];
|
||||
if(_mClass isEqualTo "") exitWith {
|
||||
diag_log "EPOCHDebug: createLocalMarkerSet -1- empty markerClass, nothing to create";
|
||||
};
|
||||
@ -83,13 +83,19 @@ if(isNil {Epoch_markerCounter})then{Epoch_markerCounter = 0};
|
||||
_mName setMarkerSizeLocal _mSize;
|
||||
_mName setMarkerDirLocal _mDir;
|
||||
|
||||
if(_mText isEqualTo "playerName")then{
|
||||
_mText = str(name player);
|
||||
if (!(_OverrideTxt isequalto "") && _OverrideTxt isequaltype "") then {
|
||||
_mName setMarkerText _OverrideTxt;
|
||||
}
|
||||
else {
|
||||
if(_mText isEqualTo "playerName")then{
|
||||
_mText = str(name player);
|
||||
};
|
||||
if!(_mText isEqualTo "")then{
|
||||
_ccText = call compile _mText;
|
||||
_mName setMarkerText _ccText;
|
||||
};
|
||||
};
|
||||
|
||||
_ccText = call compile _mText;
|
||||
_mName setMarkerTextLocal _ccText;
|
||||
|
||||
if!(_mColor isEqualTo "")then{
|
||||
_mName setMarkerColorLocal _mColor
|
||||
};
|
||||
|
@ -9,26 +9,20 @@ class CfgServicePoint {
|
||||
pos1,
|
||||
dist1,
|
||||
{VehType_1,VehType_1,...},
|
||||
"Markertype1",
|
||||
"MarkerColor1",
|
||||
"MarkerText1"
|
||||
},
|
||||
{
|
||||
pos2,
|
||||
dist2,
|
||||
{VehType,VehType,...},
|
||||
"Markertype2",
|
||||
"MarkerColor2",
|
||||
"MarkerText2"
|
||||
}
|
||||
*/
|
||||
{ // Central
|
||||
{13325,14477,0}, // Pos
|
||||
40, // max distance
|
||||
{"Landvehicle","Ship","Tank","AIR"}, // Vehicle Types for SP
|
||||
"loc_BusStop", // Marker Type
|
||||
"ColorWhite", // Marker Color
|
||||
"Service Point Land / Ship / Air" // Marker Text
|
||||
{"Landvehicle","Ship","Tank","AIR"}, // Vehicle Types for SP
|
||||
"Service Point Land / Ship / Air" // Marker Text (Leave it Blank to disable Marker)
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -28,7 +28,7 @@
|
||||
*/
|
||||
private["_config", "_markerArray", "_ccText"];
|
||||
|
||||
params [ ["_mClass",""], ["_mPos",[0,0,0]], ["_data",[]] ];
|
||||
params [ ["_mClass",""], ["_mPos",[0,0,0]], ["_OverrideTxt",""] ];
|
||||
if(_mClass isEqualTo "") exitWith {
|
||||
diag_log "EPOCHDebug: createGlobalMarkerSet -1- empty markerClass, nothing to create";
|
||||
};
|
||||
@ -76,9 +76,14 @@ _return = [];
|
||||
_mName setMarkerSize _mSize;
|
||||
_mName setMarkerDir _mDir;
|
||||
|
||||
if!(_mText isEqualTo "")then{
|
||||
_ccText = call compile _mText;
|
||||
_mName setMarkerText _ccText;
|
||||
if (!(_OverrideTxt isequalto "") && _OverrideTxt isequaltype "") then {
|
||||
_mName setMarkerText _OverrideTxt;
|
||||
}
|
||||
else {
|
||||
if!(_mText isEqualTo "")then{
|
||||
_ccText = call compile _mText;
|
||||
_mName setMarkerText _ccText;
|
||||
};
|
||||
};
|
||||
|
||||
if!(_mColor isEqualTo "")then{
|
||||
|
@ -225,28 +225,15 @@ _config = 'CfgServicePoint' call EPOCH_returnConfig;
|
||||
_servicepoints = getArray (_config >> worldname >> 'ServicePoints');
|
||||
{
|
||||
_pos = _x;
|
||||
_markertype = "mil_dot";
|
||||
_markercolor = "ColorBlack";
|
||||
_markertxt = "Service Point";
|
||||
if (count _x > 3) then {
|
||||
_pos = _x select 0;
|
||||
if ((_x select 3) isequaltype "") then {
|
||||
_markertype = _x select 3;
|
||||
};
|
||||
if (count _x > 4) then {
|
||||
if ((_x select 4) isequaltype "") then {
|
||||
_markercolor = _x select 4;
|
||||
};
|
||||
};
|
||||
if (count _x > 5) then {
|
||||
if ((_x select 5) isequaltype "") then {
|
||||
_markertxt = _x select 5;
|
||||
};
|
||||
_markertxt = _x select 3;
|
||||
};
|
||||
};
|
||||
if !(_markertype isequalto "") then {
|
||||
//_marker = createMarker [('ServicePointMarker'+(str _foreachindex)), _pos];
|
||||
_markers = ["ServicePoint", _pos] call EPOCH_server_createGlobalMarkerSet;
|
||||
if !(_markertxt isequalto "") then {
|
||||
_markers = ["ServicePoint", _pos,_markertxt] call EPOCH_server_createGlobalMarkerSet;
|
||||
if !(surfaceiswater _pos) then {
|
||||
"Land_HelipadCircle_F" createvehicle _pos;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user