From 328a9d28dc06db88e8716c7eb6d9005e03aa5628 Mon Sep 17 00:00:00 2001 From: Nick Gordon Date: Wed, 27 Nov 2013 22:50:19 -0800 Subject: [PATCH] suggested fix for adding "special" pets so that the list does not have to be duplicated multiple times. the user model can be updated in `habitrpg` to pull from here instead of hard coding it --- script/helpers.coffee | 4 +--- script/items.coffee | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/script/helpers.coffee b/script/helpers.coffee index cb1d2083ea..903118badb 100644 --- a/script/helpers.coffee +++ b/script/helpers.coffee @@ -353,9 +353,7 @@ module.exports = countPets: (originalCount, pets) -> count = if originalCount? then originalCount else _.size(pets) - count-- if pets["Wolf-Veteran"] - count-- if pets["Wolf-Cerberus"] - count-- if pets["Dragon-Hydra"] + count-- for pet,info in items.items.specialPets if pets[pet] count ### diff --git a/script/items.coffee b/script/items.coffee index e7c9bbae22..f949cbc498 100644 --- a/script/items.coffee +++ b/script/items.coffee @@ -70,6 +70,12 @@ items = module.exports.items = CottonCandyBlue: value: 4, text: 'Cotton Candy Blue' Golden: value: 5, text: 'Golden' + specialPets: + 'Wolf-Veteran': true + 'Wolf-Cerberus': true + 'Dragon-Hydra': true + 'Turkey-Base': true + food: Meat: text: 'Meat', target: 'Base' Milk: text: 'Milk', target: 'White'