sqf
This commit is contained in:
parent
d3eb230d4c
commit
c8d6e6529e
|
@ -0,0 +1 @@
|
||||||
|
\leoservermod
|
|
@ -0,0 +1,32 @@
|
||||||
|
class CfgPatches
|
||||||
|
{
|
||||||
|
class leoservermod
|
||||||
|
{
|
||||||
|
// Meta information for editor
|
||||||
|
name = "leoservermod";
|
||||||
|
author = "leo";
|
||||||
|
url = "https://leosongwei.github.io/";
|
||||||
|
|
||||||
|
requiredVersion = 1.69;
|
||||||
|
|
||||||
|
requiredAddons[] = {};
|
||||||
|
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
// init = "diag_log 'loading leoext...'; call compile preprocessFileLineNumbers '\leoservermod\init.sqf'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class CfgFunctions
|
||||||
|
{
|
||||||
|
class leoservermod
|
||||||
|
{
|
||||||
|
class functions
|
||||||
|
{
|
||||||
|
class leoservermodInit {
|
||||||
|
file="\leoservermod\init.sqf";
|
||||||
|
postInit=1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,6 @@
|
||||||
|
diag_log "leoext: try to initialize...";
|
||||||
|
|
||||||
|
_return = "libleoext" callExtension "foooo";
|
||||||
|
execVM "\leoservermod\marker.sqf";
|
||||||
|
|
||||||
|
diag_log format ["leoext: initialize complete! return: %1", _return];
|
|
@ -0,0 +1,42 @@
|
||||||
|
leoext_map_markers_information = {
|
||||||
|
private _info_list = [];
|
||||||
|
{
|
||||||
|
private _text = markerText _x;
|
||||||
|
private _icon_type = markerType _x; // "Empty" == not icon
|
||||||
|
private _pos = markerPos _x;
|
||||||
|
private _color = markerColor _x;
|
||||||
|
|
||||||
|
private _marker_info = [_text, _icon_type, _color, _pos];
|
||||||
|
if (_icon_type != "") then {
|
||||||
|
_info_list pushBack _marker_info;
|
||||||
|
};
|
||||||
|
} forEach allMapMarkers;
|
||||||
|
|
||||||
|
_info_list;
|
||||||
|
};
|
||||||
|
|
||||||
|
leoext_units_pos = {
|
||||||
|
private _units_pos = [];
|
||||||
|
{
|
||||||
|
private _side = str (side _x);
|
||||||
|
private _pos = position _x;
|
||||||
|
|
||||||
|
private _unit = [_side, _pos];
|
||||||
|
_units_pos pushBack _unit;
|
||||||
|
} forEach allUnits;
|
||||||
|
|
||||||
|
_units_pos;
|
||||||
|
};
|
||||||
|
|
||||||
|
leoext_stop = false;
|
||||||
|
|
||||||
|
[] spawn {
|
||||||
|
while {!leoext_stop} do {
|
||||||
|
sleep 1;
|
||||||
|
diag_log "submitting coordinates...";
|
||||||
|
|
||||||
|
private _markers = call leoext_map_markers_information;
|
||||||
|
private _units = call leoext_units_pos;
|
||||||
|
"libleoext" callExtension ["foo", [[_markers, _units]]];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue