diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 00000000..e417650e
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,3 @@
+# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
+#
+* @ArmaForces/sqf-devs
diff --git a/.github/labels.json b/.github/labels.json
new file mode 100644
index 00000000..67b11451
--- /dev/null
+++ b/.github/labels.json
@@ -0,0 +1,38 @@
+[
+ {
+ "name": "bug",
+ "color": "#d73a4a",
+ "description": "Something isn't working"
+ },
+ {
+ "name": "bugfix",
+ "color": "#52ed47",
+ "description": "Fixes something wasn't working"
+ },
+ {
+ "name": "documentation",
+ "color": "#0075ca",
+ "description": "Improvements or additions to documentation"
+ },
+ {
+ "name": "duplicate",
+ "color": "#cfd3d7",
+ "description": "This issue or pull request already exists"
+ },
+ {
+ "name": "enhancement",
+ "color": "#a2eeef",
+ "description": "New feature or request"
+ },
+ {
+ "name": "ignore changelog",
+ "color": "#fff",
+ "description": "Do not add to changelog"
+ },
+ {
+ "name": "scenario",
+ "color": "#3BC4B8",
+ "description": "Improvements or additions to a scenario"
+ }
+]
+
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
new file mode 100644
index 00000000..87de2055
--- /dev/null
+++ b/.github/release-drafter.yml
@@ -0,0 +1,33 @@
+branches:
+ - master
+
+name-template: 'v$NEXT_PATCH_VERSION'
+tag-template: 'v$NEXT_PATCH_VERSION'
+
+categories:
+ - title: '**ADDED:**'
+ labels:
+ - feature
+ - title: '**FIXED:**'
+ labels:
+ - bugfix
+ - title: '**CHANGED:**'
+ labels:
+ - cleanup
+ - enhancement
+
+exclude-labels:
+ - 'ignore changelog'
+
+change-template: '- $TITLE (#$NUMBER)'
+template: |
+ _ArmaForces SerialKillers release._
+
+ ## Change Log Summary
+
+ $CHANGES
+
+replacers:
+ # Category titles
+ - search: '/\#\# (\*\*(ADDED|FIXED|CHANGED):\*\*)/g'
+ replace: '$1'
diff --git a/.github/workflows/arma.yml b/.github/workflows/arma.yml
index fef1c598..224ab9f0 100644
--- a/.github/workflows/arma.yml
+++ b/.github/workflows/arma.yml
@@ -14,6 +14,8 @@ jobs:
uses: actions/checkout@master
- name: Validate SQF
run: python3 tools/sqf_validator.py
+ - name: Validate Return Types
+ run: python3 tools/return_checker.py
- name: Validate Config
run: python3 tools/config_style_checker.py
- name: Validate Stringtables
@@ -21,26 +23,17 @@ jobs:
- name: Check for BOM
uses: arma-actions/bom-check@master
- lint:
+ build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
- uses: actions/checkout@master
- - name: Lint (sqflint)
- uses: arma-actions/sqflint@master
- continue-on-error: true # No failure due to many false-positives
-
-# build:
-# runs-on: ubuntu-latest
-# steps:
-# - name: Checkout the source code
-# uses: actions/checkout@master
-# - name: Build using HEMTT
-# uses: arma-actions/hemtt@master
-# with:
-# command: build --release --ci
-# https://github.com/actions/upload-artifact/issues/3#issuecomment-524442814
-# - uses: actions/upload-artifact@master
-# with:
-# name: armaforces_mods_VERSION
-# path: releases/VERSION
+ uses: actions/checkout@v4
+ - name: Setup HEMTT
+ uses: arma-actions/hemtt@v1
+ - name: Run HEMTT build
+ run: hemtt build
+ - uses: actions/upload-artifact@v4
+ with:
+ name: afsk_${{ github.sha }}-nobin
+ path: .hemttout/@*
+ include-hidden-files: true # Because .hemttout is a hidden directory
diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml
new file mode 100644
index 00000000..1afdfef0
--- /dev/null
+++ b/.github/workflows/release-drafter.yml
@@ -0,0 +1,16 @@
+name: Release Drafter
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ draft:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Release Drafter
+ if: github.repository == 'ArmaForces/SerialKillers'
+ uses: release-drafter/release-drafter@v5
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..bdea6c93
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,33 @@
+name: Release
+
+on:
+ release:
+ types:
+ - published
+
+jobs:
+ build_addon:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set VERSION env
+ run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV
+ - name: Setup HEMTT
+ uses: arma-actions/hemtt@v1
+ - name: Run HEMTT release
+ run: hemtt release
+ # Upload to GitHub
+ - uses: softprops/action-gh-release@v1
+ with:
+ files: 'releases/afsk-${{ env.VERSION }}-*.zip'
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # Upload to Steam Workshop
+ - uses: arma-actions/workshop-upload@v1
+ with:
+ itemId: '1993094302' # Id of item to update
+ contentPath: '.hemttout/release'
+ changelog: 'https://github.com/ArmaForces/SerialKillers/releases/tag/v${{ env.VERSION }}'
+ env:
+ STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
+ STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
diff --git a/.hemtt/hooks/pre_build/set_version.rhai b/.hemtt/hooks/pre_build/set_version.rhai
new file mode 100644
index 00000000..f26f229d
--- /dev/null
+++ b/.hemtt/hooks/pre_build/set_version.rhai
@@ -0,0 +1,14 @@
+
+let modCpp = HEMTT_VFS
+ .join("mod.cpp")
+ .open_file()
+ .read()
+;
+
+modCpp.replace("0.0.0", HEMTT.project().version().to_string_short());
+
+HEMTT_VFS
+ .join("mod.cpp")
+ .create_file()
+ .write(modCpp)
+;
diff --git a/.hemtt/launch.toml b/.hemtt/launch.toml
new file mode 100644
index 00000000..3fa1131f
--- /dev/null
+++ b/.hemtt/launch.toml
@@ -0,0 +1,43 @@
+[default]
+workshop = [
+ "450814997", # CBA_A3
+ "2369477168", # ADT
+]
+parameters = [
+ "-name=dev_sk",
+]
+
+[ace]
+extends = "default"
+workshop = [
+ "463939057", # ACE
+# "766491311", # KKA3 ACE Extension
+]
+
+[cup]
+extends = "default"
+workshop = [
+ "583496184", # CUP Terrains - Core
+ "583544987", # CUP Terrains - Maps
+ "497660133", # CUP Weapons
+ "497661914", # CUP Units
+ "541888371", # CUP Vehicles
+]
+
+[vn]
+extends = "default"
+dlc = [
+ "S.O.G. Prairie Fire",
+]
+
+[ww2]
+extends = "default"
+dlc = [
+ "Spearhead 1944",
+]
+
+[gm]
+extends = "default"
+dlc = [
+ "Global Mobilization",
+]
diff --git a/.hemtt/lints.toml b/.hemtt/lints.toml
new file mode 100644
index 00000000..025af8ce
--- /dev/null
+++ b/.hemtt/lints.toml
@@ -0,0 +1,6 @@
+[sqf.command_case]
+options.ignore = [
+ "CIVILIAN",
+ "EAST",
+ "WEST",
+]
diff --git a/.hemtt/project.toml b/.hemtt/project.toml
index f6f7a9be..ba34c73b 100644
--- a/.hemtt/project.toml
+++ b/.hemtt/project.toml
@@ -1,3 +1,4 @@
+
name = "ArmaForces SerialKillers"
mainprefix = "z"
prefix = "afsk"
@@ -16,33 +17,3 @@ author = "ArmaForces"
[version]
path = "addons/main/script_version.hpp"
-
-[asc]
-exclude = [
- ".inc.sqf"
-]
-
-[hemtt.launch]
-workshop = [
- "450814997", # CBA_A3
- "2369477168", # ADT
-]
-parameters = [
- "-name=dev_sk",
- "-window",
-]
-
-[hemtt.launch.cup]
-workshop = [
- "450814997", # CBA_A3
- "2369477168", # ADT
- "583496184", # CUP Terrains - Core
- "583544987", # CUP Terrains - Maps
- "497660133", # CUP Weapons
- "497661914", # CUP Units
- "541888371", # CUP Vehicles
-]
-parameters = [
- "-name=dev_sk",
- "-window",
-]
diff --git a/addons/briefing/stringtable.xml b/addons/briefing/stringtable.xml
index fd229ee5..3e08f35d 100644
--- a/addons/briefing/stringtable.xml
+++ b/addons/briefing/stringtable.xml
@@ -5,6 +5,10 @@
SerialKillers - BriefingSerialKillers - Odprawa
+
+ Rules
+ Zasady
+ Enable rulesWłącz zasady
@@ -13,10 +17,6 @@
If enabled, suggested rules will be visible on the map in "SerialKillers" briefing section.Jeżeli włączone, proponowane zasady będą widoczne na odprawnie na mapie w zakładce "SerialKillers".
-
- Rules
- Zasady
- Cops are not allowed to use terrorist stashes/weapons. They may only use radios they find after neutralizing a terrorist.Policjanci nie mogą używać broni terrorystów ani skrytek z bronią. Mogą używać jedynie radia, które znajdą przy zneutralizowanym terroryście.
diff --git a/addons/civilian/functions/fnc_assignCityCivilian.sqf b/addons/civilian/functions/fnc_assignCityCivilian.sqf
index 620cb895..3d69e2b6 100644
--- a/addons/civilian/functions/fnc_assignCityCivilian.sqf
+++ b/addons/civilian/functions/fnc_assignCityCivilian.sqf
@@ -18,7 +18,7 @@
params ["_civilian", "_cityNamespace"];
-// Get city civilians array and pushback new civilian. No need for setVariable as getVariable returns array pointer.
+// Get city civilians array and pushBack new civilian. No need for setVariable as getVariable returns array pointer.
_cityCivilians = _cityNamespace getVariable QGVAR(CiviliansList);
_cityCivilians pushBack _civilian;
_cityNamespace setVariable [QGVAR(CiviliansCount), count _cityCivilians];
diff --git a/addons/civilian/functions/fnc_civilianKilled.sqf b/addons/civilian/functions/fnc_civilianKilled.sqf
index e78acade..8fd2cab1 100644
--- a/addons/civilian/functions/fnc_civilianKilled.sqf
+++ b/addons/civilian/functions/fnc_civilianKilled.sqf
@@ -31,7 +31,7 @@ if (count GVAR(civilians) isEqualTo 0) then {
[QEGVAR(score,allCiviliansDead)] call CBA_fnc_serverEvent;
};
-private _time = [daytime] call BIS_fnc_timeToString;
+private _time = [dayTime] call BIS_fnc_timeToString;
// Call function to create marker at killed unit's position.
[_civilian, _time] call FUNC(civilianKilledMarker);
// Show message for all cops that cop has been killed near some location with timestamp
diff --git a/addons/civilian/functions/fnc_civilianKilledMarker.sqf b/addons/civilian/functions/fnc_civilianKilledMarker.sqf
index ce47606b..eee5ffa5 100644
--- a/addons/civilian/functions/fnc_civilianKilledMarker.sqf
+++ b/addons/civilian/functions/fnc_civilianKilledMarker.sqf
@@ -18,7 +18,7 @@
params ["_unit", "_time"];
-private _markerName = format ["killed_civilian_%1_%2", _unit];
+private _markerName = format ["killed_civilian_%1", _unit];
private _markerText = format ["%1", _time];
private _marker = createMarkerLocal [_markerName, getPosATL _unit];
_marker setMarkerTypeLocal "mil_objective";
diff --git a/addons/civilian/functions/fnc_civilianKilledMsg.sqf b/addons/civilian/functions/fnc_civilianKilledMsg.sqf
index fe1190ed..f4883feb 100644
--- a/addons/civilian/functions/fnc_civilianKilledMsg.sqf
+++ b/addons/civilian/functions/fnc_civilianKilledMsg.sqf
@@ -18,7 +18,7 @@
* Public: No
*/
-params ["_unit", ["_killer", objNull], ["_timeOfDeath", daytime], ["_nearestTown", locationNull]];
+params ["_unit", ["_killer", objNull], ["_timeOfDeath", dayTime], ["_nearestTown", locationNull]];
if (_timeOfDeath isEqualType 0) then {
_timeOfDeath = [_timeOfDeath] call BIS_fnc_timeToString;
diff --git a/addons/civilian/functions/fnc_createCivilian.sqf b/addons/civilian/functions/fnc_createCivilian.sqf
index 0b279d02..a643c7c6 100644
--- a/addons/civilian/functions/fnc_createCivilian.sqf
+++ b/addons/civilian/functions/fnc_createCivilian.sqf
@@ -22,7 +22,7 @@ private _unit = selectRandom GVAR(units);
private _civilian = _newGroup createUnit [_unit, _position, [], 0, "NONE"];
if (_civilian isEqualTo objNull) exitWith {
- WARNING_2("Failed creating civilian %1 at %2", _unit, _position);
+ WARNING_2("Failed creating civilian %1 at %2",_unit,_position);
};
-[_civilian] call FUNC(initCivilian);
+[_civilian] call FUNC(initCivilian)
diff --git a/addons/civilian/functions/fnc_getNearestCity.sqf b/addons/civilian/functions/fnc_getNearestCity.sqf
index 05cc4fa7..26a60cd3 100644
--- a/addons/civilian/functions/fnc_getNearestCity.sqf
+++ b/addons/civilian/functions/fnc_getNearestCity.sqf
@@ -27,4 +27,5 @@ _nearestTown = [_position, _searchRadius] call EFUNC(common,getNearestCityLocati
// Return city namespace or objNull if not found
if (_nearestTown isEqualTo locationNull) exitWith {objNull};
-[_nearestTown] call FUNC(getCityByLocation);
+
+[_nearestTown] call FUNC(getCityByLocation)
diff --git a/addons/civilian/functions/fnc_getNearestVehicle.sqf b/addons/civilian/functions/fnc_getNearestVehicle.sqf
index 73753e1e..cb40333c 100644
--- a/addons/civilian/functions/fnc_getNearestVehicle.sqf
+++ b/addons/civilian/functions/fnc_getNearestVehicle.sqf
@@ -9,7 +9,7 @@
* 2: Filter function returning true for valid vehicles (Optional)
*
* Return Value:
- * None
+ * Nearest vehicle or objNull if not found
+
+ Predefined equipment preset
+ Predefiniowana konfiguracja ekwipunku
+ Custom equipment presetWłasna konfiguracja ekwipunku
@@ -13,17 +17,13 @@
Use "Custom" equipment preset from mission config. Overwrites predefined mod presets.Użyj konfiguracji "Custom" z pliku konfiguracyjnego w misji. Zastępuje predefiniowane konfiguracje z moda.
-
- Predefined equipment preset
- Predefiniowana konfiguracja ekwipunku
+
+ Automatic preset selection
+ Automatyczny wybór konfiguracjiUse predefined equipment preset from mod config.Użyj predefiniowanej konfiguracji ekwipunku z moda.
-
- Automatic preset selection
- Automatyczny wybór konfiguracji
-
diff --git a/addons/jail/functions/fnc_addReleaseAction.sqf b/addons/jail/functions/fnc_addReleaseAction.sqf
index 0e7c671a..7539e12c 100644
--- a/addons/jail/functions/fnc_addReleaseAction.sqf
+++ b/addons/jail/functions/fnc_addReleaseAction.sqf
@@ -24,8 +24,8 @@ private _actionID = [
LLSTRING(Release_Prisoner),
"",
"",
- QUOTE([ARR_2(_this, _target)] call FUNC(canRelease)),
- QUOTE([ARR_2(_caller, _target)] call FUNC(canRelease)),
+ QUOTE([ARR_2(_this,_target)] call FUNC(canRelease)),
+ QUOTE([ARR_2(_caller,_target)] call FUNC(canRelease)),
{}, {},
{
params ["_target", "_caller", "_actionId", "_arguments"];
diff --git a/addons/jail/functions/fnc_canRelease.sqf b/addons/jail/functions/fnc_canRelease.sqf
index d4a4802f..63949adb 100644
--- a/addons/jail/functions/fnc_canRelease.sqf
+++ b/addons/jail/functions/fnc_canRelease.sqf
@@ -8,7 +8,7 @@
* 1: Unit to release
-
- Release prisoner
- Uwolnij więźnia
- Prisoners have been released from the prison!Więźniowie zostali uwolnieni z więzienia!
+
+ Release prisoner
+ Uwolnij więźnia
+
diff --git a/addons/killers/functions/fnc_anyKillerFree.sqf b/addons/killers/functions/fnc_anyKillerFree.sqf
index 8b467f5e..d6aac31d 100644
--- a/addons/killers/functions/fnc_anyKillerFree.sqf
+++ b/addons/killers/functions/fnc_anyKillerFree.sqf
@@ -7,7 +7,7 @@
* None
*
* Return Value:
- * None
+ * True if any killer is still free
*
* Example:
* call afsk_killers_fnc_anyKillerFree
diff --git a/addons/killers/functions/fnc_createMarkersForNearbyVehicles.sqf b/addons/killers/functions/fnc_createMarkersForNearbyVehicles.sqf
index 08127911..b3719cbf 100644
--- a/addons/killers/functions/fnc_createMarkersForNearbyVehicles.sqf
+++ b/addons/killers/functions/fnc_createMarkersForNearbyVehicles.sqf
@@ -36,10 +36,10 @@ private _emptyVehicles = _nearbyVehicles select {
_marker setMarkerColorLocal "ColorCIVILIAN";
_marker setMarkerSizeLocal [0.5, 0.5];
_marker setMarkerAlphaLocal 1; // Force just in case marker already exists and should be fully-visible again
- _marker setMarkerTextLocal getText (configFile >> "CfgVehicles" >> (typeof _vehicle) >> "displayName");
+ _marker setMarkerTextLocal getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName");
private _markerType = if (_vehicle isKindOf "Air") then {
- if (_vehicle isKindOf "Plane") then { "loc_plane" } else { "loc_heli" }
+ ["loc_heli", "loc_plane"] select (_vehicle isKindOf "Plane")
} else { "loc_car" };
_marker setMarkerTypeLocal _markerType;
diff --git a/addons/killers/functions/fnc_createStartPositionMarker.sqf b/addons/killers/functions/fnc_createStartPositionMarker.sqf
index debde5ff..97288f31 100644
--- a/addons/killers/functions/fnc_createStartPositionMarker.sqf
+++ b/addons/killers/functions/fnc_createStartPositionMarker.sqf
@@ -22,11 +22,11 @@ if (_name isEqualTo "") then {
_name = [_pos] call EFUNC(common,getNearestLocationName);
};
-private _marker = createMarkerlocal [_name, _pos];
-_marker setMarkerColorlocal "ColorEAST";
-_marker setMarkerSizelocal [0.5,0.5];
-_marker setMarkerTypelocal "mil_end";
+private _marker = createMarkerLocal [_name, _pos];
+_marker setMarkerColorLocal "ColorEAST";
+_marker setMarkerSizeLocal [0.5,0.5];
+_marker setMarkerTypeLocal "mil_end";
_marker setMarkerTextLocal _name;
-GVAR(startPositionsMarkers) pushback _marker;
+GVAR(startPositionsMarkers) pushBack _marker;
_marker
diff --git a/addons/killers/functions/fnc_createStashesMarkers.sqf b/addons/killers/functions/fnc_createStashesMarkers.sqf
index ef9cdd3f..d17234aa 100644
--- a/addons/killers/functions/fnc_createStashesMarkers.sqf
+++ b/addons/killers/functions/fnc_createStashesMarkers.sqf
@@ -16,9 +16,9 @@
*/
{
- private _marker = createMarkerlocal [str _x, getPosATL _x];
- _marker setMarkerColorlocal "ColorEAST";
- _marker setMarkerSizelocal [0.5,0.5];
- _marker setMarkerTypelocal "mil_pickup";
+ private _marker = createMarkerLocal [str _x, getPosATL _x];
+ _marker setMarkerColorLocal "ColorEAST";
+ _marker setMarkerSizeLocal [0.5,0.5];
+ _marker setMarkerTypeLocal "mil_pickup";
_x setVariable [QGVAR(marker), _marker];
} forEach GVAR(stashes);
diff --git a/addons/killers/functions/fnc_initKillersStashes.sqf b/addons/killers/functions/fnc_initKillersStashes.sqf
index ab07898f..49cd544c 100644
--- a/addons/killers/functions/fnc_initKillersStashes.sqf
+++ b/addons/killers/functions/fnc_initKillersStashes.sqf
@@ -40,7 +40,7 @@ for "_y" from 0 to (_createStatshesCount - 1) step 1 do {
_box setVariable [QGVAR(killersStash), _stash];
_stash setVariable [QGVAR(box), _box];
_box call FUNC(fillKillersStash);
- GVAR(stashes) pushback _box;
+ GVAR(stashes) pushBack _box;
};
publicVariable QGVAR(stashes);
diff --git a/addons/main/ui/logo_sm_ca.paa b/addons/main/ui/logo_sm_ca.paa
new file mode 100644
index 00000000..37d7faf8
Binary files /dev/null and b/addons/main/ui/logo_sm_ca.paa differ
diff --git a/addons/markers/functions/fnc_loop.sqf b/addons/markers/functions/fnc_loop.sqf
index a3e01783..49f226db 100644
--- a/addons/markers/functions/fnc_loop.sqf
+++ b/addons/markers/functions/fnc_loop.sqf
@@ -31,7 +31,7 @@
};
#endif
};
-} foreach EGVAR(civilian,civilians);
+} forEach EGVAR(civilian,civilians);
// Move marker for every cop
if (playerSide isEqualTo WEST) then {
diff --git a/addons/missions/XEH_postInit.sqf b/addons/missions/XEH_postInit.sqf
index b5205f77..be60e994 100644
--- a/addons/missions/XEH_postInit.sqf
+++ b/addons/missions/XEH_postInit.sqf
@@ -5,5 +5,5 @@ if (!EGVAR(common,enabled)) exitWith {};
[{alive player}, {
private _welcomeText = format [LLSTRING(Welcome_Message), QUOTE(VERSION_STR)];
- titletext [_welcomeText, "plain"];
+ titleText [_welcomeText, "plain"];
}] call CBA_fnc_waitUntilAndExecute;
diff --git a/addons/modules/functions/fnc_initKillersStarts.sqf b/addons/modules/functions/fnc_initKillersStarts.sqf
index 29990f1d..8a6b3947 100644
--- a/addons/modules/functions/fnc_initKillersStarts.sqf
+++ b/addons/modules/functions/fnc_initKillersStarts.sqf
@@ -7,7 +7,7 @@
* None
*
* Return Value:
- * None
+ * List of killers start modules >
*
* Example:
* None
diff --git a/addons/modules/functions/fnc_initKillersStashes.sqf b/addons/modules/functions/fnc_initKillersStashes.sqf
index 8aec1857..90b9d979 100644
--- a/addons/modules/functions/fnc_initKillersStashes.sqf
+++ b/addons/modules/functions/fnc_initKillersStashes.sqf
@@ -7,7 +7,7 @@
* None
*
* Return Value:
- * None
+ * List of killers stash modules >
*
* Example:
* None
diff --git a/addons/modules/functions/fnc_initPoliceStations.sqf b/addons/modules/functions/fnc_initPoliceStations.sqf
index 3c56e4ea..963040d2 100644
--- a/addons/modules/functions/fnc_initPoliceStations.sqf
+++ b/addons/modules/functions/fnc_initPoliceStations.sqf
@@ -7,7 +7,7 @@
* None
*
* Return Value:
- * None
+ * List of police station modules >
*
* Example:
* None
diff --git a/addons/modules/stringtable.xml b/addons/modules/stringtable.xml
index c2b530ce..2ca2c5f8 100644
--- a/addons/modules/stringtable.xml
+++ b/addons/modules/stringtable.xml
@@ -25,13 +25,13 @@
Location Name. If empty will use nearest map location name according to player language. If not empty, the same name will be used for all languages (unless it's stringtable empty starting with $).Nazwa lokacji. Jeżeli puste to użyta zostanie nazwa najbliższej lokacji na mapie zgodnie z językiem gracza. Jeżeli nie będzie puste, ta sama nazwa pokaże się we wszystkich językach (chyba że będzie zawierać wpis lokalizowalny rozpoczynający się od $).
-
- Police Station
- Posterunek Policji
- Has helipadPosiada lądowisko dla helikoptera
+
+ Police Station
+ Posterunek Policji
+
diff --git a/addons/police/XEH_postInit.sqf b/addons/police/XEH_postInit.sqf
index 19125f0e..823c1e4c 100644
--- a/addons/police/XEH_postInit.sqf
+++ b/addons/police/XEH_postInit.sqf
@@ -58,7 +58,7 @@ if (isServer) then {
[QEGVAR(score,scoreChanged), {
params ["_side", "_change", ["_reason", ""]];
- if (_side isEqualTo EAST) exitwith {};
+ if (_side isEqualTo EAST) exitWith {};
call FUNC(equipmentScoreCheck);
}] call CBA_fnc_addEventHandler;
diff --git a/addons/police/functions/fnc_copKilled.sqf b/addons/police/functions/fnc_copKilled.sqf
index 612c0463..1c2ae26b 100644
--- a/addons/police/functions/fnc_copKilled.sqf
+++ b/addons/police/functions/fnc_copKilled.sqf
@@ -20,7 +20,7 @@ params ["_unit", "_killer"];
if !(isServer) exitWith {};
-private _time = [daytime] call BIS_fnc_timeToString;
+private _time = [dayTime] call BIS_fnc_timeToString;
private _isPlayerOrAi = ["AI", "PLAYER"] select isPlayer _killer;
LOG_4("Cop %1 was killed by %2 %3 at %4",name _unit,_isPlayerOrAi,name _killer,_time);
diff --git a/addons/police/functions/fnc_copKilledMsg.sqf b/addons/police/functions/fnc_copKilledMsg.sqf
index 181c0528..e0f24731 100644
--- a/addons/police/functions/fnc_copKilledMsg.sqf
+++ b/addons/police/functions/fnc_copKilledMsg.sqf
@@ -17,7 +17,7 @@
* Public: No
*/
-params ["_unit", "_killer", ["_timeOfDeath", daytime], ["_nearestTown", locationNull]];
+params ["_unit", "_killer", ["_timeOfDeath", dayTime], ["_nearestTown", locationNull]];
if (_timeOfDeath isEqualType 0) then {
_timeOfDeath = [_timeOfDeath] call BIS_fnc_timeToString;
diff --git a/addons/police/functions/fnc_equipmentScoreCheck.sqf b/addons/police/functions/fnc_equipmentScoreCheck.sqf
index ea34bd16..c656cd6a 100644
--- a/addons/police/functions/fnc_equipmentScoreCheck.sqf
+++ b/addons/police/functions/fnc_equipmentScoreCheck.sqf
@@ -17,19 +17,19 @@
private _step = if ((EGVAR(score,policeScore) - GVAR(lastEquipmentUpdateScore)) > 0) then {1} else {-1};
-TRACE_3("(equipmentScoreCheck) Performing check from %1 to %2 step %3", GVAR(lastEquipmentUpdateScore), EGVAR(score,policeScore), _step);
+TRACE_3("(equipmentScoreCheck) Performing check from %1 to %2 step %3",GVAR(lastEquipmentUpdateScore),EGVAR(score,policeScore),_step);
while {GVAR(lastEquipmentUpdateScore) != EGVAR(score,policeScore)} do {
if (_step > 0) then {
GVAR(lastEquipmentUpdateScore) = GVAR(lastEquipmentUpdateScore) + _step;
};
- TRACE_1("(equipmentScoreCheck) Checking %1", GVAR(lastEquipmentUpdateScore));
+ TRACE_1("(equipmentScoreCheck) Checking %1",GVAR(lastEquipmentUpdateScore));
private _scoreItems = EGVAR(equipment,policeEquipmentScores) getVariable [str GVAR(lastEquipmentUpdateScore), []];
private _scoreVehicles = EGVAR(equipment,policeVehiclesScores) getVariable [str GVAR(lastEquipmentUpdateScore), []];
- TRACE_2("(equipmentScoreCheck) Found %1 equipment and %2 vehicles", _scoreItems, _scoreVehicles);
+ TRACE_2("(equipmentScoreCheck) Found %1 equipment and %2 vehicles",_scoreItems,_scoreVehicles);
{
if (_step > 0) then {
diff --git a/addons/police/stringtable.xml b/addons/police/stringtable.xml
index 509a8474..d7788397 100644
--- a/addons/police/stringtable.xml
+++ b/addons/police/stringtable.xml
@@ -1,14 +1,6 @@
-
- SerialKillers - Police
- SerialKillers - Policja
-
-
- Police
- Policja
- Someone is in %1 police station!Ktoś majstruje coś w bazie policji w %1!
@@ -17,13 +9,21 @@
It was a bad idea...To był zły pomysł...
-
- Cop was killed at %1 in %2!
- Policjant został zabity o godzinie %1 w %2!
+
+ SerialKillers - Police
+ SerialKillers - Policja
-
- Cop was killed at %1 near %2!
- Policjant został zabity o godzinie %1 w pobliżu %2!
+
+ Cannot create %1 at %2.
+ Nie można utworzyć %1 w %2.
+
+
+ Cop was killed
+ Policjant został zabity
+
+
+ Cop was killed by cop
+ Policjant został zabity przez policjantaCop was killed by cop %3 at %1 in %2!
@@ -33,17 +33,17 @@
Cop was killed by cop %3 at %1 near %2!Policjant został zabity przez policjanta %3 o godzinie %1 w pobliżu %2!
-
- Cop was killed
- Policjant został zabity
+
+ Cop was killed at %1 in %2!
+ Policjant został zabity o godzinie %1 w %2!
-
- Cop was killed by cop
- Policjant został zabity przez policjanta
+
+ Cop was killed at %1 near %2!
+ Policjant został zabity o godzinie %1 w pobliżu %2!
-
- Cannot create %1 at %2.
- Nie można utworzyć %1 w %2.
+
+ Police
+ PolicjaSave equipment for respawn
diff --git a/addons/score/functions/fnc_addKillersScore.sqf b/addons/score/functions/fnc_addKillersScore.sqf
index 2dda71f2..3986e0d2 100644
--- a/addons/score/functions/fnc_addKillersScore.sqf
+++ b/addons/score/functions/fnc_addKillersScore.sqf
@@ -18,7 +18,7 @@
params ["_scoreChange", ["_reason", ""]];
-private _time = [daytime] call BIS_fnc_timeToString;
+private _time = [dayTime] call BIS_fnc_timeToString;
// Change killers score
GVAR(killersScore) = GVAR(killersScore) + _scoreChange;
diff --git a/addons/score/functions/fnc_addPoliceScore.sqf b/addons/score/functions/fnc_addPoliceScore.sqf
index 4f5ad516..8d8151aa 100644
--- a/addons/score/functions/fnc_addPoliceScore.sqf
+++ b/addons/score/functions/fnc_addPoliceScore.sqf
@@ -18,7 +18,7 @@
params ["_scoreChange", ["_reason", ""]];
-private _time = [daytime] call BIS_fnc_timeToString;
+private _time = [dayTime] call BIS_fnc_timeToString;
// Change police score
GVAR(policeScore) = GVAR(policeScore) + _scoreChange;
@@ -39,3 +39,5 @@ GVAR(policeScoreLastChangeTime) = CBA_missionTime;
publicVariable QGVAR(policeScoreChange);
};
}, [GVAR(policeScoreChange)], 5] call CBA_fnc_waitAndExecute;
+
+GVAR(policeScore)
diff --git a/addons/score/functions/fnc_endMissionClient.sqf b/addons/score/functions/fnc_endMissionClient.sqf
index 41d0d9d6..b36ccbb7 100644
--- a/addons/score/functions/fnc_endMissionClient.sqf
+++ b/addons/score/functions/fnc_endMissionClient.sqf
@@ -24,27 +24,27 @@ GVAR(missionEnd) = _endType;
switch (_endType) do {
// 0
case KILLERS_SCORE_REACHED: {
- private _win = if (playerSide isEqualTo EAST) then {true} else {false};
+ private _win = [false, true] select (playerSide isEqualTo EAST);
[QGVAR(killersScoreReached), _win, nil, false] call BIS_fnc_endMission;
};
// 1
case KILLERS_DEAD: {
- private _win = if (playerSide isEqualTo WEST) then {true} else {false};
+ private _win = [false, true] select (playerSide isEqualTo WEST);
[QGVAR(killersDead), _win, nil, false] call BIS_fnc_endMission;
};
// 2
case MAXIMUM_TIMEOUT_REACHED: {
- private _win = if (playerSide isEqualTo WEST) then {true} else {false};
+ private _win = [false, true] select (playerSide isEqualTo WEST);
[QGVAR(timeoutLimit), _win, nil, false] call BIS_fnc_endMission;
};
// 3
case TIME_LIMIT_REACHED: {
- private _win = if (playerSide isEqualTo WEST) then {true} else {false};
+ private _win = [false, true] select (playerSide isEqualTo WEST);
[QGVAR(timeLimit), _win, nil, false] call BIS_fnc_endMission;
};
// 4
case ALL_CIVILIANS_DEAD: {
- private _win = if (playerSide isEqualTo EAST) then {true} else {false};
+ private _win = [false, true] select (playerSide isEqualTo EAST);
[QGVAR(civiliansDead), _win, nil, false] call BIS_fnc_endMission;
};
default {
diff --git a/addons/score/functions/fnc_showScore.sqf b/addons/score/functions/fnc_showScore.sqf
index 74c362c9..52131c81 100644
--- a/addons/score/functions/fnc_showScore.sqf
+++ b/addons/score/functions/fnc_showScore.sqf
@@ -30,7 +30,7 @@ private _fnc_determineSign = {
private _separator = parseText " --------------------------- ";
_separator setAttributes ["align", "center"];
-private _msgHour = text format ["%1", [daytime] call BIS_fnc_timeToString];
+private _msgHour = text format ["%1", [dayTime] call BIS_fnc_timeToString];
_msgHour setAttributes ["align", "center"];
private _msgKillers = text format ["%1", LELSTRING(killers,Killers)];
diff --git a/addons/score/stringtable.xml b/addons/score/stringtable.xml
index a0cb28db..5d9916fe 100644
--- a/addons/score/stringtable.xml
+++ b/addons/score/stringtable.xml
@@ -1,17 +1,134 @@
+
+ All civilians are dead
+ Wszyscy cywile nie żyją
+
+
+ Killers score when cop is killed
+ Wynik zabójców gdy policjant zostanie zabity
+
+
+ When cop is killed by police killers get this many points.
+ Zabójcy dostają tyle punktów gdy policjant zginie z rąk policji.
+
+
+ Police score for kiling cop
+ Wynik policji za zabicie policjanta
+
+
+ Police get this many points when they kill cop.
+ Policja dostaje tyle punktów gdy zabije policjanta.
+ SerialKillers - ScoreSerialKillers - Wynik
-
- Killers score target
- Maksymalny wynik zabójców
+
+
+ Extra time
+ Dogrywka
-
- When killers reach given score, they win.
- Zabójcy wygrywają, gdy osiągną wskazany wynik.
+
+ Maximum extra time duration
+ Maksymalna długość dogrywki
+
+
+ After this additional time mission instantly ends with police victory. Set to -1 to disable.
+ Po tym dodatkowym czasie misja kończy się Natychmiastowym zwycięstwem policji. Ustaw na -1 by wyłączyć.
+
+
+ Killers score change during extra time
+ Zmiana wyniku zabójców po przekroczeniu limitu czasu w dogrywce
+
+
+ Killers get this many points on timeout during extra time.
+ Po upłynięciu maksymalnego czasu pomiędzy zabójstwami podczas dogrywki policja dostanie tyle punktów.
+
+
+ Police score change during extra time
+ Zmiana wyniku policji po przekroczeniu limitu czasu w dogrywce
+
+
+ Police gets this many points on timeout during extra time.
+ Po upłynięciu maksymalnego czasu pomiędzy zabójstwami podczas dogrywki policja dostanie tyle punktów.
+
+
+ Maximum timeout is adjusted to this value.
+ Maksymalny odstęp czasu między zabójstwami zostaje zmieniony do tej wartości.
+
+
+ Maximum number of timeouts is adjusted to this value.
+ Maksymalna liczba przekroczeń limitu czasu zostaje zmieniona do tej wartości.
+
+
+ Extra time has started
+ Rozpoczęła się dogrywka
+
+
+
+ Timeout between kills
+ Odstęp czasu pomiędzy zabójstwami
+
+
+ Allowed idle time: %1 s
+ Dozwolony czas bezczynności: %1 s
+
+
+ Killers score change
+ Zmiana wyniku zabójców po przekroczeniu limitu czasu
+
+
+ Killers get this many points on timeout.
+ Po upłynięciu maksymalnego czasu pomiędzy zabójstwami policja dostanie tyle punktów.
+
+
+ Maximum time between kills (s)
+ Maksymalny odstęp czasu pomiędzy zabójstwami
+
+
+ Maximum idle times: %1
+ Maksymalnie %1 razy bezczynności
+
+
+ When this time elapses police and killers can have their points adjusted. (-1 to disable)
+ Po upłynięciu tego czasu policja i zabójcy mogą mieć dodane/odjęte punkty. (-1 by wyłączyć)
+
+
+ Police score change
+ Zmiana wyniku policji po przekroczeniu limitu czasu
+
+
+ Police gets this many points on timeout.
+ Po upłynięciu maksymalnego czasu pomiędzy zabójstwami policja dostanie tyle punktów.
+
+
+ Score changes on idle time
+ Zmiany wyniku po bezczynności
+
+
+
+ From now on killers must keep killing within %1 minutes since last kill or they will face penalty.
+ Od tego momentu zabójcy muszą zabić w ciągu %1 minut od ostatniego zabójstwa albo otrzymają karę.
+
+
+ Maximum idle time reached %1/%2
+ Maksymalny odstęp czasu pomiędzy zabójstwami przekroczony %1/%2
+
+
+ Maximum number of timeouts
+ Maksymalna liczba przekroczeń limitu czasu
+
+
+ Killers lose if then exceed maximum idle time this many times. (-1 to disable)
+ Zabójcy przegrywają jeśli tyle razy przekroczą limit czasu pomiędzy zabójstwami. (-1 by wyłączyć)
@@ -67,64 +168,21 @@
When cop is killed by killers police get this many points.Policja dostaje tyle punktów gdy policjant zginie z rąk zabójców.
-
- Killers score when cop is killed
- Wynik zabójców gdy policjant zostanie zabity
-
-
- When cop is killed by police killers get this many points.
- Zabójcy dostają tyle punktów gdy policjant zginie z rąk policji.
-
-
- Police score for kiling cop
- Wynik policji za zabicie policjanta
-
-
- Police get this many points when they kill cop.
- Policja dostaje tyle punktów gdy zabije policjanta.
-
-
- Score
- Wynik
-
-
-
- Timeout between kills
- Odstęp czasu pomiędzy zabójstwami
-
-
- Maximum number of timeouts
- Maksymalna liczba przekroczeń limitu czasu
-
-
- Killers lose if then exceed maximum idle time this many times. (-1 to disable)
- Zabójcy przegrywają jeśli tyle razy przekroczą limit czasu pomiędzy zabójstwami. (-1 by wyłączyć)
-
-
- Maximum time between kills (s)
- Maksymalny odstęp czasu pomiędzy zabójstwami
-
-
- When this time elapses police and killers can have their points adjusted. (-1 to disable)
- Po upłynięciu tego czasu policja i zabójcy mogą mieć dodane/odjęte punkty. (-1 by wyłączyć)
-
-
- Police score change
- Zmiana wyniku policji po przekroczeniu limitu czasu
+
+ Killers score target
+ Maksymalny wynik zabójców
-
- Police gets this many points on timeout.
- Po upłynięciu maksymalnego czasu pomiędzy zabójstwami policja dostanie tyle punktów.
+
+ When killers reach given score, they win.
+ Zabójcy wygrywają, gdy osiągną wskazany wynik.
-
- Killers score change
- Zmiana wyniku zabójców po przekroczeniu limitu czasu
+
+ All killers are either dead or in custody.
+ Wszyscy zabójcy są martwi albo w więzieniu.
-
- Killers get this many points on timeout.
- Po upłynięciu maksymalnego czasu pomiędzy zabójstwami policja dostanie tyle punktów.
+
+ Score limit reached
+ Osiągnięty limit wyniku
-
- Extra time
- Dogrywka
-
-
- Maximum extra time duration
- Maksymalna długość dogrywki
-
-
- After this additional time mission instantly ends with police victory. Set to -1 to disable.
- Po tym dodatkowym czasie misja kończy się Natychmiastowym zwycięstwem policji. Ustaw na -1 by wyłączyć.
-
-
- Maximum timeout is adjusted to this value.
- Maksymalny odstęp czasu między zabójstwami zostaje zmieniony do tej wartości.
-
-
- Maximum number of timeouts is adjusted to this value.
- Maksymalna liczba przekroczeń limitu czasu zostaje zmieniona do tej wartości.
-
-
- Police score change during extra time
- Zmiana wyniku policji po przekroczeniu limitu czasu w dogrywce
-
-
- Police gets this many points on timeout during extra time.
- Po upłynięciu maksymalnego czasu pomiędzy zabójstwami podczas dogrywki policja dostanie tyle punktów.
-
-
- Killers score change during extra time
- Zmiana wyniku zabójców po przekroczeniu limitu czasu w dogrywce
-
-
- Killers get this many points on timeout during extra time.
- Po upłynięciu maksymalnego czasu pomiędzy zabójstwami podczas dogrywki policja dostanie tyle punktów.
-
-
-
- From now on killers must keep killing within %1 minutes since last kill or they will face penalty.
- Od tego momentu zabójcy muszą zabić w ciągu %1 minut od ostatniego zabójstwa albo otrzymają karę.
-
-
- Maximum idle time reached %1/%2
- Maksymalny odstęp czasu pomiędzy zabójstwami przekroczony %1/%2
-
-
- Extra time has started
- Rozpoczęła się dogrywka
+
+ Mission time limit reached
+ Osiągnięty limit czasu misjiRemaining time left: %1 minPozostały czas: %1 min
-
- Allowed idle time: %1 s
- Dozwolony czas bezczynności: %1 s
-
-
- Maximum idle times: %1
- Maksymalnie %1 razy bezczynności
-
-
- Score changes on idle time
- Zmiany wyniku po bezczynności
+
+ Timeouts limit reached
+ Osiągnięty limit przekroczeń limitu czasu
diff --git a/addons/vehicles/CfgVehicles.hpp b/addons/vehicles/CfgVehicles.hpp
index ddf7fd88..0764da21 100644
--- a/addons/vehicles/CfgVehicles.hpp
+++ b/addons/vehicles/CfgVehicles.hpp
@@ -4,8 +4,6 @@
class CfgVehicles
{
class Car_F;
- class Hatchback_01_base_F;
- class Hatchback_01_sport_base_F;
class C_Hatchback_01_F;
class C_Hatchback_01_sport_F;
diff --git a/addons/vehicles/functions/fnc_carAlarmNotification.sqf b/addons/vehicles/functions/fnc_carAlarmNotification.sqf
index 3a2e06ad..f9c93bdf 100644
--- a/addons/vehicles/functions/fnc_carAlarmNotification.sqf
+++ b/addons/vehicles/functions/fnc_carAlarmNotification.sqf
@@ -31,7 +31,7 @@ private _notify = if (GVAR(alarmCopsNotification) isEqualTo 1) then {
private _anyNearbyUnrestrainedCivilians = _nearbyUnits
findIf {alive _x && {side _x isEqualTo CIVILIAN && {!([_x] call EFUNC(jail,isHandcuffed))}}} != -1;
- if (_anyNearbyUnrestrainedCivilians) then { true } else { false };
+ [false, true] select (_anyNearbyUnrestrainedCivilians)
};
if (_notify) exitWith {
diff --git a/addons/vehicles/functions/fnc_createVehicle.sqf b/addons/vehicles/functions/fnc_createVehicle.sqf
index 7b0c94dd..edb6b70c 100644
--- a/addons/vehicles/functions/fnc_createVehicle.sqf
+++ b/addons/vehicles/functions/fnc_createVehicle.sqf
@@ -28,7 +28,7 @@ if (_position isEqualType objNull) then {
_position = getPosATL _position;
};
-private _mode = if (_forcePosition) then {"CAN_COLLIDE"} else {"NONE"};
+private _mode = ["NONE", "CAN_COLLIDE"] select (_forcePosition);
private _vehicle = createVehicle [_vehicleClassname, _position, [], 0, _mode];
_vehicle setDir _dir;
// Disable randomization and use own function to set texture on vehicle globally (so everyone can see the same color!)
diff --git a/addons/vehicles/functions/fnc_vehicleStolenMsg.sqf b/addons/vehicles/functions/fnc_vehicleStolenMsg.sqf
index 221b5fba..6599db3a 100644
--- a/addons/vehicles/functions/fnc_vehicleStolenMsg.sqf
+++ b/addons/vehicles/functions/fnc_vehicleStolenMsg.sqf
@@ -17,7 +17,7 @@
* Public: No
*/
-params ["_stolenVehicle", ["_timeOfTheft", daytime], ["_nearestTown", locationNull]];
+params ["_stolenVehicle", ["_timeOfTheft", dayTime], ["_nearestTown", locationNull]];
if (_timeOfTheft isEqualType 0) then {
_timeOfTheft = [_timeOfTheft] call BIS_fnc_timeToString;
diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml
index 92bfe611..32e177d4 100644
--- a/addons/vehicles/stringtable.xml
+++ b/addons/vehicles/stringtable.xml
@@ -1,18 +1,6 @@
-
- SerialKillers - Vehicles
- SerialKillers - Pojazdy
-
-
- Alarm enabled
- Alarmy włączone
-
-
- Add car alarms to civilian vehicles.
- Dodaj alarmy do pojazdów cywilnych.
- Alarm always armedAlarm zawsze uzbrojony
@@ -29,14 +17,18 @@
Control exact distance (in meters) at which an alarm can be heard. Increasing the distance makes it easier for cops to spot a stolen vehicle.Kontroluje dokładną odległość (w metrach), z której alarm będzie słyszalny. Zwiększenie tej odległości ułatwia policji zlokalizowanie skradzionego pojazdu.
+
+ Alarm Average Chance
+ Średnia szansa na alarm
+
+
+ Controls the chance of an alarm going off in a car that has the alarm armed. Normal distribution of [min, mid, max].
+ Ustala szansę na uruchomienie alarmu w pojeździe posiadającym alarm. Rozkład normalny [minimum, średnia, maksimum].
+ Notify cops of alarmPowiadomienie dla policji o alarmie
-
- When should the cops be notified that an alarm went off?
- Kiedy policja powinna być informowana o włączonym alarmie?
- Cops notification delayOpóźnienie powiadomienia dla policji
@@ -45,6 +37,10 @@
Delay between an alarm going off and possible notification for cops.Opóźnienie pomiędzy włączeniem alarmu a możliwym powiadomieniem dla Policji.
+
+ When should the cops be notified that an alarm went off?
+ Kiedy policja powinna być informowana o włączonym alarmie?
+ Alarm disarm if didn't go offRozbrój alarm jeżeli się nie włączył
@@ -53,9 +49,21 @@
Disarm alarm if it didn't go off when a player entered vehicle. Effective only if 'Alarm always armed' is disabled and 'Alarm Minimum Chance' is set to less than 1.Rozbrój alarm jeżeli się nie włączył gdy gracz wszedł do pojazdu. Działa tylko jeżeli ustawienie 'Alarm zawsze uzbrojony' jest wyłączone oraz 'Minimalna szansa na alarm' jest ustawiona na mniej niż 1.
-
- Alarm Average Chance
- Średnia szansa na alarm
+
+ Alarm Duration
+ Długość alarmu
+
+
+ Controls how long will the alarm sound be heard.
+ Ustala jak długo będzie wył alarm.
+
+
+ Alarm enabled
+ Alarmy włączone
+
+
+ Add car alarms to civilian vehicles.
+ Dodaj alarmy do pojazdów cywilnych.Alarm Maximum Chance
@@ -65,22 +73,18 @@
Alarm Minimum ChanceMinimalna szansa na alarm
-
- Controls the chance of an alarm going off in a car that has the alarm armed. Normal distribution of [min, mid, max].
- Ustala szansę na uruchomienie alarmu w pojeździe posiadającym alarm. Rozkład normalny [minimum, średnia, maksimum].
-
-
- Alarm Duration
- Długość alarmu
-
-
- Controls how long will the alarm sound be heard.
- Ustala jak długo będzie wył alarm.
+
+ Always
+ ZawszeCar alarmAlarm samochodowy
+
+ SerialKillers - Vehicles
+ SerialKillers - Pojazdy
+ Civilian vehicles limitLimit pojazdów cywilnych
@@ -89,13 +93,13 @@
Controls how much civilian vehicles will be created on the whole map.Ustala jak dużo pojazdów cywilnych będzie utworzonych na całej mapie.
-
- Vehicle was stolen at %1 in %2!
- Pojazd został skradziony o godzinie %1 w %2!
+
+ High
+ Dużo
-
- Vehicle was stolen at %1 near %2!
- Pojazd został skradziony o godzinie %1 w pobliżu %2!
+
+ If civilians nearby
+ Jeżeli są cywile w pobliżuLow
@@ -105,21 +109,17 @@
MediunŚrednio
-
- High
- Dużo
-
-
- Always
- Zawsze
- NeverNigdy
-
- If civilians nearby
- Jeżeli są cywile w pobliżu
+
+ Vehicle was stolen at %1 in %2!
+ Pojazd został skradziony o godzinie %1 w %2!
+
+
+ Vehicle was stolen at %1 near %2!
+ Pojazd został skradziony o godzinie %1 w pobliżu %2!
diff --git a/mod.cpp b/mod.cpp
index 4328e322..9e86dd3d 100644
--- a/mod.cpp
+++ b/mod.cpp
@@ -4,5 +4,8 @@ author = "ArmaForces";
url = "https://github.com/armaforces/serialkillers/";
action = "https://armaforces.com/";
actionName = "Website";
+logo = "\z\afwg\addons\main\ui\logo_sm_ca.paa";
+logoOver = "\z\afwg\addons\main\ui\logo_sm_ca.paa";
+overviewPicture = "\z\afwg\addons\main\ui\logo_sm_ca.paa";
tooltip = "ArmaForces SerialKillers";
description = "ArmaForces SerialKillers gamemode developed by 3Mydlo3.";
diff --git a/tools/Publish.ps1 b/tools/Publish.ps1
deleted file mode 100644
index 97fbeace..00000000
--- a/tools/Publish.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-param (
- [string] $version,
- [string] $workshopId,
- [string] $addonDir
-)
-
-$choice = Read-Host -Prompt "Do you want to publish '$version' on Steam Workshop? (y/N)"
-if ('y' -ne $choice.ToLower()) {
- Write-Host "Skipping Steam Workshop upload"
- Exit
-}
-
-try {
- $publisherPath = (Get-ItemProperty -Path Registry::"HKEY_CURRENT_USER\Software\Bohemia Interactive\publisher" -ErrorAction Stop).path
-} catch {
- Throw "Can't find Publisher path in registry"
-}
-
-$modPath = $PSScriptRoot + "/../releases/$version/$addonDir" | Resolve-Path
-
-$publisherArguments = @(
- "update",
- "/id:$workshopId",
- "/changeNote:""Automatic mod upload""",
- "/path:""$modPath"""
-)
-
-Start-Process -FilePath "$publisherPath\PublisherCmd.exe" -NoNewWindow -Wait -ArgumentList $publisherArguments
diff --git a/tools/Set-Version.ps1 b/tools/Set-Version.ps1
deleted file mode 100644
index 6c71fcca..00000000
--- a/tools/Set-Version.ps1
+++ /dev/null
@@ -1,10 +0,0 @@
-param (
- [string] $version,
- [string] $addonDir
-)
-
-$modCppPath = $PSScriptRoot + "/../releases/$version/$addonDir/mod.cpp"
-
-$replaced = (Get-Content $modCppPath) -replace "0.0.0", "$version"
-
-$replaced | Out-File $modCppPath
diff --git a/tools/return_checker.py b/tools/return_checker.py
new file mode 100644
index 00000000..54a42cbf
--- /dev/null
+++ b/tools/return_checker.py
@@ -0,0 +1,142 @@
+#!/usr/bin/env python3
+
+import fnmatch
+import os
+import re
+import sys
+
+
+def get_files():
+ # Allow running from root directory and tools directory
+ root_dir = ".."
+ if os.path.exists("addons"):
+ root_dir = "."
+
+ sqf_files = []
+
+ for root, _, files in os.walk(root_dir):
+ for file in fnmatch.filter(files, "fnc_*.sqf"):
+ sqf_files.append(os.path.join(root, file))
+
+ sqf_files.sort()
+
+ return sqf_files
+
+
+def filter_files(filepaths):
+ filtered_files = []
+
+ # Return only files that have a docblock
+ for filepath in filepaths:
+ with open(filepath, 'r') as file_contents:
+ for line in file_contents:
+ contents = line.strip()
+
+ # A possible docblock starts
+ if contents.startswith('/*'):
+ print(f" INFO: Found docblock in file {filepath}")
+ # Find the `* Return Value:` comment
+ lines = list(map(
+ # Remove \n from all the lines
+ (lambda s: s.strip()), file_contents.readlines()
+ ))
+
+ return_value_comment_index = lines.index('* Return Value:')
+ return_value_index = return_value_comment_index + 1
+
+ # Drop the first two characters (e.g. `* `) so it returns the return type
+ return_value = lines[return_value_index][2:]
+
+ filtered_files.append([filepath, return_value])
+
+ break
+
+ return filtered_files
+
+
+def get_last_line(filepath):
+ with open(filepath, 'r') as file_contents:
+ lines = file_contents.readlines()
+ last_line = lines[-1].strip()
+
+ # Handle multiple blank lines at the end of the file
+ if last_line == "":
+ i = -2
+
+ while lines[i].strip() == "":
+ i -= 1
+
+ return lines[i].strip()
+ return last_line
+
+
+def check_last_character(filepath, return_value):
+ last_line = get_last_line(filepath)
+ last_line_character = last_line[-1]
+
+ # If return type is None and the last line has a semicolon OR the last thing is just the nil keyword OR last thing is a closing bracket
+ if return_value == 'None' and (last_line_character == ';' or last_line == 'nil' or last_line == '};'):
+ return True
+ elif return_value != 'None' and (last_line_character != ';' or last_line == '};'):
+ return True
+ else:
+ return False
+
+
+def get_expected_last_line(last_line, return_value):
+ last_line_character = last_line[-1]
+
+ if return_value == 'None':
+ # If last character is a letter or a number
+ if re.search(r'[A-Za-z0-9]', last_line_character):
+ return '{};'.format(last_line)
+ else:
+ return 'nil'
+ else:
+ if last_line_character == ';':
+ return last_line[:-1]
+
+ return 'Unknown'
+
+
+def main():
+ print('Validating Return Types')
+ print('-----------------------')
+
+ bad_files = []
+
+ files = get_files()
+ filtered_files = filter_files(files)
+
+ for file_details in filtered_files:
+ filepath, return_value = file_details
+
+ status = check_last_character(filepath, return_value)
+
+ if not status:
+ bad_files.append(
+ [filepath, return_value, get_last_line(filepath)])
+
+ error_count = len(bad_files)
+ print('Found {} error(s)'.format(error_count))
+
+ for bad_file in bad_files:
+ filepath, return_value, last_line = bad_file
+
+ expected_last_line = get_expected_last_line(last_line, return_value)
+
+ print('\nERROR: In file {}'.format(filepath))
+ print('Incorrect return type, expected `{}`'.format(return_value))
+ print('Found line `{}`'.format(last_line))
+ print('Expected line `{}`'.format(expected_last_line))
+
+ if error_count:
+ print('\nReturn Validation FAILED')
+ else:
+ print('\nReturn Validation PASSED')
+
+ return error_count
+
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/tools/search_unused_privates.py b/tools/search_unused_privates.py
index d62db28e..6550178a 100644
--- a/tools/search_unused_privates.py
+++ b/tools/search_unused_privates.py
@@ -67,10 +67,10 @@ def popClosing():
if '_forEachIndex' in priv_declared: priv_declared.remove('_forEachIndex')
if '_forEachIndex' in priv_use: priv_use.remove('_forEachIndex')
- if '_foreachIndex' in priv_declared: priv_declared.remove('_foreachIndex')
- if '_foreachIndex' in priv_use: priv_use.remove('_foreachIndex')
- if '_foreachindex' in priv_declared: priv_declared.remove('_foreachindex')
- if '_foreachindex' in priv_use: priv_use.remove('_foreachindex')
+ if '_forEachIndex' in priv_declared: priv_declared.remove('_forEachIndex')
+ if '_forEachIndex' in priv_use: priv_use.remove('_forEachIndex')
+ if '_forEachindex' in priv_declared: priv_declared.remove('_forEachindex')
+ if '_forEachindex' in priv_use: priv_use.remove('_forEachindex')
unused = []
for s in priv_declared:
diff --git a/tools/stringtable_validator.py b/tools/stringtable_validator.py
index 55484730..01e79971 100644
--- a/tools/stringtable_validator.py
+++ b/tools/stringtable_validator.py
@@ -53,9 +53,16 @@ def check_stringtable(filepath):
print(" ERROR: Package name attribute '{}' is all lowercase, should be in titlecase.".format(package_name))
errors += 1
- if package_name.lower() != os.path.basename(os.path.dirname(filepath)):
- print(" ERROR: Package name attribute '{}' does not match the component folder name.".format(package_name))
- errors += 1
+ component_folder_name = os.path.basename(os.path.dirname(filepath))
+
+ if package_name.lower() != component_folder_name:
+ parent_component_folder_name = os.path.basename(os.path.dirname(os.path.dirname(filepath)))
+ subcomponent_name = f"{parent_component_folder_name}_{component_folder_name}"
+ if package_name.lower() != subcomponent_name:
+ print(" ERROR: Package name attribute '{}' does not match any of component folder name '{}' and subcomponent '{}'.".format(package_name, component_folder_name, subcomponent_name))
+ errors += 1
+ else:
+ print(f" INFO: Detected subaddon '{subcomponent_name}' used in Package name attribute.")
# Get all keys contained in the stringtable
keys = package.findall("Key")