Skip to content
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 construction #1403

Closed
wants to merge 0 commits into from
Closed

Add construction #1403

wants to merge 0 commits into from

Conversation

stilnat
Copy link
Contributor

@stilnat stilnat commented Dec 17, 2023

Summary

Add the ability to build stuff, integrated with the current crafting system. This is a complete rework of the current crafting system, as it was too simple to accomodate for the complexity of the crafting system design. The construction is not a separate system, it's included in the crafting system as it works the same way.

PR checklist

  • The game builds properly without errors.
  • No unrelated changes are present.
  • No "trash" files are committed.
  • Relevant code is documented.
  • Update the related GitBook document, or create a new one if needed.

Pictures/Videos)

Testing

Networking checklist

  • Works from host in host mode.
  • Works from server in server mode.
  • Works on server in client mode.
  • Works and is syncronized across different clients.
  • Is persistent.

Changes

  • Changes to current recipes, and added a bunch of new recipes to show how the new system works.
  • Generated a bunch of worldobject references that were missing. Added a script specifically to generate a reference on things that are neither tileobjects or items (AssetReferenceActor) .
  • Adds a crafting menu, to choose between multiple options of craft when needed.
  • Added a bunch of "recipe ingredient" components on prefabs part of a recipe.
  • Added a bunch of "craft" component on prefab that are sources of crafting interactions
  • Removed electric component on light tubes, so we can have some goddamn light without needing a generator.
  • Heavy modifications of steel girder to display many different configurations.
  • Added a bunch of "placed tile objects components" on prefabs that need it. Those should probably be there anyway, and not placed at runtime. (Mostly on walls and windows)
  • Added particles for hiding stuff when building.
  • Fix a small audio bug when a source of sound becomes null (might move that to separate PR)
  • Added ability to drag some stuff (unbolted furnitures)
  • Added an editor window to visualize graphs
  • Added a new utility package for editor coroutines.
  • Removed slices interactions, all crafting interactions relies on a single script now and can choose their interaction types, better than inheritance.

Related issues/PRs

TODO

  • Add intermediary missing step for wall building.
  • Add recipe for glass windows
  • Add deconstruction
  • Add ability to handle crafting stuff in hand. If the target is in hand and result is item as well, keep the item in hand.
  • Add ingredient hold in hand condition for recipes.
  • Move some method from crafting interaction to crafting system
  • Add a custom inspector for crafting recipes
  • Test the recipes conditions, make them work
  • Implement "main result" on recipe step / "secondary result" on recipe link.
  • Add a connector manager inheriting for IAdjacency connector when there's multiple connectors on an object
  • Add logs for errors
  • Check if old recipes still work
  • remove the "crafting slot part" prefab and put it in crafting slot. Rename crafting slot.
  • Fix spawning of stuff on the character instead of in front.
  • Add proper namespaces
  • Change back placed tile objects now that we have multi adjacency connectors
  • Add custom recipe editor.
  • Make loading bar work for clients
  • Add steel rod to steelsheet recipe
  • Display secondary results in crafting menu

Issues

  • Secondary results, such as steel sheets, spawn exactly where the deconstruction happen, which might mean it spawn inside a girder, which is an issue.
  • Jumpsuits don't collide with ground, not sure if it's because of this PR.
  • Some item prefabs have small changes on them, not sure why ... it should not impact their behavior, but if reviewer wants it, I'll go through the tedious process of reverting those.
  • dragging doesn't work on client, and is not properly synced

Future works

  • Make things draggable in the recipe window for extra clarity.
  • Improve the particles when building.
  • Add a default consume method incrafting system, like crafting, keep the method interface for special behavior.
  • Might want to do something about worldAssetReference and GenericObjectSo, being two different ways of keeping data about specific objects, and somewhat conflicting.
  • Add proper control bindings (Iamteapot is our input guy) when interacting with the crafting menu.
  • Add the hologram where the crafting should take place.
  • Replace the use of strings to refer to recipe steps with some sort of generated enums, this is safer and less confusing, I'm afraid using strings will get messy fast with the number of recipes growing.

@cosmiccoincidence

This comment was marked as outdated.

@cosmiccoincidence cosmiccoincidence added the Construction Tasks specific to the construction system. label Dec 31, 2023
@stilnat stilnat changed the title [WIP] Add construction Add construction Feb 10, 2024
@cosmiccoincidence
Copy link
Member

some conflicts that need to be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Construction Tasks specific to the construction system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants