Minor tweaks to modeling private methods
This commit is contained in:
parent
90407403ba
commit
5264947608
1 changed files with 5 additions and 7 deletions
|
@ -63,12 +63,10 @@ class Pet::ModelingSnapshot
|
||||||
end
|
end
|
||||||
|
|
||||||
def items
|
def items
|
||||||
@items ||= begin
|
@items ||= @object_info_registry.map do |id, item_data|
|
||||||
@object_info_registry.map do |id, item_data|
|
Item.find_or_initialize_by(id:).tap do |item|
|
||||||
Item.find_or_initialize_by(id:).tap do |item|
|
item.add_origin_registry_info item_data
|
||||||
item.add_origin_registry_info item_data
|
item.swf_assets = item_assets_for id
|
||||||
item.swf_assets = item_assets_for id
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -98,7 +96,7 @@ class Pet::ModelingSnapshot
|
||||||
|
|
||||||
def alt_style_assets
|
def alt_style_assets
|
||||||
raise Pet::UnexpectedDataFormat if @custom_pet[:biology_by_zone].empty?
|
raise Pet::UnexpectedDataFormat if @custom_pet[:biology_by_zone].empty?
|
||||||
assets_from_biology(@custom_pet[:biology_by_zone])
|
@alt_style_assets ||= assets_from_biology(@custom_pet[:biology_by_zone])
|
||||||
end
|
end
|
||||||
|
|
||||||
def assets_from_biology(biology)
|
def assets_from_biology(biology)
|
||||||
|
|
Loading…
Reference in a new issue