mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Removed all excess whitespace and standardized line endings.
This commit is contained in:
@@ -114,7 +114,7 @@ def pbCompileConnections
|
||||
record.push(csvInt!(thisline,lineno))
|
||||
record.push(csvInt!(thisline,lineno))
|
||||
record.push(csvEnumFieldOrInt!(thisline,hashenum,"",sprintf("(line %d)",lineno)))
|
||||
record.push(csvInt!(thisline,lineno))
|
||||
record.push(csvInt!(thisline,lineno))
|
||||
if !pbRgssExists?(sprintf("Data/Map%03d.rxdata",record[0])) &&
|
||||
!pbRgssExists?(sprintf("Data/Map%03d.rvdata",record[0]))
|
||||
print _INTL("Warning: Map {1}, as mentioned in the map connection data, was not found.\r\n{2}",record[0],FileLineData.linereport)
|
||||
@@ -173,22 +173,22 @@ def pbCompilePhoneData
|
||||
database.generics=section
|
||||
sections.concat(section)
|
||||
when "<BattleRequests>"
|
||||
database.battleRequests=section
|
||||
database.battleRequests=section
|
||||
sections.concat(section)
|
||||
when "<GreetingsMorning>"
|
||||
database.greetingsMorning=section
|
||||
database.greetingsMorning=section
|
||||
sections.concat(section)
|
||||
when "<GreetingsEvening>"
|
||||
database.greetingsEvening=section
|
||||
database.greetingsEvening=section
|
||||
sections.concat(section)
|
||||
when "<Greetings>"
|
||||
database.greetings=section
|
||||
sections.concat(section)
|
||||
when "<Bodies1>"
|
||||
database.bodies1=section
|
||||
database.bodies1=section
|
||||
sections.concat(section)
|
||||
when "<Bodies2>"
|
||||
database.bodies2=section
|
||||
database.bodies2=section
|
||||
sections.concat(section)
|
||||
end
|
||||
}
|
||||
@@ -496,7 +496,7 @@ class ItemList
|
||||
def initialize; @list = []; end
|
||||
def length; @list.length; end
|
||||
def []=(x,v); @list[x] = v; end
|
||||
|
||||
|
||||
def [](x)
|
||||
if !@list[x]
|
||||
defrecord = SerialRecord.new
|
||||
@@ -1462,7 +1462,7 @@ def pbCompileTrainers
|
||||
case settingname
|
||||
when "Pokemon"
|
||||
if record[1]>mLevel
|
||||
raise _INTL("Bad level: {1} (must be 1-{2})\r\n{3}",record[1],mLevel,FileLineData.linereport)
|
||||
raise _INTL("Bad level: {1} (must be 1-{2})\r\n{3}",record[1],mLevel,FileLineData.linereport)
|
||||
end
|
||||
when "Moves"
|
||||
record = [record] if record.is_a?(Integer)
|
||||
@@ -1566,7 +1566,7 @@ def pbCompileTrainers
|
||||
case i
|
||||
when TPLEVEL
|
||||
if record[i]>mLevel
|
||||
raise _INTL("Bad level: {1} (must be 1-{2})\r\n{3}",record[i],mLevel,FileLineData.linereport)
|
||||
raise _INTL("Bad level: {1} (must be 1-{2})\r\n{3}",record[i],mLevel,FileLineData.linereport)
|
||||
end
|
||||
when TPABILITY+3
|
||||
if record[i]>5
|
||||
@@ -1641,9 +1641,9 @@ def pbCompileBTTrainers(filename)
|
||||
schema = requiredtypes[key]
|
||||
next if !schema
|
||||
record = pbGetCsvRecord(section[key],0,schema)
|
||||
rsection[schema[0]] = record
|
||||
rsection[schema[0]] = record
|
||||
end
|
||||
trainernames.push(rsection[1])
|
||||
trainernames.push(rsection[1])
|
||||
beginspeech.push(rsection[2])
|
||||
endspeechwin.push(rsection[3])
|
||||
endspeechlose.push(rsection[4])
|
||||
@@ -1690,7 +1690,7 @@ def pbCompileTrainerLists
|
||||
next if key=="Challenges" && name=="DefaultTrainerList"
|
||||
next if !schema
|
||||
record = pbGetCsvRecord(section[key],0,schema)
|
||||
rsection[schema[0]] = record
|
||||
rsection[schema[0]] = record
|
||||
end
|
||||
if !rsection[0]
|
||||
raise _INTL("No trainer data file given in section {1}\r\n{2}",name,FileLineData.linereport)
|
||||
@@ -1724,4 +1724,4 @@ def pbCompileTrainerLists
|
||||
}
|
||||
}
|
||||
save_data(sections,"Data/trainer_lists.dat")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -41,7 +41,7 @@ def pbImportNewMaps
|
||||
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))
|
||||
end
|
||||
@@ -202,7 +202,7 @@ def pbAddPassageList(event,mapData)
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
def safequote(x)
|
||||
x = x.gsub(/\"\#\'\\/) { |a| "\\"+a }
|
||||
@@ -236,13 +236,13 @@ def pbEachPage(e)
|
||||
yield e
|
||||
else
|
||||
e.pages.each { |page| yield page }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class MapData
|
||||
attr_reader :mapinfos
|
||||
@@ -400,7 +400,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class TrainerChecker
|
||||
def initialize
|
||||
@@ -411,15 +411,15 @@ class TrainerChecker
|
||||
|
||||
def pbTrainerTypeCheck(symbol)
|
||||
ret = true
|
||||
if $DEBUG
|
||||
if $DEBUG
|
||||
return if @dontaskagain
|
||||
if !hasConst?(PBTrainers,symbol)
|
||||
ret = false
|
||||
else
|
||||
trtype = PBTrainers.const_get(symbol)
|
||||
@trainertypes = load_data("Data/trainer_types.dat") if !@trainertypes
|
||||
ret = false if !@trainertypes || !@trainertypes[trtype]
|
||||
end
|
||||
ret = false if !@trainertypes || !@trainertypes[trtype]
|
||||
end
|
||||
if !ret
|
||||
if pbConfirmMessage(_INTL("Add new trainer named {1}?",symbol))
|
||||
pbTrainerTypeEditorNew(symbol.to_s)
|
||||
@@ -430,7 +430,7 @@ class TrainerChecker
|
||||
# pbMapInterpreter.command_end rescue nil
|
||||
# end
|
||||
end
|
||||
end
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
@@ -490,7 +490,7 @@ def pbConvertToTrainerEvent(event,trainerChecker)
|
||||
firstpage.trigger = 2 # On event touch
|
||||
firstpage.list = [] # Clear page's commands
|
||||
# Rename the event if there's nothing above the trainer comments
|
||||
if isFirstCommand
|
||||
if isFirstCommand
|
||||
if !event.name[/trainer/i]
|
||||
ret.name = "Trainer(3)"
|
||||
elsif event.name[/^\s*trainer\s+\((\d+)\)\s*$/i]
|
||||
@@ -1002,7 +1002,7 @@ def pbFixEventUse(event,mapID,mapData)
|
||||
# repurposed, which is highly unlikely. It changes the Switch used
|
||||
# in the found event's condition to whichever is named
|
||||
# 's:tsOff?("A")'.
|
||||
if e && e.pages.length>=2 &&
|
||||
if e && e.pages.length>=2 &&
|
||||
e.pages[e.pages.length-1].condition.switch1_valid &&
|
||||
e.pages[e.pages.length-1].condition.switch1_id==22 &&
|
||||
mapData.switchName(e.pages[e.pages.length-1].condition.switch1_id)!='s:tsOff?("A")' &&
|
||||
@@ -1024,7 +1024,7 @@ def pbFixEventUse(event,mapID,mapData)
|
||||
# named 's:tsOff?("A")', it really does look like a door. Make this
|
||||
# command transfer the player on top of it rather than in front of
|
||||
# it.
|
||||
if e && e.pages.length>=2 &&
|
||||
if e && e.pages.length>=2 &&
|
||||
e.pages[e.pages.length-1].condition.switch1_valid &&
|
||||
mapData.switchName(e.pages[e.pages.length-1].condition.switch1_id)=='s:tsOff?("A")'
|
||||
# If this is really a door, move transfer target to it
|
||||
@@ -1039,7 +1039,7 @@ def pbFixEventUse(event,mapID,mapData)
|
||||
arr.push(list[_i]); list.delete_at(_i)
|
||||
while _i<list.length
|
||||
break if !list[_i] || list[_i].code!=509 # Set Move Route (continuation line)
|
||||
arr.push(list[_i]); list.delete_at(_i)
|
||||
arr.push(list[_i]); list.delete_at(_i)
|
||||
end
|
||||
end
|
||||
next arr
|
||||
@@ -1106,7 +1106,7 @@ def pbFixEventUse(event,mapID,mapData)
|
||||
# player's direction instead; make it do so and delete that Move
|
||||
# Route.
|
||||
elsif params[4]==0 && # Retain direction
|
||||
i+2<list.length &&
|
||||
i+2<list.length &&
|
||||
list[i+1].code==223 && # Change Screen Color Tone
|
||||
list[i+2].code==209 && # Set Move Route
|
||||
list[i+2].parameters[0]==-1
|
||||
@@ -1273,7 +1273,7 @@ def pbFixEventUse(event,mapID,mapData)
|
||||
if list[j].code!=0 && list[j].code!=411 # Else
|
||||
isempty = false
|
||||
break
|
||||
end
|
||||
end
|
||||
j += 1
|
||||
end
|
||||
if isempty
|
||||
@@ -1462,4 +1462,4 @@ def pbCompileTrainerEvents(mustcompile)
|
||||
save_data(commonEvents,"Data/CommonEvents.rxdata")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user