mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
Create the documents directory if it doesn't exist
This commit is contained in:
parent
9b926e0cdb
commit
ed10371231
2 changed files with 11 additions and 7 deletions
|
|
@ -123,7 +123,8 @@ def safe_puzzle_write
|
|||
when 'zh_CN'
|
||||
doc_text = DOCUMENT_TEXT_ZH_CN
|
||||
end
|
||||
File.open(Oneshot::DOCS_PATH + "/DOCUMENT.oneshot.txt", 'w') do |file|
|
||||
Dir.mkdir(Oneshot::DOCS_PATH) unless File.exists?(Oneshot::DOCS_PATH)
|
||||
File.open("#{Oneshot::DOCS_PATH}/DOCUMENT.oneshot.txt", 'w') do |file|
|
||||
file.puts(doc_text + $game_variables[20].to_s)
|
||||
end
|
||||
end
|
||||
|
|
@ -144,7 +145,8 @@ def safe_puzzle_postgame_write
|
|||
when 'zh_CN'
|
||||
doc_text = DOCUMENT_POSTGAME_TEXT_ZH_CN
|
||||
end
|
||||
File.open(Oneshot::DOCS_PATH + "/DOCUMENT.oneshot.txt", 'w') do |file|
|
||||
Dir.mkdir(Oneshot::DOCS_PATH) unless File.exists?(Oneshot::DOCS_PATH)
|
||||
File.open("#{Oneshot::DOCS_PATH}/DOCUMENT.oneshot.txt", 'w') do |file|
|
||||
file.puts(doc_text + $game_variables[20].to_s)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -505,6 +505,7 @@ module Script
|
|||
locale = 'en'
|
||||
end
|
||||
source_dir = "Graphics/Fogs/_/scenario1/" + locale.downcase
|
||||
Dir.mkdir(Oneshot::DOCS_PATH) unless File.exists?(Oneshot::DOCS_PATH)
|
||||
copy_file(source_dir + "/pw1.png", Oneshot::DOCS_PATH + "/ONESHOT_password1.png")
|
||||
copy_file(source_dir + "/pw2.png", Oneshot::DOCS_PATH + "/ONESHOT_password2.png")
|
||||
copy_file(source_dir + "/pw3.png", Oneshot::DOCS_PATH + "/ONESHOT_password3.png")
|
||||
|
|
@ -516,11 +517,12 @@ module Script
|
|||
if !Language::LANGUAGES.include? locale
|
||||
locale = 'en'
|
||||
end
|
||||
source_dir = "Graphics/Fogs/_/scenario2/" + locale.downcase
|
||||
copy_file(source_dir + "/pw1.png", Oneshot::DOCS_PATH + "/ONESHOT_password1.png")
|
||||
copy_file(source_dir + "/pw2.png", Oneshot::DOCS_PATH + "/ONESHOT_password2.png")
|
||||
copy_file(source_dir + "/pw3.png", Oneshot::DOCS_PATH + "/ONESHOT_password3.png")
|
||||
copy_file(source_dir + "/pw4.png", Oneshot::DOCS_PATH + "/ONESHOT_password4.png")
|
||||
source_dir = "Graphics/Fogs/_/scenario2/#{locale.downcase}"
|
||||
Dir.mkdir(Oneshot::DOCS_PATH) unless File.exists?(Oneshot::DOCS_PATH)
|
||||
copy_file("#{source_dir}/pw1.png", "#{Oneshot::DOCS_PATH}/ONESHOT_password1.png")
|
||||
copy_file("#{source_dir}/pw2.png", "#{Oneshot::DOCS_PATH}/ONESHOT_password2.png")
|
||||
copy_file("#{source_dir}/pw3.png", "#{Oneshot::DOCS_PATH}/ONESHOT_password3.png")
|
||||
copy_file("#{source_dir}/pw4.png", "#{Oneshot::DOCS_PATH}/ONESHOT_password4.png")
|
||||
end
|
||||
|
||||
=begin
|
||||
|
|
|
|||
Loading…
Reference in a new issue