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"];
|
private["_config", "_markerArray", "_markerName", "_ccText"];
|
||||||
|
|
||||||
params [ ["_mClass",""], ["_mPos",[0,0,0]], ["_data",[]] ];
|
params [ ["_mClass",""], ["_mPos",[0,0,0]], ["_OverrideTxt",""] ];
|
||||||
if(_mClass isEqualTo "") exitWith {
|
if(_mClass isEqualTo "") exitWith {
|
||||||
diag_log "EPOCHDebug: createLocalMarkerSet -1- empty markerClass, nothing to create";
|
diag_log "EPOCHDebug: createLocalMarkerSet -1- empty markerClass, nothing to create";
|
||||||
};
|
};
|
||||||
@ -83,12 +83,18 @@ if(isNil {Epoch_markerCounter})then{Epoch_markerCounter = 0};
|
|||||||
_mName setMarkerSizeLocal _mSize;
|
_mName setMarkerSizeLocal _mSize;
|
||||||
_mName setMarkerDirLocal _mDir;
|
_mName setMarkerDirLocal _mDir;
|
||||||
|
|
||||||
|
if (!(_OverrideTxt isequalto "") && _OverrideTxt isequaltype "") then {
|
||||||
|
_mName setMarkerText _OverrideTxt;
|
||||||
|
}
|
||||||
|
else {
|
||||||
if(_mText isEqualTo "playerName")then{
|
if(_mText isEqualTo "playerName")then{
|
||||||
_mText = str(name player);
|
_mText = str(name player);
|
||||||
};
|
};
|
||||||
|
if!(_mText isEqualTo "")then{
|
||||||
_ccText = call compile _mText;
|
_ccText = call compile _mText;
|
||||||
_mName setMarkerTextLocal _ccText;
|
_mName setMarkerText _ccText;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
if!(_mColor isEqualTo "")then{
|
if!(_mColor isEqualTo "")then{
|
||||||
_mName setMarkerColorLocal _mColor
|
_mName setMarkerColorLocal _mColor
|
||||||
|
@ -9,16 +9,12 @@ class CfgServicePoint {
|
|||||||
pos1,
|
pos1,
|
||||||
dist1,
|
dist1,
|
||||||
{VehType_1,VehType_1,...},
|
{VehType_1,VehType_1,...},
|
||||||
"Markertype1",
|
|
||||||
"MarkerColor1",
|
|
||||||
"MarkerText1"
|
"MarkerText1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pos2,
|
pos2,
|
||||||
dist2,
|
dist2,
|
||||||
{VehType,VehType,...},
|
{VehType,VehType,...},
|
||||||
"Markertype2",
|
|
||||||
"MarkerColor2",
|
|
||||||
"MarkerText2"
|
"MarkerText2"
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@ -26,9 +22,7 @@ class CfgServicePoint {
|
|||||||
{13325,14477,0}, // Pos
|
{13325,14477,0}, // Pos
|
||||||
40, // max distance
|
40, // max distance
|
||||||
{"Landvehicle","Ship","Tank","AIR"}, // Vehicle Types for SP
|
{"Landvehicle","Ship","Tank","AIR"}, // Vehicle Types for SP
|
||||||
"loc_BusStop", // Marker Type
|
"Service Point Land / Ship / Air" // Marker Text (Leave it Blank to disable Marker)
|
||||||
"ColorWhite", // Marker Color
|
|
||||||
"Service Point Land / Ship / Air" // Marker Text
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*/
|
*/
|
||||||
private["_config", "_markerArray", "_ccText"];
|
private["_config", "_markerArray", "_ccText"];
|
||||||
|
|
||||||
params [ ["_mClass",""], ["_mPos",[0,0,0]], ["_data",[]] ];
|
params [ ["_mClass",""], ["_mPos",[0,0,0]], ["_OverrideTxt",""] ];
|
||||||
if(_mClass isEqualTo "") exitWith {
|
if(_mClass isEqualTo "") exitWith {
|
||||||
diag_log "EPOCHDebug: createGlobalMarkerSet -1- empty markerClass, nothing to create";
|
diag_log "EPOCHDebug: createGlobalMarkerSet -1- empty markerClass, nothing to create";
|
||||||
};
|
};
|
||||||
@ -76,10 +76,15 @@ _return = [];
|
|||||||
_mName setMarkerSize _mSize;
|
_mName setMarkerSize _mSize;
|
||||||
_mName setMarkerDir _mDir;
|
_mName setMarkerDir _mDir;
|
||||||
|
|
||||||
|
if (!(_OverrideTxt isequalto "") && _OverrideTxt isequaltype "") then {
|
||||||
|
_mName setMarkerText _OverrideTxt;
|
||||||
|
}
|
||||||
|
else {
|
||||||
if!(_mText isEqualTo "")then{
|
if!(_mText isEqualTo "")then{
|
||||||
_ccText = call compile _mText;
|
_ccText = call compile _mText;
|
||||||
_mName setMarkerText _ccText;
|
_mName setMarkerText _ccText;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
if!(_mColor isEqualTo "")then{
|
if!(_mColor isEqualTo "")then{
|
||||||
_mName setMarkerColor _mColor
|
_mName setMarkerColor _mColor
|
||||||
|
@ -225,28 +225,15 @@ _config = 'CfgServicePoint' call EPOCH_returnConfig;
|
|||||||
_servicepoints = getArray (_config >> worldname >> 'ServicePoints');
|
_servicepoints = getArray (_config >> worldname >> 'ServicePoints');
|
||||||
{
|
{
|
||||||
_pos = _x;
|
_pos = _x;
|
||||||
_markertype = "mil_dot";
|
|
||||||
_markercolor = "ColorBlack";
|
|
||||||
_markertxt = "Service Point";
|
_markertxt = "Service Point";
|
||||||
if (count _x > 3) then {
|
if (count _x > 3) then {
|
||||||
_pos = _x select 0;
|
_pos = _x select 0;
|
||||||
if ((_x select 3) isequaltype "") then {
|
if ((_x select 3) isequaltype "") then {
|
||||||
_markertype = _x select 3;
|
_markertxt = _x select 3;
|
||||||
};
|
|
||||||
if (count _x > 4) then {
|
|
||||||
if ((_x select 4) isequaltype "") then {
|
|
||||||
_markercolor = _x select 4;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (count _x > 5) then {
|
if !(_markertxt isequalto "") then {
|
||||||
if ((_x select 5) isequaltype "") then {
|
_markers = ["ServicePoint", _pos,_markertxt] call EPOCH_server_createGlobalMarkerSet;
|
||||||
_markertxt = _x select 5;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
if !(_markertype isequalto "") then {
|
|
||||||
//_marker = createMarker [('ServicePointMarker'+(str _foreachindex)), _pos];
|
|
||||||
_markers = ["ServicePoint", _pos] call EPOCH_server_createGlobalMarkerSet;
|
|
||||||
if !(surfaceiswater _pos) then {
|
if !(surfaceiswater _pos) then {
|
||||||
"Land_HelipadCircle_F" createvehicle _pos;
|
"Land_HelipadCircle_F" createvehicle _pos;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user