Better base_shutdown.lua

 * Add built-in support for trigger-based buttons (blue_security_trigger/red_security_trigger)
 * Add built-in support for Lua-defined security shutdown length (SECURITY_LENGTH)
 * Add built-in support for turning on/off lights, brushes, trigger_ff_clips, and trigger_hurts
 * Add some helpful team-oriented trigger definitions in base_teamplay.lua
Right. Using it as a makeshift ternary operator is very common in Lua scripting, though.

Turning the logic into a function would work; however, I'm not sure I would put that function in base_shutdown, because it has little utility for maps that have a sane naming scheme. The only reason its necessary is that these official maps decided to name their trigger_hurts based on which team they hurt rather than which team/base they're associated with.