208 Commits

Author SHA1 Message Date
  Ryan Reed 796b623f89 chore: Bump version 0.1.2 -> 0.2.0 3 weeks ago
  Ryan Reed 207932d643 Inventory and Quickslots Rework (#24) 3 weeks ago
  Ryan Reed 5ed31e57d7 chore: Bump version 0.1.1 -> 0.1.2 3 weeks ago
  Ryan Reed 5257fa7fe1 feat: Update default night/day colors and time of day 3 weeks ago
  Ryan Reed 73fe4fa6c7 fix: Autosaves not working if saves path does not exist 3 weeks ago
  Ryan Reed 6ca52a9233 fix: default item_texture value 3 weeks ago
  Ryan Reed 89d9f46fc2 Bumping to version 0.1.1 4 weeks ago
  Ryan Reed 37849199ce Merge pull request 'Replacing Fullscreen with Window Mode' (#23) from window-mode into master 4 weeks ago
  Ryan Reed 23b303822f Replacing Fullscreen with Window Mode 4 weeks ago
  Ryan Reed eef494d646 Add LifetimeTimer to DroppedBlocks 4 weeks ago
  Ryan Reed d3c013f35c Updating is_valid_placement_target() logic 4 weeks ago
  Ryan Reed 5495d8892e Tweak is_valid_placement() 1 month ago
  Ryan Reed 25e06c7bf1 Minor cleanup 1 month ago
  Ryan Reed 5d8540003e Merge pull request 'Fix: Placing block where player is occupying' (#22) from fix-player-block-placement into master 1 month ago
  Ryan Reed 0bd79ee992 Disallow placing blocks where player is located 1 month ago
  Ryan Reed d3a651816a Updating wood texture to reduce tiling seams 1 month ago
  Ryan Reed 1688e445c5 Moving PREFABs out of Globals and removing Globals autoload 1 month ago
  Ryan Reed 13a90dfe13 Removing old variables 1 month ago
  Ryan Reed 795707db8b Updating version 1 month ago
  Ryan Reed 5c93f41598 Merge pull request 'Pause Menu Redesign' (#21) from pause-menu-redesign into master 1 month ago
  Ryan Reed 1015d89c0b Set visible on menus 1 month ago
  Ryan Reed c0d04507f2 Updating offsets 1 month ago
  Ryan Reed 13ffe080cf Correcting save menu open and hidden after creating a new save 1 month ago
  Ryan Reed 1cb2d08b7d Removing old SaveLoadUI scene and references to ui_node 1 month ago
  Ryan Reed e40c044ad3 Migrating menus into Inherited scenes 1 month ago
  Ryan Reed 5874f7730d Updating default animation 1 month ago
  Ryan Reed 65068a82e4 Updating save menu theme and node names 1 month ago
  Ryan Reed ad0c781dee Moving to a common theme for all menus 1 month ago
  Ryan Reed 67a34d6611 Comments and formatting 1 month ago
  Ryan Reed db15ad68ef Minor offset change 1 month ago
  Ryan Reed 2aba84aa0f Fix hiding UI when saving game and backing out to MainMenu from submenus 1 month ago
  Ryan Reed 8fe40d0c8b Fix hiding UI when saving game for screenshot 1 month ago
  Ryan Reed 82c199be69 Moving MainMenu, SettingsMenu, and SavesMenu into separate scenes 1 month ago
  Ryan Reed 4f91aa12ea Setting default values 1 month ago
  Ryan Reed 069a95fc8b Fixing autosaves setting and saving 1 month ago
  Ryan Reed d9bdcc87c3 Removing old menu scenes and renaming new menu 1 month ago
  Ryan Reed a00fe83a03 Initial work on the redesign 1 month ago
  Ryan Reed c22f21fb9c Replacing various error signals with a single error signal 1 month ago
  Ryan Reed bbb3411065 Adding setting for enabling/disabling autosaves 1 month ago
  Ryan Reed 8e0705ff47 Renaming godot icon and adding a simple skyblock-logo 1 month ago
  Ryan Reed 58b533cad7 Merge pull request 'Preserve time in save files' (#20) from additional-save-properties into master 1 month ago
  Ryan Reed d6b02a9fb3 Adding DroppedBlockDataResource for saving dropped block positions 1 month ago
  Ryan Reed f17171e41a Moving DayNightCycleComponent to Node and saving time when performing a save 1 month ago
  Ryan Reed 13c4781ee8 Fixing loading non-Node3DDataResources 1 month ago
  Ryan Reed 82fe344c12 Allow for Node type resource saving 1 month ago
  Ryan Reed c1ca3a98cb Merge pull request 'Autosaves and Simplifying SaveLevelDataComponent' (#19) from autosaves into master 1 month ago
  Ryan Reed ba7c0e2bf3 Updating default save name text 1 month ago
  Ryan Reed 15efc6145d Renaming date_created to save_date and adding to save file instead of using file modified date 1 month ago
  Ryan Reed 8d5146fd09 Updating comments 1 month ago
  Ryan Reed 48e52f4317 Adding autosave notification 1 month ago
  Ryan Reed 15a1fd8cc6 Renaming _move_autosaves() to _rotate_autosaves() 1 month ago
  Ryan Reed 858dc90b29 Standardizing autosave name 1 month ago
  Ryan Reed 150e01f11e Create the Autosave timer on _ready() 1 month ago
  Ryan Reed c30237b266 Correcting default value 1 month ago
  Ryan Reed 7ab2efefc7 Adding autosave functionality 1 month ago
  Ryan Reed aac4dbb1d9 Initial work toward autosaves 1 month ago
  Ryan Reed 926239c32f Simplifying the game_settings loading 1 month ago
  Ryan Reed d4df06fc40 Moving ui_node out of SaveLevelDataComponent into SaveLoadUI 1 month ago
  Ryan Reed 4f56398134 Moving default_save_icon_resource from SaveLevelDataComponent to SaveGameSettings 1 month ago
  Ryan Reed 0bab8edb65 Replacing filenames in save game settings with prepends 1 month ago
  Ryan Reed b04f54660c Merge pull request 'Save/Load Updates' (#18) from save-load-updates into master 1 month ago
  Ryan Reed 0df41dfc3a Correcting saving Player node 1 month ago
  Ryan Reed 9df29f9f92 Removing unnecessary instancing 1 month ago
  Ryan Reed e5dbf84a57 Fixing appending saves 1 month ago
  Ryan Reed 6845e7407a Moving open_save_list_ui and close_save_list_ui our of SaveGameManager 1 month ago
  Ryan Reed b398613dff Renaming apply_load_complete signal to apply_complete 1 month ago
  Ryan Reed 1eb9340ceb Removing jolt for now 1 month ago
  Ryan Reed 8abff9802a Reordering and renaming functions 1 month ago
  Ryan Reed 3073c8d4d6 Splitting load_save into load_save and apply_save 1 month ago
  Ryan Reed 9cdb1ad26b Fixing warning 1 month ago
  Ryan Reed 0ef53af01d Attempting to stop the double player saving that occurs sometimes 1 month ago
  Ryan Reed ee73433da2 Reworking signals for clarity and ease of use 1 month ago
  Ryan Reed 5dce93c454 Moving errors messages for signals 1 month ago
  Ryan Reed a63af34485 Updating plugin autoload setup 1 month ago
  Ryan Reed 39ff773951 Merge pull request 'Save/Load System Plugin' (#17) from save_load_plugin into master 1 month ago
  Ryan Reed 74cc0029cb Adding missing resources after move 1 month ago
  Ryan Reed b61dbb5069 Moving Save/Load system to a plugin/addon 1 month ago
  Ryan Reed cb5ea9b85a Adding missing default icon 1 month ago
  Ryan Reed a2fd6fc062 Moving Saves UI out of save_load (specific to each project) 1 month ago
  Ryan Reed d9c9ffe764 Updating comments 1 month ago
  Ryan Reed 3bced69ee4 Merge pull request 'Save File Icon Creation' (#16) from game_save_icons into master 1 month ago
  Ryan Reed 68afe1dce8 Removing unnecessary comments 1 month ago
  Ryan Reed f47367dfdf Adding setting for disabling/enabling save screenshots 1 month ago
  Ryan Reed a8b30f2657 Allow defining the save icon size 1 month ago
  Ryan Reed 2df15febad Removing duplicate signal emit() 1 month ago
  Ryan Reed 257002dc90 Renaming function for clarity 1 month ago
  Ryan Reed 8d42e81c61 Correcting resetting world and hiding UI on game load 1 month ago
  Ryan Reed 260e168179 Comment update 1 month ago
  Ryan Reed 8ea3b727f3 Moving icon texture into SaveGameManager 1 month ago
  Ryan Reed 15a8a57eda Removing need for refresh_saves_list signal 1 month ago
  Ryan Reed 71a8b5eed2 Refreshing the list of saves when opening the save list from the pause menu 1 month ago
  Ryan Reed 59f8346774 Adding a (hacky) method for generating the save icon and hiding the UI 1 month ago
  Ryan Reed f618e0c702 Checking string instead of null 1 month ago
  Ryan Reed 5b4cf461f4 Removing save icon when deleting save 1 month ago
  Ryan Reed 14990c4305 Updating how default icon is generated/displayed 1 month ago
  Ryan Reed d841c15fba Add icon creation 1 month ago
  Ryan Reed e9ffdb2bff Moving to Jolt physics 1 month ago
  Ryan Reed bde2931c40 Merge pull request 'Save/Load System Rework with UI' (#15) from save_game_ui into master 1 month ago
  Ryan Reed 7645b8827e Sorting saves list by date created, descending 1 month ago
  Ryan Reed 096bbb434d Allow Scrolling of saves 1 month ago
  Ryan Reed 136a0d304d Hide NewSaveUI by default 1 month ago
  Ryan Reed acab2a7b92 Replace Save Game and Load Game buttons with Saves 1 month ago
  Ryan Reed 34159bcb80 Formatting 1 month ago
  Ryan Reed 675d56be4c Removing save button and added support for deleting save files 1 month ago
  Ryan Reed 0ede9891d9 Create save with just save name (not filename) 1 month ago
  Ryan Reed 038162f581 Add Quick Save name and allow listing of Autosaves and Quicksaves 1 month ago
  Ryan Reed f736f36ec6 Updating README 1 month ago
  Ryan Reed e62d24431d Moving most logic and settings out of SaveDataComponent into SaveGameManager and SaveGameSettingsResource 1 month ago
  Ryan Reed 7e40ded4b2 Don't pause save/load menu ui 1 month ago
  Ryan Reed 1d35160600 Removing unnecessary load 1 month ago
  Ryan Reed 42e6aff24a Set the save name to the filename if name doesn't exist 1 month ago
  Ryan Reed 81592b0368 Removing unnused inventory scene from UI for now 1 month ago
  Ryan Reed 8aab061d36 Displaying Save/Load UI from Pause Menu 1 month ago
  Ryan Reed 57b81c3604 Moving saving/loading management into SaveGameManager 1 month ago
  Ryan Reed 6498e4ad35 Adding save name and removing icon from save file resource 1 month ago
  Ryan Reed f81080eedc Using signal in SaveGameManager for quick saves and loads 1 month ago
  Ryan Reed b3284bc933 Creating basic autosave option (unused) 1 month ago
  Ryan Reed d6cdf5b2eb Initial save game UI work (WIP) 1 month ago
  Ryan Reed b6e31af7a5 Adding a save icon (unused) 1 month ago
  Ryan Reed 9266f5bbfc Adding function for listing file saves 1 month ago
  Ryan Reed 23151a1f77 Tweak to grass textures 1 month ago
  Ryan Reed dec063f4f2 Minor offsets fix 1 month ago
  Ryan Reed f7365767e3 Modifying screenshot 1 month ago
  Ryan Reed a80c6898fc Updating screenshot 1 month ago
  Ryan Reed fa33b2b951 Merge pull request 'Day/Night Cycle' (#14) from day-night-cycle into master 1 month ago
  Ryan Reed 52603b13f1 Setting default day length to 60 seconds 1 month ago
  Ryan Reed b21e2f94f2 Updating signals 1 month ago
  Ryan Reed 7856b02ae6 Adding signals for controlling time 1 month ago
  Ryan Reed eb6da5aacb Adding day/night cycle with gradient and curve resources 1 month ago
  Ryan Reed 727dca5a03 Cleaning up functions and using Marker for spawn location 1 month ago
  Ryan Reed a34eb5b2d9 Creating a few functions 1 month ago
  Ryan Reed 8422c6a3e5 Removing unnecessary .bind()s 1 month ago
  Ryan Reed 90643eb425 Merge pull request 'Add Block Player is Holding' (#13) from block-holder into master 1 month ago
  Ryan Reed e78240ca89 Reverse previous/next quickslot due to vertical alignment 1 month ago
  Ryan Reed 1c63a25f57 Hide held block when opening settings 1 month ago
  Ryan Reed ff0ce03086 Renaming save_signal and load_signal 1 month ago
  Ryan Reed 32f7a426db Adding options for disabling quickslots or held block 1 month ago
  Ryan Reed 57484a4576 Moving UI to the left and adding the held block 1 month ago
  Ryan Reed 9825023feb Seperating BlockMesh scene and script 1 month ago
  Ryan Reed 56bf8c8335 Updating README 1 month ago
  Ryan Reed 373f34c1e5 Merge pull request 'Throw Block' (#12) from throw-block into master 1 month ago
  Ryan Reed 1197ec44de Hiding collision shape 1 month ago
  Ryan Reed 3287455b91 Adding comments 1 month ago
  Ryan Reed c49fcf4554 Moving throw velocity to a Player export 1 month ago
  Ryan Reed 877ad2901c Add throw_item to Player 1 month ago
  Ryan Reed faeae1579c Adding throw block reference 1 month ago
  Ryan Reed d59635a6dd Add ability to throw a block 1 month ago
  Ryan Reed 1bd3b3fa8e Fixing default texture 1 month ago
  Ryan Reed 3911710aad Renaming ItemResource to DBItemResource 1 month ago
  Ryan Reed 90a1c9731e Updating grass texture 1 month ago
  Ryan Reed 40ded7db02 Swapping left and right click interact 1 month ago
  Ryan Reed d53638574f Merge pull request 'Persistent Settings and Graphics Options' (#11) from pause-menu-continued into master 1 month ago
  Ryan Reed 5082eeb39b Set the default value of the settings menu 1 month ago
  Ryan Reed 89402721b2 Load saved settings on game run 1 month ago
  Ryan Reed 6cc3a68d00 Adding resolution id to settings export (GraphicsSettingsResource) 1 month ago
  Ryan Reed adc42c7080 Moving saving_settings and load_settings to signals 1 month ago
  Ryan Reed 9ff3f40114 Renaming button 1 month ago
  Ryan Reed 12dbc451b2 Migrating Game Settings into resource 1 month ago
  Ryan Reed f239bc1b16 Creating GameSettingsManager autoload and migrated Graphics settings 1 month ago
  Ryan Reed 7b114011cf Removing unnecessary casting 1 month ago
  Ryan Reed 6e1b9ce754 Change FOV while changing slider 1 month ago
  Ryan Reed d0cce1b2dd Adding FOV setting 1 month ago
  Ryan Reed 9814dd88a0 Graphics settings can now be applied 1 month ago
  Ryan Reed cadb17f886 Cleaning up tabs and adding initial graphics options (not working) 1 month ago
  Ryan Reed a75ac6613a Setting default resolution to 1280x720 1 month ago
  Ryan Reed 1c84368202 Mirroring look of Settings and Pause menus 1 month ago
  Ryan Reed 385c314906 Moving menus 1 month ago
  Ryan Reed e3109fe3ec Merge pull request 'Rework Pause Menu' (#10) from pause-menu into master 1 month ago
  Ryan Reed cfeda2818a Minor reordering 1 month ago
  Ryan Reed 25fce83a74 Adding settings menu 1 month ago
  Ryan Reed 62bb2f3772 Replaced existing options menu with Pause Menu (missing settings currently) 1 month ago
  Ryan Reed 4cc4d7c09a Minor error checking 1 month ago
  Ryan Reed 053a854822 Minor moving of icon and run scene 1 month ago
  Ryan Reed 81ea30fd49 Using select_next_item() and select_previous_item() 1 month ago
  Ryan Reed 76b2ffa6ef Cleanup of the quickslot selection 1 month ago
  Ryan Reed fa01c7ef12 Merge pull request 'Quickslot Fixes' (#9) from quickslot-fixes into master 1 month ago
  Ryan Reed d5b6172a42 Updating keybindings 1 month ago
  Ryan Reed b5adb17b31 Adding additional binding for previous/next selection 1 month ago
  Ryan Reed 23f45d5465 Quickslot starts from beginning/end when rolling over 1 month ago
  Ryan Reed f499a45371 Ensuring nonexistent item can't be selected 1 month ago
  Ryan Reed 32083e1d80 Fixing quickslot input mappings and adding support for 10 slots (only 6 in use) 1 month ago
  Ryan Reed 044f0760fe Adding glass block 1 month ago
  Ryan Reed cb99add99a Merge pull request 'Quick Slot Highlight' (#8) from quickslot-highlight into master 1 month ago
  Ryan Reed 8d7cacb07e Cleanup 1 month ago
  Ryan Reed 67937caac9 Adding quick slot highlight 1 month ago
  Ryan Reed 4d58e828e1 Updating grass textures 1 month ago
  Ryan Reed 1d6937ee9f Adding grass block 1 month ago
  Ryan Reed a736243e7b Merge pull request 'Save/Load System' (#7) from save-load-system into master 1 month ago
  Ryan Reed ab239e937a Utilize the player Transform for rotation and position 1 month ago
  Ryan Reed e4eb18a30a Correcting warning 1 month ago
  Ryan Reed c4a21a802b Cleanup 1 month ago
  Ryan Reed f757020bcf Fixing issue with loading more than once in a session 1 month ago
  Ryan Reed 06998f15fd Adding game_version to save files 1 month ago
  Ryan Reed 1538eb2ff5 Fixing player spawning on load 1 month ago
  Ryan Reed 5556483af3 Updating error 1 month ago
  Ryan Reed 2106730302 Adding/Updating error messages when saving/loading 1 month ago
  Ryan Reed 40afee187b Cleanup 1 month ago
  Ryan Reed 4ff98118ee Updating variable names 1 month ago
  Ryan Reed 93654d6d03 Adding key bindings 1 month ago
  Ryan Reed e65c319cb1 Minor formatting 1 month ago
  Ryan Reed 5e4f49e21c Ensuring id is defined before trying to hook the target 1 month ago
  Ryan Reed e0f6a76dac Renaming clear_blocks to reset_world 1 month ago
  Ryan Reed c095078d42 Moving away from instantiated block to ensure not including within save data 1 month ago
  Ryan Reed b7a1f2168d Getting loading working, moving player to spawn, and adding signal clearing the world 1 month ago
  Ryan Reed 18afa0c923 Renaming NodeDataResource to Node3DDataResource 1 month ago
  Ryan Reed f5f89144f8 Initial work toward system 1 month ago
  Ryan Reed 09b95950b2 Merge pull request 'Move Blocks to Single MeshInstance3D' (#6) from single-mesh-block into master 1 month ago
  Ryan Reed b504d1e914 Moving from mesh per face to a single MeshInstance3D 1 month ago
201 changed files with 4148 additions and 654 deletions
Split View
  1. +23
    -1
      README.md
  2. +311
    -0
      addons/save_load_system/autoloads/save_game_manager.gd
  3. +1
    -0
      addons/save_load_system/autoloads/save_game_manager.gd.uid
  4. +26
    -0
      addons/save_load_system/components/save_data_component.gd
  5. +1
    -0
      addons/save_load_system/components/save_data_component.gd.uid
  6. +6
    -0
      addons/save_load_system/components/save_data_component.tscn
  7. +11
    -0
      addons/save_load_system/components/save_level_data_component.gd
  8. +1
    -0
      addons/save_load_system/components/save_level_data_component.gd.uid
  9. +8
    -0
      addons/save_load_system/components/save_level_data_component.tscn
  10. +0
    -0
      addons/save_load_system/default_icon.svg
  11. +37
    -0
      addons/save_load_system/default_icon.svg.import
  12. +7
    -0
      addons/save_load_system/plugin.cfg
  13. +17
    -0
      addons/save_load_system/plugin.gd
  14. +1
    -0
      addons/save_load_system/plugin.gd.uid
  15. +20
    -0
      addons/save_load_system/resources/node_types/node3d_data_resource.gd
  16. +1
    -0
      addons/save_load_system/resources/node_types/node3d_data_resource.gd.uid
  17. +9
    -0
      addons/save_load_system/resources/node_types/node3d_data_resource.tres
  18. +10
    -0
      addons/save_load_system/resources/node_types/node_data_resource.gd
  19. +1
    -0
      addons/save_load_system/resources/node_types/node_data_resource.gd.uid
  20. +7
    -0
      addons/save_load_system/resources/node_types/node_data_resource.tres
  21. +11
    -0
      addons/save_load_system/resources/save_file_details_resource.gd
  22. +1
    -0
      addons/save_load_system/resources/save_file_details_resource.gd.uid
  23. +11
    -0
      addons/save_load_system/resources/save_game_data_resource.gd
  24. +1
    -0
      addons/save_load_system/resources/save_game_data_resource.gd.uid
  25. +9
    -0
      addons/save_load_system/resources/save_game_data_resource.tres
  26. +19
    -0
      addons/save_load_system/resources/save_game_settings_resource.gd
  27. +1
    -0
      addons/save_load_system/resources/save_game_settings_resource.gd.uid
  28. +15
    -0
      addons/save_load_system/resources/save_game_settings_resource.tres
  29. +28
    -0
      addons/save_load_system/resources/scene_data_resource.gd
  30. +1
    -0
      addons/save_load_system/resources/scene_data_resource.gd.uid
  31. +10
    -0
      addons/save_load_system/resources/scene_data_resource.tres
  32. +1
    -0
      assets/godot-icon.svg
  33. +3
    -3
      assets/godot-icon.svg.import
  34. +1
    -1
      assets/materials/dirt.tres
  35. +10
    -0
      assets/materials/glass.tres
  36. +9
    -0
      assets/materials/grass.tres
  37. +1
    -1
      assets/materials/leaves.tres
  38. +1
    -1
      assets/materials/stone.tres
  39. +9
    -0
      assets/materials/wood.tres
  40. +0
    -9
      assets/materials/wood_ends.tres
  41. +0
    -9
      assets/materials/wood_side.tres
  42. BIN
      assets/skyblock-logo.png
  43. +34
    -0
      assets/skyblock-logo.png.import
  44. BIN
      assets/skyblock-screenshot.png
  45. BIN
      assets/textures/dirt-block.png
  46. +4
    -4
      assets/textures/dirt-block.png.import
  47. BIN
      assets/textures/dirt-grass.png
  48. BIN
      assets/textures/glass-block.png
  49. +35
    -0
      assets/textures/glass-block.png.import
  50. BIN
      assets/textures/glass.png
  51. +34
    -0
      assets/textures/glass.png.import
  52. BIN
      assets/textures/grass-block.png
  53. +35
    -0
      assets/textures/grass-block.png.import
  54. BIN
      assets/textures/grass.png
  55. +3
    -3
      assets/textures/grass.png.import
  56. BIN
      assets/textures/leaves-block.png
  57. +35
    -0
      assets/textures/leaves-block.png.import
  58. BIN
      assets/textures/stone-block.png
  59. +35
    -0
      assets/textures/stone-block.png.import
  60. BIN
      assets/textures/wood-block.png
  61. +35
    -0
      assets/textures/wood-block.png.import
  62. BIN
      assets/textures/wood-end.png
  63. BIN
      assets/textures/wood-side.png
  64. BIN
      assets/textures/wood.png
  65. +3
    -3
      assets/textures/wood.png.import
  66. BIN
      assets/ui/folder-open-hover.png
  67. +34
    -0
      assets/ui/folder-open-hover.png.import
  68. BIN
      assets/ui/folder-open-normal.png
  69. +34
    -0
      assets/ui/folder-open-normal.png.import
  70. BIN
      assets/ui/folder-open-pressed.png
  71. +34
    -0
      assets/ui/folder-open-pressed.png.import
  72. BIN
      assets/ui/save-hover.png
  73. +34
    -0
      assets/ui/save-hover.png.import
  74. BIN
      assets/ui/save-normal.png
  75. +34
    -0
      assets/ui/save-normal.png.import
  76. BIN
      assets/ui/save-pressed.png
  77. +34
    -0
      assets/ui/save-pressed.png.import
  78. BIN
      assets/ui/spinner-clockwise.png
  79. +34
    -0
      assets/ui/spinner-clockwise.png.import
  80. BIN
      assets/ui/trash-hover.png
  81. +34
    -0
      assets/ui/trash-hover.png.import
  82. BIN
      assets/ui/trash-normal.png
  83. +34
    -0
      assets/ui/trash-normal.png.import
  84. BIN
      assets/ui/trash-pressed.png
  85. +34
    -0
      assets/ui/trash-pressed.png.import
  86. +4
    -1
      autoloads/db_items.gd
  87. +3
    -1
      autoloads/entity_manager.gd
  88. +130
    -0
      autoloads/game_settings_manager.gd
  89. +1
    -0
      autoloads/game_settings_manager.gd.uid
  90. +0
    -11
      autoloads/globals.gd
  91. +0
    -1
      autoloads/globals.gd.uid
  92. +186
    -9
      autoloads/inventory_manager.gd
  93. +13
    -0
      autoloads/signal_manager.gd
  94. +1
    -0
      autoloads/signal_manager.gd.uid
  95. +75
    -12
      project.godot
  96. +2
    -8
      resources/block_resource.gd
  97. +1
    -1
      resources/blocks/001_dirt.tres
  98. +1
    -1
      resources/blocks/002_stone.tres
  99. +3
    -9
      resources/blocks/003_wood.tres
  100. +1
    -1
      resources/blocks/004_leaves.tres

+ 23
- 1
README.md View File

@ -4,5 +4,27 @@
Building a Minecraft clone of sorts to learn Godot.
This was initially based on Sable Spirit Studio's YT series but has evolved to be quite a bit different.
![Skyblock Screenshot](assets/skyblock-screenshot.png)
## Key Bindings
| Description | Binding |
| ----------- | ------- |
| Create block | `Left Click` |
| Delete/Remove block | `Right Click` |
| Throw block | `Q` |
| Change selected block (next) | `.` |
| Change selected block (previous) | `,` |
| Change selected block | `Scroll Wheel` |
| Crouch | `Ctrl` |
| Jump | `Space` |
| Quick Load | `F6` |
| Quick Save | `F5` |
| Sprint/Run | `Shift` |
## Acknowledgements
* [Sable Spirit Studios](https://www.youtube.com/@SableSpiritStudio) for the inspiration and ideas
* [Tabler](https://tabler.io) for UI icons

+ 311
- 0
addons/save_load_system/autoloads/save_game_manager.gd View File

@ -0,0 +1,311 @@
## Performs the managing of saves by saving, loading, and returning a list of saves[br][br]
##
## Below is a basic definition of various components and resources for reference:[br]
## * SaveLevelDataComponent - The root save component that provides the Save Settings[br]
## * SaveDataComponent - Attached to a node that has properties that need to be saved[br]
## * Node Type Resources - Each type of node that requires saving, such as a TileMapLayer, needs a resource created
extends Node
signal apply_complete
signal apply_save ## Apply the loaded data to the tree. Note: This should happen AFTER load_save()
signal autosave_complete ## Autosave has completed
signal autosave_start ## Autosave has started
signal create_autosave
signal create_save(save_name: String)
signal delete_save(filename: String)
signal disable_autosaves
signal enable_autosaves
signal error(error_message: String)
signal load_complete
signal load_save(filename: String) ## Loads the save into memory. Does NOT apply the load as this allows for other actions (such as resetting the levle/world).[br]Don't forget to run `apply_save` after loading
signal save_complete
signal start_autosave
signal stop_autosave
signal quick_save
signal quick_load
signal toggle_save_icon_generation(toggled: bool) ## Enable/Disable the generation of a screenshot during save for the save icon.
var _autosaves_enabled: bool = true
var _autosave_timer: Timer = Timer.new()
var _enable_save_icon_generation: bool = true
var _loaded_save_resource: SaveGameDataResource = SaveGameDataResource.new()
var _save_game_settings: SaveGameSettings ## Contains the save paths, filename prepends, and other save settings
var _save_icon_size: Vector2i = Vector2i(896, 504) ## If Vector2.ZERO, uses the user's resolution
func _ready() -> void:
apply_save.connect(_on_apply_save)
create_save.connect(_on_save_game_as_resource)
delete_save.connect(_on_delete_save)
disable_autosaves.connect(_on_disable_autosaves)
enable_autosaves.connect(_on_enable_autosaves)
load_save.connect(_on_load_game_save)
quick_load.connect(_on_quick_load)
quick_save.connect(_on_quick_save)
start_autosave.connect(_on_start_autosave)
stop_autosave.connect(_on_stop_autosave)
toggle_save_icon_generation.connect(_on_toggle_save_icon_generation)
_autosave_timer.name = "AutosaveTimer"
_autosave_timer.one_shot = false
_autosave_timer.timeout.connect(_on_autosave_timer_timeout)
add_child(_autosave_timer)
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("quick_save"):
quick_save.emit()
if event.is_action_pressed("quick_load"):
quick_load.emit()
func list_saves(include_quick_saves: bool = true, include_autosaves: bool = true) -> Array[SaveFileDetailsResource]:
var save_files: Array[SaveFileDetailsResource] = []
if not _load_save_settings():
return save_files
var save_game_data_path: String = _save_game_settings.save_game_data_path
if !DirAccess.dir_exists_absolute(save_game_data_path):
return save_files
for filename: String in ResourceLoader.list_directory(save_game_data_path):
# TODO: Rework so the settings determine the file_name using prepends
if filename.begins_with(_save_game_settings.quicksave_file_name_prepend) and not include_quick_saves:
continue
elif filename.begins_with(_save_game_settings.autosave_file_name_prepend) and not include_autosaves:
continue
elif !filename.begins_with(_save_game_settings.save_file_name_prepend) and !filename.begins_with(_save_game_settings.quicksave_file_name_prepend) and !filename.begins_with(_save_game_settings.autosave_file_name_prepend):
continue
var _save_path: String = save_game_data_path + filename
var _save_icon: String = filename.replace(".tres", ".png")
var _save_resource: SaveFileDetailsResource = SaveFileDetailsResource.new()
# TODO: Reconsider loading the save to get the name
# This could be a large save making opening each one slow
# Should work out a better method for getting the save name (filename != save name)
var _save_file: SaveGameDataResource = ResourceLoader.load(_save_path)
_save_resource.save_name = _save_file.save_name
_save_resource.save_date = _save_file.save_date
_save_resource.filename = filename
## In 4.5, this can probably be replaced with FileAccess.get_size(_save_path)
## This should reduce the need for opening the file here
var _loaded_file: FileAccess = FileAccess.open(_save_path, FileAccess.READ)
_save_resource.filesize = _loaded_file.get_length()
_save_resource.save_icon_texture = _generate_save_icon_texture(save_game_data_path + _save_icon)
save_files.append(_save_resource)
save_files.sort_custom(_custom_save_file_sort)
return save_files
func _create_autosave() -> void:
if not _load_save_settings(): return
_autosave_timer.stop()
autosave_start.emit()
_rotate_autosaves()
var autosave_filename: String = _save_game_settings.autosave_file_name_prepend + "01.tres"
_save_game_as_resource("Auto Save", autosave_filename)
autosave_complete.emit()
_autosave_timer.start(_save_game_settings.autosave_duration)
## Sort the save files list by date created, descending
func _custom_save_file_sort(a: SaveFileDetailsResource, b: SaveFileDetailsResource) -> bool:
return a.save_date > b.save_date
## Save the properties defined on the SaveDataComponents attached to various nodes (such as Block)
func _generate_save_game_resource() -> SaveGameDataResource:
var nodes: Array = get_tree().get_nodes_in_group("save_data_component")
if nodes == null: return
var _resource: SaveGameDataResource = SaveGameDataResource.new()
for node: Node in nodes:
if node is SaveDataComponent:
@warning_ignore("unsafe_method_access")
var save_data_resource: NodeDataResource = node._save_data()
var save_final_resource: NodeDataResource = save_data_resource.duplicate()
_resource.save_data_nodes.append(save_final_resource)
return _resource
## Generate the texture for use in the save file listing
func _generate_save_icon_texture(save_icon: String) -> Texture2D:
var _icon_texture: Texture2D = ImageTexture.new()
if save_icon != null and !FileAccess.file_exists(save_icon):
_icon_texture = _save_game_settings.default_save_icon_resource
elif save_icon == null:
_icon_texture = _save_game_settings.default_save_icon_resource
else:
var _icon_image: Image = Image.new()
_icon_image.load(save_icon)
@warning_ignore("unsafe_method_access")
_icon_texture.set_image(_icon_image)
return _icon_texture
func _load_game_resource(resource_filename: String) -> void:
if not _load_save_settings(): return
var save_game_file_path: String = _save_game_settings.save_game_data_path + resource_filename
if !FileAccess.file_exists(save_game_file_path):
error.emit("Failed to load save. File does not exist: %s" % save_game_file_path)
return
_loaded_save_resource = ResourceLoader.load(save_game_file_path)
if _loaded_save_resource == null:
error.emit("Failed to load save. Unknown format? %s" % save_game_file_path)
return
load_complete.emit()
## Find the SaveLevelDataComponent within the tree which stores the save settings
func _load_save_settings() -> bool:
var _save_level_data_component: SaveLevelDataComponent = get_tree().get_first_node_in_group("save_level_data_component")
if _save_level_data_component == null:
error.emit("Failed to Save Settings. Could not find SaveLevelDataComponent node in tree")
return false
_save_game_settings = _save_level_data_component.settings
return true
## Increment autosave numbers and if we've reach max number of autosaves, remove the oldest one
func _rotate_autosaves() -> void:
var saves_dir = DirAccess.open(_save_game_settings.save_game_data_path)
if saves_dir == null:
DirAccess.make_dir_absolute(_save_game_settings.save_game_data_path)
saves_dir = DirAccess.open(_save_game_settings.save_game_data_path)
var autosaves: Array[String] = []
for filename in saves_dir.get_files():
if !filename.begins_with(_save_game_settings.autosave_file_name_prepend): continue
if !filename.ends_with(".tres"): continue
autosaves.append(filename)
if autosaves.size() == _save_game_settings.max_autosaves: # Delete oldest save
DirAccess.remove_absolute(_save_game_settings.save_game_data_path + autosaves.pop_back())
var filepath: String = _save_game_settings.save_game_data_path + _save_game_settings.autosave_file_name_prepend
for index in range(autosaves.size(), 0, -1):
var old_save_path: String = "%s%02d.tres" % [filepath, index]
var old_screenshot_path: String = "%s%02d.png" % [filepath, index]
var new_save_path: String = "%s%02d.tres" % [filepath, index + 1]
var new_screenshot_path: String = "%s%02d.png" % [filepath, index + 1]
DirAccess.copy_absolute(old_save_path, new_save_path)
if FileAccess.file_exists(old_screenshot_path):
DirAccess.copy_absolute(old_screenshot_path, new_screenshot_path)
func _save_game_as_resource(save_name, resource_filename: String) -> void:
if not _load_save_settings(): return
if !DirAccess.dir_exists_absolute(_save_game_settings.save_game_data_path):
DirAccess.make_dir_absolute(_save_game_settings.save_game_data_path)
var save_game_file_path: String = _save_game_settings.save_game_data_path + resource_filename
var _save_resource: SaveGameDataResource = _generate_save_game_resource()
_save_resource.save_name = save_name
_save_resource.save_date = Time.get_datetime_string_from_system(false, true)
var result: int = ResourceSaver.save(_save_resource, save_game_file_path)
if result != OK:
error.emit("Failed to save game (" , result, "): " + save_game_file_path)
return
_take_save_screenshot(save_game_file_path)
save_complete.emit()
## Takes a screenshot and saves next to the save file[br]
## The icon utilizes the same filename as the save file, replacing `.tres` with `.png`
func _take_save_screenshot(save_game_file_path: String) -> void:
if !_enable_save_icon_generation: return
var _icon_filepath: String = save_game_file_path.replace(".tres", ".png")
var _icon: Image = get_viewport().get_texture().get_image()
if _save_icon_size != Vector2i.ZERO:
_icon.resize(_save_icon_size.x, _save_icon_size.y)
_icon.save_png(_icon_filepath)
## Apply the loaded save. Should be performed after load_save
func _on_apply_save() -> void:
if _loaded_save_resource == null: return
var root_node: Window = get_tree().root
for resource: Resource in _loaded_save_resource.save_data_nodes:
if resource is NodeDataResource:
(resource as NodeDataResource)._load_data(root_node)
apply_complete.emit()
func _on_autosave_timer_timeout() -> void:
if not _autosaves_enabled: return
_create_autosave()
## Delete both the save file and the related screenshot
func _on_delete_save(filename: String) -> void:
if filename.length() < 1:
error.emit("Failed to delete save. Empty filename provided.")
return
var save_file_path: String = _save_game_settings.save_game_data_path + filename
DirAccess.remove_absolute(save_file_path)
DirAccess.remove_absolute(save_file_path.replace(".tres", ".png")) # Delete icon
func _on_disable_autosaves() -> void:
_autosaves_enabled = false
stop_autosave.emit()
func _on_enable_autosaves() -> void:
_autosaves_enabled = true
func _on_load_game_save(resource_filename: String) -> void:
_load_game_resource(resource_filename)
func _on_quick_load() -> void:
if not _load_save_settings(): return
_load_game_resource(_save_game_settings.quicksave_file_name_prepend + "game_data.tres")
func _on_quick_save() -> void:
if not _load_save_settings(): return
_save_game_as_resource("Quick Save", _save_game_settings.quicksave_file_name_prepend + "game_data.tres")
## Save the game, with a filename of `<save_prepend><current_date>.tres
func _on_save_game_as_resource(save_name: String) -> void:
if not _load_save_settings(): return
var current_date: String = Time.get_datetime_string_from_system().replace(":", "")
var _filename: String = _save_game_settings.save_file_name_prepend + current_date + ".tres"
_loaded_save_resource.save_name = save_name
_save_game_as_resource(save_name, _filename)
save_complete.emit()
func _on_start_autosave() -> void:
if not _autosaves_enabled: return
if _save_game_settings == null:
_load_save_settings()
_autosave_timer.start(_save_game_settings.autosave_duration)
func _on_stop_autosave() -> void:
_autosave_timer.stop()
func _on_toggle_save_icon_generation(toggled: bool) -> void:
_enable_save_icon_generation = toggled

+ 1
- 0
addons/save_load_system/autoloads/save_game_manager.gd.uid View File

@ -0,0 +1 @@
uid://dau7tp2xpp0w

+ 26
- 0
addons/save_load_system/components/save_data_component.gd View File

@ -0,0 +1,26 @@
## Add to any node that has data we need to save
## Each node type, such as TileMapLayer, will need a resource created for it
## See `res://save_load/resources/node_types/`
class_name SaveDataComponent
extends Node
@export var save_data_resource: Resource ## The resource describing the type of object being saved
@onready var parent_node: Node = get_parent()
func _ready() -> void:
add_to_group("save_data_component")
func _save_data() -> Resource:
if parent_node == null:
return
if save_data_resource == null:
push_error("save_data_resource not defined on node ", parent_node.name)
return
save_data_resource._save_data(parent_node)
return save_data_resource

+ 1
- 0
addons/save_load_system/components/save_data_component.gd.uid View File

@ -0,0 +1 @@
uid://b0400fjcqflgh

+ 6
- 0
addons/save_load_system/components/save_data_component.tscn View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://baki8rbf1ti0r"]
[ext_resource type="Script" uid="uid://b0400fjcqflgh" path="res://addons/save_load_system/components/save_data_component.gd" id="1_nm1vf"]
[node name="SaveDataComponent" type="Node"]
script = ExtResource("1_nm1vf")

+ 11
- 0
addons/save_load_system/components/save_level_data_component.gd View File

@ -0,0 +1,11 @@
## Provides an easy reference for save settings through an export rather than code
## Should be attached to the main world/level scene
class_name SaveLevelDataComponent
extends Node
@export var settings: SaveGameSettings ## The SaveGameSettings resource
func _ready() -> void:
add_to_group("save_level_data_component")

+ 1
- 0
addons/save_load_system/components/save_level_data_component.gd.uid View File

@ -0,0 +1 @@
uid://c7x2qvyu62230

+ 8
- 0
addons/save_load_system/components/save_level_data_component.tscn View File

@ -0,0 +1,8 @@
[gd_scene load_steps=3 format=3 uid="uid://c3pqilb6yh5kc"]
[ext_resource type="Script" uid="uid://c7x2qvyu62230" path="res://addons/save_load_system/components/save_level_data_component.gd" id="1_exguq"]
[ext_resource type="Resource" uid="uid://o32fooj1lxg7" path="res://addons/save_load_system/resources/save_game_settings_resource.tres" id="2_rkr1f"]
[node name="SaveLevelDataComponent" type="Node"]
script = ExtResource("1_exguq")
settings = ExtResource("2_rkr1f")

icon.svg → addons/save_load_system/default_icon.svg View File


+ 37
- 0
addons/save_load_system/default_icon.svg.import View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b4lam0dwtv8fq"
path="res://.godot/imported/default_icon.svg-8f0c0a4577d41c2e54da72bcdea5ad34.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/save_load_system/default_icon.svg"
dest_files=["res://.godot/imported/default_icon.svg-8f0c0a4577d41c2e54da72bcdea5ad34.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

+ 7
- 0
addons/save_load_system/plugin.cfg View File

@ -0,0 +1,7 @@
[plugin]
name="Save Load System"
description="An overengineered Save/Load system"
author="Ryan Reed"
version="1.0"
script="plugin.gd"

+ 17
- 0
addons/save_load_system/plugin.gd View File

@ -0,0 +1,17 @@
@tool
extends EditorPlugin
func _enter_tree() -> void:
pass
func _exit_tree() -> void:
# Clean-up of the plugin goes here.
pass
func _enable_plugin() -> void:
add_autoload_singleton("SaveGameManager", "res://addons/save_load_system/autoloads/save_game_manager.gd")
func _disable_plugin() -> void:
remove_autoload_singleton("SaveGameManager")

+ 1
- 0
addons/save_load_system/plugin.gd.uid View File

@ -0,0 +1 @@
uid://bj77sfap4rqke

+ 20
- 0
addons/save_load_system/resources/node_types/node3d_data_resource.gd View File

@ -0,0 +1,20 @@
## The base resource for saving a specific Node
class_name Node3DDataResource
extends NodeDataResource
@export var transform: Transform3D
@export var node_path: NodePath
@export var parent_node_path: NodePath
func _save_data(node: Node3D) -> void:
transform = node.transform
node_path = node.get_path()
var parent_node: Node3D = node.get_parent()
if parent_node != null:
parent_node_path = parent_node.get_path()
func _load_data(_window: Window) -> void:
pass

+ 1
- 0
addons/save_load_system/resources/node_types/node3d_data_resource.gd.uid View File

@ -0,0 +1 @@
uid://drj0sfem1gmsk

+ 9
- 0
addons/save_load_system/resources/node_types/node3d_data_resource.tres View File

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="NodeDataResource" load_steps=2 format=3 uid="uid://dald1lud7ktsj"]
[ext_resource type="Script" uid="uid://drj0sfem1gmsk" path="res://addons/save_load_system/resources/node_types/node3d_data_resource.gd" id="1_b70a7"]
[resource]
script = ExtResource("1_b70a7")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
node_path = NodePath("")
parent_node_path = NodePath("")

+ 10
- 0
addons/save_load_system/resources/node_types/node_data_resource.gd View File

@ -0,0 +1,10 @@
## The base resource for saving a specific Node
class_name NodeDataResource
extends Resource
func _save_data(node: Node3D) -> void:
pass
func _load_data(_window: Window) -> void:
pass

+ 1
- 0
addons/save_load_system/resources/node_types/node_data_resource.gd.uid View File

@ -0,0 +1 @@
uid://ku7pqlxdta2r

+ 7
- 0
addons/save_load_system/resources/node_types/node_data_resource.tres View File

@ -0,0 +1,7 @@
[gd_resource type="Resource" script_class="NodeDataResource" load_steps=2 format=3 uid="uid://btcyin8cer74n"]
[ext_resource type="Script" uid="uid://ku7pqlxdta2r" path="res://addons/save_load_system/resources/node_types/node_data_resource.gd" id="1_0d08a"]
[resource]
script = ExtResource("1_0d08a")
metadata/_custom_type_script = "uid://ku7pqlxdta2r"

+ 11
- 0
addons/save_load_system/resources/save_file_details_resource.gd View File

@ -0,0 +1,11 @@
## Details related to a filesave
## Used for displaying save file details in the UI
class_name SaveFileDetailsResource
extends Node
@export var save_name: String = "My Save"
@export var filename: String = ""
@export var save_date: String = ""
@export var filesize: int = 0
@export var save_icon_texture: Texture2D

+ 1
- 0
addons/save_load_system/resources/save_file_details_resource.gd.uid View File

@ -0,0 +1 @@
uid://hj7t2segibta

+ 11
- 0
addons/save_load_system/resources/save_game_data_resource.gd View File

@ -0,0 +1,11 @@
## The entire save structure that contains all Node3DDataResources
## Node3DDataResources will be located by the SaveLevelDataComponent
class_name SaveGameDataResource
extends Resource
@export var game_version: String = ProjectSettings.get_setting("application/config/version")
@export var save_data_nodes: Array[NodeDataResource]
@export var save_name: String
@export var save_date: String

+ 1
- 0
addons/save_load_system/resources/save_game_data_resource.gd.uid View File

@ -0,0 +1 @@
uid://di6ov7tpewhft

+ 9
- 0
addons/save_load_system/resources/save_game_data_resource.tres View File

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="SaveGameDataResource" load_steps=3 format=3 uid="uid://dkniygoky2jcx"]
[ext_resource type="Script" uid="uid://drj0sfem1gmsk" path="res://addons/save_load_system/resources/node_types/node3d_data_resource.gd" id="1_7yx7n"]
[ext_resource type="Script" uid="uid://di6ov7tpewhft" path="res://addons/save_load_system/resources/save_game_data_resource.gd" id="1_sbw5t"]
[resource]
script = ExtResource("1_sbw5t")
save_data_nodes = Array[ExtResource("1_7yx7n")]([])
metadata/_custom_type_script = "uid://di6ov7tpewhft"

+ 19
- 0
addons/save_load_system/resources/save_game_settings_resource.gd View File

@ -0,0 +1,19 @@
class_name SaveGameSettings
extends Resource
## See documentation to where this path is: https://docs.godotengine.org/en/stable/tutorials/io/data_paths.html#accessing-persistent-user-data-user[br][br]
## Default Paths:[br]
## * Windows: %APPDATA%\Godot\app_userdata\[project_name][br]
## * macOS: ~/Library/Application Support/Godot/app_userdata/[project_name][br]
## * Linux: ~/.local/share/godot/app_userdata/[project_name][br]
@export var save_game_data_path: String = "user://game_data/"
@export var max_autosaves: int = 5
@export var autosave_duration: int = 60 ## How often, in seconds, should an autosave run[br]SaveGameManager will NOT autostart the autosave timer. This must be done by the world/scene.
@export var save_file_name_prepend: String = "save_"
@export var quicksave_file_name_prepend: String = "quicksave_"
@export var autosave_file_name_prepend: String = "autosave_"
@export var default_save_icon_resource: CompressedTexture2D

+ 1
- 0
addons/save_load_system/resources/save_game_settings_resource.gd.uid View File

@ -0,0 +1 @@
uid://d0iptf06t7f47

+ 15
- 0
addons/save_load_system/resources/save_game_settings_resource.tres View File

@ -0,0 +1,15 @@
[gd_resource type="Resource" script_class="SaveGameSettings" load_steps=3 format=3 uid="uid://o32fooj1lxg7"]
[ext_resource type="Texture2D" uid="uid://b4lam0dwtv8fq" path="res://addons/save_load_system/default_icon.svg" id="1_fm0fk"]
[ext_resource type="Script" uid="uid://d0iptf06t7f47" path="res://addons/save_load_system/resources/save_game_settings_resource.gd" id="1_o1tpj"]
[resource]
script = ExtResource("1_o1tpj")
save_game_data_path = "user://game_data/"
autosave_duration = 60
max_autosaves = 5
save_file_name_prepend = "save_"
quicksave_file_name_prepend = "quicksave_"
autosave_file_name_prepend = "autosave_"
default_save_icon_resource = ExtResource("1_fm0fk")
metadata/_custom_type_script = "uid://d0iptf06t7f47"

+ 28
- 0
addons/save_load_system/resources/scene_data_resource.gd View File

@ -0,0 +1,28 @@
## Used with the SaveDataComponent for defining node and scene_file_path
class_name SceneDataResource
extends Node3DDataResource
@export var node_name: String
@export var scene_file_path: String
func _save_data(node: Node3D) -> void:
super._save_data(node)
node_name = node.name
scene_file_path = node.scene_file_path
func _load_data(window: Window) -> void:
var parent_node: Node3D
if parent_node_path != null:
parent_node = window.get_node_or_null(parent_node_path)
var scene_node: Node3D
if node_path != null:
var scene_file_resource: Resource = load(scene_file_path)
scene_node = scene_file_resource.instantiate()
if parent_node != null and scene_node != null:
parent_node.add_child(scene_node)

+ 1
- 0
addons/save_load_system/resources/scene_data_resource.gd.uid View File

@ -0,0 +1 @@
uid://bxr74kmjt6heh

+ 10
- 0
addons/save_load_system/resources/scene_data_resource.tres View File

@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="SceneDataResource" load_steps=2 format=3 uid="uid://duqhhi2nlic6n"]
[ext_resource type="Script" uid="uid://bxr74kmjt6heh" path="res://addons/save_load_system/resources/scene_data_resource.gd" id="1_ihw72"]
[resource]
script = ExtResource("1_ihw72")
global_position = Vector2(0, 0)
node_path = NodePath("")
parent_node_path = NodePath("")
metadata/_custom_type_script = "uid://bxr74kmjt6heh"

+ 1
- 0
assets/godot-icon.svg View File

@ -0,0 +1 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><g transform="translate(32 32)"><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99z" fill="#363d52"/><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99zm0 4h96c6.64 0 12 5.35 12 11.99v95.98c0 6.64-5.35 11.99-12 11.99h-96c-6.64 0-12-5.35-12-11.99v-95.98c0-6.64 5.36-11.99 12-11.99z" fill-opacity=".4"/></g><g stroke-width="9.92746" transform="matrix(.10073078 0 0 .10073078 12.425923 2.256365)"><path d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 919.24059 771.67186)"/><path d="m0 0v-47.514-6.035-5.492c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325c5.09692 6.4164715 9.92323 13.494208 13.621 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.4426579-6.973692 9.2079702-13.9828876 13.621-19.449z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 104.69892 525.90697)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.066.067c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 784.07144 817.24284)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 389.21484 625.67104)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 367.36686 631.05679)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 511.99336 724.73954)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 634.78706 625.67104)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 656.64056 631.05679)"/></g></svg>

icon.svg.import → assets/godot-icon.svg.import View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dknv7amroftm8"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
path="res://.godot/imported/godot-icon.svg-16d3e927863816a5b5801fdcd03abe47.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
source_file="res://assets/godot-icon.svg"
dest_files=["res://.godot/imported/godot-icon.svg-16d3e927863816a5b5801fdcd03abe47.ctex"]
[params]

+ 1
- 1
assets/materials/dirt.tres View File

@ -1,6 +1,6 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://uex0dq00xomt"]
[ext_resource type="Texture2D" uid="uid://li36txj7oweq" path="res://assets/textures/dirt.png" id="1_jy2vk"]
[ext_resource type="Texture2D" uid="uid://cm4x631rtdmrq" path="res://assets/textures/dirt-block.png" id="1_jy2vk"]
[resource]
albedo_texture = ExtResource("1_jy2vk")


+ 10
- 0
assets/materials/glass.tres View File

@ -0,0 +1,10 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://b2w5ybx51vuwf"]
[ext_resource type="Texture2D" uid="uid://dbgq50hfo3qyi" path="res://assets/textures/glass-block.png" id="1_wmskm"]
[resource]
transparency = 1
albedo_texture = ExtResource("1_wmskm")
metallic_specular = 0.0
roughness = 0.0
texture_filter = 0

+ 9
- 0
assets/materials/grass.tres View File

@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://b4wrf3quiaa1b"]
[ext_resource type="Texture2D" uid="uid://dsvk3faenewrl" path="res://assets/textures/grass-block.png" id="1_prref"]
[resource]
albedo_texture = ExtResource("1_prref")
metallic_specular = 0.0
roughness = 0.0
texture_filter = 0

+ 1
- 1
assets/materials/leaves.tres View File

@ -1,6 +1,6 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://d15n1p3spu3jg"]
[ext_resource type="Texture2D" uid="uid://goygbpyqhych" path="res://assets/textures/leaves.png" id="1_sli0o"]
[ext_resource type="Texture2D" uid="uid://cmtiotn1g7wxv" path="res://assets/textures/leaves-block.png" id="1_sli0o"]
[resource]
transparency = 1


+ 1
- 1
assets/materials/stone.tres View File

@ -1,6 +1,6 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://cx7m27qa4ds4s"]
[ext_resource type="Texture2D" uid="uid://ct1iawpfkdf5l" path="res://assets/textures/stone.png" id="1_vwsbh"]
[ext_resource type="Texture2D" uid="uid://ohcuqkbit3mc" path="res://assets/textures/stone-block.png" id="1_vwsbh"]
[resource]
albedo_texture = ExtResource("1_vwsbh")


+ 9
- 0
assets/materials/wood.tres View File

@ -0,0 +1,9 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://jearv8lmwhec"]
[ext_resource type="Texture2D" uid="uid://de2ll7i47211v" path="res://assets/textures/wood-block.png" id="1_7x6pw"]
[resource]
albedo_texture = ExtResource("1_7x6pw")
metallic_specular = 0.0
roughness = 0.0
texture_filter = 0

+ 0
- 9
assets/materials/wood_ends.tres View File

@ -1,9 +0,0 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://bnqiumcb3ixan"]
[ext_resource type="Texture2D" uid="uid://dxh0tr1jn2sym" path="res://assets/textures/wood-end.png" id="1_vqb8t"]
[resource]
albedo_texture = ExtResource("1_vqb8t")
metallic_specular = 0.0
roughness = 0.0
texture_filter = 0

+ 0
- 9
assets/materials/wood_side.tres View File

@ -1,9 +0,0 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://h0naiw6swfkl"]
[ext_resource type="Texture2D" uid="uid://0mw651622h01" path="res://assets/textures/wood-side.png" id="1_voafl"]
[resource]
albedo_texture = ExtResource("1_voafl")
metallic_specular = 0.0
roughness = 0.0
texture_filter = 0

BIN
assets/skyblock-logo.png View File

Before After
Width: 497  |  Height: 497  |  Size: 17 KiB

+ 34
- 0
assets/skyblock-logo.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://f6hee5t26uqt"
path="res://.godot/imported/skyblock-logo.png-10c2483abdf724a98544057e7ddffd26.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/skyblock-logo.png"
dest_files=["res://.godot/imported/skyblock-logo.png-10c2483abdf724a98544057e7ddffd26.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/skyblock-screenshot.png View File

Before After
Width: 1946  |  Height: 1145  |  Size: 759 KiB

BIN
assets/textures/dirt-block.png View File

Before After
Width: 48  |  Height: 32  |  Size: 440 B

assets/textures/wood-end.png.import → assets/textures/dirt-block.png.import View File

@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dxh0tr1jn2sym"
path="res://.godot/imported/wood-end.png-880ae7062d85d2bd8bfc66b6bcdb95a8.ctex"
uid="uid://cm4x631rtdmrq"
path="res://.godot/imported/dirt-block.png-bfe7e3792ac49118c2f92d8dedccd3b1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/wood-end.png"
dest_files=["res://.godot/imported/wood-end.png-880ae7062d85d2bd8bfc66b6bcdb95a8.ctex"]
source_file="res://assets/textures/dirt-block.png"
dest_files=["res://.godot/imported/dirt-block.png-bfe7e3792ac49118c2f92d8dedccd3b1.ctex"]
[params]

BIN
assets/textures/dirt-grass.png View File

Before After
Width: 16  |  Height: 16  |  Size: 913 B

BIN
assets/textures/glass-block.png View File

Before After
Width: 48  |  Height: 32  |  Size: 385 B

+ 35
- 0
assets/textures/glass-block.png.import View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dbgq50hfo3qyi"
path.s3tc="res://.godot/imported/glass-block.png-044c3715bdfecbc3ecf8d63721050d0b.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/textures/glass-block.png"
dest_files=["res://.godot/imported/glass-block.png-044c3715bdfecbc3ecf8d63721050d0b.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

BIN
assets/textures/glass.png View File

Before After
Width: 16  |  Height: 16  |  Size: 281 B

+ 34
- 0
assets/textures/glass.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cpllegyqnfnrh"
path="res://.godot/imported/glass.png-bc5a76edb61031570869d2267fdb76fd.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/glass.png"
dest_files=["res://.godot/imported/glass.png-bc5a76edb61031570869d2267fdb76fd.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/textures/grass-block.png View File

Before After
Width: 48  |  Height: 32  |  Size: 953 B

+ 35
- 0
assets/textures/grass-block.png.import View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dsvk3faenewrl"
path.s3tc="res://.godot/imported/grass-block.png-a43533c53e78ccd42111c48d59e43ebf.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/textures/grass-block.png"
dest_files=["res://.godot/imported/grass-block.png-a43533c53e78ccd42111c48d59e43ebf.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

BIN
assets/textures/grass.png View File

Before After
Width: 16  |  Height: 16  |  Size: 370 B

assets/textures/dirt-grass.png.import → assets/textures/grass.png.import View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bgo4mb3atmbot"
path="res://.godot/imported/dirt-grass.png-12fb5ebf1f814e95cc24f2d6fd063398.ctex"
path="res://.godot/imported/grass.png-44de1b601ed5e0482c9aa195977ab90c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/dirt-grass.png"
dest_files=["res://.godot/imported/dirt-grass.png-12fb5ebf1f814e95cc24f2d6fd063398.ctex"]
source_file="res://assets/textures/grass.png"
dest_files=["res://.godot/imported/grass.png-44de1b601ed5e0482c9aa195977ab90c.ctex"]
[params]

BIN
assets/textures/leaves-block.png View File

Before After
Width: 48  |  Height: 32  |  Size: 544 B

+ 35
- 0
assets/textures/leaves-block.png.import View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmtiotn1g7wxv"
path.s3tc="res://.godot/imported/leaves-block.png-c01c16272b530ade3ca524610fc204a6.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/textures/leaves-block.png"
dest_files=["res://.godot/imported/leaves-block.png-c01c16272b530ade3ca524610fc204a6.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

BIN
assets/textures/stone-block.png View File

Before After
Width: 48  |  Height: 32  |  Size: 272 B

+ 35
- 0
assets/textures/stone-block.png.import View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ohcuqkbit3mc"
path.s3tc="res://.godot/imported/stone-block.png-7d1af345ce6c8bdaa19899a5ad89c6da.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/textures/stone-block.png"
dest_files=["res://.godot/imported/stone-block.png-7d1af345ce6c8bdaa19899a5ad89c6da.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

BIN
assets/textures/wood-block.png View File

Before After
Width: 48  |  Height: 32  |  Size: 679 B

+ 35
- 0
assets/textures/wood-block.png.import View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://de2ll7i47211v"
path.s3tc="res://.godot/imported/wood-block.png-443d7f141af0d10d126bdfee9ade4138.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/textures/wood-block.png"
dest_files=["res://.godot/imported/wood-block.png-443d7f141af0d10d126bdfee9ade4138.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

BIN
assets/textures/wood-end.png View File

Before After
Width: 16  |  Height: 16  |  Size: 805 B

BIN
assets/textures/wood-side.png View File

Before After
Width: 16  |  Height: 16  |  Size: 700 B

BIN
assets/textures/wood.png View File

Before After
Width: 16  |  Height: 16  |  Size: 238 B

assets/textures/wood-side.png.import → assets/textures/wood.png.import View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://0mw651622h01"
path="res://.godot/imported/wood-side.png-7d9834bbc960a2c99991aedb7dcfa31e.ctex"
path="res://.godot/imported/wood.png-eeb3ea6fc91501562e05b28492ed90b0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/wood-side.png"
dest_files=["res://.godot/imported/wood-side.png-7d9834bbc960a2c99991aedb7dcfa31e.ctex"]
source_file="res://assets/textures/wood.png"
dest_files=["res://.godot/imported/wood.png-eeb3ea6fc91501562e05b28492ed90b0.ctex"]
[params]

BIN
assets/ui/folder-open-hover.png View File

Before After
Width: 57  |  Height: 46  |  Size: 887 B

+ 34
- 0
assets/ui/folder-open-hover.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://by4w5ll3le7g6"
path="res://.godot/imported/folder-open-hover.png-30b298f03eda987ff7b4c29cb81e0196.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/folder-open-hover.png"
dest_files=["res://.godot/imported/folder-open-hover.png-30b298f03eda987ff7b4c29cb81e0196.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/ui/folder-open-normal.png View File

Before After
Width: 57  |  Height: 46  |  Size: 842 B

+ 34
- 0
assets/ui/folder-open-normal.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmq51cgasug81"
path="res://.godot/imported/folder-open-normal.png-f3b3efc8925c789ef79f8d8da6495fd6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/folder-open-normal.png"
dest_files=["res://.godot/imported/folder-open-normal.png-f3b3efc8925c789ef79f8d8da6495fd6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/ui/folder-open-pressed.png View File

Before After
Width: 57  |  Height: 46  |  Size: 771 B

+ 34
- 0
assets/ui/folder-open-pressed.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://blyryo60jydgi"
path="res://.godot/imported/folder-open-pressed.png-96c8378f366a7c3f00bd052101358d2d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/folder-open-pressed.png"
dest_files=["res://.godot/imported/folder-open-pressed.png-96c8378f366a7c3f00bd052101358d2d.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/ui/save-hover.png View File

Before After
Width: 48  |  Height: 48  |  Size: 869 B

+ 34
- 0
assets/ui/save-hover.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://o3l0j53mgkan"
path="res://.godot/imported/save-hover.png-7fdcaa20e46d61abf1ad21c191339e15.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/save-hover.png"
dest_files=["res://.godot/imported/save-hover.png-7fdcaa20e46d61abf1ad21c191339e15.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/ui/save-normal.png View File

Before After
Width: 48  |  Height: 48  |  Size: 855 B

+ 34
- 0
assets/ui/save-normal.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ja8bc1h5x85o"
path="res://.godot/imported/save-normal.png-52807bf4c046513286efdc3c8e34024f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/save-normal.png"
dest_files=["res://.godot/imported/save-normal.png-52807bf4c046513286efdc3c8e34024f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/ui/save-pressed.png View File

Before After
Width: 48  |  Height: 48  |  Size: 773 B

+ 34
- 0
assets/ui/save-pressed.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://crqgyft4gfilt"
path="res://.godot/imported/save-pressed.png-2e1c957e7e0122a7212e624479432e6e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/save-pressed.png"
dest_files=["res://.godot/imported/save-pressed.png-2e1c957e7e0122a7212e624479432e6e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/ui/spinner-clockwise.png View File

Before After
Width: 240  |  Height: 240  |  Size: 6.4 KiB

+ 34
- 0
assets/ui/spinner-clockwise.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bsfqsslfq53dn"
path="res://.godot/imported/spinner-clockwise.png-bbb06e749ee5040cd72cec4de0d564b2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/spinner-clockwise.png"
dest_files=["res://.godot/imported/spinner-clockwise.png-bbb06e749ee5040cd72cec4de0d564b2.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/ui/trash-hover.png View File

Before After
Width: 48  |  Height: 54  |  Size: 860 B

+ 34
- 0
assets/ui/trash-hover.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmrtuy0i5qc01"
path="res://.godot/imported/trash-hover.png-c251e165aefa0e6e3b0d1056b13c4069.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/trash-hover.png"
dest_files=["res://.godot/imported/trash-hover.png-c251e165aefa0e6e3b0d1056b13c4069.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/ui/trash-normal.png View File

Before After
Width: 48  |  Height: 54  |  Size: 826 B

+ 34
- 0
assets/ui/trash-normal.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dvp5yeoqw36yt"
path="res://.godot/imported/trash-normal.png-1b0b4c772e81c3db536c4de9f47346e0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/trash-normal.png"
dest_files=["res://.godot/imported/trash-normal.png-1b0b4c772e81c3db536c4de9f47346e0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/ui/trash-pressed.png View File

Before After
Width: 48  |  Height: 54  |  Size: 768 B

+ 34
- 0
assets/ui/trash-pressed.png.import View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://brwa8yljyrlgy"
path="res://.godot/imported/trash-pressed.png-55019366421198956cc6c4016ef656ac.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/trash-pressed.png"
dest_files=["res://.godot/imported/trash-pressed.png-55019366421198956cc6c4016ef656ac.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

+ 4
- 1
autoloads/db_items.gd View File

@ -1,9 +1,12 @@
extends Node
@onready var data: Dictionary = {
@onready var data: Dictionary[String, Resource] = {
"001": preload("res://resources/blocks/001_dirt.tres"),
"002": preload("res://resources/blocks/002_stone.tres"),
"003": preload("res://resources/blocks/003_wood.tres"),
"004": preload("res://resources/blocks/004_leaves.tres"),
"005": preload("res://resources/blocks/005_grass.tres"),
"006": preload("res://resources/blocks/006_glass.tres"),
"007": preload("res://resources/items/007_torch.tres"),
}

+ 3
- 1
autoloads/entity_manager.gd View File

@ -1,4 +1,6 @@
extends Node
signal create_block(id: String, position: Vector3)
signal drop_block(id: String, position: Vector3)
signal drop_block(id: String, start_position: Vector3, direction: Vector3, velocity: float)
signal reset_world ## Used for signaling a deletion of all in the BlocksContainer and DroppedItemsContainer
signal spawn_player(transform: Transform3D)

+ 130
- 0
autoloads/game_settings_manager.gd View File

@ -0,0 +1,130 @@
extends Node
#region Game Options Signals
signal game_options_autosaves_changed(autosaves_enabled: bool)
signal game_options_block_highlight_changed(block_highlight_enabled: bool)
signal game_options_held_block_ui_changed(held_block_enabled: bool)
signal game_options_quickslots_ui_changed(quickslots_enabled: bool)
signal game_options_screenshot_saves_changed(screenshots_enabled: bool)
signal game_options_waila_changed(waila_enabled: bool)
#endregion
#region Graphics Settings Signals
signal apply_graphics_settings
signal graphics_fov_changed(fov: int)
signal graphics_resolution_changed(resolution: Vector2i, id: int)
signal graphics_vsync_changed(vsync_enabled: bool)
signal graphics_window_mode_changed(mode_id: int)
#endregion
signal load_game_settings
signal save_game_settings
## See documentation to where this path is: https://docs.godotengine.org/en/stable/tutorials/io/data_paths.html#accessing-persistent-user-data-user[br][br]
## Default Paths:[br]
## * Windows: %APPDATA%\Godot\app_userdata\[project_name][br]
## * macOS: ~/Library/Application Support/Godot/app_userdata/[project_name][br]
## * Linux: ~/.local/share/godot/app_userdata/[project_name][br]
var save_data_path: String = "user://game_data/"
var settings_file_name: String = "game_settings.tres"
var settings_file_path: String = save_data_path + settings_file_name
var settings: GameSettingsResource = GameSettingsResource.new()
func _init() -> void:
game_options_autosaves_changed.connect(_on_game_options_autosaves_changed)
game_options_block_highlight_changed.connect(_on_game_options_block_highlight_changed)
game_options_held_block_ui_changed.connect(_on_game_options_held_block_ui_changed)
game_options_quickslots_ui_changed.connect(_on_game_options_quickslots_ui_changed)
game_options_screenshot_saves_changed.connect(_on_game_options_screenshot_saves_changed)
game_options_waila_changed.connect(_on_game_options_waila_changed)
graphics_fov_changed.connect(_on_graphics_fov_changed)
graphics_resolution_changed.connect(_on_graphics_resolution_changed)
graphics_window_mode_changed.connect(_on_graphics_window_mode_changed)
graphics_vsync_changed.connect(_on_graphics_vsync_changed)
apply_graphics_settings.connect(_on_apply_graphics_settings)
load_game_settings.connect(load_settings)
save_game_settings.connect(save_settings)
#region Game Option Settings
func _on_game_options_autosaves_changed(autosaves_enabled: bool) -> void:
settings.game_options.enable_autosaves = autosaves_enabled
save_settings()
func _on_game_options_block_highlight_changed(highlight_enabled: bool) -> void:
settings.game_options.enable_block_highlight = highlight_enabled
save_settings()
func _on_game_options_held_block_ui_changed(held_block_enabled: bool) -> void:
settings.game_options.enable_held_block = held_block_enabled
save_settings()
func _on_game_options_quickslots_ui_changed(quickslots_enabled: bool) -> void:
settings.game_options.enable_quickslots_ui = quickslots_enabled
save_settings()
func _on_game_options_screenshot_saves_changed(screenshots_enabled: bool) -> void:
settings.game_options.enable_save_screenshots = screenshots_enabled
save_settings()
func _on_game_options_waila_changed(waila_enabled: bool) -> void:
settings.game_options.enable_waila = waila_enabled
save_settings()
#endregion
#region Graphics Settings
func _on_apply_graphics_settings() -> void:
DisplayServer.window_set_mode(settings.graphics.window_mode)
get_window().size = settings.graphics.resolution
if settings.graphics.vsync:
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED)
else:
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_DISABLED)
save_settings()
func _on_graphics_fov_changed(fov: int) -> void:
settings.graphics.fov = fov
func _on_graphics_resolution_changed(resolution: Vector2i, id: int) -> void:
settings.graphics.resolution = resolution
settings.graphics.resolution_id = id
func _on_graphics_vsync_changed(vsync_enabled: bool) -> void:
settings.graphics.vsync = vsync_enabled
func _on_graphics_window_mode_changed(id: int) -> void:
settings.graphics.window_mode = id as DisplayServer.WindowMode
#endregion
#region Saving and Loading Settings
func load_settings(apply_after_load: bool = true) -> void:
if !FileAccess.file_exists(settings_file_path):
printerr("Failed to load game settings. File does not exist: ", settings_file_path)
return
settings = ResourceLoader.load(settings_file_path)
if settings == null:
printerr("Failed to load game settings. Unknown format? ", settings_file_path)
return
if apply_after_load:
apply_graphics_settings.emit()
func save_settings() -> void:
if !DirAccess.dir_exists_absolute(save_data_path):
DirAccess.make_dir_absolute(save_data_path)
var result: int = ResourceSaver.save(settings, settings_file_path)
if result != OK:
printerr("Failed to save game settings: ", result)
#endregion

+ 1
- 0
autoloads/game_settings_manager.gd.uid View File

@ -0,0 +1 @@
uid://dxe2y12f412lp

+ 0
- 11
autoloads/globals.gd View File

@ -1,11 +0,0 @@
extends Node
const BLOCK_PREFAB: PackedScene = preload("res://scenes/blocks/block.tscn")
const DROPPED_BLOCK_PREFAB: PackedScene = preload("res://scenes/blocks/dropped_block.tscn")
var enable_waila: bool = true ## Enable `What Am I Looking At` UI
var enable_block_highlight: bool = true
var is_options_menu_active: bool = false

+ 0
- 1
autoloads/globals.gd.uid View File

@ -1 +0,0 @@
uid://cp6sum1t6el0a

+ 186
- 9
autoloads/inventory_manager.gd View File

@ -1,20 +1,197 @@
extends Node
signal item_dropped(item: DBItemResource)
signal item_picked_up(item: DBItemResource)
#region Inventory Specific
signal add_to_inventory(item_id: String, amount: int)
signal clear_inventory ## Remove all items in inventory
signal item_added(item_id: String, amount: int)
signal item_removed(item_id: String, amount: int)
signal inventory_closed
signal inventory_opened
signal inventory_slot_updated(slot_index: int)
signal remove_from_inventory(item_id: String, amount: int)
signal remove_from_quickslot(amount: int)
signal remove_from_slot(slot_index: int, amount: int)
#endregion
#region Quickslots
signal next_quick_slot
signal previous_quick_slot
signal quick_slot_selected(slot_index: int)
signal select_quick_slot(slot_index: int)
signal quick_slot_item_changed(item_id: String)
signal item_picked_up(item: ItemResource)
signal item_dropped(item: ItemResource)
signal inventory_opened
signal inventory_closed
#endregion
var max_inventory_items: int = 40 # 4 rows of 10
var quick_slot_count: int = 10
var selected_quick_slot: int = 0
var quick_slot_item_id: String = "001"
var inventory: Array[DBItemResource] = [] ## To ensure inventory is automatically sorted, "empty" inventory cells will be replaced with null to keep positions
var _inventory_cache: Dictionary[String, Dictionary] = {} ## Used for caching certain information
func _ready() -> void:
self.quick_slot_item_changed.connect(_on_quick_slot_item_changed.bind())
self.item_picked_up.connect(_on_item_picked_up)
self.item_dropped.connect(_on_item_dropped)
self.add_to_inventory.connect(_on_add_to_inventory)
self.clear_inventory.connect(_on_clear_inventory)
self.quick_slot_selected.connect(_on_quick_slot_selected)
self.remove_from_inventory.connect(_on_remove_from_inventory)
self.remove_from_quickslot.connect(_on_remove_from_quickslot)
self.remove_from_slot.connect(_on_remove_from_slot)
func available_space(item_id: String) -> int:
var full_stacks: int = floor(_inventory_cache[item_id].total / DBItems.data[item_id].max_stack_size)
var space_in_stacks: int = (
DBItems.data[item_id].max_stack_size - abs(
_inventory_cache[item_id].total - (DBItems.data[item_id].max_stack_size * full_stacks)
)
)
# This is a bit of a hack because I'm a math/logic noob
if space_in_stacks == DBItems.data[item_id].max_stack_size:
space_in_stacks = 0
var open_stack_amount: int = (max_inventory_items - inventory.size()) * DBItems.data[item_id].max_stack_size
return open_stack_amount + space_in_stacks
func get_inventory_item(item_slot: int = selected_quick_slot) -> DBItemResource:
if item_slot >= inventory.size() or item_slot < 0:
return null
return inventory.get(item_slot)
func get_quick_slot_item_id(item_slot: int = selected_quick_slot) -> String:
return inventory[item_slot].id
func _find_stacks_by_id(item_resource: DBItemResource, item_id: String) -> bool:
return item_resource != null and item_resource.id == item_id
## Find the stack where at least one item can be added
func _find_stacks_with_space(item_resource: DBItemResource, item_id: String) -> bool:
return (
item_resource == null or (
item_resource.id == item_id and
item_resource.amount < item_resource.max_stack_size
)
)
## Removes an amount of items from a specific slot
## If the amount exceeds the amount of the slot, will NOT remove from other stacks
func _remove_from_slot(slot_index: int, amount: int) -> void:
if slot_index >= max_inventory_items:
printerr("Slot Index ", slot_index, " out of inventory range")
return
inventory[slot_index].amount -= amount
if inventory[slot_index].amount <= 0:
inventory[slot_index] = null
inventory_slot_updated.emit(slot_index)
func _update_cache_total(item_id: String, amount: int) -> void:
if not _inventory_cache.get(item_id):
_inventory_cache[item_id] = {"total": 0}
_inventory_cache[item_id].total += amount
func _on_add_to_inventory(item_id: String, amount: int = 1) -> void:
if not DBItems.data.get(item_id):
printerr("Cannot add item, ", item_id, ", to inventory. Could not find item within DBItems.data.")
return
if amount < 1:
printerr("Cannot add item, ", item_id, ", to inventory. Amount to add cannot be less then 1.")
return
var item_resource: DBItemResource = DBItems.data[item_id]
# This logic seems overly complicated and is a mess.
# Should look into fixing/simplifying this in the future
var amount_remaining: int = amount
while amount_remaining > 0:
var first_stack_index: int = inventory.find_custom(_find_stacks_with_space.bind(item_id))
var stack_resource: DBItemResource
if first_stack_index == -1 and inventory.size() < max_inventory_items: # No existing stack and empty slots available
stack_resource = item_resource.duplicate()
inventory.append(stack_resource)
if amount_remaining <= stack_resource.max_stack_size:
_update_cache_total(item_id, amount_remaining)
inventory[-1].amount += amount_remaining
amount_remaining = 0
else:
_update_cache_total(item_id, stack_resource.max_stack_size)
inventory[-1].amount = stack_resource.max_stack_size
amount_remaining -= stack_resource.max_stack_size
inventory_slot_updated.emit(inventory.size() - 1)
elif first_stack_index > -1:
if inventory[first_stack_index] == null: # Empty slot
inventory[first_stack_index] = item_resource.duplicate()
stack_resource = inventory[first_stack_index]
var current_amount: int = stack_resource.amount
var total_amount: int = current_amount + amount_remaining
if total_amount < stack_resource.max_stack_size: # Stack not full and has space
_update_cache_total(item_id, amount_remaining)
inventory[first_stack_index].amount = total_amount
amount_remaining = 0
else:
_update_cache_total(item_id, stack_resource.max_stack_size - current_amount)
inventory[first_stack_index].amount = stack_resource.max_stack_size
amount_remaining -= stack_resource.max_stack_size
inventory_slot_updated.emit(first_stack_index)
item_added.emit(item_id, amount - amount_remaining)
func _on_remove_from_inventory(item_id: String, amount: int = 1) -> void:
var amount_remaining: int = amount
while amount_remaining > 0:
var last_stack_index: int = inventory.rfind_custom(_find_stacks_by_id.bind(item_id))
if last_stack_index > -1:
var stack_resource: DBItemResource = inventory[last_stack_index]
var current_stack_amount: int = stack_resource.amount
var total_amount: int = current_stack_amount - amount_remaining
if total_amount > 0: # Stack will not be empty after removing
_update_cache_total(item_id, -amount_remaining)
inventory[last_stack_index].amount -= amount_remaining
amount_remaining = 0
else:
var to_remove: int = stack_resource.max_stack_size - current_stack_amount
_update_cache_total(item_id, -amount_remaining)
inventory[last_stack_index] = null
amount_remaining -= to_remove
inventory_slot_updated.emit(last_stack_index)
else: # Received more to remove than we have stacks for
amount_remaining = 0
item_removed.emit(item_id, amount - amount_remaining)
func _on_clear_inventory() -> void:
inventory.clear()
_inventory_cache.clear()
func _on_item_dropped(item: DBItemResource) -> void:
_on_remove_from_inventory(item.id, 1)
func _on_item_picked_up(item: DBItemResource) -> void:
_on_add_to_inventory(item.id, 1)
func _on_quick_slot_selected(slot_index: int) -> void:
selected_quick_slot = slot_index
func _on_remove_from_slot(slot_index: int, amount: int) -> void:
_remove_from_slot(slot_index, amount)
func _on_quick_slot_item_changed(item_id: String) -> void:
quick_slot_item_id = item_id
func _on_remove_from_quickslot(amount: int) -> void:
_remove_from_slot(selected_quick_slot, amount)

+ 13
- 0
autoloads/signal_manager.gd View File

@ -0,0 +1,13 @@
## General Purpose signals
extends Node
signal pause_game
signal resume_game
signal hide_ui
signal show_ui
signal open_pause_menu
signal close_pause_menu
signal open_settings_menu
signal close_settings_menu

+ 1
- 0
autoloads/signal_manager.gd.uid View File

@ -0,0 +1 @@
uid://biwce2o15q44g

+ 75
- 12
project.godot View File

@ -11,16 +11,19 @@ config_version=5
[application]
config/name="Skyblock"
config/version="0.2.0"
run/main_scene="uid://cgx0nawwjjj7g"
config/features=PackedStringArray("4.4", "Forward Plus")
config/icon="res://icon.svg"
config/icon="uid://f6hee5t26uqt"
[autoload]
Globals="*res://autoloads/globals.gd"
EntityManager="*res://autoloads/entity_manager.gd"
InventoryManager="*res://autoloads/inventory_manager.gd"
DBItems="*res://autoloads/db_items.gd"
SignalManager="*res://autoloads/signal_manager.gd"
GameSettingsManager="*res://autoloads/game_settings_manager.gd"
SaveGameManager="*res://addons/save_load_system/autoloads/save_game_manager.gd"
[debug]
@ -29,6 +32,15 @@ gdscript/warnings/untyped_declaration=1
gdscript/warnings/inferred_declaration=1
gdscript/warnings/unsafe_method_access=1
[display]
window/size/viewport_width=1280
window/size/viewport_height=720
[editor_plugins]
enabled=PackedStringArray("res://addons/save_load_system/plugin.cfg")
[file_customization]
folder_colors={
@ -40,6 +52,10 @@ folder_colors={
"res://scenes/ui/": "green"
}
[global_group]
Player=""
[input]
move_forward={
@ -104,39 +120,86 @@ crouch={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194326,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
quickslot0={
quickslot_next={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":49,"location":0,"echo":false,"script":null)
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":8,"position":Vector2(189, 22),"global_position":Vector2(198, 68),"factor":1.0,"button_index":4,"canceled":false,"pressed":true,"double_click":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":46,"key_label":0,"unicode":46,"location":0,"echo":false,"script":null)
]
}
quickslot_previous={
"deadzone": 0.2,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":16,"position":Vector2(173, 17),"global_position":Vector2(182, 63),"factor":1.0,"button_index":5,"canceled":false,"pressed":true,"double_click":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":44,"key_label":0,"unicode":44,"location":0,"echo":false,"script":null)
]
}
open_inventory={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":73,"key_label":0,"unicode":105,"location":0,"echo":false,"script":null)
]
}
quick_load={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194337,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
quick_save={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194336,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
throw_item={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null)
]
}
quickslot1={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":49,"location":0,"echo":false,"script":null)
]
}
quickslot2={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"key_label":0,"unicode":51,"location":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null)
]
}
quickslot3={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"key_label":0,"unicode":51,"location":0,"echo":false,"script":null)
]
}
quickslot4={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":52,"key_label":0,"unicode":52,"location":0,"echo":false,"script":null)
]
}
quickslot_next={
quickslot5={
"deadzone": 0.2,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":8,"position":Vector2(189, 22),"global_position":Vector2(198, 68),"factor":1.0,"button_index":4,"canceled":false,"pressed":true,"double_click":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":53,"key_label":0,"unicode":53,"location":0,"echo":false,"script":null)
]
}
quickslot_previous={
quickslot6={
"deadzone": 0.2,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":16,"position":Vector2(173, 17),"global_position":Vector2(182, 63),"factor":1.0,"button_index":5,"canceled":false,"pressed":true,"double_click":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":54,"key_label":0,"unicode":54,"location":0,"echo":false,"script":null)
]
}
open_inventory={
quickslot7={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":73,"key_label":0,"unicode":105,"location":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":55,"key_label":0,"unicode":55,"location":0,"echo":false,"script":null)
]
}
quickslot8={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":56,"key_label":0,"unicode":56,"location":0,"echo":false,"script":null)
]
}
quickslot9={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":57,"key_label":0,"unicode":57,"location":0,"echo":false,"script":null)
]
}
quickslot10={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":48,"key_label":0,"unicode":48,"location":0,"echo":false,"script":null)
]
}


+ 2
- 8
resources/block_resource.gd View File

@ -1,11 +1,5 @@
class_name BlockResource
extends ItemResource
extends DBItemResource
## East material is also the default material if not provided
@export var material_east: StandardMaterial3D = null
@export var material_west: StandardMaterial3D = null
@export var material_north: StandardMaterial3D = null
@export var material_south: StandardMaterial3D = null
@export var material_top: StandardMaterial3D = null
@export var material_bottom: StandardMaterial3D = null
@export var material_texture: StandardMaterial3D = null

+ 1
- 1
resources/blocks/001_dirt.tres View File

@ -5,7 +5,7 @@
[resource]
script = ExtResource("1_ljghb")
material_east = ExtResource("1_n1cq6")
material_texture = ExtResource("1_n1cq6")
id = "001"
name = "Dirt"
amount = 0


+ 1
- 1
resources/blocks/002_stone.tres View File

@ -5,7 +5,7 @@
[resource]
script = ExtResource("1_63t5s")
material_east = ExtResource("1_6chm7")
material_texture = ExtResource("1_6chm7")
id = "002"
name = "Stone"
amount = 0


+ 3
- 9
resources/blocks/003_wood.tres View File

@ -1,17 +1,11 @@
[gd_resource type="Resource" script_class="BlockResource" load_steps=4 format=3 uid="uid://bvudydis6w27b"]
[gd_resource type="Resource" script_class="BlockResource" load_steps=3 format=3 uid="uid://bvudydis6w27b"]
[ext_resource type="Material" uid="uid://bnqiumcb3ixan" path="res://assets/materials/wood_ends.tres" id="1_1n8h6"]
[ext_resource type="Material" uid="uid://jearv8lmwhec" path="res://assets/materials/wood.tres" id="1_plhol"]
[ext_resource type="Script" uid="uid://dwrmy4mx0mw18" path="res://resources/block_resource.gd" id="2_1n8h6"]
[ext_resource type="Material" uid="uid://h0naiw6swfkl" path="res://assets/materials/wood_side.tres" id="2_o823h"]
[resource]
script = ExtResource("2_1n8h6")
material_east = ExtResource("2_o823h")
material_west = ExtResource("2_o823h")
material_north = ExtResource("2_o823h")
material_south = ExtResource("2_o823h")
material_top = ExtResource("1_1n8h6")
material_bottom = ExtResource("1_1n8h6")
material_texture = ExtResource("1_plhol")
id = "003"
name = "Wood"
amount = 0


+ 1
- 1
resources/blocks/004_leaves.tres View File

@ -5,7 +5,7 @@
[resource]
script = ExtResource("3_kuops")
material_east = ExtResource("1_dbmit")
material_texture = ExtResource("1_dbmit")
id = "004"
name = "Leaves"
amount = 0


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save