-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add: Marker texts are now localized to client #430
Changes from 18 commits
0db2117
6561054
37da641
9405052
247a598
50c3045
803880a
3456998
8e06700
a0da886
ce657c8
fba9e12
5b73cf4
8dd8457
524e8c3
e782220
3053a6c
ef9b484
ca32f3a
4d76c0b
a05272c
4135c3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
params [ | ||
["_marker", ""], | ||
["_text", ""], | ||
["_arg", ""] | ||
]; | ||
|
||
//check for localized text | ||
_text = if (isLocalized _text) then {(localize _text)}; | ||
|
||
//set markerText | ||
_marker setMarkerTextLocal format [_text, _arg]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ _vehicle = _this select 0; | |
_marker = createmarker [format ["m_%1",_vehicle],getPos _vehicle]; | ||
_marker setMarkerType "mil_box"; | ||
_marker setMarkerColor "ColorRed"; | ||
_marker setMarkerText format [(localize "STR_BTC_HAM_O_EH_VEHKILLED_MRK"),getText (configFile >> "cfgVehicles" >> typeof _vehicle >> "displayName")]; // %1 wreck | ||
[_marker,"STR_BTC_HAM_O_EH_VEHKILLED_MRK",(getText (configFile >> "cfgVehicles" >> typeof _vehicle >> "displayName"))] remoteExec ["btc_fnc_set_markerTextLocal", [0, -2] select isDedicated, _marker]; // %1 wreck | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you remove the JIP when this marker is deleted ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure done 😄 |
||
|
||
_vehicle setVariable ["marker",_marker]; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,12 +36,12 @@ btc_side_jip_data = [14,getPos _city1,_city1 getVariable "name"]; | |
//// Create markers \\\\ | ||
_marker1 = createmarker [format ["sm_2_%1",getPos _city1],getPos _city1]; | ||
_marker1 setmarkertype "hd_flag"; | ||
_marker1 setmarkertext (localize "STR_BTC_HAM_SIDE_CONVOY_MRKSTART"); //Convoy Start | ||
[_marker,"STR_BTC_HAM_SIDE_CONVOY_MRKSTART"] remoteExec ["btc_fnc_set_markerTextLocal", [0, -2] select isDedicated, _marker]; //Convoy Start | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
_marker1 setMarkerSize [0.6, 0.6]; | ||
|
||
_marker2 = createmarker [format ["sm_2_%1",_pos2],_pos2]; | ||
_marker2 setmarkertype "hd_flag"; | ||
_marker2 setmarkertext (localize "STR_BTC_HAM_SIDE_CONVOY_MRKEND"); //Convoy End | ||
[_marker,"STR_BTC_HAM_SIDE_CONVOY_MRKEND"] remoteExec ["btc_fnc_set_markerTextLocal", [0, -2] select isDedicated, _marker]; //Convoy End | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
_marker2 setMarkerSize [0.6, 0.6]; | ||
|
||
_area = createmarker [format ["sm_%1",_pos2],_pos2]; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ _area setmarkercolor "colorBlue"; | |
|
||
_marker = createmarker [format ["sm_2_%1",_pos],_pos]; | ||
_marker setmarkertype "hd_flag"; | ||
_marker setmarkertext (localize "STR_BTC_HAM_SIDE_UNDERWATER_MRK"); //Generator | ||
[_marker,"STR_BTC_HAM_SIDE_UNDERWATER_MRK"] remoteExec ["btc_fnc_set_markerTextLocal", [0, -2] select isDedicated, _marker]; //Generator | ||
_marker setMarkerSize [0.6, 0.6]; | ||
|
||
|
||
|
@@ -58,7 +58,7 @@ _group = [_pos,8, 1 + round random 5,0.8] call btc_fnc_mil_create_group; | |
[_pos,20, 2 + round random 4,0.5] call btc_fnc_mil_create_group; | ||
|
||
_pos = getPosASL _generator; | ||
leader _group setPosASL [_pos select 0, _pos select 1, (_pos select 2) + 1 + random 1]; | ||
(leader (_group select 0)) setPosASL [_pos select 0, _pos select 1, (_pos select 2) + 1 + random 1]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should not be here, may be you based your branch on your last PR, doesn't matter :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My mistake, sorry. |
||
|
||
waitUntil {sleep 5; (btc_side_aborted || btc_side_failed || !Alive _generator )}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! So there was a third solution !