I have a sort of custom assembling machine in my mod. The type is "assembling-machine". I'm wondering if it's possible to disable players from changing the recipe inside of it.
Thanks!
Is this possible?
-
- Burner Inserter
- Posts: 5
- Joined: Wed Nov 19, 2014 5:06 am
- Contact:
Re: Is this possible?
Code: Select all
entity.operable = false
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: Is this possible?
To expand: this will also prevent players from setting a recipe if the assembler doesn't have any yet. Which is fine if you want your assembling machine to only be able to make one recipe, since then you can just use:rk84 wrote:Code: Select all
entity.operable = false
Code: Select all
entity.recipe = entity.force.recipes["recipe name"]
Re: Is this possible?
If you already know the recipe name you just set it directly - no need to look it up in the force recipes list:MrDoomah wrote:... you can just use:
assuming the recipe is available to that force of course.Code: Select all
entity.recipe = entity.force.recipes["recipe name"]
Code: Select all
entity.recipe = "recipe name"
If you want to get ahold of me I'm almost always on Discord.