mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
update 6.7
This commit is contained in:
@@ -33,40 +33,34 @@ class Game_Player < Game_Character
|
||||
return moving? && !@move_route_forcing && pbCanRun?
|
||||
end
|
||||
|
||||
#Override the player's graphics
|
||||
# Path from Graphics/Characters/player/
|
||||
def setPlayerGraphicsOverride(path)
|
||||
@defaultCharacterName=path
|
||||
|
||||
end
|
||||
def removeGraphicsOverride
|
||||
@defaultCharacterName = ""
|
||||
end
|
||||
|
||||
def hasGraphicsOverride?
|
||||
return @defaultCharacterName!=""
|
||||
end
|
||||
|
||||
def character_name
|
||||
@defaultCharacterName = "" if !@defaultCharacterName
|
||||
return @defaultCharacterName if @defaultCharacterName!=""
|
||||
return @defaultCharacterName if hasGraphicsOverride?
|
||||
if !@move_route_forcing && $Trainer.character_ID>=0
|
||||
meta = GameData::Metadata.get_player($Trainer.character_ID)
|
||||
if meta && !$PokemonGlobal.bicycle && !$PokemonGlobal.diving && !$PokemonGlobal.surfing
|
||||
charset = 1 # Display normal character sprite
|
||||
|
||||
|
||||
player_is_moving = moving?
|
||||
if pbCanRun? && (player_is_moving || @wasmoving) && Input.dir4!=0 && meta[4] && meta[4]!=""
|
||||
charset = 4 # Display running character sprite
|
||||
end
|
||||
|
||||
newCharName = pbGetPlayerCharset(meta,charset)
|
||||
|
||||
if newCharName
|
||||
# echoln caller
|
||||
# echoln newCharName
|
||||
# echoln "moving: " + moving?.to_s
|
||||
# echoln "was moving: " + @wasmoving.to_s
|
||||
#
|
||||
# echoln "can run: " + pbCanRun?.to_s
|
||||
# echoln "Input.dir4 " + Input.dir4.to_s
|
||||
#
|
||||
#
|
||||
# echoln (moving? || @wasmoving)
|
||||
# echoln charset
|
||||
# echoln ""
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
@character_name = newCharName if newCharName
|
||||
@wasmoving = player_is_moving
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user