Skip to content

Commit

Permalink
Merge branch 'translation_unstable' into translation_master
Browse files Browse the repository at this point in the history
  • Loading branch information
Spoffy committed Aug 10, 2019
2 parents d5bea0b + eb6f8f9 commit a28acaf
Show file tree
Hide file tree
Showing 92 changed files with 1,429 additions and 525 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
*.xcopy.log
Tools/ValidationResults.txt
*.log
*.pbo
*.pbo.bak
*.bat
template.*.cfg
.vscode
.github
24 changes: 0 additions & 24 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion A3-Antistasi/AI/guardDog.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ while {alive _dog} do
{
[_spotted,false] remoteExec ["setCaptive",0,_spotted]; _spotted setCaptive false;
};
} forEach ([100,0,position _dog,teamPlayer] call A3A_fnc_distanceUnits);
} forEach ([20,0,position _dog,teamPlayer] call A3A_fnc_distanceUnits);

if ((random 10 < 1) and (isNull _spotted)) then
{
Expand Down
4 changes: 2 additions & 2 deletions A3-Antistasi/Ammunition/NATOCrate.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ clearWeaponCargoGlobal _crate;
clearItemCargoGlobal _crate;
clearBackpackCargoGlobal _crate;

_var1 = 1+ round random 4;
_var1 = 1 + round random 4;
_var2 = 1 + round random 5;
_var3 = 1 + floor random 3;
_var4 = floor random 2;
Expand All @@ -26,7 +26,7 @@ for "_i" from 0 to _var1 do
_thingX = selectRandom (weaponsNato + antitankAAF);
if (!(_thingX in unlockedWeapons)) then
{
_num = 1+ (floor random 12);
_num = 1 + (floor random 12);
_crate addWeaponCargoGlobal [_thingX, _num];
_magazines = getArray (configFile / "CfgWeapons" / _thingX / "magazines");
_crate addMagazineCargoGlobal [_magazines select 0, _num * 3];
Expand Down
19 changes: 6 additions & 13 deletions A3-Antistasi/CREATE/CIVinit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,34 +44,27 @@ _EHkilledIdx = _unit addEventHandler ["killed",
{
if (isPlayer _killer) then
{
if (!isMultiPlayer) then
{
_nul = [0,20] remoteExec ["A3A_fnc_resourcesFIA",2];
_killer addRating 1000;
}
else
{
if (typeOf _victim == "C_man_w_worker_F") then {_killer addRating 1000};
[-10,_killer] call A3A_fnc_playerScoreAdd
}
if (typeOf _victim == "C_man_w_worker_F") then {_killer addRating 1000};
[-10,_killer] call A3A_fnc_playerScoreAdd;
};
_multiplier = 1;
if (typeOf _victim == "C_journalist_F") then {_multiplier = 10};
if (side _killer == teamPlayer) then
//Must be group, in case they're undercover.
if (side group _killer == teamPlayer) then
{
_nul = [1*_multiplier,0] remoteExec ["A3A_fnc_prestige",2];
_nul = [1,0,getPos _victim] remoteExec ["A3A_fnc_citySupportChange",2];
}
else
{
if (side _killer == Occupants) then
if (side group _killer == Occupants) then
{
//_nul = [-1*_multiplier,0] remoteExec ["A3A_fnc_prestige",2];
_nul = [0,1,getPos _victim] remoteExec ["A3A_fnc_citySupportChange",2];
}
else
{
if (side _killer == Invaders) then
if (side group _killer == Invaders) then
{
//_nul = [2*_multiplier,0] remoteExec ["A3A_fnc_prestige",2];
_nul = [-1,1,getPos _victim] remoteExec ["A3A_fnc_citySupportChange",2];
Expand Down
3 changes: 2 additions & 1 deletion A3-Antistasi/CREATE/CSATpunish.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ for "_i" from 0 to round random 2 do
{
if ([vehCSATPlane] call A3A_fnc_vehAvailable) then
{
_nul = [_mrkDestination,Invaders,"NAPALM"] spawn A3A_fnc_airstrike;
private _bombType = if (napalmEnabled) then {"NAPALM"} else {"HE"};
_nul = [_mrkDestination,Invaders,_bombType] spawn A3A_fnc_airstrike;
sleep 30;
};
};
Expand Down
2 changes: 1 addition & 1 deletion A3-Antistasi/CREATE/createAIAirplane.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ if ((spawner getVariable _markerX != 2) and _frontierX) then
_typeVehX = if (_sideX==Occupants) then {staticATOccupants} else {staticATInvaders};
_veh = _typeVehX createVehicle _positionX;
_vehiclesX pushBack _veh;
_veh setPos _pos;
_veh setDir _dirVeh + 180;
_veh setPos _pos;
_typeUnit = if (_sideX==Occupants) then {staticCrewOccupants} else {staticCrewInvaders};
_unit = _groupX createUnit [_typeUnit, _positionX, [], 0, "NONE"];
[_unit,_markerX] call A3A_fnc_NATOinit;
Expand Down
2 changes: 1 addition & 1 deletion A3-Antistasi/CREATE/createAIOutposts.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ if (count _roads != 0) then
_pos = _positionX findEmptyPosition [5,_size,"I_Truck_02_covered_F"];//donde pone 5 antes ponía 10
if (count _pos > 0) then
{
_typeVehX = if (_sideX == Occupants) then {if (!_isFIA) then {vehNATOTrucks} else {[vehFIATruck]}} else {vehCSATTrucks};
_typeVehX = if (_sideX == Occupants) then {if (!_isFIA) then {vehNATOTrucks + vehNATOCargoTrucks} else {[vehFIATruck]}} else {vehCSATTrucks};
_veh = createVehicle [selectRandom _typeVehX, _pos, [], 0, "NONE"];
_veh setDir random 360;
_vehiclesX pushBack _veh;
Expand Down
2 changes: 1 addition & 1 deletion A3-Antistasi/CREATE/createAIResources.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ if (count _pos > 0) then
{
_typeVehX = if (_sideX == Occupants) then
{
if (!_isFIA) then {vehNATOTrucks} else {[vehFIATruck]};
if (!_isFIA) then {vehNATOTrucks + vehNATOCargoTrucks} else {[vehFIATruck]};
}
else
{
Expand Down
2 changes: 0 additions & 2 deletions A3-Antistasi/CREATE/createAIcontrols.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ if (_isControl) then
_typeVehX = if (_sideX == Occupants) then {NATOFlag} else {CSATFlag};
_veh = createVehicle [_typeVehX, _pos, [],0, "CAN_COLLIDE"];
_vehiclesX pushBack _veh;
_veh = _typeVehX createVehicle _positionX;
_vehiclesX pushBack _veh;
_veh setPosATL _pos;
_veh setDir _dirVeh;
sleep 1;
Expand Down
2 changes: 1 addition & 1 deletion A3-Antistasi/CREATE/milBuildings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ for "_i" from 0 to (count _buildings) - 1 do
{
_typeVehX = if (_sideX == Occupants) then {staticAAOccupants} else {staticAAInvaders};
_veh = createVehicle [_typeVehX, (_building buildingPos 8), [],0, "CAN_COLLIDE"];
_veh setPosATL [(getPos _building select 0),(getPos _building select 1),(getPosATL _veh select 2)];
_veh setDir (getDir _building);
_veh setPosATL [(getPos _building select 0),(getPos _building select 1),(getPosATL _veh select 2)];
_unit = _groupX createUnit [_typeUnit, _positionX, [], 0, "NONE"];
[_unit,_markerX] call A3A_fnc_NATOinit;
_unit moveInGunner _veh;
Expand Down
2 changes: 1 addition & 1 deletion A3-Antistasi/CREATE/patrolCA.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if ((!_isMarker) and (_typeOfAttack != "Air") and (!_super) and ({sidesX getVari
_friendlies = if (_sideX == Occupants) then {allUnits select {(_x distance _posDestination < 200) and (alive _x) and ((side (group _x) == _sideX) or (side (group _x) == civilian))}} else {allUnits select {(_x distance _posDestination < 100) and ([_x] call A3A_fnc_canFight) and (side (group _x) == _sideX)}};
if (count _friendlies == 0) then
{
_typeX = "NAPALM";
_typeX = if (napalmEnabled) then {"NAPALM"} else {"HE"};
{
if (vehicle _x isKindOf "Tank") then
{
Expand Down
28 changes: 8 additions & 20 deletions A3-Antistasi/CREATE/wavedCA.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -594,25 +594,19 @@ while {(_waves > 0)} do
{
sleep 60;
_rnd = if (_mrkDestination in airportsX) then {round random 4} else {round random 2};
private _bombOptions = if (napalmEnabled) then {["HE","CLUSTER","NAPALM"]} else {["HE","CLUSTER"]};
for "_i" from 0 to _rnd do
{
if ([_plane] call A3A_fnc_vehAvailable) then
{
diag_log "Antistasi: Airstrike Spawned";
if (_i == 0) then
if (_i == 0 && {_mrkDestination in airportsX}) then
{
if (_mrkDestination in airportsX) then
{
_nul = [_mrkDestination,_sideX,"HE"] spawn A3A_fnc_airstrike;
}
else
{
_nul = [_mrkDestination,_sideX,selectRandom ["HE","CLUSTER","NAPALM"]] spawn A3A_fnc_airstrike;
};
_nul = [_mrkDestination,_sideX,"HE"] spawn A3A_fnc_airstrike;
}
else
{
_nul = [_mrkDestination,_sideX,selectRandom ["HE","CLUSTER","NAPALM"]] spawn A3A_fnc_airstrike;
_nul = [_mrkDestination,_sideX,selectRandom _bombOptions] spawn A3A_fnc_airstrike;
};
sleep 30;
};
Expand All @@ -630,25 +624,19 @@ while {(_waves > 0)} do
{
sleep 60;
_rnd = if (_mrkDestination in airportsX) then {if ({sidesX getVariable [_x,sideUnknown] == Invaders} count airportsX == 1) then {8} else {round random 4}} else {round random 2};
private _bombOptions = if (napalmEnabled) then {["HE","CLUSTER","NAPALM"]} else {["HE","CLUSTER"]};
for "_i" from 0 to _rnd do
{
if ([_plane] call A3A_fnc_vehAvailable) then
{
diag_log "Antistasi: Airstrike Spawned";
if (_i == 0) then
if (_i == 0 && {_mrkDestination in airportsX}) then
{
if (_mrkDestination in airportsX) then
{
_nul = [_mrkDestination,_sideX,"HE"] spawn A3A_fnc_airstrike;
}
else
{
_nul = [_mrkDestination,_sideX,selectRandom ["HE","CLUSTER","NAPALM"]] spawn A3A_fnc_airstrike;
};
_nul = [_mrkDestination,_sideX,"HE"] spawn A3A_fnc_airstrike;
}
else
{
_nul = [_posDestination,_sideX,selectRandom ["HE","CLUSTER","NAPALM"]] spawn A3A_fnc_airstrike;
_nul = [_posDestination,_sideX,selectRandom _bombOptions] spawn A3A_fnc_airstrike;
};
sleep 30;
};
Expand Down
2 changes: 1 addition & 1 deletion A3-Antistasi/Debugging/spawnDebuggingLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ while {shouldRunDebuggingLoop} do {
//If petros ceases to exist, the whole gamemode is fucked. No exaggeration. At all.
//As a precaution, this is the 'OH FUCK I HOPE PETROS EXISTS' check, that makes sure he always exists.
if (isNil "petros" || {isNull petros}) then {
call A3A_fnc_createPetros;
[] call A3A_fnc_createPetros;
};
sleep 60;
};
2 changes: 2 additions & 0 deletions A3-Antistasi/Dialogs/firstLoad.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ if (count _this > 0) then {_bypass = true};
waitUntil {dialog};
hint "W A R N I N G\n\nREAD THIS!!!\n\n\nAntistasi does NOT support vanilla save. Do not expect 100% of functionalities if you Save&Exit and after you come back with Resume option. Both on SP and MP.\n\n\nAntistasi has an in built save system, GTA alike, which is the system you have to use in order to have full functionalities.\n\nTo Save: Go to the Map Board, select ""Game Options"" and hit on ""Persistent Save"" button.\n\nTo load: RESTART the game and click YES on this window";
waitUntil {!dialog};
diag_log "[Antistasi] Saving is now possible.";
player setVariable ['canSave', true, true];
2 changes: 1 addition & 1 deletion A3-Antistasi/Garage/placeEmptyVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ clearItemCargoGlobal _garageVeh;
clearBackpackCargoGlobal _garageVeh;

_garageVeh allowDamage true;
_garageVeh enableSimulationGlobal true;
_garageVeh enableSimulation true;

_garageVeh;
2 changes: 1 addition & 1 deletion A3-Antistasi/Garage/private/attemptPlaceVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (!(_isValidLocationArray select 0)) exitWith {
[] call A3A_fnc_handleVehPlacementCancelled;
};

private _canPlaceArray = [vehPlace_callbackTarget, CALLBACK_CAN_PLACE_VEH , [vehPlace_previewVeh]] call A3A_fnc_vehPlacementCallbacks;
private _canPlaceArray = [vehPlace_callbackTarget, CALLBACK_CAN_PLACE_VEH , [_pos, _dir, _vehicleType]] call A3A_fnc_vehPlacementCallbacks;
if (isNil "_canPlaceArray") then {
diag_log format ["[Antistasi] No Can Place Vehicle Callback registered for %1", vehPlace_callbackTarget];
_canPlaceArray = [true];
Expand Down
4 changes: 2 additions & 2 deletions A3-Antistasi/Garage/vehPlacementBegin.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ vehPlace_extraMessage = _displayMessage;

vehPlace_previewVeh = _vehicleType createVehicleLocal [0,0,1000];
vehPlace_previewVeh allowDamage false;
vehPlace_previewVeh enableSimulationGlobal false;
vehPlace_previewVeh enableSimulation false;

[_vehicleType] call A3A_fnc_displayVehiclePlacementMessage;
hint "Hover your mouse to the desired position. If it's safe and suitable, you will see the vehicle";
Expand Down Expand Up @@ -105,7 +105,7 @@ addMissionEventHandler ["EachFrame",
deleteVehicle vehPlace_previewVeh;
vehPlace_previewVeh = _typeX createVehicleLocal [0,0,1000];
vehPlace_previewVeh allowDamage false;
vehPlace_previewVeh enableSimulationGlobal false;
vehPlace_previewVeh enableSimulation false;
[_typeX] call A3A_fnc_displayVehiclePlacementMessage;
};
case VEHPLACE_ACTION_ROT_LEFT:
Expand Down
2 changes: 1 addition & 1 deletion A3-Antistasi/Garage/vehPlacementCallbacks.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ params ["_callbackTarget", "_callbackType", ["_callbackParams", []]];
CALLBACK_VEH_PLACED_SUCCESSFULLY - Passed the created vehicle, no return needed. Only called if vehicle successfully created.
CALLBACK_VEH_PLACEMENT_CANCELLED - No parameters, no return needed
CALLBACK_SHOULD_CANCEL_PLACEMENT - Passed a temporary preview vehicle, return format [shouldCancel: bool, messageOnCancel: string]
CALLBACK_CAN_PLACE_VEH - Passed a temporary preview vehicle, return format [canPlace: bool, messageOnUnableTo: string]
CALLBACK_CAN_PLACE_VEH - Passed position, direction and vehicle class, return format [canPlace: bool, messageOnUnableTo: string]
CALLBACK_VEH_PLACEMENT_CLEANUP - Passed nothing, no return needed. Called just before vehicle placement totally finishes. Should always be called.
CALLBACK_VEH_IS_VALID_LOCATION - Passed position, direction and vehicle class. Return format [canPlace: bool, messageOnUnableTo: string]
CALLBACK_VEH_CUSTOM_CREATE_VEHICLE - Given a class, position and direction. Return vehicle created.
Expand Down
26 changes: 22 additions & 4 deletions A3-Antistasi/JeroenArsenal/JNA/fn_arsenal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,15 @@ switch _mode do {
_primaryweapon set [0,((_primaryweapon select 0) call BIS_fnc_baseWeapon)];
_secondaryweapon set [0,((_secondaryweapon select 0) call BIS_fnc_baseWeapon)];
_handgunweapon set [0,((_handgunweapon select 0) call BIS_fnc_baseWeapon)];
_backpack set [0,((_backpack select 0) call BIS_fnc_basicBackpack)];

//Some mod backpacks have no empty variant
if (count _backpack > 0) then {
private _basicBackpack = ((_backpack select 0) call BIS_fnc_basicBackpack);
if (_basicBackpack isEqualTo "") then {
_basicBackpack = _backpack select 0;
};
_backpack set [0,_basicBackpack];
};

_uniformitems = [_unifrom,1,[]] call BIS_fnc_param;
_vestitems = [_vest,1,[]] call BIS_fnc_param;
Expand Down Expand Up @@ -1634,10 +1642,20 @@ switch _mode do {

if (_item != "") then{
switch _index do{
case IDC_RSCDISPLAYARSENAL_TAB_UNIFORM:{player forceaddUniform _item;};
case IDC_RSCDISPLAYARSENAL_TAB_VEST:{player addVest _item;};
case IDC_RSCDISPLAYARSENAL_TAB_BACKPACK:{player addbackpack _item;};
case IDC_RSCDISPLAYARSENAL_TAB_UNIFORM:{
player forceaddUniform _item;
};
case IDC_RSCDISPLAYARSENAL_TAB_VEST:{
player addVest _item;
};
case IDC_RSCDISPLAYARSENAL_TAB_BACKPACK: {
player addbackpack _item;
//Some glitchy backpacks aren't empty. Make sure they are. NO FREE ITEMS.
clearAllItemsFromBackpack player;
};
};



//container changed
_container = switch _index do{
Expand Down
Loading

0 comments on commit a28acaf

Please sign in to comment.