Baystation12/Baystation12 — pull request #6247 by Kelenius (2014-09-01 06:57:32+00:00)
Title: Of stacks

Stack update!

This makes use of two stack procs: get_amount() and use().

get_amount() simply returns amount of remaining items in the stack. Point is that it can be made to be something other than 'amount variable', allowing to give cyborgs stacks that run from an energy storage.

use() handles item removal. It tries to remove a specified amount of items from the stack, returns 0 if it's impossible, and handles deleting of stack if the amount reaches zero, then returns 1 if it was successful.

Adds a lot of spanclasses and better feedback messages for stack uses. A lot more are needed, but for the sake of my sanity I can't tackle them all at once.

Also fixes a lot of places where it was possible to, e.g. start putting glass into a computer twice and make two sheets disappear.