Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunk loading unloading #71

Merged
merged 255 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
255 commits
Select commit Hold shift + click to select a range
cf5743a
Load custom levels into main menu
snipercup Nov 23, 2023
0676fe3
Fix scaling issue
snipercup Nov 23, 2023
4d92eea
Fix no scroll bug
snipercup Nov 24, 2023
94de13f
Added terraintile editor
snipercup Nov 24, 2023
a869594
Tile saving and loading works
snipercup Nov 25, 2023
5d62db0
Improved tile editor
snipercup Nov 25, 2023
cb77aed
Contenteditor adjusted sizing, tab control
snipercup Nov 26, 2023
306b9f8
Added categories to map editor
snipercup Nov 27, 2023
af4e1f2
Polishing
snipercup Nov 28, 2023
eebe6d3
Remove comments
snipercup Nov 28, 2023
9b7c849
Starting POC
snipercup Nov 28, 2023
d5836a2
Infinite panning now possible
snipercup Nov 29, 2023
16d4ad9
Now it's seamless
snipercup Nov 30, 2023
32e402a
Cleanup overmap script
snipercup Nov 30, 2023
9c1cfa0
Refactor file names json function
snipercup Dec 2, 2023
8e2f9d1
Switch level from overmap
snipercup Dec 3, 2023
866b2c4
Can switch levels in-game
snipercup Dec 3, 2023
a6e0691
Add gui elements to overmap
snipercup Dec 3, 2023
c513d77
Create gamedata singleton
snipercup Dec 3, 2023
2b11e38
Refactor some json loading
snipercup Dec 3, 2023
adf11f5
overmap is consistent
snipercup Dec 5, 2023
6ae5f43
Initial version of save load
snipercup Dec 5, 2023
3c6e92d
remove editor complaints
snipercup Dec 6, 2023
e2f8601
Added the selectable sprite custom widget
snipercup Dec 8, 2023
a459a66
Add mobeditor, refactor contentlist
snipercup Dec 10, 2023
01105d6
layout, bugfix
snipercup Dec 10, 2023
eb98a0a
small refactor of adding json items
snipercup Dec 10, 2023
143a3ba
Initial version of mob editor
snipercup Dec 10, 2023
e5632c0
fix map editor bug when creating new map
snipercup Dec 10, 2023
1f37269
Refactor editor data management
snipercup Dec 13, 2023
1592220
Update tiles.json to use sprite name
snipercup Dec 14, 2023
4d917aa
reintroduce slopes
snipercup Dec 15, 2023
f6925bb
Update markdownlabel
snipercup Dec 16, 2023
9bb4615
Limit input rect on tilegrid
snipercup Dec 16, 2023
cc6c8fb
Limit painting only to when drawing
snipercup Dec 16, 2023
e092de2
Add icons to replace text
snipercup Dec 17, 2023
f299775
Add brush preview
snipercup Dec 17, 2023
ae0cab2
Add rotation to mapeditor
snipercup Dec 17, 2023
5101f44
Tiles rotate in game
snipercup Dec 22, 2023
d7efa12
Add folder colors
snipercup Dec 22, 2023
667dfbc
Make another scripts folder green
snipercup Dec 22, 2023
89f1d20
Move sprites and scenes to defaults
snipercup Dec 23, 2023
fc8c2cb
remove extra scenes and sprites
snipercup Dec 23, 2023
2370da9
Moved the enemy corpse to defaults
snipercup Dec 23, 2023
3a90db2
Adjusted scenes to new paths
snipercup Dec 23, 2023
5bc423d
Remove extra tiles
snipercup Dec 23, 2023
35729f4
Remove extra sprites too
snipercup Dec 23, 2023
2c30049
Mapeditor allow mob painting
snipercup Dec 23, 2023
1eceb0f
Update scrapwalker64.png
snipercup Dec 23, 2023
f165150
Mob spawns on the block
snipercup Jan 2, 2024
e8f0c0b
Mob now has transparancy
snipercup Jan 4, 2024
d894cbf
remove commented code
snipercup Jan 4, 2024
4e49632
fix block save load
snipercup Jan 7, 2024
cd36a24
rename enemy to mob
snipercup Jan 7, 2024
6c7b0b7
Save and load mob and block rotation
snipercup Jan 7, 2024
9e84a84
Fix save initialization
snipercup Jan 8, 2024
653c517
Fix overmap coordinates
snipercup Jan 8, 2024
f337849
Rename level select to load game
snipercup Jan 9, 2024
c68672d
Change the load maps function
snipercup Jan 9, 2024
b745a2e
Add load game function
snipercup Jan 9, 2024
faab876
Initial load game implementation
snipercup Jan 9, 2024
517e484
Save the overmap too
snipercup Jan 9, 2024
b17d361
Properly save overmap
snipercup Jan 10, 2024
b107e5f
Return load game function
snipercup Jan 10, 2024
e89e5d5
Preserve player inventory between maps
snipercup Jan 12, 2024
f0ba3d5
Preserve player inventory across saves
snipercup Jan 12, 2024
8263876
Enemy corpse loot is saved and loaded
snipercup Jan 12, 2024
cde03db
Save and load player health and death
snipercup Jan 12, 2024
5c85c8f
add furniture sprites
snipercup Jan 13, 2024
2165638
Minor fix on existing widgets
snipercup Jan 13, 2024
04a5ba5
Initial furniture editor
snipercup Jan 13, 2024
2faa884
Finalize furniture editor
snipercup Jan 13, 2024
ba5a692
Paint furniture in map editur
snipercup Jan 13, 2024
9b3c2ce
add furniture to game
snipercup Jan 14, 2024
48f21e9
Basic physics for furniture
snipercup Jan 14, 2024
5a4326d
Adjust layers
snipercup Jan 15, 2024
d45d812
Save and load furniture
snipercup Jan 15, 2024
6222bbf
Create map icons
snipercup Jan 15, 2024
e1848e7
fix mapeditor bugs
snipercup Jan 15, 2024
ed88095
Initial tactical map editor
snipercup Jan 15, 2024
a2233d9
Adding tacticalmap infrastructure
snipercup Jan 15, 2024
4cee329
Tactical map editor can write file
snipercup Jan 16, 2024
7f8e3d9
Tacticalmap loads ingame
snipercup Jan 16, 2024
b72e4b0
Tactical maps are saved and loaded
snipercup Jan 16, 2024
3381a2f
fix tileeditor bugs
snipercup Jan 16, 2024
ce4c6b5
Add tiles, enable tab navigation
snipercup Jan 16, 2024
ede35fa
snow and toxic waste tiles
snipercup Jan 16, 2024
73470e7
More tiles, kitchen, rock
snipercup Jan 16, 2024
cb53e17
Delete old tiles, add new ones
snipercup Jan 17, 2024
486853d
Add the last tiles
snipercup Jan 17, 2024
6f9f374
Mob looks at target
snipercup Jan 17, 2024
d5d2435
Mobs spawn with stats
snipercup Jan 17, 2024
637e503
Save load mobs, add rust sentinel
snipercup Jan 17, 2024
4b12ee8
Mobs get unique meshes
snipercup Jan 17, 2024
ff7eea0
Furniture above player invisible, fix bug
snipercup Jan 18, 2024
a77e991
Add static furniture node and load and save
snipercup Jan 18, 2024
8f3536e
Furniture rotation, not working yet
snipercup Jan 18, 2024
b401d21
Fix tacticalmap editor bug
snipercup Jan 19, 2024
1becb66
Rotate furniture, loading not working yet
snipercup Jan 19, 2024
e261156
Rotation is saved and loaded properly
snipercup Jan 20, 2024
21e2fe1
proper furniture save load rotation
snipercup Jan 20, 2024
b702eaf
Remove commented out code
snipercup Jan 20, 2024
6e5cbeb
Initial item editor, sprites
snipercup Jan 21, 2024
6b4a6ca
First item created
snipercup Jan 21, 2024
4d816d0
Add height width stack properties
snipercup Jan 21, 2024
657e978
Add current items
snipercup Jan 21, 2024
53c2a9b
Items are loaded from json data
snipercup Jan 21, 2024
3066dbe
Basic inventory window
snipercup Jan 21, 2024
d92cb17
Inventory window basic functionality
snipercup Jan 21, 2024
a4bf510
Dynamic list of containers in proximity, inventory window
snipercup Jan 22, 2024
61c24b9
Update gloot
snipercup Jan 23, 2024
1a06644
Add some tabs to the item editor
snipercup Jan 23, 2024
160ec24
Add pistol and rifle json in item editor
snipercup Jan 23, 2024
b3880ec
Magazine and bullet json
snipercup Jan 23, 2024
b1ecc20
Weapon can be equipped
snipercup Jan 24, 2024
66da0a7
start implementing dual wielding
snipercup Jan 24, 2024
134fec6
Basic dual wielding
snipercup Jan 24, 2024
3888d22
two handed weapons clear the other hand slot
snipercup Jan 25, 2024
cd84ae2
Switch to list based inventory instead of grid
snipercup Jan 25, 2024
e85bf08
Fix inventory window layout
snipercup Jan 25, 2024
06ad207
Add volume to item editor
snipercup Jan 25, 2024
0931938
Change player sprite, apply rotation
snipercup Jan 26, 2024
0879cc4
Slopes are slopes instead of blocks
snipercup Jan 26, 2024
3591084
Add rocky hill map, json function
snipercup Jan 26, 2024
c0e2acf
Add tree, pinetree, willowtree
snipercup Jan 26, 2024
8fb2e60
Scaling on the mapeditor
snipercup Jan 26, 2024
41804eb
Furniture edge snapping
snipercup Jan 26, 2024
1468bc1
Scale furniture on map editor
snipercup Jan 26, 2024
dfeeba8
Save player equipment between saves
snipercup Jan 26, 2024
44b3b72
Rectangle select in all directions
snipercup Jan 27, 2024
af928c7
Remove size controls from map editor
snipercup Jan 27, 2024
8f18d72
Add map rotation to map editor
snipercup Jan 27, 2024
55f3cfd
Furniture rotates when map rotatates
snipercup Jan 27, 2024
07c567e
Update rotation UI control
snipercup Jan 27, 2024
806f0fe
Basic list implemented
snipercup Jan 27, 2024
a29e7b2
Layout, highlighting
snipercup Jan 27, 2024
1654fe8
The entire row is highlighted
snipercup Jan 27, 2024
ea06c0d
Item selection works
snipercup Jan 27, 2024
d705381
Now only rows are selected
snipercup Jan 27, 2024
e1d8b20
Add headers
snipercup Jan 27, 2024
6df9629
Attempt to sort by column, need fix
snipercup Jan 27, 2024
e7ddc2e
Refactor
snipercup Jan 28, 2024
dc8ad30
Sorting works
snipercup Jan 28, 2024
fa1b65c
Only one header can be selected
snipercup Jan 28, 2024
5b2a185
Refactor
snipercup Jan 28, 2024
c2591be
Sorting refactor
snipercup Jan 28, 2024
8e5cfb0
More refactor
snipercup Jan 28, 2024
f12fb0a
Remove unused functions
snipercup Jan 28, 2024
efd85ee
More refactoring
snipercup Jan 28, 2024
1f0987d
Single items can be de-selected
snipercup Jan 28, 2024
81a03f2
Selection works again
snipercup Jan 28, 2024
8e30e11
Clean up item selection
snipercup Jan 28, 2024
ec8565b
Reverse sorting
snipercup Jan 28, 2024
1162a2b
Remove excess functions
snipercup Jan 28, 2024
4741931
Add comments
snipercup Jan 28, 2024
56b639a
Basic context menu
snipercup Jan 28, 2024
701a89b
Add inventory signals
snipercup Jan 28, 2024
166c020
Show the context menu
snipercup Jan 28, 2024
79d1ade
Context menu shows up
snipercup Jan 28, 2024
6b51523
Signals of context menu connected
snipercup Jan 28, 2024
f2e697c
Remove editor complaints
snipercup Jan 28, 2024
6f121d5
Implement new items lots left and right hand
snipercup Jan 28, 2024
6c3a2ad
Items load from nearby containers
snipercup Jan 28, 2024
36c4793
Add stack size column
snipercup Jan 28, 2024
8d405de
Polishing
snipercup Jan 28, 2024
df122a3
selected items are no longer duplicated
snipercup Jan 28, 2024
79ee5d7
Refactor
snipercup Jan 28, 2024
4eef67e
Rename group to row
snipercup Jan 29, 2024
48ed87c
Merge selecteditems and inventory_rows
snipercup Jan 29, 2024
6ba2a27
Refactor highlight
snipercup Jan 29, 2024
30c6468
Cleanup
snipercup Jan 29, 2024
7013af3
Move GUI input connection to parent
snipercup Jan 29, 2024
3851da0
Implement drag drop
snipercup Jan 29, 2024
12d0ee6
drag drop polishing
snipercup Jan 29, 2024
86e9562
More drag polising
snipercup Jan 29, 2024
a39e66c
Projectile is fired, collides with wall
snipercup Jan 30, 2024
038102d
Collision with furniture
snipercup Jan 30, 2024
b6f73d3
mobs die when they are killed
snipercup Jan 30, 2024
d9d4510
Bullet rotates towards direction
snipercup Jan 30, 2024
7bcaa1c
Separate weapons, sprites
snipercup Jan 30, 2024
8d3733c
fix scaling bug
snipercup Jan 30, 2024
18c32c7
code cleanup, small bugfix
snipercup Jan 30, 2024
8faca3e
Centralize can_fire_weapon
snipercup Jan 30, 2024
706aefd
Weapons fire continuously when button down
snipercup Jan 30, 2024
fd3f0b8
Implement firing speed
snipercup Jan 30, 2024
76f05aa
Implement reload speed
snipercup Jan 30, 2024
ad39d6d
Fix editor bugs
snipercup Jan 30, 2024
df4b5b8
Implemented recoil
snipercup Jan 30, 2024
74d5a36
Pull magazines from inventory
snipercup Feb 1, 2024
e2b4cb8
Reloading, serialization
snipercup Feb 1, 2024
e16ce1c
Fix reloading bug
snipercup Feb 1, 2024
c6ab346
Reload the magazine with most bullets
snipercup Feb 1, 2024
de4a04c
Generalize current action, drop mag on item slot
snipercup Feb 1, 2024
f04ebc7
No shooting when reloading
snipercup Feb 1, 2024
122da53
Magazine contents shown in title in inventory
snipercup Feb 1, 2024
eb0fbed
Equip by drag and drop
snipercup Feb 1, 2024
0842871
Magazines stay inside the gun
snipercup Feb 2, 2024
37ab491
Guns show current and max ammo
snipercup Feb 2, 2024
1c3a494
Unload reload gun trough context menu
snipercup Feb 2, 2024
55fbe32
Rename controls
snipercup Feb 2, 2024
b7c6216
Central player inventory
snipercup Feb 2, 2024
7f33147
Implement central player inventory
snipercup Feb 2, 2024
26fb4f5
Move functions to where they belong
snipercup Feb 2, 2024
af21158
Move insert_magazine to ItemManager
snipercup Feb 2, 2024
0210a6d
reload magazines
snipercup Feb 3, 2024
719a914
Partial stacks can reload magazines
snipercup Feb 3, 2024
6adc4b4
Add 6 new furniture
snipercup Feb 3, 2024
6d020ed
Fix the block rotation
snipercup Feb 4, 2024
4db5128
Simplify block rotation
snipercup Feb 4, 2024
941e040
Rotation in mapeditor
snipercup Feb 4, 2024
40c5da0
code formatting
snipercup Feb 4, 2024
d852c80
Allow magazine selection
snipercup Feb 6, 2024
3d4d973
fix checkbox
snipercup Feb 6, 2024
ec75498
Enforce magazine restrictions
snipercup Feb 6, 2024
6170f06
Context menu reload check compatible magazine
snipercup Feb 6, 2024
33b686b
Fix genericmap
snipercup Feb 6, 2024
1dcc382
fix tiles_in_rectangle function
snipercup Feb 6, 2024
f1ab33f
Copy selected tiles to memory
snipercup Feb 7, 2024
5be8519
Basic copy paste
snipercup Feb 8, 2024
e5c3245
Add button, hotkey
snipercup Feb 8, 2024
fbd466d
Allow the rotation of tile selection
snipercup Feb 8, 2024
a83e132
copy selection from all levels
snipercup Feb 8, 2024
b678c79
Function to paste an entire column
snipercup Feb 8, 2024
14b1b31
add editormode
snipercup Feb 9, 2024
8ee67cf
Copy paste a column works
snipercup Feb 9, 2024
5705c00
Fix rotating the selection
snipercup Feb 10, 2024
a979d7e
Tidy up the code
snipercup Feb 10, 2024
d12427a
Refactor rotation
snipercup Feb 10, 2024
01b9568
Refactoring
snipercup Feb 10, 2024
6c314b3
Rotating a copied column works now
snipercup Feb 11, 2024
45fffb7
Fix furniture rotation
snipercup Feb 11, 2024
37cf093
Fix brush preview position
snipercup Feb 12, 2024
ccfcddc
Only one rectangle button can be active
snipercup Feb 12, 2024
6b8a8dd
Add new house and toilet
snipercup Feb 13, 2024
953329e
Update gloot
snipercup Feb 13, 2024
f5fd96b
Create map as chunk
snipercup Feb 13, 2024
c2e5d0a
Chunks are saved on overmap travel
snipercup Feb 13, 2024
9434080
Implement threads
snipercup Feb 14, 2024
e70f3be
Putting blocks back
snipercup Feb 15, 2024
00d10dc
Move block construction to itself
snipercup Feb 16, 2024
3060841
Blocks have rotation
snipercup Feb 16, 2024
e718b79
Saving and loading at ovemap travel works
snipercup Feb 16, 2024
49be3f1
Slopes are no longer rotated twice when reloading
snipercup Feb 17, 2024
fa378c2
update navigationmesh
snipercup Feb 17, 2024
26217e3
Add static furniture to map
snipercup Feb 17, 2024
fc9f048
Furniture and tiles are saved and loaded
snipercup Feb 18, 2024
2b02837
Movable furniture gets rotated right
snipercup Feb 22, 2024
a270ad6
Mobs spawn in chunks
snipercup Feb 26, 2024
82855a0
Containers are spawned into the map
snipercup Feb 26, 2024
c773b79
Pull block meshes from dictionary
snipercup Feb 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 0 additions & 19 deletions Blocks/Stairs_to_E001.tscn

This file was deleted.

20 changes: 0 additions & 20 deletions Blocks/Stairs_to_S001.tscn

This file was deleted.

20 changes: 0 additions & 20 deletions Blocks/Stairs_to_W001.tscn

This file was deleted.

18 changes: 0 additions & 18 deletions Blocks/concrete_wall001.tscn

This file was deleted.

18 changes: 0 additions & 18 deletions Blocks/concrete_wall002.tscn

This file was deleted.

6 changes: 0 additions & 6 deletions Blocks/grass_001.gd

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://buj4ukj1oh4pq"]

[ext_resource type="Texture2D" uid="uid://bu00lw1luehxr" path="res://Textures/Tiles/Actual textures/1.png" id="1_a2cuf"]
[ext_resource type="Texture2D" uid="uid://bu00lw1luehxr" path="res://Defaults/Sprites/1.png" id="1_a2cuf"]

[resource]
albedo_texture = ExtResource("1_a2cuf")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://pdqqtb1s8g6n"]

[ext_resource type="Texture2D" uid="uid://cyy4j5vso6khu" path="res://Textures/Tiles/Actual textures/4.png" id="1_rgn6b"]
[ext_resource type="Texture2D" uid="uid://cyy4j5vso6khu" path="res://Defaults/Sprites/4.png" id="1_rgn6b"]

[resource]
shading_mode = 0
Expand Down
93 changes: 93 additions & 0 deletions Defaults/Blocks/default_block.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
class_name DefaultBlock
extends StaticBody3D

var blockposition: Vector3
var tileJSON: Dictionary # The json that defines this block
var shape: String = "block"


func _ready():
position = blockposition
apply_block_rotation()


# Function to make it's own shape and texture based on an id and position
# This function is called by a Chunk to construct it's blocks
func construct_self(blockpos: Vector3, newTileJSON: Dictionary):
tileJSON = newTileJSON
blockposition = blockpos
# Adding to this group makes sure that the NavigationRegion3D considers the block when baking the navmesh
add_to_group("navigation_mesh_source_group")
disable_mode = CollisionObject3D.DISABLE_MODE_MAKE_STATIC
# Set collision layer to layer 1 and 5
collision_layer = 1 | (1 << 4) # Layer 1 is 1, Layer 5 is 1 << 4 (16), combined with bitwise OR
# Set collision mask to layer 1
collision_mask = 1 # Layer 1 is 1

# Get the shape of the block
var tileJSONData = Gamedata.get_data_by_id(Gamedata.data.tiles,tileJSON.id)
if tileJSONData.has("shape"):
if tileJSONData.shape == "slope":
shape = "slope"

create_mesh.call_deferred()
create_collider()



func create_mesh():
var blockmeshisntance = MeshInstance3D.new()
var blockmesh = Helper.get_or_create_block_mesh(tileJSON.id, shape)
blockmeshisntance.mesh = blockmesh
add_child.call_deferred(blockmeshisntance)


func create_collider():
var collider = CollisionShape3D.new()
if shape == "block":
collider.shape = BoxShape3D.new()
else: # It's a slope
collider.shape = ConvexPolygonShape3D.new()
collider.shape.points = [
Vector3(0.5, 0.5, 0.5),
Vector3(0.5, 0.5, -0.5),
Vector3(-0.5, -0.5, 0.5),
Vector3(0.5, -0.5, 0.5),
Vector3(0.5, -0.5, -0.5),
Vector3(-0.5, -0.5, -0.5)
]

add_child.call_deferred(collider)


# When the map is created for the first time, we will apply block rotation
# This function will not be called when a map is loaded
func apply_block_rotation():
var defaultRotation: int = 0
# Only previously saved blocks have the block_x property, so we don't need to apply default rotation again
if shape == "slope" and not tileJSON.has("block_x"):
defaultRotation = 90
# The slope has a default rotation of 90
# The block has a default rotation of 0
var myRotation: int = tileJSON.get("rotation", 0) + defaultRotation
# Hack to get previouly saved slopes into the right rotation
if (myRotation == 0 or myRotation == 180) and shape == "slope" and tileJSON.has("block_x"):
myRotation += 180
if myRotation == 0:
# Only the block will match this case, not the slope. The block points north
rotation_degrees = Vector3(0,myRotation+180,0)
elif myRotation == 90:
# A slope will point north
# A block will point east
rotation_degrees = Vector3(0,myRotation+0,0)
elif myRotation == 180:
# A block will point south
# A slope will point east
rotation_degrees = Vector3(0,myRotation-180,0)
elif myRotation == 270:
# A block will point west
# A slope will point south
rotation_degrees = Vector3(0,myRotation+0,0)
elif myRotation == 360:
# Only a slope can match this case if it's rotation is 270 and it gets 90 rotation by default
rotation_degrees = Vector3(0,myRotation-180,0)
9 changes: 5 additions & 4 deletions Blocks/grass_001.tscn → Defaults/Blocks/default_block.tscn
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
[gd_scene load_steps=5 format=3 uid="uid://cpaa3ui52a23c"]

[ext_resource type="Material" uid="uid://buj4ukj1oh4pq" path="res://Materials/floor1.tres" id="1_tldl5"]
[ext_resource type="Script" path="res://Blocks/grass_001.gd" id="1_yge5h"]
[ext_resource type="Script" path="res://Defaults/Blocks/default_block.gd" id="1_s3i5a"]
[ext_resource type="Material" uid="uid://buj4ukj1oh4pq" path="res://Defaults/Blocks/Materials/floor1.tres" id="2_ukdu8"]

[sub_resource type="BoxMesh" id="BoxMesh_j05ve"]
material = ExtResource("1_tldl5")
material = ExtResource("2_ukdu8")

[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_gyg2o"]
points = PackedVector3Array(0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5)

[node name="Grass001" type="StaticBody3D" groups=["navigation_mesh_source_group"]]
disable_mode = 1
script = ExtResource("1_yge5h")
collision_layer = 17
script = ExtResource("1_s3i5a")

[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("BoxMesh_j05ve")
Expand Down
14 changes: 14 additions & 0 deletions Defaults/Blocks/default_slope.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends StaticBody3D

var id: String = ""

func update_texture(material: BaseMaterial3D) -> void:
var prism_mesh = PrismMesh.new()
prism_mesh.left_to_right = 1
prism_mesh.surface_set_material(0, material)

$MeshInstance3D.mesh = prism_mesh # Assign the new PrismMesh to the MeshInstance3D


func get_texture_string() -> String:
return $MeshInstance3D.mesh.material.albedo_texture.resource_path
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[gd_scene load_steps=4 format=3 uid="uid://dnsl5rk6de7na"]
[gd_scene load_steps=5 format=3 uid="uid://dnsl5rk6de7na"]

[ext_resource type="Material" uid="uid://pdqqtb1s8g6n" path="res://Materials/stairs1.tres" id="1_r8jiw"]
[ext_resource type="Script" path="res://Defaults/Blocks/default_slope.gd" id="1_x2ar8"]
[ext_resource type="Material" uid="uid://pdqqtb1s8g6n" path="res://Defaults/Blocks/Materials/stairs1.tres" id="2_qnimx"]

[sub_resource type="PrismMesh" id="PrismMesh_7xabc"]
material = ExtResource("1_r8jiw")
lightmap_size_hint = Vector2i(14, 21)
material = ExtResource("2_qnimx")
left_to_right = 1.0

[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_7isgt"]
Expand All @@ -12,6 +14,8 @@ points = PackedVector3Array(0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5, -0.5, 0.5, 0.5,
[node name="StairsToN001" type="StaticBody3D" groups=["navigation_mesh_source_group"]]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0)
disable_mode = 1
collision_layer = 17
script = ExtResource("1_x2ar8")

[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("PrismMesh_7xabc")
Expand Down
23 changes: 23 additions & 0 deletions Defaults/Furniture/FurniturePhysics.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[gd_scene load_steps=4 format=3 uid="uid://cpmwu7v1r8cg8"]

[ext_resource type="Script" path="res://Scripts/FurniturePhysics.gd" id="1_klkkl"]
[ext_resource type="Texture2D" uid="uid://cqfqxgp12asw1" path="res://Mods/Core/Furniture/table_64.png" id="1_q67ig"]

[sub_resource type="SphereShape3D" id="SphereShape3D_vweei"]
radius = 0.3

[node name="FurniturePhysics" type="RigidBody3D"]
collision_layer = 4
collision_mask = 7
axis_lock_angular_x = true
axis_lock_angular_z = true
linear_damp = 59.0
angular_damp = 59.0
script = ExtResource("1_klkkl")

[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
texture = ExtResource("1_q67ig")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_vweei")
20 changes: 20 additions & 0 deletions Defaults/Furniture/FurnitureStatic.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[gd_scene load_steps=4 format=3 uid="uid://cm4n8cljiij4w"]

[ext_resource type="Script" path="res://Scripts/FurnitureStatic.gd" id="1_wituf"]
[ext_resource type="Texture2D" uid="uid://cqfqxgp12asw1" path="res://Mods/Core/Furniture/table_64.png" id="2_nt0ji"]

[sub_resource type="BoxShape3D" id="BoxShape3D_23dag"]
size = Vector3(0.4, 0.6, 0.4)

[node name="FurnitureStatic" type="StaticBody3D"]
collision_layer = 17
axis_lock_angular_x = true
axis_lock_angular_z = true
script = ExtResource("1_wituf")

[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
texture = ExtResource("2_nt0ji")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_23dag")
Binary file added Defaults/Maps/Generichouse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Defaults/Maps/Generichouse.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://sqi8fd2vi8jr"
path="res://.godot/imported/Generichouse.png-54cdc2d9e4775bcd5290036badaeb324.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Defaults/Maps/Generichouse.png"
dest_files=["res://.godot/imported/Generichouse.png-54cdc2d9e4775bcd5290036badaeb324.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
Loading