<commit_before>//	@file Version: 2
//	@file Name: vehicleSpawning.sqf
//	@file Author: JoSchaap
//  new one, no longer requires Spawn_ markers but uses the town's radius in config.sqf to pick the ammount of vehicles

if (!isServer) exitWith {};

private ["_counter","_townname","_tradius","_pos","_vehammount","_minrad","_maxrad","_lcounter","_spawnedVehicles","_createRandomVehicle","_angleIncr","_langle","_lpos"];
_tradius = 0;
_townname = "debug";
_counter = 1;
_vehammount = 0;
_minrad = 0;
_maxrad = 0;
_lcounter = 0;

_spawnedVehicles = [];

_createRandomVehicle =
{
	private ["_pos", "_minrad", "_maxrad", "_counter", "_num", "_vehicleType", "_mindist"];
	_pos = _this select 0;
	_minrad = _this select 1;
	_maxrad = _this select 2;
	_counter = _this select 3;
	
	_num = floor (random 100);

	if (_num < 100) then { _vehicleType = civilianVehicles call BIS_fnc_selectRandom };
	if (_num < 50) then { _vehicleType = lightMilitaryVehicles call BIS_fnc_selectRandom };
	if (_num < 15) then { _vehicleType = mediumMilitaryVehicles call BIS_fnc_selectRandom };
	
	if (_vehicleType isKindOf "Quadbike_01_base_F") then {
		_mindist = 1.5;
	} else {
		_mindist = 4;
	};
	
	_pos = [_pos, _minrad, _maxrad, _mindist, 0, 60*(pi/180), 0, _vehicleType] call findSafePos;
	
	[_pos, _vehicleType] call vehicleCreation;
	
	//diag_log format ["Vehicle spawn #%1 done", _counter];
};

_vehammount = ceil (_tradius / 15);

{
	_pos = getMarkerPos (_x select 0);
	_tradius = _x select 1;
	_townname = _x select 2;
	_vehammount = ceil (_tradius / 15);  // spawns a vehicle for every 15m radius the townmarker has, this might need tweaking! 
	_angleIncr = 360 / _vehammount;
	_langle = random _angleIncr;
	//_minrad = 15;
	//_maxrad = 30;
	_minrad = 0;
	_maxrad = _tradius / 2;
	<commit_msg>reduce the amount of vehicles<commit_after>//	@file Version: 2
//	@file Name: vehicleSpawning.sqf
//	@file Author: JoSchaap
//  new one, no longer requires Spawn_ markers but uses the town's radius in config.sqf to pick the ammount of vehicles

if (!isServer) exitWith {};

private ["_counter","_townname","_tradius","_pos","_vehammount","_minrad","_maxrad","_lcounter","_spawnedVehicles","_createRandomVehicle","_angleIncr","_langle","_lpos"];
_tradius = 0;
_townname = "debug";
_counter = 1;
_vehammount = 0;
_minrad = 0;
_maxrad = 0;
_lcounter = 0;

_spawnedVehicles = [];

_createRandomVehicle =
{
	private ["_pos", "_minrad", "_maxrad", "_counter", "_num", "_vehicleType", "_mindist"];
	_pos = _this select 0;
	_minrad = _this select 1;
	_maxrad = _this select 2;
	_counter = _this select 3;
	
	_num = floor (random 100);

	if (_num < 100) then { _vehicleType = civilianVehicles call BIS_fnc_selectRandom };
	if (_num < 50) then { _vehicleType = lightMilitaryVehicles call BIS_fnc_selectRandom };
	if (_num < 15) then { _vehicleType = mediumMilitaryVehicles call BIS_fnc_selectRandom };
	
	if (_vehicleType isKindOf "Quadbike_01_base_F") then {
		_mindist = 1.5;
	} else {
		_mindist = 4;
	};
	
	_pos = [_pos, _minrad, _maxrad, _mindist, 0, 60*(pi/180), 0, _vehicleType] call findSafePos;
	
	[_pos, _vehicleType] call vehicleCreation;
	
	//diag_log format ["Vehicle spawn #%1 done", _counter];
};

_vehammount = ceil (_tradius / 30);

{
	_pos = getMarkerPos (_x select 0);
	_tradius = _x select 1;
	_townname = _x select 2;
	_vehammount = ceil (_tradius / 30);  // spawns a vehicle for every 30m radius the townmarker has, this might need tweaking! 
	_angleIncr = 360 / _vehammount;
	_langle = random _angleIncr;
	//_minrad = 15;
	//_maxrad = 30;
	_minrad = 0;
	_maxrad = _tradius / 2;
	
{'fraction_non_alphanumeric': 0.13004484304932734, 'fraction_numerical': 0.02914798206278027, 'mean_word_length': 4.602825745682889, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '393144', 'n_tokens_mistral': 1479, 'n_tokens_neox': 1329, 'n_words': 374}