tgstation/-tg-station — pull request #3811 by Menshin (2014-05-29 14:08:01+00:00)
Title: SMES constructible terminals

Added a way to construct or dismantle terminals for SMES.

__Construction :__
* you must be north, south, east or west of the SMES (diagonal is not allowed, because we've got no sprites for diagonals terminals),
* the floor plating must be removed,
* the maintenance panel of the SMES must be open,
* you must have at least 10 lengths of cable

__Deconstruction :__
* the terminal must be exposed (plating removed),
* the maintenance panel of the SMES must be open,
* you must use wirecutters

There's a chance for electrocution if unprotected for both actions.

The code is heavily inspired by the APC one.
I was going to do a standard function for all power machines, but realized only SMES and APC possess a _terminal_ variable.
Given the APC code is somewhat different from the SMES one (e.g the terminal is on the same tile as the APC, as opposed to an adjacent one), that would have involved special cases in a function only used by two objects.

Also, "Span classed" the APC file while i was at it.