LuaTechnology.effects[1].type="LOCK-recipe"

Things that we aren't going to implement
Post Reply
PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

LuaTechnology.effects[1].type="LOCK-recipe"

Post by PyroFire »

Can we have a lock-recipe technology effect type?
It does the opposite of unlock-recipe.

The purpose of this request is to add recipes that are "upgrades" of the same recipe, but be able to prevent those less efficient recipes from showing.
Lock-recipe technology effect would (ideally) make it so this kind of behavior is internally consistent if factorio ever re-evaluates its recipes against the technologies.

havvy
Burner Inserter
Burner Inserter
Posts: 13
Joined: Fri Aug 29, 2014 9:49 pm
Contact:

Re: LuaTechnology.effects[1].type="LOCK-recipe"

Post by havvy »

Pyanadon's Alien Life has a bunch of technologies that do exactly this.

Alternatively, an effect type of modify-recipe with a ModifyRecipePrototype could be possible, but that'd be more work on the Factorio side. Still, would help remove code related to updating the recipes in the assemblers. Even better, the ModifyRecipePrototype could also be how expensive recipes are defined, moving the complexity away from RecipePrototype.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13201
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaTechnology.effects[1].type="LOCK-recipe"

Post by Rseding91 »

I don't see this as really working. If you have 2 separate technologies that do not rely on each other in any way where 1 unlocks a recipe and 1 locks a recipe it just fails; depending on what order the player researches them you get different results.

I think this is best left to scripting logic and reaction to the on-research-finished event.
If you want to get ahold of me I'm almost always on Discord.

User avatar
mrudat
Fast Inserter
Fast Inserter
Posts: 229
Joined: Fri Feb 16, 2018 5:21 am
Contact:

Re: LuaTechnology.effects[1].type="LOCK-recipe"

Post by mrudat »

an upgrade-recipe effect? unlock recipe-2 if/when recipe-1 is researched, and replace recipe-1 with recipe-2 where recipe-1 is being crafted?

Post Reply

Return to “Won't implement”