scrom / Experiments

a NodeJS text adventure - deliberately coded badly to re-experience the pain of legacy code
http://mvta.herokuapp.com/
2 stars 0 forks source link

adding multiple liquids or powders to the same (or a full) container should be prevented unless they combine #311

Closed scrom closed 9 years ago

scrom commented 9 years ago

At the moment it's possible to add 2 liquids to a container even when they don't combine. Whilst it'd be neat to simply combine them (which I could try to support with some difficulty) I think for now it's better to simply trap this case and block it happening.

scrom commented 9 years ago

see also #312

scrom commented 9 years ago

Even more sensible would be to destroy both of the liquids in the container and generate some "waste" liquid that makes you sick

scrom commented 9 years ago

generating liquids is done elsewhere in the game engine already with the blood feature so this should be possible

scrom commented 9 years ago

Preventing these is now done. There is however another case to handle. If the liquid you're trying to add is the same (same name and properties) then it should combine and just increase the quantity and weight of the bottle)

scrom commented 9 years ago

combining liquids now sorted (haven't checked resulting attributes in test yet though)

scrom commented 9 years ago

test now added for attributes

scrom commented 9 years ago

Also needs supporting for powders (now done)