diff --git a/data/json/furniture_and_terrain/furniture-domestic_plants.json b/data/json/furniture_and_terrain/furniture-domestic_plants.json index f5c75abfa2c06..a6d7995978031 100644 --- a/data/json/furniture_and_terrain/furniture-domestic_plants.json +++ b/data/json/furniture_and_terrain/furniture-domestic_plants.json @@ -137,92 +137,6 @@ "bash": { "str_min": 2, "str_max": 6, "sound": "crunch.", "sound_fail": "whish." }, "plant_data": { "transform": "f_plant_mature", "base": "f_null" } }, - { - "type": "furniture", - "id": "f_mutant_tree_adult", - "name": "mutant tree", - "description": "This bizarre tree spreads its twisted branches at odd angles toward the sky. If you squint, it almost looks like a human figure with its arms raised to catch the sun.", - "symbol": "7", - "color": "light_green", - "required_str": -1, - "move_cost_mod": 0, - "flags": [ - "PLANT", - "SEALED", - "TRANSPARENT", - "CONTAINER", - "NOITEM", - "TINY", - "DONT_REMOVE_ROTTEN", - "GROWTH_HARVEST", - "MUTANT_TREE", - "TREE", - "OBSTACLE" - ], - "bash": { - "str_min": 18, - "str_max": 50, - "sound": "crunch.", - "sound_fail": "whish.", - "items": [ - { "item": "stick_long", "count": [ 1, 2 ] }, - { "item": "bone", "count": [ 1, 2 ] }, - { "item": "splinter", "count": [ 1, 5 ] }, - { "item": "twig", "count": [ 2, 5 ] }, - { "item": "leaves", "count": [ 5, 25 ] } - ] - }, - "plant_data": { "transform": "f_null", "base": "f_null" } - }, - { - "type": "furniture", - "id": "f_mutant_tree_sapling", - "name": "mutant sapling", - "description": "A twisted and gnarled little tree. Its shape is at once alien and familiar.", - "symbol": "1", - "color": "green", - "move_cost_mod": 1, - "required_str": -1, - "flags": [ - "PLANT", - "SEALED", - "TRANSPARENT", - "CONTAINER", - "NOITEM", - "TINY", - "DONT_REMOVE_ROTTEN", - "GROWTH_MATURE", - "SMALL_HIDE", - "YOUNG" - ], - "bash": { - "str_min": 8, - "str_max": 50, - "sound": "crunch.", - "sound_fail": "whish.", - "items": [ - { "item": "stick_long", "count": [ 0, 2 ] }, - { "item": "bone", "count": [ 1, 2 ] }, - { "item": "splinter", "count": [ 0, 2 ] }, - { "item": "twig", "count": [ 1, 3 ] }, - { "item": "leaves", "count": [ 5, 20 ] } - ] - }, - "plant_data": { "transform": "f_mutant_tree_adult", "base": "f_null" } - }, - { - "type": "furniture", - "id": "f_mutant_tree_sprout", - "name": "sprout", - "description": "A tiny little sprout that has just begun to grow.", - "symbol": "^", - "color": "green", - "move_cost_mod": 0, - "required_str": -1, - "flags": [ "PLANT", "SEALED", "TRANSPARENT", "CONTAINER", "NOITEM", "TINY", "DONT_REMOVE_ROTTEN", "GROWTH_SEEDLING" ], - "bash": { "str_min": 6, "str_max": 10, "sound": "crunch.", "sound_fail": "whish." }, - "plant_data": { "transform": "f_mutant_tree_sapling", "base": "f_null" } - }, { "type": "furniture", "id": "f_planter", diff --git a/data/json/items/comestibles/seed.json b/data/json/items/comestibles/seed.json index de27f6671154f..0a04be8432b6b 100644 --- a/data/json/items/comestibles/seed.json +++ b/data/json/items/comestibles/seed.json @@ -1079,14 +1079,6 @@ "symbol": ".", "flags": [ "TRADER_AVOID", "CANNIBALISM" ], "color": "brown", - "seed_data": { - "plant_name": "mutant", - "fruit": "null", - "grow": "90 days", - "seedling_form": "f_mutant_tree_sprout", - "mature_form": "f_mutant_tree_sapling", - "harvestable_form": "f_mutant_tree_adult", - "required_terrain_flag": "TREE_PLANTABLE" - } + "seed_data": { "plant_name": "mutant", "fruit": "null", "grow": "90 days", "required_terrain_flag": "TREE_PLANTABLE" } } ] diff --git a/data/json/obsoletion_and_migration_0.I/obsolete_furniture.json b/data/json/obsoletion_and_migration_0.I/obsolete_furniture.json new file mode 100644 index 0000000000000..2662811117fc4 --- /dev/null +++ b/data/json/obsoletion_and_migration_0.I/obsolete_furniture.json @@ -0,0 +1,91 @@ +[ + { + "//": "Obsoleted during 0.H, if I am still obsolete at the time of 0.I stable please migrate me.", + "type": "furniture", + "id": "f_mutant_tree_adult", + "name": "mutant tree", + "description": "This bizarre tree spreads its twisted branches at odd angles toward the sky. If you squint, it almost looks like a human figure with its arms raised to catch the sun.", + "symbol": "7", + "color": "light_green", + "required_str": -1, + "move_cost_mod": 0, + "flags": [ + "PLANT", + "SEALED", + "TRANSPARENT", + "CONTAINER", + "NOITEM", + "TINY", + "DONT_REMOVE_ROTTEN", + "GROWTH_HARVEST", + "MUTANT_TREE", + "TREE", + "OBSTACLE" + ], + "bash": { + "str_min": 18, + "str_max": 50, + "sound": "crunch.", + "sound_fail": "whish.", + "items": [ + { "item": "stick_long", "count": [ 1, 2 ] }, + { "item": "bone", "count": [ 1, 2 ] }, + { "item": "splinter", "count": [ 1, 5 ] }, + { "item": "twig", "count": [ 2, 5 ] }, + { "item": "leaves", "count": [ 5, 25 ] } + ] + }, + "plant_data": { "transform": "f_null", "base": "f_null" } + }, + { + "//": "Obsoleted during 0.H, if I am still obsolete at the time of 0.I stable please migrate me.", + "type": "furniture", + "id": "f_mutant_tree_sapling", + "name": "mutant sapling", + "description": "A twisted and gnarled little tree. Its shape is at once alien and familiar.", + "symbol": "1", + "color": "green", + "move_cost_mod": 1, + "required_str": -1, + "flags": [ + "PLANT", + "SEALED", + "TRANSPARENT", + "CONTAINER", + "NOITEM", + "TINY", + "DONT_REMOVE_ROTTEN", + "GROWTH_MATURE", + "SMALL_HIDE", + "YOUNG" + ], + "bash": { + "str_min": 8, + "str_max": 50, + "sound": "crunch.", + "sound_fail": "whish.", + "items": [ + { "item": "stick_long", "count": [ 0, 2 ] }, + { "item": "bone", "count": [ 1, 2 ] }, + { "item": "splinter", "count": [ 0, 2 ] }, + { "item": "twig", "count": [ 1, 3 ] }, + { "item": "leaves", "count": [ 5, 20 ] } + ] + }, + "plant_data": { "transform": "f_mutant_tree_adult", "base": "f_null" } + }, + { + "//": "Obsoleted during 0.H, if I am still obsolete at the time of 0.I stable please migrate me.", + "type": "furniture", + "id": "f_mutant_tree_sprout", + "name": "sprout", + "description": "A tiny little sprout that has just begun to grow.", + "symbol": "^", + "color": "green", + "move_cost_mod": 0, + "required_str": -1, + "flags": [ "PLANT", "SEALED", "TRANSPARENT", "CONTAINER", "NOITEM", "TINY", "DONT_REMOVE_ROTTEN", "GROWTH_SEEDLING" ], + "bash": { "str_min": 6, "str_max": 10, "sound": "crunch.", "sound_fail": "whish." }, + "plant_data": { "transform": "f_mutant_tree_sapling", "base": "f_null" } + } +] diff --git a/src/item.cpp b/src/item.cpp index 96cb4c55caa51..f1afbc2578721 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -14077,30 +14077,6 @@ std::string item::get_plant_name() const return type->seed->plant_name.translated(); } -std::optional item::get_plant_seedling_form() const -{ - if( !type->seed ) { - return std::nullopt; - } - return type->seed->seedling_form; -} - -std::optional item::get_plant_mature_form() const -{ - if( !type->seed ) { - return std::nullopt; - } - return type->seed->mature_form; -} - -std::optional item::get_plant_harvestable_form() const -{ - if( !type->seed ) { - return std::nullopt; - } - return type->seed->harvestable_form; -} - bool item::is_dangerous() const { if( has_flag( flag_DANGEROUS ) ) { diff --git a/src/item.h b/src/item.h index aca0035f6dcca..41787dc4a48a6 100644 --- a/src/item.h +++ b/src/item.h @@ -1982,18 +1982,6 @@ class item : public visitable * translated. Returns an empty string for non-seed items. */ std::string get_plant_name() const; - /** - * Furniture ID of what the plant grows into. Defaults to f_plant_seedling - */ - std::optional get_plant_seedling_form() const; - /** - * Furniture ID of what the plant grows into. Defaults to f_plant_mature - */ - std::optional get_plant_mature_form() const; - /** - * Furniture ID of what the plant grows into. Defaults to f_plant_harvestable - */ - std::optional get_plant_harvestable_form() const; /*@}*/ /** * @name Armor related functions. diff --git a/src/item_factory.cpp b/src/item_factory.cpp index 4369ef646965b..25e955a1e2ce7 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -69,9 +69,6 @@ static const ammotype ammo_NULL( "NULL" ); static const damage_type_id damage_bash( "bash" ); static const damage_type_id damage_bullet( "bullet" ); -static const furn_str_id furn_f_plant_harvest( "f_plant_harvest" ); -static const furn_str_id furn_f_plant_mature( "f_plant_mature" ); -static const furn_str_id furn_f_plant_seedling( "f_plant_seedling" ); static const gun_mode_id gun_mode_DEFAULT( "DEFAULT" ); static const gun_mode_id gun_mode_MELEE( "MELEE" ); @@ -3403,9 +3400,6 @@ void islot_seed::load( const JsonObject &jo ) mandatory( jo, was_loaded, "fruit", fruit_id ); optional( jo, was_loaded, "seeds", spawn_seeds, true ); optional( jo, was_loaded, "byproducts", byproducts ); - optional( jo, was_loaded, "seedling_form", seedling_form, furn_f_plant_seedling ); - optional( jo, was_loaded, "mature_form", mature_form, furn_f_plant_mature ); - optional( jo, was_loaded, "harvestable_form", harvestable_form, furn_f_plant_harvest ); optional( jo, was_loaded, "required_terrain_flag", required_terrain_flag, ter_furn_flag::TFLAG_PLANTABLE ); } diff --git a/src/map.cpp b/src/map.cpp index d5a6f5a72bf28..56a12d22de633 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -8293,9 +8293,7 @@ void map::grow_plant( const tripoint &p ) } rotten_item_spawn( *seed, p ); - //Become a seedling - std::optional seedling_form = seed->get_plant_seedling_form(); - furn_set( p, furn_str_id( seedling_form.value() ) ); + furn_set( p, furn_str_id( furn.plant->transform ) ); } else if( seed->age() < plantEpoch * 3 * furn.plant->growth_multiplier ) { if( has_flag_furn( ter_furn_flag::TFLAG_GROWTH_MATURE, p ) ) { return; @@ -8312,9 +8310,7 @@ void map::grow_plant( const tripoint &p ) if( !has_flag_furn( ter_furn_flag::TFLAG_GROWTH_SEEDLING, p ) ) { rotten_item_spawn( *seed, p ); } - //Become a mature plant - std::optional mature_form = seed->get_plant_mature_form(); - furn_set( p, furn_str_id( mature_form.value() ) ); + furn_set( p, furn_str_id( furn.plant->transform ) ); } else { //You've skipped two stages so roll monsters two times @@ -8330,9 +8326,7 @@ void map::grow_plant( const tripoint &p ) rotten_item_spawn( *seed, p ); rotten_item_spawn( *seed, p ); } - //Become a harvestable plant. - std::optional harvestable_form = seed->get_plant_harvestable_form(); - furn_set( p, furn_str_id( harvestable_form.value() ) ); + furn_set( p, furn_str_id( furn.plant->transform ) ); } } }