Template:Img item/icon: Difference between revisions

From PZwiki
(Added medical items)
m (Add Coldpack)
 
(9 intermediate revisions by 2 users not shown)
Line 6: Line 6:
| Bullets9mm|9mm Rounds|9mm Round = 40calAmmoBox
| Bullets9mm|9mm Rounds|9mm Round = 40calAmmoBox
| Bullets9mmBox|Box of 9mm Bullets = HandgunAmmoBox
| Bullets9mmBox|Box of 9mm Bullets = HandgunAmmoBox
| 9mmClip|9mm Magazine = BerettaClip
| 9mmClip|9mm Magazine|M9 Magazine = BerettaClip
| Bullets45|.45 Auto|.45 Auto Round = 40calAmmoBox
| Bullets45|.45 Auto|.45 Auto Round = 40calAmmoBox
| Bullets45Box|Box of .45 Auto Bullets|Box of .45 Auto Rounds = HandgunAmmoBox
| Bullets45Box|Box of .45 Auto Bullets|Box of .45 Auto Rounds = HandgunAmmoBox
| 45Clip|.45 Auto Magazine = BerettaClip
| 45Clip|.45 Auto Magazine|M1911 Auto Magazine = BerettaClip
| Bullets44|.44 Magnum Bullets|.44 Magnum Round = 40calAmmoBox
| Bullets44|.44 Magnum Bullets|.44 Magnum Round = 40calAmmoBox
| Bullets44Box|Box of .44 Magnum Bullets|Box of .44 Magnum Rounds = HandgunAmmoBox
| Bullets44Box|Box of .44 Magnum Bullets|Box of .44 Magnum Rounds = HandgunAmmoBox
| 44Clip|.44 Magazine = BerettaClip
| 44Clip|.44 Magazine|D-E Magazine = BerettaClip
| Bullets38|.38 Special Bullets|.38 Special Round = 40calAmmoBox
| Bullets38|.38 Special Bullets|.38 Special Round = 40calAmmoBox
| Bullets38Box|Box of .38 Special Bullets|Box of .38 Special Rounds = HandgunAmmoBox
| Bullets38Box|Box of .38 Special Bullets|Box of .38 Special Rounds = HandgunAmmoBox
Line 19: Line 19:
| 223Bullets|.223 Ammo|.223 Round = RifleAmmo223loose
| 223Bullets|.223 Ammo|.223 Round = RifleAmmo223loose
| 223Box|Box of .223 Bullets|Box of .223 Rounds = RifleAmmo223
| 223Box|Box of .223 Bullets|Box of .223 Rounds = RifleAmmo223
| 223Clip|.223 Magazine = BerettaClip
| 223Clip|.223 Magazine|MSR700 Magazine = BerettaClip
| 308Bullets|.308 Ammo|.308 Round = RifleAmmo308loose
| 308Bullets|.308 Ammo|.308 Round = RifleAmmo308loose
| 308Box|Box of .308 Bullets|Box of .308 Rounds = RifleAmmo308
| 308Box|Box of .308 Bullets|Box of .308 Rounds = RifleAmmo308
| 308Clip|.308 Magazine = BerettaClip
| 308Clip|.308 Magazine|MSR788 Magazine = BerettaClip
| 556Bullets|.556 Ammo|.556 Round = RifleAmmo308loose
| 556Bullets|.556 Ammo|5.56mm Round = RifleAmmo308loose
| 556Box|Box of .556 Bullets|Box of .556 Rounds = RifleAmmo308
| 556Box|Box of .556 Bullets|Box of .556 Rounds = RifleAmmo308
| 556Clip|.556 Magazine = BerettaClip
| 556Clip|.556 Magazine|M16 Magazine = BerettaClip
| M14Clip|.308 Magazine = BerettaClip<!--
| M14Clip|.308 Magazine|M14 Magazine = BerettaClip<!--


##  FIREARMS  ##
##  FIREARMS  ##
Line 44: Line 44:
| Revolver_Short|M36 Revolver = RevolverShort
| Revolver_Short|M36 Revolver = RevolverShort
| AssaultRifle|M16 Assault Rifle = AssaultRifle
| AssaultRifle|M16 Assault Rifle = AssaultRifle
| AssaultRifle2|M14 Single Shot Assault Rifle = AssaultRifle2<!--
| AssaultRifle2|M14 Single Shot Assault Rifle|M14 Rifle = AssaultRifle2<!--
 
##  WEAPON ATTACHMENTS  ##
 
-->
| IronSight|Iron Sight = ScopeIronSight
| x2Scope|x2 Scope = Scope2x
| x4Scope|x4 Scope = Scope4x
| x8Scope|x8 Scope = Scope8x
| AmmoStraps|Ammo Straps = AmmoStrap
| Sling|Sling = GunSling
| FiberglassStock|Fiberglass Stock = RifleFibreglassStock
| RecoilPad|Recoil Pad = RifleRecoilPad
| Laser|Laser = HandgunLaser
| RedDot|Red Dot = RedDot
| GunLight|Gun Light = RedDot
| Bayonnet|Bayonnet|Bayonet = HuntingKnife
| ChokeTubeFull|Choke Tube Full|Choke Tube - Full = ShotgunChoke
| ChokeTubeImproved|Choke Tube Improved|Choke Tube - Improved = ShotgunChoke<!--


##  TRAPS  ##
##  TRAPS  ##
Line 76: Line 94:
| Cotton|cotton = Rag
| Cotton|cotton = Rag
| Denim|denim = DenimStrips
| Denim|denim = DenimStrips
| Leather|leather = LeatherStrips<!--
| Leather|leather = LeatherStrips
| ElectronicsScrap|Electronics Scrap|Scrap Electronics|Electronics = ElectronicsScrap <!--


##  LITERATURE  ##
##  LITERATURE  ##
Line 179: Line 198:


-->
-->
| Coldpack = Coldpack
| Bandaid|Adhesive Bandages = Bandaid
| Bandaid|Adhesive Bandages = Bandaid
| Bandage = Bandage
| Bandage = Bandage
| AlcoholBandage|Sterilized Bandage = Bandage
| AlcoholBandage|Sterilized Bandage = Bandage
| BandageDirty|Dirty Bandage = Bandage
| BandageDirty|Dirty Bandage = BandageDirty
| DenimStrips|Denim Strips = DenimStrips
| DenimStrips|Denim Strips = DenimStrips
| DenimStripsDirty|Dirty Denim Strips = DenimStrips
| DenimStripsDirty|Dirty Denim Strips = DenimStrips
Line 218: Line 238:
| Pills|Painkillers = PillsPainkiller
| Pills|Painkillers = PillsPainkiller
| PillsSleepingTablets|Sleeping Tablets = PillsSleeping
| PillsSleepingTablets|Sleeping Tablets = PillsSleeping
| PillsVitamins|Vitamins = Vitamins
| PillsVitamins|Vitamins = Vitamins<!--
 
##  WEAPONS  ##
 
-->
| Saucepan = SaucepanEmpty
| Plank = Plank<!--
 
##  OTHER  ##
 
-->
| WaterDrop|Water Drop|Water = WaterDrop
| WaterSaucepan|Saucepan with Water = SaucepanEmpty
| Pot|Cooking Pot = Pot
| WaterPot|Cooking Pot with Water = Pot_Water
| TreeBranch|Tree Branch = Branch
| WoodenStick|Sturdy Stick = TZ_WoodenStick
| MortarPestle|Mortar and Pestle = MortarPestle
| Lighter = Lighter
| #default = image
| #default = image
}}</includeonly><noinclude>{{Documentation}}</noinclude>
}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 15:47, 19 November 2023

[view] [edit] [history] [purge] Template documentation
{{Img item/icon}} is a subtemplate of {{Img item}}. This functions as an icon index for all items.

This template uses a switch, searching for a matching input string, returning an output string.

Usage

Although a subtemplate, this can function as a standalone template to lookup an icon for an item.

The input string should be the item's item ID (excluding the module) or the display name.

{{Img item/icon|item=Item ID <!-- or DisplayName -->}}

Adding to index

The index can be added to by:

  1. Click "Edit" (top-right)
  2. Copy the following snippet and paste in a new line, after the switch (top) and before the default (bottom): | ID| DisplayName = Output
  3. Replace: ID with the Item's ID (excluding the module), DisplayName with the Item's display name (as it appears in-game), and Output with the file you want to display (without the file extension e.g. PNG).
    1. Additional input strings can be added by placing a pipe | followed by the string after the last input string, but before the equals symbol =
      • Example: | LemonGrass| Lemongrass| Lemon Grass = Lemongrass
    2. Any additional input strings should be:
      • Previous item names, e.g. Whiskey Bottle or Bourbon
      • Alternate item names, i.e. name in script file may be different to in-game item name (this is contained in ItemName_EN.txt), e.g. Lemon Grass or Lemongrass
      • UK vs US spelling, e.g. Tire or Tyre
  4. Also add to {{Img item/name}} and {{Img_item/link}}

Example

Type Produces Explanation
{{Img item/icon|item=ShotgunShellsBox}}
ShotgunAmmoBox Using the item ID
{{Img item/icon|item=Box of Shotgun Shells}}
ShotgunAmmoBox Using the display name
Documentation transcluded from Template:Img item/icon/doc.
Editors can experiment in this template's sandbox (create)