mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-25 15:55:59 +00:00
Merge branch 'master' into dev
This commit is contained in:
@@ -576,11 +576,17 @@ module PluginManager
|
|||||||
next if !plugins[o] || !plugins[o][:dependencies]
|
next if !plugins[o] || !plugins[o][:dependencies]
|
||||||
# go through all dependencies
|
# go through all dependencies
|
||||||
for dname in plugins[o][:dependencies]
|
for dname in plugins[o][:dependencies]
|
||||||
|
optional = false
|
||||||
# clean the name to a simple string
|
# clean the name to a simple string
|
||||||
dname = dname[0] if dname.is_a?(Array) && dname.length == 2
|
if dname.is_a?(Array)
|
||||||
dname = dname[1] if dname.is_a?(Array) && dname.length == 3
|
optional = [:optional,:optional_exact].include?(dname[0])
|
||||||
|
dname = dname[dname.length - 2]
|
||||||
|
end
|
||||||
# catch missing dependency
|
# catch missing dependency
|
||||||
self.error("Plugin '#{o}' requires plugin '#{dname}' to work properly.") if !order.include?(dname)
|
if !order.include?(dname)
|
||||||
|
next if optional
|
||||||
|
self.error("Plugin '#{o}' requires plugin '#{dname}' to work properly.")
|
||||||
|
end
|
||||||
# skip if already sorted
|
# skip if already sorted
|
||||||
next if order.index(dname) > order.index(o)
|
next if order.index(dname) > order.index(o)
|
||||||
# catch looping dependency issue
|
# catch looping dependency issue
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ class PokemonEncounters
|
|||||||
if favored_type
|
if favored_type
|
||||||
new_enc_list = []
|
new_enc_list = []
|
||||||
enc_list.each do |enc|
|
enc_list.each do |enc|
|
||||||
species_data = GameData::Species.get(enc[0])
|
species_data = GameData::Species.get(enc[1])
|
||||||
t1 = species_data.type1
|
t1 = species_data.type1
|
||||||
t2 = species_data.type2
|
t2 = species_data.type2
|
||||||
new_enc_list.push(enc) if t1 == favored_type || t2 == favored_type
|
new_enc_list.push(enc) if t1 == favored_type || t2 == favored_type
|
||||||
|
|||||||
Reference in New Issue
Block a user