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

卡图生成器 卡背文件名更改

parent f7ebe964
...@@ -32,6 +32,9 @@ Rake::GemPackageTask.new(spec) do |p| ...@@ -32,6 +32,9 @@ Rake::GemPackageTask.new(spec) do |p|
if Windows if Windows
p.need_zip = true p.need_zip = true
p.zip_command = '../7z.exe a -tzip' p.zip_command = '../7z.exe a -tzip'
def p.zip_file
"#{package_name}-win32.zip"
end
else else
p.need_tar = true p.need_tar = true
end end
......
...@@ -9,7 +9,10 @@ class Card ...@@ -9,7 +9,10 @@ class Card
@db.results_as_hash = true @db.results_as_hash = true
PicPath = if RUBY_PLATFORM["win"] || RUBY_PLATFORM["ming"] PicPath = if RUBY_PLATFORM["win"] || RUBY_PLATFORM["ming"]
require 'win32/registry' require 'win32/registry'
Win32::Registry::HKEY_CURRENT_USER.open('Software\OCGSOFT\Cards'){|reg|reg['Path']} rescue '' ospicpath = Win32::Registry::HKEY_CURRENT_USER.open('Software\OCGSOFT\Cards'){|reg|reg['Path']} rescue ''
p ospicpath.encoding
ospicpath.force_encoding "GBK"
p ospicpath.encode "UTF-8"
else else
'' #其他操作系统卡图存放位置标准尚未制定。 '' #其他操作系统卡图存放位置标准尚未制定。
end end
......
...@@ -12,7 +12,7 @@ class Card ...@@ -12,7 +12,7 @@ class Card
def create_image def create_image
#载入背景图 #载入背景图
result = if monster? result = if monster?
Surface.load "graphics/cardcreater/back/#{card_type}/#{attribute} #{level}.jpg" Surface.load "graphics/cardcreater/back/#{card_type}/#{attribute}_#{level}.jpg"
else else
Surface.load "graphics/cardcreater/back/#{card_type}.jpg" Surface.load "graphics/cardcreater/back/#{card_type}.jpg"
end end
......
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