forked from Giallustio/HeartsAndMinds
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADD: a reputation change whenever a building is destroyed
- Loading branch information
Showing
4 changed files
with
36 additions
and
0 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
14 changes: 14 additions & 0 deletions
14
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/buildingchanged.sqf
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,14 @@ | ||
params ["_from", "_to", "_isRuin"]; | ||
private _classname = typeOf _from; | ||
private _malus = [btc_rep_malus_building_damaged, btc_rep_malus_building_destroyed] select _isRuin; | ||
|
||
{ | ||
if([_x select 0, _classname] call BIS_fnc_inString) exitWith { | ||
_malus = _malus * (_x select 1); | ||
}; | ||
} forEach btc_buildings_multipliers; | ||
|
||
if(btc_debug_log) then { | ||
systemChat format [ "BuildingChanged: %1 to %2. Malus: %3", | ||
typeOf _from, typeOf _to, _malus ]; | ||
}; |
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