○ ESS20仅限 关于ESS20汉化版使用的问题

fpyyyy

宝可梦训练家
2023/08/13
1
0
20
29
打扰各位了,想请教一下,在使用ESS20汉化版中点击新游戏后出现这样的情况应该怎么解决呢?IMG_9675.JPG
 
解决方案
把以下代码放到Tools.rb文件底下可以修复,我明后天会修这个问题,原因是20.1到21.1的更改造成的
Ruby:
def fmtReplaceEscapes(text)
  text.gsub!(/&lt;/, "<")
  text.gsub!(/&gt;/, ">")
  text.gsub!(/&apos;/, "'")
  text.gsub!(/&quot;/, "\"")
  text.gsub!(/&amp;/, "&")
  text.gsub!(/&m;/, "♂")
  text.gsub!(/&f;/, "♀")
end

class Color
  def self.new_from_rgb(param)
    return Font.default_color if !param
    base_int = param.to_i(16)
    case param.length
    when 8   # 32-bit hex
      return Color.new(
        (base_int >> 24) & 0xFF,
        (base_int >> 16) & 0xFF,
        (base_int >> 8) & 0xFF,
        (base_int) & 0xFF
      )
    when 6   # 24-bit hex
      return Color.new(
        (base_int >> 16) & 0xFF,
        (base_int >> 8) & 0xFF,
        (base_int) & 0xFF
      )...

木亦会枯

馆主
2022/08/10
41
1
25
625
宁夏银川
把以下代码放到Tools.rb文件底下可以修复,我明后天会修这个问题,原因是20.1到21.1的更改造成的
Ruby:
def fmtReplaceEscapes(text)
  text.gsub!(/&lt;/, "<")
  text.gsub!(/&gt;/, ">")
  text.gsub!(/&apos;/, "'")
  text.gsub!(/&quot;/, "\"")
  text.gsub!(/&amp;/, "&")
  text.gsub!(/&m;/, "♂")
  text.gsub!(/&f;/, "♀")
end

class Color
  def self.new_from_rgb(param)
    return Font.default_color if !param
    base_int = param.to_i(16)
    case param.length
    when 8   # 32-bit hex
      return Color.new(
        (base_int >> 24) & 0xFF,
        (base_int >> 16) & 0xFF,
        (base_int >> 8) & 0xFF,
        (base_int) & 0xFF
      )
    when 6   # 24-bit hex
      return Color.new(
        (base_int >> 16) & 0xFF,
        (base_int >> 8) & 0xFF,
        (base_int) & 0xFF
      )
    when 4   # 15-bit hex
      return Color.new(
        ((base_int) & 0x1F) << 3,
        ((base_int >> 5) & 0x1F) << 3,
        ((base_int >> 10) & 0x1F) << 3
      )
    when 1, 2   # Color number
      case base_int
      when 0 then return Color.white
      when 1 then return Color.blue
      when 2 then return Color.red
      when 3 then return Color.green
      when 4 then return Color.cyan
      when 5 then return Color.pink
      when 6 then return Color.yellow
      when 7 then return Color.gray
      else        return Font.default_color
      end
    end
    return Font.default_color
  end
end
[ICODE][/ICODE]
 
解决方案

在线成员

现在没有成员在线。

论坛统计

主题
542
消息
2,474
成员
3,146
最新成员
拳脚乱了春秋