User:LVL/Sandbox: Difference between revisions

Jump to navigation Jump to search
LVL (talk | contribs)
No edit summary
LVL (talk | contribs)
No edit summary
Line 3: Line 3:
=== get_cost ===
=== get_cost ===
*  **Valid item:** {{#invoke:ItemData|get_cost|Berserker}}  
*  **Valid item:** {{#invoke:ItemData|get_cost|Berserker}}  
    *  (Expected: "3,200")
*  (Expected: "3,200")
*  **Valid item with weird casing:** {{#invoke:ItemData|get_cost|bErSeRkEr}}
*  **Valid item with weird casing:** {{#invoke:ItemData|get_cost|bErSeRkEr}}
    *  (Expected: "3,200")
*  (Expected: "3,200")
*  **Valid item with whitespace:** {{#invoke:ItemData|get_cost|  Berserker  }}
*  **Valid item with whitespace:** {{#invoke:ItemData|get_cost|  Berserker  }}
    *  (Expected: "3,200")
*  (Expected: "3,200")
*  **Invalid item:** {{#invoke:ItemData|get_cost|This Item Does Not Exist}}
*  **Invalid item:** {{#invoke:ItemData|get_cost|This Item Does Not Exist}}
    *  (Expected: A red "Item Not Found" error)
*  (Expected: A red "Item Not Found" error)
*  **No item:** {{#invoke:ItemData|get_cost|}}
*  **No item:** {{#invoke:ItemData|get_cost|}}
    *  (Expected: A red "Item Not Found" error)
*  (Expected: A red "Item Not Found" error)


=== get_type ===
=== get_type ===
*  **Weapon:** {{#invoke:ItemData|get_type|Active Reload}}
*  **Weapon:** {{#invoke:ItemData|get_type|Active Reload}}
    *  (Expected: "Weapon" or its localized equivalent)
*  (Expected: "Weapon" or its localized equivalent)
*  **Armor:** {{#invoke:ItemData|get_type|Witchmail}}
*  **Armor:** {{#invoke:ItemData|get_type|Witchmail}}
    *  (Expected: "Armor" or its localized equivalent)
*  (Expected: "Armor" or its localized equivalent)
*  **Tech:** {{#invoke:ItemData|get_type|Spirit Strike}}
*  **Tech:** {{#invoke:ItemData|get_type|Spirit Strike}}
    *  (Expected: "Tech" or its localized equivalent)
*  (Expected: "Tech" or its localized equivalent)


=== is_active ===
=== is_active ===
*  **Passive item:** {{#invoke:ItemData|is_active|Berserker}}
*  **Passive item:** {{#invoke:ItemData|is_active|Berserker}}
    *  (Expected: "false")
*  (Expected: "false")
*  **Active item (Toggle):** {{#invoke:ItemData|is_active|Blood Tribute}}
*  **Active item (Toggle):** {{#invoke:ItemData|is_active|Blood Tribute}}
    *  (Expected: "true")
*  (Expected: "true")
*  **Active item (InstantCast):** {{#invoke:ItemData|is_active|Refresher}}
*  **Active item (InstantCast):** {{#invoke:ItemData|is_active|Refresher}}
    *  (Expected: "true")
*  (Expected: "true")


=== get_prop ===
=== get_prop ===
*  **Simple property:** {{#invoke:ItemData|get_prop|Berserker|Tier}}
*  **Simple property:** {{#invoke:ItemData|get_prop|Berserker|Tier}}
    *  (Expected: "3")
*  (Expected: "3")
*  **Table property (ShopFilters):** {{#invoke:ItemData|get_prop|Armor Piercing Rounds|ShopFilters}}
*  **Table property (ShopFilters):** {{#invoke:ItemData|get_prop|Armor Piercing Rounds|ShopFilters}}
    *  (Expected: "ClipSize, WeaponDamage")
*  (Expected: "ClipSize, WeaponDamage")
*  **Property of a disabled item:** {{#invoke:ItemData|get_prop|Ablative Coat|MaxBulletResist}}
*  **Property of a disabled item:** {{#invoke:ItemData|get_prop|Ablative Coat|MaxBulletResist}}
    *  (Expected: "30")
*  (Expected: "30")


=== get_codename ===
=== get_codename ===
*  **Get codename for "Refresher":** {{#invoke:ItemData|get_codename|Refresher}}
*  **Get codename for "Refresher":** {{#invoke:ItemData|get_codename|Refresher}}
    *  (Expected: "upgrade_refresher")
*  (Expected: "upgrade_refresher")
*  **Get codename for "Witchmail":** {{#invoke:ItemData|get_codename|Witchmail}}
*  **Get codename for "Witchmail":** {{#invoke:ItemData|get_codename|Witchmail}}
    *  (Expected: "upgrade_absorbing_armor")
*  (Expected: "upgrade_absorbing_armor")


=== get_component_name ===
=== get_component_name ===
*  **Item with components:** {{#invoke:ItemData|get_component_name|Vortex Web}}
*  **Item with components:** {{#invoke:ItemData|get_component_name|Vortex Web}}
    *  (Expected: The name of the item with codename "upgrade_containment". This will be blank if that item has no name.)
*  (Expected: The name of the item with codename "upgrade_containment". This will be blank if that item has no name.)
*  **Item without components:** {{#invoke:ItemData|get_component_name|Berserker}}
*  **Item without components:** {{#invoke:ItemData|get_component_name|Berserker}}
    *  (Expected: Blank)
*  (Expected: Blank)


=== get_scalar (Testing Current Data) ===
=== get_scalar (Testing Current Data) ===
'''Note:''' This confirms the module correctly handles missing `SpiritScaling` data in the current JSON.
'''Note:''' This confirms the module correctly handles missing `SpiritScaling` data in the current JSON.
*  **Call for "Torment Pulse":** {{#invoke:ItemData|get_scalar|Torment Pulse|DamagePulseAmount}}
*  **Call for "Torment Pulse":** {{#invoke:ItemData|get_scalar|Torment Pulse|DamagePulseAmount}}
    *  (Expected: A red error message like "SpiritScaling data not found for "Torment Pulse"")
*  (Expected: A red error message like "SpiritScaling data not found for "Torment Pulse"")


=== get_headcount ===
=== get_headcount ===
*  **Total enabled items:** {{#invoke:ItemData|get_headcount}}
*  **Total enabled items:** {{#invoke:ItemData|get_headcount}}
    *  (Expected: A number representing the total count of enabled items with names in your full JSON.)
*  (Expected: A number representing the total count of enabled items with names in your full JSON.)


=== Integration Test (Using a common template) ===
=== Integration Test (Using a common template) ===
*  **Transcluding a key template with a real, enabled item:**
*  **Transcluding a key template with a real, enabled item:**
    {{Infobox item|name=Witchmail}}
{{Infobox item|name=Witchmail}}
    *  (The entire infobox should render correctly.)
*  (The entire infobox should render correctly.)


*  **Transcluding with a disabled item:**
*  **Transcluding with a disabled item:**
    {{Infobox item|name=Ablative Coat}}
{{Infobox item|name=Ablative Coat}}
    *  (The infobox should still render, showing how the template handles disabled items.)
*  (The infobox should still render, showing how the template handles disabled items.)


=== DEBUGGING Ablative Coat ===
=== DEBUGGING Ablative Coat ===
{{#invoke:ItemData|debug_lookup|Ablative Coat}}
{{#invoke:ItemData|debug_lookup|Ablative Coat}}