Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Game_Message
- Unused_Char = [
- /\\$/,
- /\\./,
- /\\\|/,
- /\\>/,
- /\\</,
- /\\^/,
- ]
- def convert_escape_characters(text)
- result = text.to_s.clone
- Unused_Char.each do |regex|
- result.gsub!(regex) {""}
- end
- result.gsub!(/\\/) { "\e" }
- result.gsub!(/\e\e/) { "\\" }
- result.gsub!(/\eV\[(\d+)\]/i) { $game_variables[$1.to_i] }
- result.gsub!(/\eN\[(\d+)\]/i) { actor_name($1.to_i) }
- result.gsub!(/\eP\[(\d+)\]/i) { party_member_name($1.to_i) }
- result.gsub!(/\eG/i) { Vocab::currency_unit }
- result.gsub!(/\eC\[(\d+)\]/i) { "" } # Destroy change color code
- result.gsub!(/\eI\[(\d+)\]/i) { " " } # Destroy draw icon
- result
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment