From f9b270447f76133a42faed9970968f9865208c05 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 9 Jan 2016 05:40:06 -0500 Subject: [PATCH] v0.3.4: reworked some aspects of plant & seed naming --- .../items/wands/WandOfRegrowth.java | 4 ++-- .../messages/plants/plants.properties | 15 +++++++++++++-- .../plants/BlandfruitBush.java | 3 +-- .../shatteredpixeldungeon/plants/Blindweed.java | 3 +-- .../shatteredpixeldungeon/plants/Dreamfoil.java | 3 +-- .../shatteredpixeldungeon/plants/Earthroot.java | 3 +-- .../shatteredpixeldungeon/plants/Fadeleaf.java | 3 +-- .../shatteredpixeldungeon/plants/Firebloom.java | 3 +-- .../shatteredpixeldungeon/plants/Icecap.java | 3 +-- .../shatteredpixeldungeon/plants/Plant.java | 9 +-------- .../shatteredpixeldungeon/plants/Rotberry.java | 3 +-- .../shatteredpixeldungeon/plants/Sorrowmoss.java | 3 +-- .../shatteredpixeldungeon/plants/Starflower.java | 3 +-- .../shatteredpixeldungeon/plants/Stormvine.java | 3 +-- .../shatteredpixeldungeon/plants/Sungrass.java | 3 +-- 15 files changed, 28 insertions(+), 36 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java index b3e4f000e..5c4c55196 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java @@ -271,7 +271,7 @@ public class WandOfRegrowth extends Wand { //seed is never dropped, only care about plant class public static class Seed extends Plant.Seed { { - setPlant(Dewcatcher.class); + plantClass = Dewcatcher.class; } } } @@ -305,7 +305,7 @@ public class WandOfRegrowth extends Wand { //seed is never dropped, only care about plant class public static class Seed extends Plant.Seed { { - setPlant(Seedpod.class); + plantClass = Seedpod.class; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants.properties b/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants.properties index 33e6d5c8d..86d05c449 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants.properties +++ b/src/com/shatteredpixel/shatteredpixeldungeon/messages/plants/plants.properties @@ -1,45 +1,56 @@ plants.blandfruitbush.name=Blandfruit plants.blandfruitbush.desc=Distant cousin of the Rotberry, the pear-shaped produce of the Blandfruit bush tastes like caked dust. The fruit is gross and unsubstantial but isn't poisonous. perhaps it could be cooked. +plants.blandfruitbush$seed.name=seed of blandfruit plants.blindweed.name=Blindweed plants.blindweed.desc=Upon being touched a Blindweed perishes in a bright flash of light. The flash is strong enough to disorient for several seconds. +plants.blindweed$seed.name=seed of blindweed plants.dreamfoil.name=Dreamfoil plants.dreamfoil.refreshed=You feel refreshed. plants.dreamfoil.desc=The Dreamfoil's prickly flowers contain a chemical which is known for its properties as a strong neutralizing agent. Most weaker creatures are overwhelmed and knocked unconscious, which gives the plant its namesake. +plants.dreamfoil$seed.name=seed of dreamfoil plants.earthroot.name=Earthroot plants.earthroot.desc=When a creature touches an Earthroot, its roots create a kind of immobile natural armor around it. +plants.earthroot$seed.name=seed of earthroot plants.earthroot$armor.name=Herbal armor plants.earthroot$armor.desc=A kind of natural, immobile armor is protecting you. The armor forms plates of bark and twine, wrapping around your body.\n\nThis herbal armor will absorb 50%% of all physical damage you take, until it eventually runs out of durability and collapses. The armor is also immobile, if you attempt to move it will break apart and be lost.\n\nThe herbal armor can absorb %d more damage before breaking. plants.fadeleaf.name=Fadeleaf plants.fadeleaf.desc=Touching a Fadeleaf will teleport any creature to a random place on the current level. +plants.fadeleaf$seed.name=seed of fadeleaf plants.firebloom.name=Firebloom plants.firebloom.desc=When something touches a Firebloom, it bursts into flames. +plants.firebloom$seed.name=seed of firebloom plants.icecap.name=Icecap plants.icecap.desc=Upon being touched, an Icecap lets out a puff of freezing pollen. The freezing effect is much stronger if the environment is wet. +plants.icecap$seed.name=seed of icecap plants.plant$seed.seed_of=seed of %s plants.plant$seed.ac_plant=PLANT -plants.plant$seed.info=Throw this seed to the place where you want to grow %s.\n\n%s +plants.plant$seed.info=Throw this seed to the place where you want to grow a plant.\n\n%s plants.rotberry.name=Rotberry plants.rotberry.desc=The berries of a young rotberry shrub taste like sweet, sweet death.\n\nGiven several days, this rotberry shrub will grow into another rot heart. +plants.rotberry$seed.name=seed of rotberry plants.sorrowmoss.name=Sorrowmoss plants.sorrowmoss.desc=A Sorrowmoss is a flower (not a moss) with razor-sharp petals, coated with a deadly venom. +plants.sorrowmoss$seed.name=seed of sorrowmoss plants.starflower.name=Starflower plants.starflower.desc=An extremely rare plant, Starflower is said to grant holy power to whomever touches it. +plants.starflower$seed.name=seed of starflower plants.stormvine.name=Stormvine plants.stormvine.desc=Gravity affects the Stormvine plant strangely, allowing its whispy blue tendrils to 'hang' on the air. Anything caught in the vine is affected by this, and becomes disoriented. +plants.stormvine$seed.name=seed of stormvine plants.sungrass.name=Sungrass plants.sungrass.desc=Sungrass is renowned for its sap's slow but effective healing properties. - +plants.sungrass$seed.name=seed of sungrass plants.sungrass$health.name=Herbal Healing plants.sungrass$health.desc=Sungrass possesses excellent healing properties, though its not as fast as a potion of healing.\n\nYou are current slowly regenerating health from the sungrass plant. Taking damage while healing will reduce the healing effectiveness, and moving off the plant will break the healing effect.\n\nYou can heal for %d more health, or until your health is full. diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java index f41b9ea09..3580a8f4a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java @@ -39,10 +39,9 @@ public class BlandfruitBush extends Plant { public static class Seed extends Plant.Seed { { - setPlant( BlandfruitBush.class ); - image = ItemSpriteSheet.SEED_BLANDFRUIT; + plantClass = BlandfruitBush.class; alchemyClass = null; } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Blindweed.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Blindweed.java index 53fb9941d..d394d8662 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Blindweed.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Blindweed.java @@ -60,10 +60,9 @@ public class Blindweed extends Plant { public static class Seed extends Plant.Seed { { - setPlant(Blindweed.class); - image = ItemSpriteSheet.SEED_BLINDWEED; + plantClass = Blindweed.class; alchemyClass = PotionOfInvisibility.class; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java index 6017deda5..804f7753d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java @@ -66,10 +66,9 @@ public class Dreamfoil extends Plant { public static class Seed extends Plant.Seed { { - setPlant(Dreamfoil.class); - image = ItemSpriteSheet.SEED_DREAMFOIL; + plantClass = Dreamfoil.class; alchemyClass = PotionOfPurity.class; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Earthroot.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Earthroot.java index 9880ce1c8..a0c76fd36 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Earthroot.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Earthroot.java @@ -56,10 +56,9 @@ public class Earthroot extends Plant { public static class Seed extends Plant.Seed { { - setPlant( Earthroot.class ); - image = ItemSpriteSheet.SEED_EARTHROOT; + plantClass = Earthroot.class; alchemyClass = PotionOfParalyticGas.class; bones = true; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java index 64428f61c..48ad5dc66 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java @@ -74,10 +74,9 @@ public class Fadeleaf extends Plant { public static class Seed extends Plant.Seed { { - setPlant( Fadeleaf.class ); - image = ItemSpriteSheet.SEED_FADELEAF; + plantClass = Fadeleaf.class; alchemyClass = PotionOfMindVision.class; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Firebloom.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Firebloom.java index 5a935c581..8d543a28c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Firebloom.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Firebloom.java @@ -47,10 +47,9 @@ public class Firebloom extends Plant { public static class Seed extends Plant.Seed { { - setPlant( Firebloom.class ); - image = ItemSpriteSheet.SEED_FIREBLOOM; + plantClass = Firebloom.class; alchemyClass = PotionOfLiquidFlame.class; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java index d8a047b4b..3e74a70ec 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java @@ -51,10 +51,9 @@ public class Icecap extends Plant { public static class Seed extends Plant.Seed { { - setPlant( Icecap.class ); - image = ItemSpriteSheet.SEED_ICECAP; + plantClass = Icecap.class; alchemyClass = PotionOfFrost.class; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java index a6633f46c..c615120ab 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java @@ -128,15 +128,8 @@ public abstract class Plant implements Bundlable { } protected Class plantClass; - protected String plantName; public Class alchemyClass; - - protected void setPlant(Class plantClass){ - this.plantClass = plantClass; - plantName = Messages.get(plantClass, "name"); - name = Messages.get(Seed.class, "seed_of", plantName); - } @Override public ArrayList actions( Hero hero ) { @@ -206,7 +199,7 @@ public abstract class Plant implements Bundlable { @Override public String info() { - return Messages.get( Seed.class, "info", Utils.indefinite( plantName ), desc() ); + return Messages.get( Seed.class, "info", desc() ); } } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java index 0e272f7c9..f600f0253 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java @@ -37,10 +37,9 @@ public class Rotberry extends Plant { public static class Seed extends Plant.Seed { { - setPlant( Rotberry.class ); - image = ItemSpriteSheet.SEED_ROTBERRY; + plantClass = Rotberry.class; alchemyClass = PotionOfStrength.class; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Sorrowmoss.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Sorrowmoss.java index cc2934482..f061ecf30 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Sorrowmoss.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Sorrowmoss.java @@ -51,10 +51,9 @@ public class Sorrowmoss extends Plant { public static class Seed extends Plant.Seed { { - setPlant( Sorrowmoss.class ); - image = ItemSpriteSheet.SEED_SORROWMOSS; + plantClass = Sorrowmoss.class; alchemyClass = PotionOfToxicGas.class; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Starflower.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Starflower.java index 72ed8eb3d..2e8a26263 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Starflower.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Starflower.java @@ -49,10 +49,9 @@ public class Starflower extends Plant { public static class Seed extends Plant.Seed{ { - setPlant( Starflower.class ); - image = ItemSpriteSheet.SEED_STARFLOWER; + plantClass = Starflower.class; alchemyClass = PotionOfExperience.class; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java index 43a8b9da8..ba060369c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Stormvine.java @@ -44,10 +44,9 @@ public class Stormvine extends Plant { public static class Seed extends Plant.Seed { { - setPlant( Stormvine.class ); - image = ItemSpriteSheet.SEED_STORMVINE; + plantClass = Stormvine.class; alchemyClass = PotionOfLevitation.class; } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Sungrass.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Sungrass.java index 1c0b94e81..f44f963c3 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Sungrass.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Sungrass.java @@ -55,10 +55,9 @@ public class Sungrass extends Plant { public static class Seed extends Plant.Seed { { - setPlant( Sungrass.class ); - image = ItemSpriteSheet.SEED_SUNGRASS; + plantClass = Sungrass.class; alchemyClass = PotionOfHealing.class; bones = true;