[0.18.6] hide_from_player_crafting recipe property glitch

Bugs that are actually features.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

[0.18.6] hide_from_player_crafting recipe property glitch

Post by DRY411S »

In my Recycling Machines mod NONE of the recycling recipes can be crafted by hand. Until now, they have all appeared in the player's crafting menu under recycling tabs. Many people have commented how cluttered the crafting tabs become if they have a lot of other mods. And challenged me to remove them.

Imagine my:
  • delight when I just discovered the hide_from_player_crafting recipe property today. I just amended the mod to assign the property to EVERY recycling recipe.
  • disappointment when the tabs didn't disappear.
  • surprise when I clicked on the tabs and saw that almost all the recipes had disappeared but a few random ones are still there.

4 screenshots of unexpected player crafting tabs

I can see no reason why those should still be visible. I checked my data to make sure I hadn't missed setting the property (set in data-updates stage and the hide_from_player_crafting property untouched afterwards). I haven't. Example for the advanced circuit below:

Code: Select all

  {
    category = "recycling-1",
    expensive = {
      enabled = false,
      energy_required = 6,
      ingredients = {
        {
          "advanced-circuit",
          1
        }
      },
      results = {
        {
          "electronic-circuit",
          2
        },
        {
          "plastic-bar",
          4
        },
        {
          "copper-cable",
          8
        }
      }
    },
    group = "dry411srev-intermediate-products",
    hidden = false,
    hide_from_player_crafting = true,
    icon = "__base__/graphics/icons/advanced-circuit.png",
    icon_size = 64,
    localised_name = {
      "recipe-name.recycledparts",
      {
        "item-name.advanced-circuit"
      }
    },
    name = "dry411srev-advanced-circuit",
    normal = {
      enabled = false,
      energy_required = 6,
      ingredients = {
        nil
      },
      results = {
        {
          "electronic-circuit",
          2
        },
        {
          "plastic-bar",
          2
        },
        {
          "copper-cable",
          4
        }
      }
    },
    order = "f[advanced-circuit]",
    subgroup = "dry411srev-intermediate-product",
    type = "recipe"
  },
So I thought maybe I'd made a mistake somewhere else. I crafted a recycling machine, placed it, and open the crafting menu to make sure all the items could be recycled.

Recycling Machine 1 Crafting menu


No. There they are. The pipe and the tank. The blue belt is missing but that's because my mod insists that any recipes that use fluids cannot be recycled in a Recycling Machine 1.

Let me know if you need the mod's code. The version on the mod portal isn't using the property. Why would it? It appears to be bugged after all. :D
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5304
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.18.6] hide_from_player_crafting recipe property glitch

Post by Klonan »

You need to set the flag in the difficulty of the recipe
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.18.6] hide_from_player_crafting recipe property glitch

Post by DRY411S »

Perfect thanks. Does that mean (from the screenshots), that those are the only vanilla items in the game which have expensive recipes?
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.18.6] hide_from_player_crafting recipe property glitch

Post by DRY411S »

DRY411S wrote: Sat Feb 15, 2020 7:52 pm Perfect thanks. Does that mean (from the screenshots), that those are the only vanilla items in the game which have expensive recipes?
Answering my own question. It would seem so, after I made a little change to my code.
Post Reply

Return to “Not a bug”