mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Replaced get_character(0) with get_self
This commit is contained in:
@@ -277,7 +277,7 @@ class Game_System
|
|||||||
def update
|
def update
|
||||||
@timer -= 1 if @timer_working && @timer>0
|
@timer -= 1 if @timer_working && @timer>0
|
||||||
if Input.trigger?(Input::SPECIAL) && pbCurrentEventCommentInput(1,"Cut Scene")
|
if Input.trigger?(Input::SPECIAL) && pbCurrentEventCommentInput(1,"Cut Scene")
|
||||||
event = @map_interpreter.get_character(0)
|
event = @map_interpreter.get_self
|
||||||
@map_interpreter.pbSetSelfSwitch(event.id,"A",true)
|
@map_interpreter.pbSetSelfSwitch(event.id,"A",true)
|
||||||
@map_interpreter.command_end
|
@map_interpreter.command_end
|
||||||
event.start
|
event.start
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ end
|
|||||||
|
|
||||||
def pbCurrentEventCommentInput(elements,trigger)
|
def pbCurrentEventCommentInput(elements,trigger)
|
||||||
return nil if !pbMapInterpreterRunning?
|
return nil if !pbMapInterpreterRunning?
|
||||||
event = pbMapInterpreter.get_character(0)
|
event = pbMapInterpreter.get_self
|
||||||
return nil if !event
|
return nil if !event
|
||||||
return pbEventCommentInput(event,elements,trigger)
|
return pbEventCommentInput(event,elements,trigger)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -478,7 +478,7 @@ def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
|
|||||||
if !$game_temp.waiting_trainer && pbMapInterpreterRunning? &&
|
if !$game_temp.waiting_trainer && pbMapInterpreterRunning? &&
|
||||||
($player.able_pokemon_count > 1 ||
|
($player.able_pokemon_count > 1 ||
|
||||||
($player.able_pokemon_count > 0 && $PokemonGlobal.partner))
|
($player.able_pokemon_count > 0 && $PokemonGlobal.partner))
|
||||||
thisEvent = pbMapInterpreter.get_character(0)
|
thisEvent = pbMapInterpreter.get_self
|
||||||
# Find all other triggered trainer events
|
# Find all other triggered trainer events
|
||||||
triggeredEvents = $game_player.pbTriggeredTrainerEvents([2],false)
|
triggeredEvents = $game_player.pbTriggeredTrainerEvents([2],false)
|
||||||
otherEvent = []
|
otherEvent = []
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ Events.onSpritesetCreate += proc { |_sender, e|
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
def pbBerryPlant
|
def pbBerryPlant
|
||||||
interp = pbMapInterpreter
|
interp = pbMapInterpreter
|
||||||
this_event = interp.get_character(0)
|
this_event = interp.get_self
|
||||||
berry_plant = interp.getVariable
|
berry_plant = interp.getVariable
|
||||||
if !berry_plant
|
if !berry_plant
|
||||||
berry_plant = BerryPlantData.new
|
berry_plant = BerryPlantData.new
|
||||||
@@ -460,7 +460,7 @@ def pbPickBerry(berry, qty = 1)
|
|||||||
else
|
else
|
||||||
pbMessage(_INTL("The soil returned to its soft and loamy state."))
|
pbMessage(_INTL("The soil returned to its soft and loamy state."))
|
||||||
end
|
end
|
||||||
this_event = pbMapInterpreter.get_character(0)
|
this_event = pbMapInterpreter.get_self
|
||||||
pbSetSelfSwitch(this_event.id, "A", true)
|
pbSetSelfSwitch(this_event.id, "A", true)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ module Compiler
|
|||||||
['pbDayCareChoose', 'DayCare.choose'],
|
['pbDayCareChoose', 'DayCare.choose'],
|
||||||
['pbDayCareGetCompatibility', 'DayCare.get_compatibility'],
|
['pbDayCareGetCompatibility', 'DayCare.get_compatibility'],
|
||||||
['pbEggGenerated?', 'DayCare.egg_generated?'],
|
['pbEggGenerated?', 'DayCare.egg_generated?'],
|
||||||
['pbDayCareGenerateEgg', 'DayCare.collect_egg']
|
['pbDayCareGenerateEgg', 'DayCare.collect_egg'],
|
||||||
|
['get_character(0)', 'get_self'],
|
||||||
|
['get_character(-1)', 'get_player']
|
||||||
]
|
]
|
||||||
|
|
||||||
module_function
|
module_function
|
||||||
@@ -216,7 +218,7 @@ module Compiler
|
|||||||
page.trigger = 3 # Autorun
|
page.trigger = 3 # Autorun
|
||||||
page.list.clear
|
page.list.clear
|
||||||
list = page.list
|
list = page.list
|
||||||
push_branch(list,"get_character(0).onEvent?")
|
push_branch(list,"get_self.onEvent?")
|
||||||
push_event(list,208,[0],1) # Change Transparent Flag
|
push_event(list,208,[0],1) # Change Transparent Flag
|
||||||
push_wait(list,6,1) # Wait
|
push_wait(list,6,1) # Wait
|
||||||
push_event(list,208,[1],1) # Change Transparent Flag
|
push_event(list,208,[1],1) # Change Transparent Flag
|
||||||
@@ -560,7 +562,7 @@ module Compiler
|
|||||||
introplay = sprintf("pbTrainerIntro(:%s)",trtype)
|
introplay = sprintf("pbTrainerIntro(:%s)",trtype)
|
||||||
# Write first page
|
# Write first page
|
||||||
push_script(firstpage.list,introplay) # pbTrainerIntro
|
push_script(firstpage.list,introplay) # pbTrainerIntro
|
||||||
push_script(firstpage.list,"pbNoticePlayer(get_character(0))")
|
push_script(firstpage.list,"pbNoticePlayer(get_self)")
|
||||||
push_text(firstpage.list,battles[0])
|
push_text(firstpage.list,battles[0])
|
||||||
if battles.length>1 # Has rematches
|
if battles.length>1 # Has rematches
|
||||||
push_script(firstpage.list,sprintf("pbTrainerCheck(%s,%d,%d)",safetrcombo,battles.length,battleid))
|
push_script(firstpage.list,sprintf("pbTrainerCheck(%s,%d,%d)",safetrcombo,battles.length,battleid))
|
||||||
@@ -580,7 +582,7 @@ module Compiler
|
|||||||
push_branch(firstpage.list,battleString)
|
push_branch(firstpage.list,battleString)
|
||||||
if battles.length>1 # Has rematches
|
if battles.length>1 # Has rematches
|
||||||
push_script(firstpage.list,
|
push_script(firstpage.list,
|
||||||
sprintf("pbPhoneRegisterBattle(_I(\"%s\"),get_character(0),%s,%d)",
|
sprintf("pbPhoneRegisterBattle(_I(\"%s\"),get_self,%s,%d)",
|
||||||
regspeech,safetrcombo,battles.length),1)
|
regspeech,safetrcombo,battles.length),1)
|
||||||
end
|
end
|
||||||
push_self_switch(firstpage.list,"A",true,1)
|
push_self_switch(firstpage.list,"A",true,1)
|
||||||
@@ -638,7 +640,7 @@ module Compiler
|
|||||||
push_text(lastpage.list,ebattle,1)
|
push_text(lastpage.list,ebattle,1)
|
||||||
end
|
end
|
||||||
push_script(lastpage.list,
|
push_script(lastpage.list,
|
||||||
sprintf("pbPhoneRegisterBattle(_I(\"%s\"),get_character(0),%s,%d)",
|
sprintf("pbPhoneRegisterBattle(_I(\"%s\"),get_self,%s,%d)",
|
||||||
regspeech,safetrcombo,battles.length),1)
|
regspeech,safetrcombo,battles.length),1)
|
||||||
push_exit(lastpage.list,1) # Exit Event Processing
|
push_exit(lastpage.list,1) # Exit Event Processing
|
||||||
push_branch_end(lastpage.list,1)
|
push_branch_end(lastpage.list,1)
|
||||||
@@ -650,7 +652,7 @@ module Compiler
|
|||||||
push_text(lastpage.list,ebattle)
|
push_text(lastpage.list,ebattle)
|
||||||
if battles.length>1
|
if battles.length>1
|
||||||
push_script(lastpage.list,
|
push_script(lastpage.list,
|
||||||
sprintf("pbPhoneRegisterBattle(_I(\"%s\"),get_character(0),%s,%d)",
|
sprintf("pbPhoneRegisterBattle(_I(\"%s\"),get_self,%s,%d)",
|
||||||
regspeech,safetrcombo,battles.length))
|
regspeech,safetrcombo,battles.length))
|
||||||
end
|
end
|
||||||
push_end(lastpage.list)
|
push_end(lastpage.list)
|
||||||
@@ -803,7 +805,7 @@ module Compiler
|
|||||||
# Rewrite last page
|
# Rewrite last page
|
||||||
list = lastPage.list
|
list = lastPage.list
|
||||||
list.clear
|
list.clear
|
||||||
push_branch(list,"get_character(0).onEvent?") # Conditional Branch
|
push_branch(list,"get_self.onEvent?") # Conditional Branch
|
||||||
push_event(list,208,[0],1) # Change Transparent Flag (invisible)
|
push_event(list,208,[0],1) # Change Transparent Flag (invisible)
|
||||||
push_script(list, "Followers.hide_followers", 1)
|
push_script(list, "Followers.hide_followers", 1)
|
||||||
push_move_route_and_wait(list,0,[ # Move Route for setting door to open
|
push_move_route_and_wait(list,0,[ # Move Route for setting door to open
|
||||||
|
|||||||
Reference in New Issue
Block a user