105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# File 'lib/rmxp_extractor/ron.rb', line 105
def rmxp_serialize
str = "EventCommand(\n"
$indent += 2
str += "#{" " * $indent}indent: #{@indent},\n"
str += "#{" " * $indent}code: #{@code},\n"
str += "#{" " * $indent}parameters: ["
if @parameters.empty?
str += "],\n"
else
$indent += 2
@parameters.each do |param|
str += "\n#{" " * $indent}#{param.class.name.split("::").last}(#{param.rmxp_serialize}),"
end
$indent -= 2
str += "\n#{" " * $indent}],\n"
end
$indent -= 2
str += "#{" " * $indent})"
str
end
|