mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-21 19:08:30 +01:00
Content editor: Only enable item's "has equip effects" if the item category is wearable.
This commit is contained in:
@@ -13,6 +13,16 @@ var ATEditor = (function(ATEditor, model, ATModelFunctions) {
|
||||
|
||||
$scope.$watch('obj.category', function(val) {
|
||||
$scope.isWeapon = ATModelFunctions.itemCategoryFunctions.isWeaponCategory(val);
|
||||
$scope.isUsable = ATModelFunctions.itemCategoryFunctions.isUsableCategory(val);
|
||||
if (!$scope.isUsable) {
|
||||
$scope.obj.hasUseEffect = false;
|
||||
}
|
||||
$scope.isWearable = ATModelFunctions.itemCategoryFunctions.isWearableCategory(val);
|
||||
if (!$scope.isWearable) {
|
||||
$scope.obj.hasEquipEffect = false;
|
||||
$scope.obj.hasHitEffect = false;
|
||||
$scope.obj.hasKillEffect = false;
|
||||
}
|
||||
});
|
||||
$scope.$watch('obj.hasManualPrice', function(hasManualPrice) {
|
||||
$scope.obj.baseMarketCost = hasManualPrice ? ATModelFunctions.itemFunctions.calculateItemCost($scope.obj) : 0;
|
||||
|
||||
@@ -35,16 +35,16 @@
|
||||
<option value="4">Rare (purple)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<div class="fieldWithLabel" ng-ds-fade="isWearable">
|
||||
<label class="checkbox"><input type="checkbox" id="hasEquipEffect" ng-model="obj.hasEquipEffect" />Has equip effect</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<div class="fieldWithLabel" ng-ds-fade="isUsable">
|
||||
<label class="checkbox"><input type="checkbox" id="hasUseEffect" ng-model="obj.hasUseEffect" />Has use effect</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<div class="fieldWithLabel" ng-ds-fade="isWearable">
|
||||
<label class="checkbox"><input type="checkbox" id="hasHitEffect" ng-model="obj.hasHitEffect" />Has effect on every hit</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<div class="fieldWithLabel" ng-ds-fade="isWearable">
|
||||
<label class="checkbox"><input type="checkbox" id="hasKillEffect" ng-model="obj.hasKillEffect" />Has effect on every kill</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
Reference in New Issue
Block a user