-
Notifications
You must be signed in to change notification settings - Fork 278
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
Orders tab with new Mine action #1640
Conversation
On the future Expansion front, I'm not convinced TypeTags is the right thing to attach actions to. I'd prefer a separate Actions System, not dissimilar to EventActions, dispatched to a furniture (or utility or whatever else) along the lines of Action(string actionName) the main difference being that we would want some to have default behavior, and some to be on by default (such as with deconstruction of course). |
Yes. Was thinking about something similar. Though I have yet to come up with idea to have default behaviors and still have it somehow in .xml for modders to see and override. <Furniture type="door" inheritFrom="generic_furniture">
<Name>Door</Name>
...
</Furniture> This could even decrease the size of furniture definitions if there will be more base definitions. Not sure whether it makes sense to restrict inheritance level to 1, to prevent complex mess, but again, could clean up the definitions. |
That doesn't look a half bad way to do it, though I would have it by default inherit from generic_furniture, if no other inherit is set, no reason to have identical code that has to be on every furniture, since it would be the more common. And I don't see any reason to artificially limit inheritance depth, (unless there's a point at which it becomes a performance concern), don't necessarily need excess effort to implement it if it doesn't just happen as a result of basic implementation (or isn't too much excess effort). If a modder wants to do something more complex that such things makes easier, more power to them, it should however be discouraged in core, unless doing so is required or prevents things from being excessively complex. |
updated
|
When using Deconstruct Furniture and dragging over a large area that includes some furniture, nothing is marked for deconstruction and I get this error
also bonus points if mining in dev mode caused asteroids to be insta-mined, like how deconstruction is handled. |
Conflicted |
Unconflicted. Works with developer mode now. |
To confirm, the deconstruct bug exists in master. |
One small issue: The Inventory Spawning display appears over top of the orders tab, I believe the Construction menu solves this by hiding the inventory spawning window when the construction menu is shown, and reshowing it when the construction menu is hidden. Other than that, looks good. |
Because both of the bugs noted exist on master, merging |
Actually the issue with the inventory spawn window overlaying the orders menu doesn't exist in master... but ok, I guess... |
There is a new tab 'Orders' where I moved Deconstruct and added new Mine orders. So it is possible to use drag to select area for mining.
New tab looks like this:
There is new folder in Models called OrderActions that contains classes (currently Build, Deconstruct and Mine) with job creation and deserialization logic. I have removed FurnitureConstructionJob and FurnitureDeconstructionJob prototypes (did so also for utilities).
Also I experimented with parenting for furniture (have it functional somewhere in git stash), but there was really no benefit as every furniture is unique enough and doesn't share stuff with other furniture.
Please give it a try if you have time and report any issues.