-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fully localize all user visible actions, messages, notifications and …
…fix related bugs (#96) * Replace placeholders * Variable location size so kill messages better reflect in/around for large cities * Adjust for cityArea * Fix Civilian killed stringtable * Optimize killed marker creation * Prevent 'cop killed by cop' when civilian kills cop * Fix localization of kill notifications * Show localized car alarm notification * Localize cannot create vehicle message * Fix some settings should not require restart * Fix alarm not working in nearby civilians mode * Add TODO * Localize killers start positions names * Fix incorrect PREP * Change locationNames(Raw) namespaces to hashMaps * Fix default LocationName for module not being localized * Fix for generated positions * Optimize policeStationMarker creation * Localize "Teleport back" * Add FUNC(isCop) * Fix logging player or AI * Fix again * Fix side check in isCop * Try workaround for vehicle suicide detection * Add name of the cop that killed other cop * Fix variable name * Fix cop check in kill messages * Fix killer name being null on suicide * Resolve TODO * Localized police station name * Fix no empty spawner message appearing when empty vehicle can be removed * Increase 2nd spawn attempt delay * Remove forced police station names from missions * Add a note to module "LocationName" that it's optional * Fix killers start module missing property name * Drop forced killers start name in Malden scenario * Log module LocationNames and fix automatic name selection * Fix killers don't see police station markers * Try localize 'maximum idle time reached' * Localize teleport name * Use isNotEqualTo * PublicVariable LocationName of police station module * Pass unlocalized string to changeScore for timeout message * Fix localizable message template and args ignored in showScore flow * Still doesn't work * Fix format array creation * Add postInit warning message that debug mode is enabled * Actually implement time limit * Change killers score change stacking duration the more score changes * Time limit & extra time improvements * Shorten main game time limit to 30 minutes (+15 extra) * Increase extra time timeouts limit
- Loading branch information
Showing
55 changed files
with
638 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function checks if a unit/position is in a city. | ||
* | ||
* Arguments: | ||
* 0: Unit/Position to check <OBJECT/POSITION> | ||
* 1: Particular city location to check <LOCATION> (Optional) | ||
* | ||
* Return Value: | ||
* 0: Result <BOOL> | ||
* | ||
* Example: | ||
* [position player] call afsk_civilian_fnc_isPositionInCity | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_position", ["_location", locationNull]]; | ||
|
||
if (_position isEqualType objNull) then { | ||
_position = getPosATL _position; | ||
}; | ||
|
||
private _nearestCity = if (_location isEqualTo locationNull) then { | ||
[_position] call FUNC(getNearestCity) | ||
} else { | ||
[_location] call FUNC(getCityByLocation) | ||
}; | ||
|
||
private _nearestCityArea = _nearestCity getVariable QGVAR(cityArea); | ||
_position inArea _nearestCityArea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function returns location name from config. | ||
* | ||
* Arguments: | ||
* 0: Location <LOCATION> | ||
* | ||
* Return Value: | ||
* 0: Location name <STRING> | ||
* | ||
* Example: | ||
* [[player] call afsk_common_fnc_getNearestLocation] call afsk_common_fnc_getLocationName | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_location"]; | ||
|
||
private _locationClassname = if (_location isEqualType locationNull) then { | ||
className _location; | ||
} else { | ||
_location | ||
}; | ||
|
||
// Location does not have classname so no name also | ||
if (_locationClassname isEqualTo "") exitWith {""}; | ||
|
||
// Try to get name from cache | ||
private _name = GVAR(locationNamesRaw) getOrDefault [_locationClassname, ""]; | ||
|
||
if (_name isEqualTo "") then { | ||
_name = getTextRaw (configFile >> "CfgWorlds" >> worldName >> "Names" >> _locationClassname >> "name"); | ||
// Fill cache | ||
GVAR(locationNamesRaw) set [_locationClassname, _name]; | ||
}; | ||
|
||
_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.