Commit d0981ed8 authored by 神楽坂玲奈's avatar 神楽坂玲奈

Merge pull request #1 from IamIpanda/patch-1

Update Command.rb
parents 17293014 bdf82f74
......@@ -24,24 +24,25 @@ module Commands
end
def generate_delta(languages = nil)
Log.logger.info "Generate delta card image(s)"
self.clear_mse
data = Sqlite.load
changes = HashJudger.compare data
generates = changes[0] + changes[2]
removes = changes[1]
data = Sqlite.split generates
Log.logger.info "Generate delta card image(s) with parameter: #{languages.inspect}"
if languages == nil
process(removes, data)
process_generate_delta
else
for language in languages
Global.language = language
process(removes, data)
process_generate_delta
end
end
end
def process(removes, data)
def process_generate_delta
Log.logger.info "Generate delta card image with language #{Global.language}"
self.clear_mse
data = Sqlite.load # Language effected here
changes = HashJudger.compare data
generates = changes[0] + changes[2]
removes = changes[1]
data = Sqlite.split generates
for card in removes
id = YGOCoreJudgers.get_id card
path = File.join Global.full_answer_path, id.to_s + Global.image_type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment