mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Added checks that prevent aliasing a method if the alias method already exists, fixed Symbiosis not working properly for opponents
This commit is contained in:
@@ -41,9 +41,9 @@ end
|
||||
|
||||
|
||||
class Spriteset_Map
|
||||
alias _animationSprite_initialize initialize
|
||||
alias _animationSprite_update update
|
||||
alias _animationSprite_dispose dispose
|
||||
alias _animationSprite_initialize initialize unless method_defined?(:_animationSprite_initialize)
|
||||
alias _animationSprite_update update unless method_defined?(:_animationSprite_update)
|
||||
alias _animationSprite_dispose dispose unless method_defined?(:_animationSprite_dispose)
|
||||
|
||||
def initialize(map = nil)
|
||||
@usersprites = []
|
||||
|
||||
@@ -123,7 +123,7 @@ end
|
||||
# ? CLASS Sprite_Character edit
|
||||
#===================================================
|
||||
class Sprite_Character < RPG::Sprite
|
||||
alias shadow_initialize initialize
|
||||
alias shadow_initialize initialize unless method_defined?(:shadow_initialize)
|
||||
|
||||
def initialize(viewport, character = nil)
|
||||
@ombrelist = []
|
||||
@@ -153,7 +153,7 @@ class Sprite_Character < RPG::Sprite
|
||||
@ombrelist.clear
|
||||
end
|
||||
|
||||
alias shadow_update update
|
||||
alias shadow_update update unless method_defined?(:shadow_update)
|
||||
|
||||
def update
|
||||
shadow_update
|
||||
@@ -178,7 +178,8 @@ end
|
||||
class Spriteset_Map
|
||||
attr_accessor :shadows
|
||||
|
||||
alias shadow_initialize initialize
|
||||
alias shadow_initialize initialize unless method_defined?(:shadow_initialize)
|
||||
|
||||
def initialize(map = nil)
|
||||
@shadows = []
|
||||
warn = false
|
||||
|
||||
@@ -566,7 +566,8 @@ end
|
||||
class Game_Event < Game_Character
|
||||
attr_accessor :pe_refresh
|
||||
|
||||
alias nf_particles_game_map_initialize initialize
|
||||
alias nf_particles_game_map_initialize initialize unless method_defined?(:nf_particles_game_map_initialize)
|
||||
|
||||
def initialize(map_id, event, map = nil)
|
||||
@pe_refresh = false
|
||||
begin
|
||||
@@ -576,7 +577,8 @@ class Game_Event < Game_Character
|
||||
end
|
||||
end
|
||||
|
||||
alias nf_particles_game_map_refresh refresh
|
||||
alias nf_particles_game_map_refresh refresh unless method_defined?(:nf_particles_game_map_refresh)
|
||||
|
||||
def refresh
|
||||
nf_particles_game_map_refresh
|
||||
@pe_refresh = true
|
||||
|
||||
Reference in New Issue
Block a user