mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Fix for Pokémon editor deleting a moveset move when "changing" which move it is to the same move, fixed typo in def addBackgroundOrColoredPlane.
This commit is contained in:
@@ -742,7 +742,7 @@ def addBackgroundOrColoredPlane(sprites,planename,background,color,viewport=nil)
|
|||||||
bitmapName=pbResolveBitmap("Graphics/Pictures/#{background}")
|
bitmapName=pbResolveBitmap("Graphics/Pictures/#{background}")
|
||||||
if bitmapName==nil
|
if bitmapName==nil
|
||||||
# Plane should exist in any case
|
# Plane should exist in any case
|
||||||
sprites[planename]=ColoredPlane.new(color,@viewport)
|
sprites[planename]=ColoredPlane.new(color,viewport)
|
||||||
else
|
else
|
||||||
sprites[planename]=AnimatedPlane.new(viewport)
|
sprites[planename]=AnimatedPlane.new(viewport)
|
||||||
sprites[planename].setBitmap(bitmapName)
|
sprites[planename].setBitmap(bitmapName)
|
||||||
|
|||||||
@@ -1004,7 +1004,7 @@ module MovePoolProperty
|
|||||||
end
|
end
|
||||||
when 1 # Change move
|
when 1 # Change move
|
||||||
newmove = pbChooseMoveList(entry[1])
|
newmove = pbChooseMoveList(entry[1])
|
||||||
if newmove
|
if newmove && newmove != entry[1]
|
||||||
havemove = -1
|
havemove = -1
|
||||||
realcmds.each do |e|
|
realcmds.each do |e|
|
||||||
havemove = e[2] if e[0] == entry[0] && e[1] == newmove
|
havemove = e[2] if e[0] == entry[0] && e[1] == newmove
|
||||||
@@ -1012,6 +1012,7 @@ module MovePoolProperty
|
|||||||
if havemove >= 0 # New move already known at level; delete this move
|
if havemove >= 0 # New move already known at level; delete this move
|
||||||
realcmds[cmd[1]] = nil
|
realcmds[cmd[1]] = nil
|
||||||
realcmds.compact!
|
realcmds.compact!
|
||||||
|
cmd[1] = [cmd[1], realcmds.length - 1].min
|
||||||
oldsel = havemove
|
oldsel = havemove
|
||||||
else # Apply the new move
|
else # Apply the new move
|
||||||
entry[1] = newmove
|
entry[1] = newmove
|
||||||
|
|||||||
Reference in New Issue
Block a user