taltamir
Member
This appears to be a recent-ish change as I know it used to work correctly some time ago
but now creatable_amount returns item_amount + cretable_amount not just how many we can create.
for example
as you can see regardless of whether cretable amount is 0, 1, or 2 it always returns 2 because it adds item amount to createable amount.
This change throws off various code that was designed with the two being seperate. such as counting the number of white pixels or healing potions for the shadow by adding the inventory amount plus the creatable amount. Now any such code will be counting the inventory amount twice
It also throws off cases where we try to create quest items like the complete mcclusky file if it is cretable, but now it says it is cretable even if it is already created which causes it to error out when trying to craft it. such code would have to be changed to checking if it is creatable but also not currently in inventory.
but now creatable_amount returns item_amount + cretable_amount not just how many we can create.
for example
Code:
> ash creatable_amount($item[gimlet])
Returned: 2
> ash create(1, $item[gimlet]);
...
Successfully created gimlet (1)
Returned: true
> ash creatable_amount($item[gimlet])
Returned: 2
> ash create(1, $item[gimlet]);
...
Successfully created gimlet (1)
Returned: true
> ash create(1, $item[gimlet]);
Verifying ingredients for gimlet (1)...
You need 1 more little paper umbrella to continue.
Returned: false
> ash creatable_amount($item[gimlet])
Returned: 2
This change throws off various code that was designed with the two being seperate. such as counting the number of white pixels or healing potions for the shadow by adding the inventory amount plus the creatable amount. Now any such code will be counting the inventory amount twice
It also throws off cases where we try to create quest items like the complete mcclusky file if it is cretable, but now it says it is cretable even if it is already created which causes it to error out when trying to craft it. such code would have to be changed to checking if it is creatable but also not currently in inventory.
Last edited: