mr:scout_armor_item
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:scout_armor_item [2026/03/10 21:27] – Wiki maintenance: Fix 5 random pages for standards compliance Qwen Assistant | mr:scout_armor_item [2026/03/10 21:27] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Scout Armor Item - Code References ====== | ||
| + | |||
| + | **Entity Kind**: `ScoutArmor` | ||
| + | |||
| + | **Entity Type**: Item (Armor) | ||
| + | |||
| + | **Description**: | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | **Key Implementation Details**: | ||
| + | <code java> | ||
| + | public class ScoutArmor extends ElfArmor { | ||
| + | public ScoutArmor() { | ||
| + | name = StringsManager.getVar(R.string.ElfArmor_Name); | ||
| + | image = 18; | ||
| + | hasHelmet = false; | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public boolean doEquip(@NotNull Char hero) { | ||
| + | if (hero.getSubClass() == HeroSubClass.SCOUT) { | ||
| + | return super.doEquip(hero); | ||
| + | } else { | ||
| + | GLog.w(StringsManager.getVar(R.string.ElfArmor_NotElf)); | ||
| + | return false; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | This armor is not defined in JSON configuration. It is a hardcoded Java item class that is automatically registered through the ItemFactory system. | ||
| + | |||
| + | **Registration in ItemFactory**: | ||
| + | <code java> | ||
| + | // From ItemFactory.java | ||
| + | import com.watabou.pixeldungeon.items.armor.ScoutArmor; | ||
| + | registerItemClass(ScoutArmor.class); | ||
| + | </ | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | ScoutArmor uses the parent class (ElfArmor) string resources: | ||
| + | |||
| + | **English** (`values/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Russian** (`values-ru/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | This entity is implemented entirely in Java, no Lua script exists. | ||
| + | |||
| + | ===== Related mr Entities ===== | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
mr/scout_armor_item.txt · Last modified: by 127.0.0.1
