mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Removed all code relating to RMVX
This commit is contained in:
@@ -23,13 +23,8 @@ class Game_System
|
|||||||
attr_accessor :bgm_position
|
attr_accessor :bgm_position
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
if $RPGVX
|
|
||||||
@map_interpreter = Game_Interpreter.new(0,true)
|
|
||||||
@battle_interpreter = Game_Interpreter.new(0,false)
|
|
||||||
else
|
|
||||||
@map_interpreter = Interpreter.new(0, true)
|
@map_interpreter = Interpreter.new(0, true)
|
||||||
@battle_interpreter = Interpreter.new(0, false)
|
@battle_interpreter = Interpreter.new(0, false)
|
||||||
end
|
|
||||||
@timer = 0
|
@timer = 0
|
||||||
@timer_working = false
|
@timer_working = false
|
||||||
@save_disabled = false
|
@save_disabled = false
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ class Game_Map
|
|||||||
|
|
||||||
TILE_WIDTH = 32
|
TILE_WIDTH = 32
|
||||||
TILE_HEIGHT = 32
|
TILE_HEIGHT = 32
|
||||||
X_SUBPIXELS = ($RPGVX) ? 8 : 4
|
X_SUBPIXELS = 4
|
||||||
Y_SUBPIXELS = ($RPGVX) ? 8 : 4
|
Y_SUBPIXELS = 4
|
||||||
REAL_RES_X = TILE_WIDTH * X_SUBPIXELS
|
REAL_RES_X = TILE_WIDTH * X_SUBPIXELS
|
||||||
REAL_RES_Y = TILE_HEIGHT * Y_SUBPIXELS
|
REAL_RES_Y = TILE_HEIGHT * Y_SUBPIXELS
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ class Game_Map
|
|||||||
|
|
||||||
def setup(map_id)
|
def setup(map_id)
|
||||||
@map_id = map_id
|
@map_id = map_id
|
||||||
@map = load_data(sprintf("Data/Map%03d.%s",map_id,($RPGVX) ? "rvdata" : "rxdata"))
|
@map = load_data(sprintf("Data/Map%03d.rxdata",map_id))
|
||||||
tileset = $data_tilesets[@map.tileset_id]
|
tileset = $data_tilesets[@map.tileset_id]
|
||||||
updateTileset
|
updateTileset
|
||||||
@fog_ox = 0
|
@fog_ox = 0
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class Spriteset_Map
|
|||||||
|
|
||||||
def update
|
def update
|
||||||
return if @tilemap.disposed?
|
return if @tilemap.disposed?
|
||||||
if $RPGVX || $PokemonSystem.tilemap==0
|
if $PokemonSystem.tilemap==0
|
||||||
if self.map==$game_map
|
if self.map==$game_map
|
||||||
pbDayNightTint(@@viewport3)
|
pbDayNightTint(@@viewport3)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -266,16 +266,16 @@ class Interpreter
|
|||||||
when 402; return command_402 # When [**]
|
when 402; return command_402 # When [**]
|
||||||
when 403; return command_403 # When Cancel
|
when 403; return command_403 # When Cancel
|
||||||
when 103; return command_103 # Input Number
|
when 103; return command_103 # Input Number
|
||||||
when 104; return command_104 # Change Text Options [not in VX]
|
when 104; return command_104 # Change Text Options
|
||||||
when 105; return command_105 # Button Input Processing [not in VX]
|
when 105; return command_105 # Button Input Processing
|
||||||
when 106; return command_106 # Wait [in VX: 230]
|
when 106; return command_106 # Wait
|
||||||
when 111; return command_111 # Conditional Branch
|
when 111; return command_111 # Conditional Branch
|
||||||
when 411; return command_411 # Else
|
when 411; return command_411 # Else
|
||||||
when 112; return command_112 # Loop
|
when 112; return command_112 # Loop
|
||||||
when 413; return command_413 # Repeat Above
|
when 413; return command_413 # Repeat Above
|
||||||
when 113; return command_113 # Break Loop
|
when 113; return command_113 # Break Loop
|
||||||
when 115; return command_115 # Exit Event Processing
|
when 115; return command_115 # Exit Event Processing
|
||||||
when 116; return command_116 # Erase Event [in VX: 214]
|
when 116; return command_116 # Erase Event
|
||||||
when 117; return command_117 # Call Common Event
|
when 117; return command_117 # Call Common Event
|
||||||
when 118; return command_118 # Label
|
when 118; return command_118 # Label
|
||||||
when 119; return command_119 # Jump to Label
|
when 119; return command_119 # Jump to Label
|
||||||
@@ -288,7 +288,7 @@ class Interpreter
|
|||||||
when 127; return command_127 # Change Weapons
|
when 127; return command_127 # Change Weapons
|
||||||
when 128; return command_128 # Change Armor
|
when 128; return command_128 # Change Armor
|
||||||
when 129; return command_129 # Change Party Member
|
when 129; return command_129 # Change Party Member
|
||||||
when 131; return command_131 # Change Windowskin [not in VX]
|
when 131; return command_131 # Change Windowskin
|
||||||
when 132; return command_132 # Change Battle BGM
|
when 132; return command_132 # Change Battle BGM
|
||||||
when 133; return command_133 # Change Battle End ME
|
when 133; return command_133 # Change Battle End ME
|
||||||
when 134; return command_134 # Change Save Access
|
when 134; return command_134 # Change Save Access
|
||||||
@@ -298,14 +298,14 @@ class Interpreter
|
|||||||
when 202; return command_202 # Set Event Location
|
when 202; return command_202 # Set Event Location
|
||||||
when 203; return command_203 # Scroll Map
|
when 203; return command_203 # Scroll Map
|
||||||
when 204; return command_204 # Change Map Settings
|
when 204; return command_204 # Change Map Settings
|
||||||
when 205; return command_205 # Change Fog Color Tone [in VX: Set Move Route]
|
when 205; return command_205 # Change Fog Color Tone
|
||||||
when 206; return command_206 # Change Fog Opacity [in VX: Get on/off Vehicle]
|
when 206; return command_206 # Change Fog Opacity
|
||||||
when 207; return command_207 # Show Animation [in VX: 212]
|
when 207; return command_207 # Show Animation
|
||||||
when 208; return command_208 # Change Transparent Flag [in VX: 211]
|
when 208; return command_208 # Change Transparent Flag
|
||||||
when 209; return command_209 # Set Move Route [in VX: 205]
|
when 209; return command_209 # Set Move Route
|
||||||
when 210; return command_210 # Wait for Move's Completion
|
when 210; return command_210 # Wait for Move's Completion
|
||||||
when 221; return command_221 # Prepare for Transition [Not in VX, now called Fadeout Screen]
|
when 221; return command_221 # Prepare for Transition
|
||||||
when 222; return command_222 # Execute Transition [Not in VX, now called Fadein Screen]
|
when 222; return command_222 # Execute Transition
|
||||||
when 223; return command_223 # Change Screen Color Tone
|
when 223; return command_223 # Change Screen Color Tone
|
||||||
when 224; return command_224 # Screen Flash
|
when 224; return command_224 # Screen Flash
|
||||||
when 225; return command_225 # Screen Shake
|
when 225; return command_225 # Screen Shake
|
||||||
@@ -319,8 +319,8 @@ class Interpreter
|
|||||||
when 242; return command_242 # Fade Out BGM
|
when 242; return command_242 # Fade Out BGM
|
||||||
when 245; return command_245 # Play BGS
|
when 245; return command_245 # Play BGS
|
||||||
when 246; return command_246 # Fade Out BGS
|
when 246; return command_246 # Fade Out BGS
|
||||||
when 247; return command_247 # Memorize BGM/BGS [not in VX]
|
when 247; return command_247 # Memorize BGM/BGS
|
||||||
when 248; return command_248 # Restore BGM/BGS [not in VX]
|
when 248; return command_248 # Restore BGM/BGS
|
||||||
when 249; return command_249 # Play ME
|
when 249; return command_249 # Play ME
|
||||||
when 250; return command_250 # Play SE
|
when 250; return command_250 # Play SE
|
||||||
when 251; return command_251 # Stop SE
|
when 251; return command_251 # Stop SE
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ def pbSetTextMessages
|
|||||||
neednewline=false
|
neednewline=false
|
||||||
end
|
end
|
||||||
if list.code == 101
|
if list.code == 101
|
||||||
lastitem+="#{list.parameters[0]}" if !$RPGVX
|
lastitem+="#{list.parameters[0]}"
|
||||||
neednewline=true
|
neednewline=true
|
||||||
elsif list.code == 102
|
elsif list.code == 102
|
||||||
for k in 0...list.parameters[0].length
|
for k in 0...list.parameters[0].length
|
||||||
@@ -107,7 +107,7 @@ def pbSetTextMessages
|
|||||||
t = Time.now.to_i
|
t = Time.now.to_i
|
||||||
Graphics.update
|
Graphics.update
|
||||||
end
|
end
|
||||||
filename=sprintf("Data/Map%03d.%s",id,$RPGVX ? "rvdata" : "rxdata")
|
filename=sprintf("Data/Map%03d.rxdata",id)
|
||||||
next if !pbRgssExists?(filename)
|
next if !pbRgssExists?(filename)
|
||||||
map = load_data(filename)
|
map = load_data(filename)
|
||||||
items=[]
|
items=[]
|
||||||
@@ -132,7 +132,7 @@ def pbSetTextMessages
|
|||||||
neednewline=false
|
neednewline=false
|
||||||
end
|
end
|
||||||
if list.code == 101
|
if list.code == 101
|
||||||
lastitem+="#{list.parameters[0]}" if !$RPGVX
|
lastitem+="#{list.parameters[0]}"
|
||||||
neednewline=true
|
neednewline=true
|
||||||
elsif list.code == 102
|
elsif list.code == 102
|
||||||
for k in 0...list.parameters[0].length
|
for k in 0...list.parameters[0].length
|
||||||
|
|||||||
@@ -382,126 +382,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Game_Interpreter # Used by RMVX
|
|
||||||
include InterpreterMixin
|
|
||||||
eval(InterpreterMixin::CustomEventCommands)
|
|
||||||
@@immediateDisplayAfterWait=false
|
|
||||||
@buttonInput=false
|
|
||||||
|
|
||||||
def pbParams
|
|
||||||
return @params
|
|
||||||
end
|
|
||||||
|
|
||||||
def command_105
|
|
||||||
return false if @buttonInput
|
|
||||||
@buttonInput=true
|
|
||||||
pbButtonInputProcessing(@list[@index].parameters[0])
|
|
||||||
@buttonInput=false
|
|
||||||
@index+=1
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
def command_101
|
|
||||||
if $game_temp.message_window_showing
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
$game_message=Game_Message.new if !$game_message
|
|
||||||
message=""
|
|
||||||
commands=nil
|
|
||||||
numInputVar=nil
|
|
||||||
numInputDigitsMax=nil
|
|
||||||
text=""
|
|
||||||
facename=@list[@index].parameters[0]
|
|
||||||
faceindex=@list[@index].parameters[1]
|
|
||||||
if facename && facename!=""
|
|
||||||
text+="\\ff[#{facename},#{faceindex}]"
|
|
||||||
end
|
|
||||||
if $game_message
|
|
||||||
$game_message.background=@list[@index].parameters[2]
|
|
||||||
end
|
|
||||||
$game_system.message_position=@list[@index].parameters[3]
|
|
||||||
message+=text
|
|
||||||
messageend=""
|
|
||||||
loop do
|
|
||||||
nextIndex=pbNextIndex(@index)
|
|
||||||
code=@list[nextIndex].code
|
|
||||||
if code == 401
|
|
||||||
text=@list[nextIndex].parameters[0]
|
|
||||||
text+=" " if text!="" && text[text.length-1,1]!=" "
|
|
||||||
message+=text
|
|
||||||
@index=nextIndex
|
|
||||||
else
|
|
||||||
if code == 102
|
|
||||||
commands=@list[nextIndex].parameters
|
|
||||||
@index=nextIndex
|
|
||||||
elsif code == 106 && @@immediateDisplayAfterWait
|
|
||||||
params=@list[nextIndex].parameters
|
|
||||||
if params[0]<=10
|
|
||||||
nextcode=@list[nextIndex+1].code
|
|
||||||
if nextcode==101||nextcode==102||nextcode==103
|
|
||||||
@index=nextIndex
|
|
||||||
else
|
|
||||||
break
|
|
||||||
end
|
|
||||||
else
|
|
||||||
break
|
|
||||||
end
|
|
||||||
elsif code == 103
|
|
||||||
numInputVar=@list[nextIndex].parameters[0]
|
|
||||||
numInputDigitsMax=@list[nextIndex].parameters[1]
|
|
||||||
@index=nextIndex
|
|
||||||
elsif code == 101
|
|
||||||
messageend="\1"
|
|
||||||
end
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
message=_MAPINTL($game_map.map_id,message)
|
|
||||||
@message_waiting=true
|
|
||||||
if commands
|
|
||||||
cmdlist=[]
|
|
||||||
for cmd in commands[0]
|
|
||||||
cmdlist.push(_MAPINTL($game_map.map_id,cmd))
|
|
||||||
end
|
|
||||||
command=pbMessage(message+messageend,cmdlist,commands[1])
|
|
||||||
@branch[@list[@index].indent] = command
|
|
||||||
elsif numInputVar
|
|
||||||
params=ChooseNumberParams.new
|
|
||||||
params.setMaxDigits(numInputDigitsMax)
|
|
||||||
params.setDefaultValue($game_variables[numInputVar])
|
|
||||||
$game_variables[numInputVar]=pbMessageChooseNumber(message+messageend,params)
|
|
||||||
$game_map.need_refresh = true if $game_map
|
|
||||||
else
|
|
||||||
pbMessage(message+messageend)
|
|
||||||
end
|
|
||||||
@message_waiting=false
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
def command_102
|
|
||||||
@message_waiting=true
|
|
||||||
command=pbShowCommands(nil,@list[@index].parameters[0],@list[@index].parameters[1])
|
|
||||||
@message_waiting=false
|
|
||||||
@branch[@list[@index].indent] = command
|
|
||||||
Input.update # Must call Input.update again to avoid extra triggers
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
def command_103
|
|
||||||
varnumber=@list[@index].parameters[0]
|
|
||||||
@message_waiting=true
|
|
||||||
params=ChooseNumberParams.new
|
|
||||||
params.setMaxDigits(@list[@index].parameters[1])
|
|
||||||
params.setDefaultValue($game_variables[varnumber])
|
|
||||||
$game_variables[varnumber]=pbChooseNumber(nil,params)
|
|
||||||
$game_map.need_refresh = true if $game_map
|
|
||||||
@message_waiting=false
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Interpreter # Used by RMXP
|
class Interpreter # Used by RMXP
|
||||||
include InterpreterMixin
|
include InterpreterMixin
|
||||||
eval(InterpreterMixin::CustomEventCommands)
|
eval(InterpreterMixin::CustomEventCommands)
|
||||||
|
|||||||
@@ -1533,28 +1533,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Game_Interpreter
|
|
||||||
def command_303
|
|
||||||
if $Trainer
|
|
||||||
$Trainer.name=pbEnterPlayerName(_INTL("Your name?"),1,@params[1],$Trainer.name)
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
if $game_actors && $data_actors && $data_actors[@params[0]] != nil
|
|
||||||
# Set battle abort flag
|
|
||||||
pbFadeOutIn {
|
|
||||||
sscene=PokemonEntryScene.new
|
|
||||||
sscreen=PokemonEntry.new(sscene)
|
|
||||||
$game_actors[@params[0]].name=sscreen.pbStartScreen(
|
|
||||||
_INTL("Enter {1}'s name.",$game_actors[@params[0]].name),
|
|
||||||
1,@params[1],$game_actors[@params[0]].name)
|
|
||||||
}
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ end
|
|||||||
Events.onMapChanging += proc { |_sender,e|
|
Events.onMapChanging += proc { |_sender,e|
|
||||||
newMapID = e[0]
|
newMapID = e[0]
|
||||||
if newMapID>0
|
if newMapID>0
|
||||||
mapinfos = ($RPGVX) ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata")
|
mapinfos = load_data("Data/MapInfos.rxdata")
|
||||||
oldWeather = pbGetMetadata($game_map.map_id,MetadataWeather)
|
oldWeather = pbGetMetadata($game_map.map_id,MetadataWeather)
|
||||||
if $game_map.name!=mapinfos[newMapID].name
|
if $game_map.name!=mapinfos[newMapID].name
|
||||||
$game_screen.weather(0,0,0) if oldWeather
|
$game_screen.weather(0,0,0) if oldWeather
|
||||||
@@ -418,7 +418,7 @@ Events.onMapChange += proc { |_sender,e|
|
|||||||
$PokemonEncounters.setup($game_map.map_id) if $PokemonEncounters
|
$PokemonEncounters.setup($game_map.map_id) if $PokemonEncounters
|
||||||
$PokemonGlobal.visitedMaps[$game_map.map_id] = true
|
$PokemonGlobal.visitedMaps[$game_map.map_id] = true
|
||||||
if oldid!=0 && oldid!=$game_map.map_id
|
if oldid!=0 && oldid!=$game_map.map_id
|
||||||
mapinfos = ($RPGVX) ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata")
|
mapinfos = load_data("Data/MapInfos.rxdata")
|
||||||
weather = pbGetMetadata($game_map.map_id,MetadataWeather)
|
weather = pbGetMetadata($game_map.map_id,MetadataWeather)
|
||||||
if $game_map.name!=mapinfos[oldid].name
|
if $game_map.name!=mapinfos[oldid].name
|
||||||
$game_screen.weather(weather[0],8,20) if weather && rand(100)<weather[1]
|
$game_screen.weather(weather[0],8,20) if weather && rand(100)<weather[1]
|
||||||
@@ -472,7 +472,7 @@ Events.onMapSceneChange += proc { |_sender,e|
|
|||||||
nosignpost = true if NO_SIGNPOSTS[2*i+1]==$PokemonGlobal.mapTrail[1] && NO_SIGNPOSTS[2*i]==$game_map.map_id
|
nosignpost = true if NO_SIGNPOSTS[2*i+1]==$PokemonGlobal.mapTrail[1] && NO_SIGNPOSTS[2*i]==$game_map.map_id
|
||||||
break if nosignpost
|
break if nosignpost
|
||||||
end
|
end
|
||||||
mapinfos = $RPGVX ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata")
|
mapinfos = load_data("Data/MapInfos.rxdata")
|
||||||
oldmapname = mapinfos[$PokemonGlobal.mapTrail[1]].name
|
oldmapname = mapinfos[$PokemonGlobal.mapTrail[1]].name
|
||||||
nosignpost = true if $game_map.name==oldmapname
|
nosignpost = true if $game_map.name==oldmapname
|
||||||
end
|
end
|
||||||
@@ -1197,13 +1197,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Game_Interpreter
|
|
||||||
include InterpreterFieldMixin
|
|
||||||
eval(InterpreterFieldMixin::CustomEventCommands)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Audio playing
|
# Audio playing
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|||||||
@@ -625,12 +625,8 @@ end
|
|||||||
# Blacking out animation
|
# Blacking out animation
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
def pbRxdataExists?(file)
|
def pbRxdataExists?(file)
|
||||||
if $RPGVX
|
|
||||||
return pbRgssExists?(file+".rvdata")
|
|
||||||
else
|
|
||||||
return pbRgssExists?(file+".rxdata")
|
return pbRgssExists?(file+".rxdata")
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def pbStartOver(gameover=false)
|
def pbStartOver(gameover=false)
|
||||||
if pbInBugContest?
|
if pbInBugContest?
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ end
|
|||||||
Events.onMapChange += proc { |_sender,e|
|
Events.onMapChange += proc { |_sender,e|
|
||||||
oldMapID = e[0]
|
oldMapID = e[0]
|
||||||
# Get and compare map names
|
# Get and compare map names
|
||||||
mapInfos = $RPGVX ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata")
|
mapInfos = load_data("Data/MapInfos.rxdata")
|
||||||
next if mapInfos && oldMapID>0 && mapInfos[oldMapID] &&
|
next if mapInfos && oldMapID>0 && mapInfos[oldMapID] &&
|
||||||
mapInfos[oldMapID].name && $game_map.name==mapInfos[oldMapID].name
|
mapInfos[oldMapID].name && $game_map.name==mapInfos[oldMapID].name
|
||||||
# Make roaming Pokémon roam
|
# Make roaming Pokémon roam
|
||||||
|
|||||||
@@ -259,8 +259,7 @@ class PokemonLoadScreen
|
|||||||
savefile = RTP.getSaveFileName("Game.rxdata")
|
savefile = RTP.getSaveFileName("Game.rxdata")
|
||||||
FontInstaller.install
|
FontInstaller.install
|
||||||
data_system = pbLoadRxData("Data/System")
|
data_system = pbLoadRxData("Data/System")
|
||||||
mapfile = ($RPGVX) ? sprintf("Data/Map%03d.rvdata",data_system.start_map_id) :
|
mapfile = sprintf("Data/Map%03d.rxdata",data_system.start_map_id)
|
||||||
sprintf("Data/Map%03d.rxdata",data_system.start_map_id)
|
|
||||||
if data_system.start_map_id==0 || !pbRgssExists?(mapfile)
|
if data_system.start_map_id==0 || !pbRgssExists?(mapfile)
|
||||||
pbMessage(_INTL("No starting position was set in the map editor.\1"))
|
pbMessage(_INTL("No starting position was set in the map editor.\1"))
|
||||||
pbMessage(_INTL("The game cannot continue."))
|
pbMessage(_INTL("The game cannot continue."))
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# Abstraction layer for RPG Maker XP/VX
|
# Abstraction layer for RPG Maker XP
|
||||||
# Won't be used if $PokemonBag exists
|
# Won't be used if $PokemonBag exists
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class RpgxpMartAdapter
|
class RpgxpMartAdapter
|
||||||
@@ -894,33 +894,3 @@ class Interpreter
|
|||||||
setPrice(item,-1,sellprice)
|
setPrice(item,-1,sellprice)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Game_Interpreter
|
|
||||||
def getItem(p)
|
|
||||||
if p[0]==0; return $data_items[p[1]]
|
|
||||||
elsif p[0]==1; return $data_weapons[p[1]]
|
|
||||||
elsif p[0]==2; return $data_armors[p[1]]
|
|
||||||
end
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def command_302
|
|
||||||
shop_goods = [getItem(@params)]
|
|
||||||
# Loop
|
|
||||||
loop do
|
|
||||||
# Advance index
|
|
||||||
@index += 1
|
|
||||||
# If next event command has shop on second line or after
|
|
||||||
if @list[@index].code == 605
|
|
||||||
# Add goods list to new item
|
|
||||||
shop_goods.push(getItem(@list[@index].parameters))
|
|
||||||
else
|
|
||||||
# End
|
|
||||||
pbPokemonMart(shop_goods.compact,nil,@params[2])
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|||||||
@@ -9,12 +9,8 @@ def pbSafeLoad(file)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbLoadRxData(file) # :nodoc:
|
def pbLoadRxData(file) # :nodoc:
|
||||||
if $RPGVX
|
|
||||||
return load_data(file+".rvdata")
|
|
||||||
else
|
|
||||||
return load_data(file+".rxdata")
|
return load_data(file+".rxdata")
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def pbChooseLanguage
|
def pbChooseLanguage
|
||||||
commands=[]
|
commands=[]
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand
|
|||||||
# roaming
|
# roaming
|
||||||
curmap = $PokemonGlobal.roamPosition[index]
|
curmap = $PokemonGlobal.roamPosition[index]
|
||||||
if curmap
|
if curmap
|
||||||
mapinfos = ($RPGVX) ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata")
|
mapinfos = load_data("Data/MapInfos.rxdata")
|
||||||
status = "[ROAMING][#{curmap}: #{mapinfos[curmap].name}]"
|
status = "[ROAMING][#{curmap}: #{mapinfos[curmap].name}]"
|
||||||
else
|
else
|
||||||
status = "[ROAMING][map not set]"
|
status = "[ROAMING][map not set]"
|
||||||
|
|||||||
@@ -652,21 +652,13 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
def pbCompileAnimations
|
def pbCompileAnimations
|
||||||
begin
|
begin
|
||||||
if $RPGVX
|
|
||||||
pbanims = load_data("Data/PkmnAnimations.rvdata")
|
|
||||||
else
|
|
||||||
pbanims = load_data("Data/PkmnAnimations.rxdata")
|
pbanims = load_data("Data/PkmnAnimations.rxdata")
|
||||||
end
|
|
||||||
rescue
|
rescue
|
||||||
pbanims = PBAnimations.new
|
pbanims = PBAnimations.new
|
||||||
end
|
end
|
||||||
move2anim = [[],[]]
|
move2anim = [[],[]]
|
||||||
=begin
|
=begin
|
||||||
if $RPGVX
|
|
||||||
anims = load_data("Data/Animations.rvdata")
|
|
||||||
else
|
|
||||||
anims = load_data("Data/Animations.rxdata")
|
anims = load_data("Data/Animations.rxdata")
|
||||||
end
|
|
||||||
for anim in anims
|
for anim in anims
|
||||||
next if !anim || anim.frames.length==1
|
next if !anim || anim.frames.length==1
|
||||||
found = false
|
found = false
|
||||||
|
|||||||
@@ -6,14 +6,10 @@ def pbImportNewMaps
|
|||||||
mapfiles = {}
|
mapfiles = {}
|
||||||
# Get IDs of all maps in the Data folder
|
# Get IDs of all maps in the Data folder
|
||||||
Dir.chdir("Data") {
|
Dir.chdir("Data") {
|
||||||
mapData = sprintf("Map*.%s",$RPGVX ? "rvdata" : "rxdata")
|
mapData = sprintf("Map*.rxdata")
|
||||||
for map in Dir.glob(mapData)
|
for map in Dir.glob(mapData)
|
||||||
if $RPGVX
|
|
||||||
mapfiles[$1.to_i(10)] = true if map[/map(\d+)\.rvdata/i]
|
|
||||||
else
|
|
||||||
mapfiles[$1.to_i(10)] = true if map[/map(\d+)\.rxdata/i]
|
mapfiles[$1.to_i(10)] = true if map[/map(\d+)\.rxdata/i]
|
||||||
end
|
end
|
||||||
end
|
|
||||||
}
|
}
|
||||||
mapinfos = pbLoadRxData("Data/MapInfos")
|
mapinfos = pbLoadRxData("Data/MapInfos")
|
||||||
maxOrder = 0
|
maxOrder = 0
|
||||||
@@ -38,11 +34,7 @@ def pbImportNewMaps
|
|||||||
count += 1
|
count += 1
|
||||||
end
|
end
|
||||||
if imported
|
if imported
|
||||||
if $RPGVX
|
|
||||||
save_data(mapinfos,"Data/MapInfos.rvdata")
|
|
||||||
else
|
|
||||||
save_data(mapinfos,"Data/MapInfos.rxdata")
|
save_data(mapinfos,"Data/MapInfos.rxdata")
|
||||||
end
|
|
||||||
pbMessage(_INTL("{1} new map(s) copied to the Data folder were successfully imported.",count))
|
pbMessage(_INTL("{1} new map(s) copied to the Data folder were successfully imported.",count))
|
||||||
end
|
end
|
||||||
return imported
|
return imported
|
||||||
@@ -121,10 +113,6 @@ def pbPushText(list,text,indent=0)
|
|||||||
textsplit = text.split(/\\m/)
|
textsplit = text.split(/\\m/)
|
||||||
for t in textsplit
|
for t in textsplit
|
||||||
first = true
|
first = true
|
||||||
if $RPGVX
|
|
||||||
list.push(RPG::EventCommand.new(101,indent,["",0,0,2]))
|
|
||||||
first = false
|
|
||||||
end
|
|
||||||
textsplit2 = t.split(/\n/)
|
textsplit2 = t.split(/\n/)
|
||||||
for i in 0...textsplit2.length
|
for i in 0...textsplit2.length
|
||||||
textchunk = textsplit2[i].gsub(/\s+$/,"")
|
textchunk = textsplit2[i].gsub(/\s+$/,"")
|
||||||
@@ -265,9 +253,7 @@ class MapData
|
|||||||
end
|
end
|
||||||
|
|
||||||
def mapFilename(mapID)
|
def mapFilename(mapID)
|
||||||
filename = sprintf("Data/map%03d",mapID)
|
return sprintf("Data/Map%03d.rxdata",mapID)
|
||||||
filename += ($RPGVX) ? ".rvdata" : ".rxdata"
|
|
||||||
return filename
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def getMap(mapID)
|
def getMap(mapID)
|
||||||
@@ -322,7 +308,6 @@ class MapData
|
|||||||
end
|
end
|
||||||
|
|
||||||
def isPassable?(mapID,x,y)
|
def isPassable?(mapID,x,y)
|
||||||
return true if $RPGVX
|
|
||||||
map = getMap(mapID)
|
map = getMap(mapID)
|
||||||
return false if !map
|
return false if !map
|
||||||
return false if x<0 || x>=map.width || y<0 || y>=map.height
|
return false if x<0 || x>=map.width || y<0 || y>=map.height
|
||||||
@@ -343,7 +328,6 @@ class MapData
|
|||||||
end
|
end
|
||||||
|
|
||||||
def isCounterTile?(mapID,x,y)
|
def isCounterTile?(mapID,x,y)
|
||||||
return false if $RPGVX
|
|
||||||
map = getMap(mapID)
|
map = getMap(mapID)
|
||||||
return false if !map
|
return false if !map
|
||||||
passages = getTilesetPassages(map,mapID)
|
passages = getTilesetPassages(map,mapID)
|
||||||
@@ -361,7 +345,6 @@ class MapData
|
|||||||
end
|
end
|
||||||
|
|
||||||
def setCounterTile(mapID,x,y)
|
def setCounterTile(mapID,x,y)
|
||||||
return if $RPGVX
|
|
||||||
map = getMap(mapID)
|
map = getMap(mapID)
|
||||||
return if !map
|
return if !map
|
||||||
passages = getTilesetPassages(map,mapID)
|
passages = getTilesetPassages(map,mapID)
|
||||||
@@ -390,11 +373,9 @@ class MapData
|
|||||||
end
|
end
|
||||||
|
|
||||||
def saveTilesets
|
def saveTilesets
|
||||||
filename = "Data/Tilesets"
|
filename = "Data/Tilesets.rxdata"
|
||||||
filename += ($RPGVX) ? ".rvdata" : ".rxdata"
|
|
||||||
save_data(@tilesets,filename)
|
save_data(@tilesets,filename)
|
||||||
filename = "Data/System"
|
filename = "Data/System.rxdata"
|
||||||
filename += ($RPGVX) ? ".rvdata" : ".rxdata"
|
|
||||||
save_data(@system,filename)
|
save_data(@system,filename)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1455,11 +1436,5 @@ def pbCompileTrainerEvents(_mustcompile)
|
|||||||
commonEvents[key] = newevent; changed = true
|
commonEvents[key] = newevent; changed = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if changed
|
save_data(commonEvents,"Data/CommonEvents.rxdata") if changed
|
||||||
if $RPGVX
|
|
||||||
save_data(commonEvents,"Data/CommonEvents.rvdata")
|
|
||||||
else
|
|
||||||
save_data(commonEvents,"Data/CommonEvents.rxdata")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user