mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 14:26:01 +00:00
Wrote a generalised data property editor that deals with a list of things from a GameData module, allowed the WildItem properties for species to contain multiple items each
This commit is contained in:
@@ -824,9 +824,9 @@ module Compiler
|
||||
:egg_moves => contents["EggMoves"] || base_data.egg_moves.clone,
|
||||
:abilities => contents["Abilities"] || base_data.abilities.clone,
|
||||
:hidden_abilities => contents["HiddenAbilities"] || contents["HiddenAbility"] || base_data.hidden_abilities.clone,
|
||||
:wild_item_common => contents["WildItemCommon"] || base_data.wild_item_common,
|
||||
:wild_item_uncommon => contents["WildItemUncommon"] || base_data.wild_item_uncommon,
|
||||
:wild_item_rare => contents["WildItemRare"] || base_data.wild_item_rare,
|
||||
:wild_item_common => contents["WildItemCommon"] || base_data.wild_item_common.clone,
|
||||
:wild_item_uncommon => contents["WildItemUncommon"] || base_data.wild_item_uncommon.clone,
|
||||
:wild_item_rare => contents["WildItemRare"] || base_data.wild_item_rare.clone,
|
||||
:egg_groups => contents["EggGroups"] || contents["Compatibility"] || base_data.egg_groups.clone,
|
||||
:hatch_steps => contents["HatchSteps"] || contents["StepsToHatch"] || base_data.hatch_steps,
|
||||
:incense => base_data.incense,
|
||||
@@ -847,7 +847,9 @@ module Compiler
|
||||
# If form is single-typed, ensure it remains so if base species is dual-typed
|
||||
species_hash[:type2] = contents["Type1"] if contents["Type1"] && !contents["Type2"]
|
||||
# If form has any wild items, ensure none are inherited from base species
|
||||
if contents["WildItemCommon"] || contents["WildItemUncommon"] || contents["WildItemRare"]
|
||||
if (contents["WildItemCommon"] && !contents["WildItemCommon"].empty?) ||
|
||||
(contents["WildItemUncommon"] && !contents["WildItemUncommon"].empty?) ||
|
||||
(contents["WildItemRare"] && !contents["WildItemRare"].empty?)
|
||||
species_hash[:wild_item_common] = contents["WildItemCommon"]
|
||||
species_hash[:wild_item_uncommon] = contents["WildItemUncommon"]
|
||||
species_hash[:wild_item_rare] = contents["WildItemRare"]
|
||||
|
||||
@@ -329,9 +329,9 @@ module Compiler
|
||||
f.write(sprintf("FormName = %s\r\n", species.real_form_name)) if species.real_form_name && !species.real_form_name.empty?
|
||||
f.write(sprintf("Generation = %d\r\n", species.generation)) if species.generation != 0
|
||||
f.write(sprintf("Flags = %s\r\n", species.flags.join(","))) if species.flags.length > 0
|
||||
f.write(sprintf("WildItemCommon = %s\r\n", species.wild_item_common)) if species.wild_item_common
|
||||
f.write(sprintf("WildItemUncommon = %s\r\n", species.wild_item_uncommon)) if species.wild_item_uncommon
|
||||
f.write(sprintf("WildItemRare = %s\r\n", species.wild_item_rare)) if species.wild_item_rare
|
||||
f.write(sprintf("WildItemCommon = %s\r\n", species.wild_item_common.join(","))) if species.wild_item_common.length > 0
|
||||
f.write(sprintf("WildItemUncommon = %s\r\n", species.wild_item_uncommon.join(","))) if species.wild_item_uncommon.length > 0
|
||||
f.write(sprintf("WildItemRare = %s\r\n", species.wild_item_rare.join(","))) if species.wild_item_rare.length > 0
|
||||
if species.evolutions.any? { |evo| !evo[3] }
|
||||
f.write("Evolutions = ")
|
||||
need_comma = false
|
||||
@@ -431,9 +431,9 @@ module Compiler
|
||||
if species.wild_item_common != base_species.wild_item_common ||
|
||||
species.wild_item_uncommon != base_species.wild_item_uncommon ||
|
||||
species.wild_item_rare != base_species.wild_item_rare
|
||||
f.write(sprintf("WildItemCommon = %s\r\n", species.wild_item_common)) if species.wild_item_common
|
||||
f.write(sprintf("WildItemUncommon = %s\r\n", species.wild_item_uncommon)) if species.wild_item_uncommon
|
||||
f.write(sprintf("WildItemRare = %s\r\n", species.wild_item_rare)) if species.wild_item_rare
|
||||
f.write(sprintf("WildItemCommon = %s\r\n", species.wild_item_common.join(","))) if species.wild_item_common.length > 0
|
||||
f.write(sprintf("WildItemUncommon = %s\r\n", species.wild_item_uncommon.join(","))) if species.wild_item_uncommon.length > 0
|
||||
f.write(sprintf("WildItemRare = %s\r\n", species.wild_item_rare.join(","))) if species.wild_item_rare.length > 0
|
||||
end
|
||||
if species.evolutions != base_species.evolutions && species.evolutions.any? { |evo| !evo[3] }
|
||||
f.write("Evolutions = ")
|
||||
|
||||
Reference in New Issue
Block a user