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

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

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