Add rendering for all the new stuff
This commit is contained in:
parent
45c4cc5af6
commit
cb4ff0e1f2
5 changed files with 39 additions and 3 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
attributes :id,
|
attributes :id,
|
||||||
:party_id,
|
:party_id,
|
||||||
:position,
|
:position,
|
||||||
:uncap_level
|
:uncap_level,
|
||||||
|
:perpetuity
|
||||||
|
|
||||||
node :object do |c|
|
node :object do |c|
|
||||||
partial("characters/base", :object => c.character)
|
partial("characters/base", :object => c.character)
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,26 @@ attributes :id,
|
||||||
:party_id,
|
:party_id,
|
||||||
:mainhand,
|
:mainhand,
|
||||||
:position,
|
:position,
|
||||||
:uncap_level
|
:uncap_level,
|
||||||
|
:element
|
||||||
|
|
||||||
node :object do |w|
|
node :object do |w|
|
||||||
partial("weapons/base", :object => w.weapon)
|
partial("weapons/base", :object => w.weapon)
|
||||||
|
end
|
||||||
|
|
||||||
|
node :weapon_keys, :if => lambda { |w| [2, 3, 17, 22].include?(w.weapon.series) } do |w|
|
||||||
|
partial("weapon_keys/base", :object => w.weapon_keys)
|
||||||
|
end
|
||||||
|
|
||||||
|
node :ax, :if => lambda { |w| w.weapon.ax > 0 } do |w|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
:modifier => w.ax_modifier1,
|
||||||
|
:strength => w.ax_strength1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
:modifier => w.ax_modifier2,
|
||||||
|
:strength => w.ax_strength2
|
||||||
|
}
|
||||||
|
]
|
||||||
end
|
end
|
||||||
3
app/views/api/v1/weapon_keys/all.json.rabl
Normal file
3
app/views/api/v1/weapon_keys/all.json.rabl
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
collection @keys
|
||||||
|
|
||||||
|
extends 'weapon_keys/base'
|
||||||
10
app/views/api/v1/weapon_keys/base.json.rabl
Normal file
10
app/views/api/v1/weapon_keys/base.json.rabl
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
object :weapon_key
|
||||||
|
|
||||||
|
attributes :id, :series, :slot, :group
|
||||||
|
|
||||||
|
node :name do |k|
|
||||||
|
{
|
||||||
|
:en => k.name_en,
|
||||||
|
:jp => k.name_jp
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
@ -5,7 +5,11 @@ attributes :id,
|
||||||
:element,
|
:element,
|
||||||
:proficiency,
|
:proficiency,
|
||||||
:max_level,
|
:max_level,
|
||||||
:max_skill_level
|
:max_skill_level,
|
||||||
|
:limit,
|
||||||
|
:rarity,
|
||||||
|
:series,
|
||||||
|
:ax
|
||||||
|
|
||||||
node :name do |w|
|
node :name do |w|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue