diff --git a/addons/interaction/ACE_Settings.hpp b/addons/interaction/ACE_Settings.hpp index e95947ec75..6c6010bbe4 100644 --- a/addons/interaction/ACE_Settings.hpp +++ b/addons/interaction/ACE_Settings.hpp @@ -13,4 +13,10 @@ class ACE_Settings { displayName = CSTRING(PassMagazineSetting); category = ECSTRING(interact_menu,Category_InteractionMenu); }; + class GVAR(disableNegativeRating) { + displayName = CSTRING(DisableNegativeRating_DisplayName); + description = CSTRING(DisableNegativeRating_Description); + value = 0; + typeName = "BOOL"; + }; }; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 2c8ae72064..2829b488cc 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -7,7 +7,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); category = "ACE"; displayName = CSTRING(Module_DisplayName); - function = "ACE_Interaction_fnc_moduleInteraction"; + function = QFUNC(moduleInteraction); scope = 2; isGlobal = 1; isSingular = 1; @@ -19,6 +19,12 @@ class CfgVehicles { typeName = "BOOL"; defaultValue = 1; }; + class DisableNegativeRating { + displayName = CSTRING(DisableNegativeRating_DisplayName); + description = CSTRING(DisableNegativeRating_Description); + typeName = "BOOL"; + defaultValue = 0; + }; }; class ModuleDescription { description = CSTRING(Module_Description); diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index bbbda80bfa..67800c2618 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -108,3 +108,11 @@ GVAR(isOpeningDoor) = false; ["isNotSwimming", {!underwater (_this select 0)}] call EFUNC(common,addCanInteractWithCondition); ["isNotOnLadder", {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState (_this select 0) >> "ACE_isLadder") != 1}] call EFUNC(common,addCanInteractWithCondition); + +["ace_settingsInitialized", { + if (GVAR(disableNegativeRating)) then { + player addEventHandler ["HandleRating", { + (_this select 1) max 0 + }]; + }; +}] call CBA_fnc_addEventHandler; diff --git a/addons/interaction/functions/fnc_moduleInteraction.sqf b/addons/interaction/functions/fnc_moduleInteraction.sqf index ec3ec0a086..e4f5418fda 100644 --- a/addons/interaction/functions/fnc_moduleInteraction.sqf +++ b/addons/interaction/functions/fnc_moduleInteraction.sqf @@ -22,5 +22,6 @@ params ["_logic", "", "_activated"]; if !(_activated) exitWith {}; [_logic, QGVAR(EnableTeamManagement), "EnableTeamManagement"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(disableNegativeRating), "DisableNegativeRating"] call EFUNC(common,readSettingFromModule); INFO("Interaction Module Initialized."); diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 7068a12525..441568d90f 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -927,6 +927,14 @@ 允许玩家使用小队管理选单? 预设: 是 允許玩家使用小隊管理選單? 預設: 是 + + Disable negative rating + Negative Bewertung deaktivieren + + + Should players receive negative rating? When enabled players are only receiving positive ratings which prevents friendly AI fire when destroying friendly equipment or killing team members. + Sollen Spieler negative Bewertungen erhalten dürfen? Wenn diese Option aktiviert ist, erhalten Spieler nur positive Bewerungen, was Freundbeschuss durch KI verhindert, wenn befreundete Ausrüstung zerstört oder befreundete Einheiten von Spielern des selben Teams getötet werden. + Team management allows color allocation for team members, taking team command and joining/leaving teams. Na zarządzanie drużyną składa się: przydział kolorów dla członków drużyny, przejmowanie dowodzenia, dołączanie/opuszczanie drużyn.