mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
more interaction cleanup
This commit is contained in:
parent
f48636e633
commit
5c5a65443b
@ -117,7 +117,8 @@ class CfgVehicles {
|
||||
class ACE_Pardon {
|
||||
displayName = CSTRING(Pardon);
|
||||
condition = QUOTE(rating _target < -2000 && {alive _target} && {side group _player == side group _target});
|
||||
statement = QUOTE([ARR_3(_target,'{_this addRating -rating _this}',_target)] call DEFUNC(common,execRemoteFnc));
|
||||
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canPardon));
|
||||
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(pardon));
|
||||
showDisabled = 0;
|
||||
priority = 2.5;
|
||||
};
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
ACE_Modifier = 0;
|
||||
|
||||
["pardon", {(_this select 0) addRating -rating (_this select 0)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
["getDown", {
|
||||
params ["_target"];
|
||||
|
||||
|
@ -24,6 +24,8 @@ PREP(canBecomeLeader);
|
||||
PREP(doBecomeLeader);
|
||||
PREP(canTapShoulder);
|
||||
PREP(tapShoulder);
|
||||
PREP(canPardon);
|
||||
PREP(pardon);
|
||||
|
||||
// interaction with doors
|
||||
PREP(getDoor);
|
||||
|
20
addons/interaction/functions/fnc_canPardon.sqf
Normal file
20
addons/interaction/functions/fnc_canPardon.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Checks if the unit can pardon the target.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Unit can pardon target <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
alive _target
|
||||
&& {rating _target < -2000}
|
||||
&& {side group _unit == side group _target}
|
18
addons/interaction/functions/fnc_pardon.sqf
Normal file
18
addons/interaction/functions/fnc_pardon.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Unit pardons target unit.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["", "_target"];
|
||||
|
||||
["pardon", [_target], [_target]] call EFUNC(common,targetEvent);
|
Loading…
Reference in New Issue
Block a user