-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add destroy_grid_entity function #341
Conversation
I'd also suggest a |
So, a different function with that name right? Or an overload? |
Well the one you already made clearly expects an entity(uid), but I wouldn't mind if this new function has an overload that treats a single argument as uid and 3 as coordinates... |
It feels a bit weird for me since most overloads have almost the same kind of parameters or just extra ones, though |
Well I think of it this way: What is the harm if we add the overload? Will someone accidentally forget the rest of the arguments and something terrible happens when the uid was supposed to be an x-coordinate, or is it just a convenient shorthand with no risk of confusing anyone... |
well, doesn't make sense passing uid, y position and layer, or passing just x position, hopefully people won't be that dumb 🐈 |
oh and this reminds me that overloads generated in |
Ah yes the new safe io and os stuff is also missing, I was supposed to make something for it, but it's probably easiest to just manually add |
Still suggesting the overloaded function to be called |
ohh... true |
Adds the
destroy_grid_entity
function to be able to remove a grid entity from the grid at the same time it gets destroyed, so the neighbor entities can be fixed right after destroying it, and a way to correctly destroy grid entities before the game has created their decorations, to have the correct decorationsI was thinking I could add some optional parameter to disable destroying the items of the grid entity, so if the user wants to do something different with the items, it could be done by the user itself (?)