Added underscore to berry plant charsets, added Debug menu function that will rename these files (including in map data)

This commit is contained in:
Maruno17
2021-11-21 18:45:13 +00:00
parent ea9cacd6b9
commit ddb95a8bb6
4 changed files with 136 additions and 2 deletions

View File

@@ -141,6 +141,36 @@ module Enumerable
end
end
#===============================================================================
# class File
#===============================================================================
class File
# Copies the source file to the destination path.
def self.copy(source, destination)
data = ""
t = Time.now
File.open(source, 'rb') do |f|
while r = f.read(4096)
if Time.now - t > 1
Graphics.update
t = Time.now
end
data += r
end
end
File.delete(destination) if File.file?(destination)
f = File.new(destination, 'wb')
f.write data
f.close
end
# Copies the source to the destination and deletes the source.
def self.move(source, destination)
File.copy(source, destination)
File.delete(source)
end
end
#===============================================================================
# Kernel methods
#===============================================================================