[0.17] Painless landfill

This is the place to request new mods or give ideas about what could be done.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.17] Painless landfill

Post by eradicator »

And you could pre-craft whichever of the two recipes is cheaper and then un-/install the mod :twisted:.
Apart from that, yea, might be a good idea. But who knows if the author of $any-particular-mod doesn't have different goals.
(And i didn't even try to remember if or not "landfill" was seperate in some earlier version :D. I just ask the engine / my text editor what it is *now*. It does use the exact same graphics file in any case.)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Qon
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [0.17] Painless landfill

Post by Qon »

I'm saying that the Platforms and it's recipes could be removed. Just have [Platforms mod] make landfill minable just like platforms, that's it except maybe also reskin landfill. But there would be no platform recipe or platforms at all in the mod, landfill just gets that capability.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: [0.17] Painless landfill

Post by zOldBulldog »

From the discussion it is now clear to me that the ability of being able to undo comes at a heavy price... having to use a landfill tile that is non-standard and therefore if you uninstall the mod you end up with a broken map or have to go through a number of difficult hoops to prevent it.

So perhaps I should reformulated the request as something simpler:

Is it feasible to make a mod that does nothing more than use regular blueprints (no landfill in them) and just adds landfill in whatever places your blueprint is trying to place objects but encounters water?

In other words, if I have landfill and necessary materials on hand us personal bots, when I place a blueprint it just gets built (all the hoops handled behind the scenes).

Qon
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [0.17] Painless landfill

Post by Qon »

Being able to undo could fairly simply be added to Platforms mod, which I actually also posted as a suggestion on that board. So it doesn't have to be pricy.
zOldBulldog wrote:
Thu May 16, 2019 6:01 pm
Is it feasible to make a mod that does nothing more than use regular blueprints (no landfill in them) and just adds landfill in whatever places your blueprint is trying to place objects but encounters water?

In other words, if I have landfill and necessary materials on hand us personal bots, when I place a blueprint it just gets built (all the hoops handled behind the scenes).
Since it has already been made, yes it is feasible. It adds a button that is visible while placing a blueprint that adds landfill under all entities in the blueprint (or temporary cut-copy-paste blueprint) and also the ability to flip blueprints etc.
There's another mod that just adds that button but it adds the button permanently even when not holding a blueprint and it lacks the other features so I wouldn't recommend it over BlueprintExtensions, which is a must have. But BP-E was broken a while back so then I used the worse mod as a temporary replacement.

But a vanilla bug is that you can't place ghosts on landfill ghosts so you have to place twice, again when the landfill has been placed. Same for both mods, not their fault. I haven't reported it yet though.
Last edited by Qon on Thu May 16, 2019 6:33 pm, edited 1 time in total.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: [0.17] Painless landfill

Post by zOldBulldog »

Qon wrote:
Thu May 16, 2019 6:29 pm
Being able to undo could fairly simply be added to Platforms mod, which I actually also posted as a suggestion on that board. So it doesn't have to be pricy.
zOldBulldog wrote:
Thu May 16, 2019 6:01 pm
Is it feasible to make a mod that does nothing more than use regular blueprints (no landfill in them) and just adds landfill in whatever places your blueprint is trying to place objects but encounters water?

In other words, if I have landfill and necessary materials on hand us personal bots, when I place a blueprint it just gets built (all the hoops handled behind the scenes).
Since it has already been made, yes it is feasible. It adds a button that is visible while placing a blueprint that adds landfill under all entities in the blueprint (or temporary cut-copy-paste blueprint) and also the ability to flip blueprints etc.
There's another mod that just adds that button but it adds the button permanently even when not holding a blueprint and it lacks the other features so I wouldn't recommend it over BlueprintExtensions, which is a must have. But BP-E was broken a while back so then I used the worse mod as a temporary replacement.

You have to press the button first though and you might have to double-click (a vanilla bug maybe?) to get entities placed on top of landfill ghosts to actually stick. But it's pretty much perfect and that's just a really minor inconvenience.
Ty, I was under the (apparently wrong impression) that BP-E updated the blueprint itself to include the landfill (which I didn't quite like) so I ignored it.

But if the button lets you add the landfill "as you place the blueprint" I'll definitely give it a try.

Qon
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [0.17] Painless landfill

Post by Qon »

It does add it to the blueprint. But making a copy is fairly trivial (add to library and take from there) and if the blueprint is in the library I don't think the blueprint is updated, just the temporary copy in your hand. And removing the landfill tiles is just rightclick the blueprint and then rightclick the landfill in the entity list to filter them away.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.17] Painless landfill

Post by eradicator »

zOldBulldog wrote:
Thu May 16, 2019 6:33 pm
But if the button lets you add the landfill "as you place the blueprint" I'll definitely give it a try.
To be able to do that the base game would have to raise an event when placing a blueprint *fails*. Which it doesn't, so it's not moddable.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Qon
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [0.17] Painless landfill

Post by Qon »

zOldBulldog wrote:
Thu May 16, 2019 6:01 pm
From the discussion it is now clear to me that the ability of being able to undo comes at a heavy price... having to use a landfill tile that is non-standard and therefore if you uninstall the mod you end up with a broken map or have to go through a number of difficult hoops to prevent it.
Mod change request

and response:
micromario wrote: I didn't know about the changes to landfill in .17

This sounds like a great idea, actually I can't think of any reason not to make this change.

Let me see what I can do
So get Platforms because soon they will be undoable landfill with no drawback. :D
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: [0.17] Painless landfill

Post by zOldBulldog »

Qon wrote:
Thu May 16, 2019 9:32 pm
zOldBulldog wrote:
Thu May 16, 2019 6:01 pm
From the discussion it is now clear to me that the ability of being able to undo comes at a heavy price... having to use a landfill tile that is non-standard and therefore if you uninstall the mod you end up with a broken map or have to go through a number of difficult hoops to prevent it.
Mod change request

and response:
micromario wrote: I didn't know about the changes to landfill in .17

This sounds like a great idea, actually I can't think of any reason not to make this change.

Let me see what I can do
So get Platforms because soon they will be undoable landfill with no drawback. :D
Indeed. Very nice. Sounds like the perfect solution.

Qon
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [0.17] Painless landfill

Post by Qon »

zOldBulldog wrote:
Thu May 16, 2019 9:50 pm
Indeed. Very nice. Sounds like the perfect solution.
Of course it's perfect, it was my idea! 8-)
I mean.... thanks, and thanks to micromario for the excellent idea to make minable platforms in the first place and now keeping it up to date with the latest tech! ;)
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

Qon
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [0.17] Painless landfill

Post by Qon »

Qon wrote:
Thu May 16, 2019 9:32 pm
So get Platforms because soon they will be undoable landfill with no drawback. :D
micromario decided to release the update as a separate mod: Breakable Landfill
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

User avatar
micromario
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Apr 05, 2018 11:53 am
Contact:

Re: [0.17] Painless landfill

Post by micromario »

Reading through this thread, I'm going to start working on an update to automatically landfill blueprints if you are holding shift, and then un-landfill them after the key is released

Qon
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [0.17] Painless landfill

Post by Qon »

micromario wrote:
Fri May 17, 2019 9:38 pm
Reading through this thread, I'm going to start working on an update to automatically landfill blueprints if you are holding shift, and then un-landfill them after the key is released
Sounds great, if you succeed! Hope it goes well.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.17] Painless landfill

Post by eradicator »

micromario wrote:
Fri May 17, 2019 9:38 pm
automatically landfill blueprints if you are holding shift
how do you intend to detect "holding shift", i'm not aware the engine supports anything other than "pressed down once"?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
micromario
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Apr 05, 2018 11:53 am
Contact:

Re: [0.17] Painless landfill

Post by micromario »

eradicator wrote:
Sat May 18, 2019 7:12 am
micromario wrote:
Fri May 17, 2019 9:38 pm
automatically landfill blueprints if you are holding shift
how do you intend to detect "holding shift", i'm not aware the engine supports anything other than "pressed down once"?
You're right, can't be done. A shame

Qon
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [0.17] Painless landfill

Post by Qon »

micromario wrote:
Mon May 20, 2019 9:13 pm
eradicator wrote:
Sat May 18, 2019 7:12 am
micromario wrote:
Fri May 17, 2019 9:38 pm
automatically landfill blueprints if you are holding shift
how do you intend to detect "holding shift", i'm not aware the engine supports anything other than "pressed down once"?
You're right, can't be done. A shame
Do you need to? on_put_item gives you a blueprint placement event (might not happen when not forced but then it doesn't matter really in this case). So instead of adding it when you press shift, do it when you place the item. And you don't even have to modify the actual blueprint. You can modify a copy that you swap in and then back out on placement instead. Check out how BlueprintAlignment mod does it. You can't undo (not added to the undo stack) when a blueprint is aligned. But I think BlueprintAlignment could avoid that issue by not calling build_blueprint and instead swap in a modified blueprint in hand (it swaps in a dummy object to avoid regular placement completely and builds it by itself instead, which is bad with the way build_blueprint currently works). So you could make it work too :)
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

User avatar
micromario
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Apr 05, 2018 11:53 am
Contact:

Re: [0.17] Painless landfill

Post by micromario »

Qon wrote:
Mon May 20, 2019 9:38 pm
micromario wrote:
Mon May 20, 2019 9:13 pm
eradicator wrote:
Sat May 18, 2019 7:12 am
micromario wrote:
Fri May 17, 2019 9:38 pm
automatically landfill blueprints if you are holding shift
how do you intend to detect "holding shift", i'm not aware the engine supports anything other than "pressed down once"?
You're right, can't be done. A shame
Do you need to? on_put_item gives you a blueprint placement event (might not happen when not forced but then it doesn't matter really in this case). So instead of adding it when you press shift, do it when you place the item. And you don't even have to modify the actual blueprint. You can modify a copy that you swap in and then back out on placement instead. Check out how BlueprintAlignment mod does it. You can't undo (not added to the undo stack) when a blueprint is aligned. But I think BlueprintAlignment could avoid that issue by not calling build_blueprint and instead swap in a modified blueprint in hand (it swaps in a dummy object to avoid regular placement completely and builds it by itself instead, which is bad with the way build_blueprint currently works). So you could make it work too :)
Wow, had no idea that callback worked on blueprints. I feel so powerful now

User avatar
micromario
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Apr 05, 2018 11:53 am
Contact:

Re: [0.17] Painless landfill

Post by micromario »

on_put_item

shift_build :: boolean: Item was placed using shift building.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.17] Painless landfill

Post by eradicator »

micromario wrote:
Tue May 21, 2019 3:29 am
on_put_item

shift_build :: boolean: Item was placed using shift building.
I thought i observed the other day that this doen't fire at all if none of the blueprint content can be placed (i.e. all is over water). Maybe i'm remembering that wrong?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Qon
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [0.17] Painless landfill

Post by Qon »

eradicator wrote:
Tue May 21, 2019 7:00 am
micromario wrote:
Tue May 21, 2019 3:29 am
on_put_item

shift_build :: boolean: Item was placed using shift building.
I thought i observed the other day that this doen't fire at all if none of the blueprint content can be placed (i.e. all is over water). Maybe i'm remembering that wrong?
That is probably right :/
For me, it is kind of rare that no part at all is on the ground so it's not a huge problem. But for those cases, I would use the "Fill under entities with Landfill" button from BlueprintExtensions. I already have over 100 mods so why not a few more?

Maybe someone can make a mod interface request/bug report so that we can get on_put_item even when it fails to place all things?
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser

Post Reply

Return to “Ideas and Requests For Mods”