A Geometrical Challenge Everybody loves geometry.  So why don't we try and code golf it?  This challenge involves taking in letters and numbers and making shapes depending on it.
The Input
The input will be in the form of (shapeIdentifier)(size)(inverter).
But what are shapeIdentifier, size, and inverter?
The shape identifier is the identifier for the type of shape you will be making with *s.  The following are the shape identifiers:

s - Square
t - Triangle

The size will be between 1-20, and it is the size of the figure.
The inverter is whether or not the shape will be upside down, which is denoted by a + or a -.  Do note:  s3- == (equals) s3+ because squares are symmetric.  However, t5- != (does not equal) t5+.
Trailing whitespace is okay in the output but leading whitespace is not.
Output Examples
Input: s3+
Output:
***
***
***

Input: t5+

Output:
  *
 ***
*****

Input: t3-
Output:
***
 *
 

Special Notes
The triangle input will always be an odd number, so the triangles will always end with 1 * at the top.

The size of the triangle is the size of the base if the inverter is
+ and is the size of the top if the inverter is -.
Pyth, 40 36 34 32 bytes
-1 byte by @isaacg
JstPz_W}\+zjl#m.[J*\*-J*}\tzyd;J

A semicolon inside a lambda is now the lambda variable's global value, a feature that saves one byte.
                         Implicit: z = input
JstPz                    J = size.
_W }\+z                  Reverse if &quot;+&quot; in z
j l# m                J  Join the nonempty lines in map lambda d:... over range(J)
      .[J            ;   Pad the following with spaces (;) to length J
         *\*               &quot;*&quot;, this many times:
            -J*}\tzyd        J if &quot;t&quot; not  in z,
                             otherwise the correct number for a triangle.

Try it here.
Test suite.