Skip to content

Commit

Permalink
Add construction (#1450)
Browse files Browse the repository at this point in the history
* use Icraftable interface in crafting system instead of items

* add craftablke tile objects

* make wall craftable

* add build walls

* added IRecipeIngredient interface

* make building wall kinda work

* partial new asset integration

* fixing crafting

* partial drag stuff around

* add some building interactions

* fix placing crafted tile objects

* fix shot not spawning properly

* fix dragging with item in hand

* add construction particles

* adding particles when crafting

* add screwdriver sound

* add sounds when screwing

* fix audio bug, build, and rename

* fix crafting system encapsulation

* some doc and adding the transform target field

* move ingredients in smoke

* adding multi step crafting for girders

* work on adding sheets on walls

* complete girder craftable

* modify craftable interface

* simplify crafting interactions and add modify

* fix step number increase and mesh

* update replace in interactions

* refactor and some doc

* fix smoke not cancelling

* fix distance order of item chosen

* allow multiple adjacency connectors for girder

* remove passing instance to Icraftable interface

* make tube light work without electricity

* Add a bunch of sounds

* remove assemble interaction

* remove replace in bolt interaction

* replacing strings with enum for crafting type

* Adding build source for hands

* bolt using enum craftiung type

* allow craft in hand

* remove item consume and craft

* add handcrafting

* drag stuff half convincingly

* some doc

* start applying design

* big changes

* adding crafting menu when multiple options (WIP)

* start changing recipes

* add a bunch of asset for database assets stuff

* adding recipes and crafting slots

* remove shit

* some progress on crafting menu

* changes steel wall recipes and fix delayed interactions

* update some settings

* add reinforced stuff on the girder recipe

* add deconstruction process

* make crafting menu not networked

* change crafting menu

* improve crafting menu

* make crafting thing possible to deconstruct

* add some deconstruction on walls

* update construction system a lot

* remove tool sounds

* update sounds group

* update sounds.asset

* consume before spawning

* add multi connector and update girder

* cleanup, doc, and use time from recipe link

* make steel wall to girder recipe and make conditions work

* add a basic recipe editor window

* working layout algorithm for graphs

* add colors and recipe step names

* add ability to zoom/dezoom and pan the recipe window

* add minimum force criteria

* better lines and arrow heads

* some cleanup

* deal with null ref

* make algorithm generic

* stop when reaching minimum force

* make text dynamic

* add some recipe step and fix knife

* some doc

* open menu only if more than one option

* improve crafting menu

* improve crafdting menu

* highlight selected button

* fix bug on recipe editor

* fix missing scripts

* Update EngineeringBorg.prefab

* Update FloorTile.prefab

* Update JumpsuitEngineer.prefab

* remove slot part prefab

* remove missing scripts

* gets back to single connector for placed tile objects

* Update CablesAdjacencyConnector.cs

* single step result, some doc and cleanup

* move scripts

* doc and cleanup

* some doc

* Update WoodLog.prefab

* Update PlasmaTank.prefab

* Update ElectricalCable.prefab

* Update GlassShard.prefab

* Update WoodPlank.prefab

* Update MatterBin.prefab

* Update MicroLaser.prefab

* Update ElectricalWire.prefab

* Update Medkit.prefab

* Update Hatchet.prefab

* Update item.cs

* some doc

* cleanup and doc

* add doc

* cleanup small fix

* simplify crafting interactions and doc

* Delete Builds/Game/Data/Tilemaps/constructionMap.json

* clean up and doc

* add basics for crafting editor window

* update custom recipe editor

* fix editor build issues

* first attempt at networking

* fix modifications of walls not showing

* fix spawning on top of players

* Add ability to add step to recipe and fix some recipes

* fix recipes and some client stuff

* fix loading bar

* some error logs

* fix client crafting smoke

* fix knife and cleanup

* cleanup

* cleanup

* cleanup

* fix small merge issue

* remove is expanded checks

* add steelgirder unbolted item so

* Revert "Merge branch 'develop' into add-construction"

This reverts commit 6c792df, reversing
changes made to 213cf29.

* Revert "Revert "Merge branch 'develop' into add-construction""

This reverts commit fccbe4b.

* fix after merge

* Cleanup 1

* Cleanup 2

* Cleanup 3

* simplify doc

* add ingredients from hand

* Debug -> Log

* simplify craft method

* fix fishnet scene ids

* add getter

* Replace coroutines with DOMove

* Fix camera lock after building

* Oops, actually fix the camera

* Add a crutch to fix duplicated secondary results

* update test station for testing purposes

* remove steelsheet duplicate asset

* return if target asset reference is null

* Rename things, replace string consts

* Improve secondary results

* Improve secondary results, fix menu slots

* Add missing reference

* Rename interactions

* Adjust font

* Implement close button

* Fix mesh bug

* Remove string constant

* Rename stuff, use switch case

* Move stuff around

* Add welder to teststation

* Simplify CraftingRecipeEditor, rename properties in assets

* Add NaughtyAttributes, make steps look good

* Improve visualiser

* fixed some style and missing assembly ref

* fix steelsheetrecipe

* add tooltips

* fix merge assembly issue

* modify tooltip and comment

---------

Co-authored-by: Mechar418 <iamteapot42@gmail.com>
  • Loading branch information
stilnat and iamteapot422 authored Sep 4, 2024
1 parent e9db54c commit 320e2ba
Show file tree
Hide file tree
Showing 416 changed files with 21,880 additions and 723 deletions.
24 changes: 20 additions & 4 deletions Assets/Content/Addressables/AssetGroups/CraftingRecipes.asset
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,30 @@ MonoBehaviour:
m_SerializedData: []
m_GUID: 32ec404d3166dea4b8246e46ce1581b0
m_SerializeEntries:
- m_GUID: 5dafa9029944cdc448a9e1d6d67e438f
m_Address: Assets/Content/Data/Recipes/SlicedBananas.asset
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 5069902a314070f4ca869692cbc791fa
m_Address: Assets/Content/Data/Recipes/WeirdComplexRecipe.asset
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 41ed3a9a199817b47b7ba22ecb7c1ab4
m_Address: Assets/Content/Data/Recipes/SteelGirderUnboltedRecipe.asset
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: b7f1e5d68b05f6743a606736245ff481
m_Address: Assets/Content/Data/Recipes/SteelSheetRecipe.asset
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 115e1db3f2858c14fa6b736f67e552be
m_Address: Assets/Content/Data/Recipes/ReinforcedWallRecipe.asset
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 3d6dc37a96797e442bafcb066f1f9aef
m_Address: Assets/Content/Data/Recipes/SteelWallRecipe.asset
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 3decef2c351e13b4194d1994c485a170
m_Address: Assets/Content/Data/Recipes/SteelGirderRecipe.asset
m_ReadOnly: 0
m_SerializedLabels: []
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: ddc57d0f5f9fb874e8a26db0c5b215e0, type: 2}
m_SchemaSet:
Expand Down
26 changes: 26 additions & 0 deletions Assets/Content/Addressables/AssetGroups/Items.asset
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,22 @@ MonoBehaviour:
m_Address: Assets/Content/WorldObjects/Items/Functional/Parts/PowerCells/PowerCell.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 45d13347efae0f54882e0e56dd770bb1
m_Address: Assets/Content/WorldObjects/Structures/Walls/SteelWall.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 6c2559c2017ada740b245951a23c2e1d
m_Address: Assets/Content/WorldObjects/Structures/Walls/SteelGirder.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 3b33b5cf16a677a4e85a110679cde32a
m_Address: Assets/Content/WorldObjects/Structures/Floors/Plenum.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 5dba4171f2124fb48b0e32c0e10841e0
m_Address: Assets/Content/WorldObjects/Structures/Walls/SteelGirderUnbolted.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: a1a7407e08bb2914c97f431063bf83e2
m_Address: Assets/Content/WorldObjects/Items/Functional/Materials/GlassSheetReinforced.prefab
m_ReadOnly: 0
Expand Down Expand Up @@ -369,6 +385,16 @@ MonoBehaviour:
m_Address: Assets/Content/WorldObjects/Items/Functional/Materials/ElectricalCable.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: b9c224febb4233f4e912745553097652
m_Address: Assets/Content/WorldObjects/Structures/Walls/SteelWindow.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: abcc60752234e584d8d98c9dec03e7cc
m_Address: Assets/Content/WorldObjects/Structures/Walls/SteelWallReinforced.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: f2493b5478dd8e946ba98861f533362e
m_Address: Assets/Content/WorldObjects/Structures/Walls/SteelWindowReinforced.prefab
- m_GUID: 88d1ba1edb4ce5e4fa74c6a8d53e36e1
m_Address: Assets/Content/WorldObjects/Items/Clothing/HeadsetSecurityLeft.prefab
m_ReadOnly: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ MonoBehaviour:
m_Address: Assets/Content/WorldObjects/World/VFX/Health/BleedingParticle.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: ca5e6b5f7c6c5054a8f8155ef44e3e43
m_Address: Assets/Content/WorldObjects/World/VFX/Construction/ConstructionParticle.prefab
m_ReadOnly: 0
m_SerializedLabels: []
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: ddc57d0f5f9fb874e8a26db0c5b215e0, type: 2}
m_SchemaSet:
Expand Down
12 changes: 10 additions & 2 deletions Assets/Content/Data/Databases/CraftingRecipes.asset
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,16 @@ MonoBehaviour:
AssetGroup: {fileID: 11400000, guid: ead2cce9e35a7304ab5b8cc67d03347b, type: 2}
Assets:
_list:
- _key: SlicedBananas
_value: {fileID: 11400000, guid: 5dafa9029944cdc448a9e1d6d67e438f, type: 2}
- _key: WeirdComplexRecipe
_value: {fileID: 11400000, guid: 5069902a314070f4ca869692cbc791fa, type: 2}
- _key: SteelGirderUnboltedRecipe
_value: {fileID: 11400000, guid: 41ed3a9a199817b47b7ba22ecb7c1ab4, type: 2}
- _key: SteelSheetRecipe
_value: {fileID: 11400000, guid: b7f1e5d68b05f6743a606736245ff481, type: 2}
- _key: ReinforcedWallRecipe
_value: {fileID: 11400000, guid: 115e1db3f2858c14fa6b736f67e552be, type: 2}
- _key: SteelWallRecipe
_value: {fileID: 11400000, guid: 3d6dc37a96797e442bafcb066f1f9aef, type: 2}
- _key: SteelGirderRecipe
_value: {fileID: 11400000, guid: 3decef2c351e13b4194d1994c485a170, type: 2}
_new:
14 changes: 14 additions & 0 deletions Assets/Content/Data/Databases/Items.asset
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ MonoBehaviour:
_value: {fileID: 7927487060350510867, guid: c69ed93dc225ea049bbf1a02662c48c0, type: 3}
- _key: PowerCell
_value: {fileID: 2402587210622244651, guid: de67200a4c96d444f800399a033ddfef, type: 3}
- _key: SteelWall
_value: {fileID: 3591147544166670882, guid: 45d13347efae0f54882e0e56dd770bb1, type: 3}
- _key: SteelGirder
_value: {fileID: 3591147544166670882, guid: 6c2559c2017ada740b245951a23c2e1d, type: 3}
- _key: Plenum
_value: {fileID: 8028539322119499722, guid: 3b33b5cf16a677a4e85a110679cde32a, type: 3}
- _key: SteelGirderUnbolted
_value: {fileID: 3591147544166670882, guid: 5dba4171f2124fb48b0e32c0e10841e0, type: 3}
- _key: GlassReinforcedSheet
_value: {fileID: 7125681683583715523, guid: a1a7407e08bb2914c97f431063bf83e2, type: 3}
- _key: GlassSheet
Expand Down Expand Up @@ -192,6 +200,12 @@ MonoBehaviour:
_value: {fileID: 7125681683583715523, guid: cc71128d4bcc0c548ac11481000ac424, type: 3}
- _key: ElectricalCable
_value: {fileID: 7125681683583715523, guid: 0e69918696f58e04f846e985ec7405fe, type: 3}
- _key: SteelWindow
_value: {fileID: 3591147544166670882, guid: b9c224febb4233f4e912745553097652, type: 3}
- _key: SteelWallReinforced
_value: {fileID: 3591147544166670882, guid: abcc60752234e584d8d98c9dec03e7cc, type: 3}
- _key: SteelWindowReinforced
_value: {fileID: 3591147544166670882, guid: f2493b5478dd8e946ba98861f533362e, type: 3}
- _key: HeadsetSecurityLeft
_value: {fileID: 1529136833643899573, guid: 88d1ba1edb4ce5e4fa74c6a8d53e36e1, type: 3}
- _key: HeadsetSecurityRight
Expand Down
2 changes: 2 additions & 0 deletions Assets/Content/Data/Databases/ParticlesEffects.asset
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ MonoBehaviour:
_value: {fileID: 7714517724079113232, guid: 17b0d9163e9cdf14aa557557e7d9d76b, type: 3}
- _key: BleedingParticle
_value: {fileID: 6016476664605660376, guid: a6a77c26ee7edd94c804f4ddd851c8ba, type: 3}
- _key: ConstructionParticle
_value: {fileID: 9126258469831405173, guid: ca5e6b5f7c6c5054a8f8155ef44e3e43, type: 3}
_new:
37 changes: 37 additions & 0 deletions Assets/Content/Data/Recipes/ReinforcedWallRecipe.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c384097cfa3559042be45b4f6328d961, type: 3}
m_Name: ReinforcedWallRecipe
m_EditorClassIdentifier:
Target: {fileID: 11400000, guid: 9b16536c8b6953b459e5906389bc4cdd, type: 2}
Steps:
- _name: SteelWallReinforced
IsInitialState: 1
IsTerminal: 0
CustomCraft: 0
Result: {fileID: 0}
- _name: ReinforcedSteelGirderWithBoltedReinforcedMetalSheets
IsInitialState: 0
IsTerminal: 1
CustomCraft: 0
Result: {fileID: 11400000, guid: bbc616cb55d58144eb50ce126cfca103, type: 2}
StepLinks:
- _elements:
_list: []
_new: {fileID: 0}
_conditions: []
_craftingInteractionType: 5
_from: SteelWallReinforced
_to: ReinforcedSteelGirderWithBoltedReinforcedMetalSheets
_modifyResult: 1
_executionTime: 4
_secondaryResults: []

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 0 additions & 24 deletions Assets/Content/Data/Recipes/SlicedBananas.asset

This file was deleted.

Loading

0 comments on commit 320e2ba

Please sign in to comment.