Tidied up usage of colour tags (everything uses c3 now via def shadowc3tag), moved gender text colours to MessageConfig

This commit is contained in:
Maruno17
2023-04-07 01:12:17 +01:00
parent 6b690c4492
commit 5315b53eae
10 changed files with 146 additions and 101 deletions

View File

@@ -329,30 +329,6 @@ class Color
def self.orange; return Color.new(255, 155, 0); end
def self.purple; return Color.new(155, 0, 255); end
def self.brown; return Color.new(112, 72, 32); end
# TODO: These are from def getSkinColor. It isn't appropriate to make Color
# objects of these, though, as they're just converted straight back into
# hex strings.
# def self.text_blue; return Color.new( 0, 112, 248); end
# def self.text_blue_light; return Color.new(120, 184, 232); end
# def self.text_red; return Color.new(232, 32, 16); end
# def self.text_red_light; return Color.new(248, 168, 184); end
# def self.text_green; return Color.new( 96, 176, 72); end
# def self.text_green_light; return Color.new(174, 208, 144); end
# def self.text_cyan; return Color.new( 72, 216, 216); end
# def self.text_cyan_light; return Color.new(168, 224, 224); end
# def self.text_magenta; return Color.new(208, 56, 184); end
# def self.text_magenta_light; return Color.new(232, 160, 224); end
# def self.text_yellow; return Color.new(232, 208, 32); end
# def self.text_yellow_light; return Color.new(248, 232, 136); end
# def self.text_gray; return Color.new(160, 160, 168); end
# def self.text_gray_light; return Color.new(208, 208, 216); end
# def self.text_white; return Color.new(240, 240, 248); end
# def self.text_white_light; return Color.new(200, 200, 208); end # Intentionally darker than text_white
# def self.text_purple; return Color.new(114, 64, 232); end
# def self.text_purple_light; return Color.new(184, 168, 224); end
# def self.text_orange; return Color.new(248, 152, 24); end
# def self.text_orange_light; return Color.new(248, 200, 152); end
end
#===============================================================================

View File

@@ -6,6 +6,10 @@ module MessageConfig
LIGHT_TEXT_SHADOW_COLOR = Color.new(72, 80, 88)
DARK_TEXT_MAIN_COLOR = Color.new(80, 80, 88)
DARK_TEXT_SHADOW_COLOR = Color.new(160, 160, 168)
MALE_TEXT_MAIN_COLOR = Color.new(48, 80, 200) # Used by message tag "\b"
MALE_TEXT_SHADOW_COLOR = Color.new(208, 208, 200)
FEMALE_TEXT_MAIN_COLOR = Color.new(224, 8, 8) # Used by message tag "\r"
FEMALE_TEXT_SHADOW_COLOR = Color.new(208, 208, 200)
FONT_NAME = "Power Green"
FONT_SIZE = 27
FONT_Y_OFFSET = 8
@@ -20,8 +24,8 @@ module MessageConfig
# 2 = Pause cursor is displayed at lower middle side
CURSOR_POSITION = 1
WINDOW_OPACITY = 255
TEXT_SPEED = nil # can be positive to wait frames or negative to
# show multiple characters in a single frame
TEXT_SPEED = nil # can be positive to wait frames, or negative
# to show multiple characters in a single frame
@@systemFrame = nil
@@defaultTextSkin = nil
@@textSpeed = nil
@@ -328,21 +332,22 @@ def getSkinColor(windowskin, color, isDarkSkin)
if !windowskin || windowskin.disposed? ||
windowskin.width != 128 || windowskin.height != 128
# Base color, shadow color (these are reversed on dark windowskins)
# Values in arrays are RGB numbers
textcolors = [
"0070F8", "78B8E8", # 1 Blue
"E82010", "F8A8B8", # 2 Red
"60B048", "B0D090", # 3 Green
"48D8D8", "A8E0E0", # 4 Cyan
"D038B8", "E8A0E0", # 5 Magenta
"E8D020", "F8E888", # 6 Yellow
"A0A0A8", "D0D0D8", # 7 Grey
"F0F0F8", "C8C8D0", # 8 White
"9040E8", "B8A8E0", # 9 Purple
"F89818", "F8C898", # 10 Orange
MessageConfig::DARK_TEXT_MAIN_COLOR.to_rgb24,
MessageConfig::DARK_TEXT_SHADOW_COLOR.to_rgb24, # 11 Dark default
MessageConfig::LIGHT_TEXT_MAIN_COLOR.to_rgb24,
MessageConfig::LIGHT_TEXT_SHADOW_COLOR.to_rgb24 # 12 Light default
[ 0, 112, 248], [120, 184, 232], # 1 Blue
[232, 32, 16], [248, 168, 184], # 2 Red
[ 96, 176, 72], [174, 208, 144], # 3 Green
[ 72, 216, 216], [168, 224, 224], # 4 Cyan
[208, 56, 184], [232, 160, 224], # 5 Magenta
[232, 208, 32], [248, 232, 136], # 6 Yellow
[160, 160, 168], [208, 208, 216], # 7 Gray
[240, 240, 248], [200, 200, 208], # 8 White
[114, 64, 232], [184, 168, 224], # 9 Purple
[248, 152, 24], [248, 200, 152], # 10 Orange
MessageConfig::DARK_TEXT_MAIN_COLOR,
MessageConfig::DARK_TEXT_SHADOW_COLOR, # 11 Dark default
MessageConfig::LIGHT_TEXT_MAIN_COLOR,
MessageConfig::LIGHT_TEXT_SHADOW_COLOR # 12 Light default
]
if color == 0 || color > textcolors.length / 2 # No special colour, use default
if isDarkSkin # Dark background, light text
@@ -353,10 +358,10 @@ def getSkinColor(windowskin, color, isDarkSkin)
end
# Special colour as listed above
if isDarkSkin && color != 12 # Dark background, light text
return sprintf("<c3=%s,%s>", textcolors[(2 * (color - 1)) + 1], textcolors[2 * (color - 1)])
return shadowc3tag(textcolors[(2 * (color - 1)) + 1], textcolors[2 * (color - 1)])
end
# Light background, dark text
return sprintf("<c3=%s,%s>", textcolors[2 * (color - 1)], textcolors[(2 * (color - 1)) + 1])
return shadowc3tag(textcolors[2 * (color - 1)], textcolors[(2 * (color - 1)) + 1])
else # VX windowskin
color = 0 if color >= 32
x = 64 + ((color % 8) * 8)

View File

@@ -307,7 +307,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
@fmtchars = []
fmt = getFormattedText(self.contents, 0, 0,
self.width - self.borderX - SpriteWindow_Base::TEXT_PADDING, -1,
shadowctag(@baseColor, @shadowColor) + value, 32, true)
shadowc3tag(@baseColor, @shadowColor) + value, 32, true)
@oldfont = self.contents.font.clone
fmt.each do |ch|
chx = ch[1] + ch[3]
@@ -334,7 +334,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
else
@fmtchars = getFormattedText(self.contents, 0, 0,
self.width - self.borderX - SpriteWindow_Base::TEXT_PADDING, -1,
shadowctag(@baseColor, @shadowColor) + value, 32, true)
shadowc3tag(@baseColor, @shadowColor) + value, 32, true)
@oldfont = self.contents.font.clone
@fmtchars.each do |ch|
chx = ch[1] + ch[3]

View File

@@ -1,25 +1,40 @@
#===============================================================================
# Text colors
#===============================================================================
# TODO: Unused.
# Unused
def ctag(color)
return sprintf("<c=%s>", color.to_rgb32(true))
end
# Unused
def shadowctag(base, shadow)
return sprintf("<c2=%s%s>", base.to_rgb15, shadow.to_rgb15)
end
# base and shadow are either instances of class Color, or are arrays containing
# 3 or 4 integers which are RGB(A) values.
def shadowc3tag(base, shadow)
return sprintf("<c3=%s,%s>", base.to_rgb32, shadow.to_rgb32)
if base.is_a?(Color)
base_text = base.to_rgb32
else
base_text = sprintf("%02X%02X%02X", base[0], base[1], base[2])
base_text += sprintf("02X", base[3]) if base[3]
end
if shadow.is_a?(Color)
shadow_text = shadow.to_rgb32
else
shadow_text = sprintf("%02X%02X%02X", shadow[0], shadow[1], shadow[2])
shadow_text += sprintf("02X", shadow[3]) if shadow[3]
end
return sprintf("<c3=%s,%s>", base_text, shadow_text)
end
# TODO: Unused.
# Unused
def shadowctagFromColor(color)
return shadowc3tag(color, color.get_contrast_color)
end
# TODO: Unused.
# Unused
def shadowctagFromRgb(param)
return shadowctagFromColor(Color.new_from_rgb(param))
end
@@ -1022,7 +1037,7 @@ end
def drawFormattedTextEx(bitmap, x, y, width, text, baseColor = nil, shadowColor = nil, lineheight = 32)
base = baseColor ? baseColor.clone : Color.new(96, 96, 96)
shadow = shadowColor ? shadowColor.clone : Color.new(208, 208, 200)
text = shadowctag(base, shadow) + text
text = shadowc3tag(base, shadow) + text
chars = getFormattedText(bitmap, x, y, width, -1, text, lineheight)
drawFormattedChars(bitmap, chars)
end

View File

@@ -442,8 +442,10 @@ def pbMessageDisplay(msgwindow, message, letterbyletter = true, commandProc = ni
text.gsub!(/\\pog/i, "\\b") if $player&.female?
text.gsub!(/\\pg/i, "")
text.gsub!(/\\pog/i, "")
text.gsub!(/\\b/i, "<c3=3050C8,D0D0C8>")
text.gsub!(/\\r/i, "<c3=E00808,D0D0C8>")
male_text_tag = shadowc3tag(MessageConfig::MALE_TEXT_MAIN_COLOR, MessageConfig::MALE_TEXT_SHADOW_COLOR)
female_text_tag = shadowc3tag(MessageConfig::FEMALE_TEXT_MAIN_COLOR, MessageConfig::FEMALE_TEXT_SHADOW_COLOR)
text.gsub!(/\\b/i, male_text_tag)
text.gsub!(/\\r/i, female_text_tag)
text.gsub!(/\\[Ww]\[([^\]]*)\]/) do
w = $1.to_s
if w == ""

View File

@@ -36,6 +36,9 @@ end
#
#===============================================================================
class PokemonPokedexMenu_Scene
SEEN_OBTAINED_TEXT_BASE = Color.new(248, 248, 248)
SEEN_OBTAINED_TEXT_SHADOW = Color.new(192, 32, 40)
def pbUpdate
pbUpdateSpriteHash(@sprites)
end
@@ -47,8 +50,9 @@ class PokemonPokedexMenu_Scene
@sprites = {}
@sprites["background"] = IconSprite.new(0, 0, @viewport)
@sprites["background"].setBitmap(_INTL("Graphics/UI/Pokedex/bg_menu"))
text_tag = shadowc3tag(SEEN_OBTAINED_TEXT_BASE, SEEN_OBTAINED_TEXT_SHADOW)
@sprites["headings"] = Window_AdvancedTextPokemon.newWithSize(
_INTL("<c3=F8F8F8,C02028>SEEN<r>OBTAINED</c3>"), 286, 136, 208, 64, @viewport
text_tag + _INTL("SEEN") + "<r>" + _INTL("OBTAINED") + "</c3>", 286, 136, 208, 64, @viewport
)
@sprites["headings"].windowskin = nil
@sprites["commands"] = Window_DexesList.new(commands, commands2, Graphics.width - 84)

View File

@@ -104,6 +104,11 @@ end
class PokemonSummary_Scene
MARK_WIDTH = 16
MARK_HEIGHT = 16
# Colors used for messages in this scene
RED_TEXT_BASE = Color.new(248, 56, 32)
RED_TEXT_SHADOW = Color.new(224, 152, 144)
BLACK_TEXT_BASE = Color.new(64, 64, 64)
BLACK_TEXT_SHADOW = Color.new(176, 176, 176)
def pbUpdate
pbUpdateSpriteHash(@sprites)
@@ -437,13 +442,14 @@ class PokemonSummary_Scene
# Write Exp text OR heart gauge message (if a Shadow Pokémon)
if @pokemon.shadowPokemon?
textpos.push([_INTL("Heart Gauge"), 238, 246, :left, base, shadow])
black_text_tag = shadowc3tag(BLACK_TEXT_BASE, BLACK_TEXT_SHADOW)
heartmessage = [_INTL("The door to its heart is open! Undo the final lock!"),
_INTL("The door to its heart is almost fully open."),
_INTL("The door to its heart is nearly open."),
_INTL("The door to its heart is opening wider."),
_INTL("The door to its heart is opening up."),
_INTL("The door to its heart is tightly shut.")][@pokemon.heartStage]
memo = sprintf("<c3=404040,B0B0B0>%s\n", heartmessage)
memo = black_text_tag + heartmessage
drawFormattedTextEx(overlay, 234, 308, 264, memo)
else
endexp = @pokemon.growth_rate.minimum_exp_for_level(@pokemon.level + 1)
@@ -498,30 +504,33 @@ class PokemonSummary_Scene
end
# Draw all text
pbDrawTextPositions(overlay, textpos)
red_text_tag = shadowc3tag(RED_TEXT_BASE, RED_TEXT_SHADOW)
black_text_tag = shadowc3tag(BLACK_TEXT_BASE, BLACK_TEXT_SHADOW)
memo = ""
# Write date received
if @pokemon.timeReceived
date = @pokemon.timeReceived.day
month = pbGetMonthName(@pokemon.timeReceived.mon)
year = @pokemon.timeReceived.year
memo += _INTL("<c3=404040,B0B0B0>{1} {2}, {3}\n", date, month, year)
memo += black_text_tag + _INTL("{1} {2}, {3}", date, month, year) + "\n"
end
# Write map name egg was received on
mapname = pbGetMapNameFromId(@pokemon.obtain_map)
mapname = @pokemon.obtain_text if @pokemon.obtain_text && !@pokemon.obtain_text.empty?
if mapname && mapname != ""
memo += _INTL("<c3=404040,B0B0B0>A mysterious Pokémon Egg received from <c3=F83820,E09890>{1}<c3=404040,B0B0B0>.\n", mapname)
mapname = red_text_tag + mapname + black_text_tag
memo += black_text_tag + _INTL("A mysterious Pokémon Egg received from {1}.", mapname) + "\n"
else
memo += _INTL("<c3=404040,B0B0B0>A mysterious Pokémon Egg.\n", mapname)
memo += black_text_tag + _INTL("A mysterious Pokémon Egg.") + "\n"
end
memo += "\n" # Empty line
# Write Egg Watch blurb
memo += _INTL("<c3=404040,B0B0B0>\"The Egg Watch\"\n")
memo += black_text_tag + _INTL("\"The Egg Watch\"") + "\n"
eggstate = _INTL("It looks like this Egg will take a long time to hatch.")
eggstate = _INTL("What will hatch from this? It doesn't seem close to hatching.") if @pokemon.steps_to_hatch < 10_200
eggstate = _INTL("It appears to move occasionally. It may be close to hatching.") if @pokemon.steps_to_hatch < 2550
eggstate = _INTL("Sounds can be heard coming from inside! It will hatch soon!") if @pokemon.steps_to_hatch < 1275
memo += sprintf("<c3=404040,B0B0B0>%s\n", eggstate)
memo += black_text_tag + eggstate
# Draw all text
drawFormattedTextEx(overlay, 232, 86, 268, memo)
# Draw the Pokémon's markings
@@ -530,44 +539,48 @@ class PokemonSummary_Scene
def drawPageTwo
overlay = @sprites["overlay"].bitmap
red_text_tag = shadowc3tag(RED_TEXT_BASE, RED_TEXT_SHADOW)
black_text_tag = shadowc3tag(BLACK_TEXT_BASE, BLACK_TEXT_SHADOW)
memo = ""
# Write nature
showNature = !@pokemon.shadowPokemon? || @pokemon.heartStage <= 3
if showNature
natureName = @pokemon.nature.name
memo += _INTL("<c3=F83820,E09890>{1}<c3=404040,B0B0B0> nature.\n", natureName)
nature_name = red_text_tag + @pokemon.nature.name + black_text_tag
memo += _INTL("{1} nature.", @pokemon.nature.name) + "\n"
end
# Write date received
if @pokemon.timeReceived
date = @pokemon.timeReceived.day
month = pbGetMonthName(@pokemon.timeReceived.mon)
year = @pokemon.timeReceived.year
memo += _INTL("<c3=404040,B0B0B0>{1} {2}, {3}\n", date, month, year)
memo += black_text_tag + _INTL("{1} {2}, {3}", date, month, year) + "\n"
end
# Write map name Pokémon was received on
mapname = pbGetMapNameFromId(@pokemon.obtain_map)
mapname = @pokemon.obtain_text if @pokemon.obtain_text && !@pokemon.obtain_text.empty?
mapname = _INTL("Faraway place") if nil_or_empty?(mapname)
memo += sprintf("<c3=F83820,E09890>%s\n", mapname)
memo += red_text_tag + mapname + "\n"
# Write how Pokémon was obtained
mettext = [_INTL("Met at Lv. {1}.", @pokemon.obtain_level),
mettext = [
_INTL("Met at Lv. {1}.", @pokemon.obtain_level),
_INTL("Egg received."),
_INTL("Traded at Lv. {1}.", @pokemon.obtain_level),
"",
_INTL("Had a fateful encounter at Lv. {1}.", @pokemon.obtain_level)][@pokemon.obtain_method]
memo += sprintf("<c3=404040,B0B0B0>%s\n", mettext) if mettext && mettext != ""
_INTL("Had a fateful encounter at Lv. {1}.", @pokemon.obtain_level)
][@pokemon.obtain_method]
memo += black_text_tag + mettext + "\n" if mettext && mettext != ""
# If Pokémon was hatched, write when and where it hatched
if @pokemon.obtain_method == 1
if @pokemon.timeEggHatched
date = @pokemon.timeEggHatched.day
month = pbGetMonthName(@pokemon.timeEggHatched.mon)
year = @pokemon.timeEggHatched.year
memo += _INTL("<c3=404040,B0B0B0>{1} {2}, {3}\n", date, month, year)
memo += black_text_tag + _INTL("{1} {2}, {3}", date, month, year) + "\n"
end
mapname = pbGetMapNameFromId(@pokemon.hatched_map)
mapname = _INTL("Faraway place") if nil_or_empty?(mapname)
memo += sprintf("<c3=F83820,E09890>%s\n", mapname)
memo += _INTL("<c3=404040,B0B0B0>Egg hatched.\n")
memo += red_text_tag + mapname + "\n"
memo += black_text_tag + _INTL("Egg hatched.") + "\n"
else
memo += "\n" # Empty line
end
@@ -616,7 +629,7 @@ class PokemonSummary_Scene
_INTL("Somewhat of a clown."),
_INTL("Quick to flee.")]
}
memo += sprintf("<c3=404040,B0B0B0>%s\n", characteristics[best_stat][best_iv % 5])
memo += black_text_tag + characteristics[best_stat][best_iv % 5] + "\n"
end
# Write all text
drawFormattedTextEx(overlay, 232, 86, 268, memo)

View File

@@ -27,6 +27,15 @@ end
#
#===============================================================================
class PokemonSave_Scene
LOCATION_TEXT_BASE = Color.new(32, 152, 8) # Green
LOCATION_TEXT_SHADOW = Color.new(144, 240, 144)
MALE_TEXT_BASE = Color.new(0, 112, 248) # Blue
MALE_TEXT_SHADOW = Color.new(120, 184, 232)
FEMALE_TEXT_BASE = Color.new(232, 32, 16) # Red
FEMALE_TEXT_SHADOW = Color.new(248, 168, 184)
OTHER_TEXT_BASE = Color.new(0, 112, 248) # Blue
OTHER_TEXT_SHADOW = Color.new(120, 184, 232)
def pbStartScreen
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99999
@@ -35,18 +44,24 @@ class PokemonSave_Scene
hour = totalsec / 60 / 60
min = totalsec / 60 % 60
mapname = $game_map.name
textColor = ["0070F8,78B8E8", "E82010,F8A8B8", "0070F8,78B8E8"][$player.gender]
locationColor = "209808,90F090" # green
loctext = _INTL("<ac><c3={1}>{2}</c3></ac>", locationColor, mapname)
loctext += _INTL("Player<r><c3={1}>{2}</c3><br>", textColor, $player.name)
if hour > 0
loctext += _INTL("Time<r><c3={1}>{2}h {3}m</c3><br>", textColor, hour, min)
if $player.male?
text_tag = shadowc3tag(MALE_TEXT_BASE, MALE_TEXT_SHADOW)
elsif $player.female?
text_tag = shadowc3tag(FEMALE_TEXT_BASE, FEMALE_TEXT_SHADOW)
else
loctext += _INTL("Time<r><c3={1}>{2}m</c3><br>", textColor, min)
text_tag = shadowc3tag(OTHER_TEXT_BASE, OTHER_TEXT_SHADOW)
end
loctext += _INTL("Badges<r><c3={1}>{2}</c3><br>", textColor, $player.badge_count)
location_tag = shadowc3tag(LOCATION_TEXT_BASE, LOCATION_TEXT_SHADOW)
loctext = location_tag + "<ac>" + mapname + "</ac></c3>"
loctext += _INTL("Player") + "<r>" + text_tag + $player.name + "</c3><br>"
if hour > 0
loctext += _INTL("Time") + "<r>" + text_tag + _INTL("{1}h {2}m", hour, min) + "</c3><br>"
else
loctext += _INTL("Time") + "<r>" + text_tag + _INTL("{1}m", min) + "</c3><br>"
end
loctext += _INTL("Badges") + "<r>" + text_tag + $player.badge_count.to_s + "</c3><br>"
if $player.has_pokedex
loctext += _INTL("Pokédex<r><c3={1}>{2}/{3}</c3>", textColor, $player.pokedex.owned_count, $player.pokedex.seen_count)
loctext += _INTL("Pokédex") + "<r>" + text_tag + $player.pokedex.owned_count.to_s + "/" + $player.pokedex.seen_count.to_s + "</c3>"
end
@sprites["locwindow"] = Window_AdvancedTextPokemon.new(loctext)
@sprites["locwindow"].viewport = @viewport

View File

@@ -7,6 +7,13 @@ class DuelWindow < Window_AdvancedTextPokemon
attr_reader :name
attr_reader :is_enemy
PLAYER_TEXT_BASE = Color.new(48, 80, 200) # Blue
PLAYER_TEXT_SHADOW = Color.new(160, 192, 240)
ENEMY_TEXT_BASE = Color.new(224, 8, 8) # Red
ENEMY_TEXT_SHADOW = Color.new(248, 184, 112)
HP_TEXT_BASE = Color.new(32, 152, 8) # Green
HP_TEXT_SHADOW = Color.new(144, 240, 144)
def initialize(name, is_enemy)
@hp = 10
@name = name
@@ -33,9 +40,13 @@ class DuelWindow < Window_AdvancedTextPokemon
end
def duel_refresh
name_color = @is_enemy ? "<ar><c3=E00808,F8B870>" : "<c3=3050C8,A0C0F0>"
hp_color = "<c3=209808,90F090>"
self.text = _INTL("{1}{2}\r\n{3}HP: {4}", name_color, fmtescape(@name), hp_color, @hp)
if @is_enemy
name_tag = shadowc3tag(ENEMY_TEXT_BASE, ENEMY_TEXT_SHADOW)
else
name_tag = shadowc3tag(PLAYER_TEXT_BASE, PLAYER_TEXT_SHADOW)
end
hp_tag = shadowc3tag(HP_TEXT_BASE, HP_TEXT_SHADOW)
self.text = name_tag + fmtescape(@name) + "\r\n" + hp_tag + _INTL("HP: {1}", @hp)
end
end

View File

@@ -2,6 +2,9 @@
#
#===============================================================================
class BattleSwapScene
RED_TEXT_BASE = Color.new(232, 32, 16)
RED_TEXT_SHADOW = Color.new(248, 168, 184)
def pbStartRentScene(rentals)
@rentals = rentals
@mode = 0 # rental (pick 3 out of 6 initial Pokémon)
@@ -78,12 +81,13 @@ class BattleSwapScene
end
def pbGetCommands(list, choices)
red_text_tag = shadowc3tag(RED_TEXT_BASE, RED_TEXT_SHADOW)
commands = []
list.length.times do |i|
pkmn = list[i]
category = pkmn.species_data.category
cmd = _INTL("{1} - {2} Pokémon", pkmn.speciesName, category)
cmd = "<c3=E82010,F8A8B8>" + cmd if choices.include?(i) # Red text
cmd = red_text_tag + cmd if choices.include?(i) # Red text
commands.push(cmd)
end
return commands