mirror of
https://github.com/rakion99/shelter-editor.git
synced 2026-09-22 18:12:15 +00:00
Added "Heal All Dwellers" Button
Added a button to heal all dwellers.
This commit is contained in:
1 parent
8d9544d1aa
commit
07ff20c331
2 files changed
+13
No files matched your search
@@ -143,6 +143,10 @@
|
||||
<label>Max All Dweller Happiness</label><br />
|
||||
<button type="button" class="btn btn-primary" ng-click="maxhappinessAll()">Activate</button>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<label>Heal All Dwellers</label><br />
|
||||
<button type="button" class="btn btn-primary" ng-click="healAll()">Activate</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -301,6 +301,15 @@ app.controller('dwellerController', function ($scope) {
|
||||
$scope.save.dwellers.dwellers[i].happiness.happinessValue = 100;
|
||||
};
|
||||
|
||||
$scope.healAll = function () {
|
||||
var sum2 = Object.keys($scope.save.dwellers.dwellers).length;
|
||||
for(i=0; i<sum2; i++)
|
||||
{
|
||||
$scope.save.dwellers.dwellers[i].health.radiationValue = 0;
|
||||
$scope.save.dwellers.dwellers[i].health.healthValue = $scope.save.dwellers.dwellers[i].health.maxHealth;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.maxSpecialAll = function () {
|
||||
var sum2 = Object.keys($scope.save.dwellers.dwellers).length;
|
||||
for(i=0; i<sum2; i++)
|
||||
|
||||
Reference in new issue
Block a user