Page 1 of 1
Alternative to build_from_cursor with same non-cursor-related features
Posted: Tue Jun 10, 2025 5:39 am
by sparr
I would like to be able to place an entity in the world with all the same non-cursor-related features and behaviors as build_from_cursor, such as build modes, fast replacing, placing necessary foundation and tile ghosts, adding to the undo stack, setting the last user, etc. I don't want to use build_from_cursor due to
viewtopic.php?t=129192 as well as the extra complexity of having to manage the cursor and extra inventories and item stacks.
This might just involve new options for create_entity, or it could be a new method that is somewhere between create_entity and build_from_cursor.
Re: Alternative to build_from_cursor with same non-cursor-related features
Posted: Tue Jun 10, 2025 8:03 am
by curiosity
create_entity already has most of those, if not all. The only things it doesn't do are automagically use the player's cursor's direction (which you can get) and (IIRC) decrement item count in the stack.
Re: Alternative to build_from_cursor with same non-cursor-related features
Posted: Tue Jun 10, 2025 1:53 pm
by sparr
curiosity wrote: Tue Jun 10, 2025 8:03 amcreate_entity already has most of those, if not all. The only things it doesn't do
How do you get create_entity to put an ice platform ghost and/or concrete ghost under a new ghost entity on Aquilo when build_from_cursor would do it?
Re: Alternative to build_from_cursor with same non-cursor-related features
Posted: Tue Jun 10, 2025 2:25 pm
by Rseding91
sparr wrote: Tue Jun 10, 2025 1:53 pm
curiosity wrote: Tue Jun 10, 2025 8:03 amcreate_entity already has most of those, if not all. The only things it doesn't do
How do you get create_entity to put an ice platform ghost and/or concrete ghost under a new ghost entity on Aquilo when build_from_cursor would do it?
You can't. That feature is exclusive to the player built-from-cursor logic and I don't see it being extracted. Maybe I'm wrong on that - but the person who might know if it's possible is currently busy with bug fixing.
Re: Alternative to build_from_cursor with same non-cursor-related features
Posted: Tue Jun 10, 2025 2:37 pm
by sparr
Another approach to implementing this could be to start from build_from_cursor to make something like build_from_itemstack
Re: Alternative to build_from_cursor with same non-cursor-related features
Posted: Tue Jun 10, 2025 3:11 pm
by sparr
PS: This is an XY post. The underlying problem/goal here is to place pipe ghosts on Aquilo with the necessary tiles under them. The broader inquiry into how to solve that sort of problem with that mod is at
viewtopic.php?t=129325
Re: Alternative to build_from_cursor with same non-cursor-related features
Posted: Wed Jun 11, 2025 6:01 am
by protocol_1903
build_from_itemstack would work perfect, for this and other scenarios like it
Re: Alternative to build_from_cursor with same non-cursor-related features
Posted: Wed Jun 11, 2025 11:48 am
by sparr
protocol_1903 wrote: Wed Jun 11, 2025 6:01 amfor this and other scenarios like it
Elaborating on other uses cases would probably at least slightly increase the chances of something like this getting implemented.
Re: Alternative to build_from_cursor with same non-cursor-related features
Posted: Thu Jun 12, 2025 2:45 am
by protocol_1903
... You know I would if I remembered what scenarios I had in mind. Oops.