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

Updating Cogito to Godot 4.3 #320

Merged
merged 3 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![COGITO_banner](docs/Cogito_capsule_202402_jpg.jpg)
# COGITO
[![GodotEngine](https://img.shields.io/badge/Godot_4.2.1_stable-blue?logo=godotengine&logoColor=white)](https://godotengine.org/) [![COGITO](https://img.shields.io/badge/beta_202409-35A1D7?label=COGITO&labelColor=0E887A)](https://github.com/Phazorknight/Cogito)
[![GodotEngine](https://img.shields.io/badge/Godot_4.3_stable-blue?logo=godotengine&logoColor=white)](https://godotengine.org/) [![COGITO](https://img.shields.io/badge/beta_202409-35A1D7?label=COGITO&labelColor=0E887A)](https://github.com/Phazorknight/Cogito)
beta 202410.01

## What is it?
Expand Down
4 changes: 3 additions & 1 deletion addons/cogito/Assets/Shader/ViewmodelSpace.gd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ func _init():
instance uniform bool viewmodel_enabled = true;'''

injected_vertex = '''
UV = UV * uv1_scale.xy + uv1_offset.xy;

/* begin shader magic*/
float onetanfov = 1.0f / tan(0.5f * (viewmodel_fov * PI / 180.0f));
float aspect = VIEWPORT_SIZE.x / VIEWPORT_SIZE.y;
Expand All @@ -32,7 +34,7 @@ func _init():
POSITION = PROJECTION_MATRIX * MODELVIEW_MATRIX * vec4(VERTEX.xyz, 1.0);

if(viewmodel_enabled){
POSITION.z = mix(POSITION.z, 0, 0.999);
POSITION.z = mix(POSITION.z, 0, -2.999);
}
/* end shader magic */
'''
Expand Down
1 change: 0 additions & 1 deletion addons/cogito/CogitoObjects/cogito_player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ func _input(event):
head.rotation.x = clamp(head.rotation.x, deg_to_rad(-90), deg_to_rad(90))

mouse_movement.emit(look_movement)
print("CogPlayer: mouse_movement relative= ", look_movement)


# Checking Analog stick input for mouse look
Expand Down
2 changes: 1 addition & 1 deletion addons/cogito/CogitoObjects/cogito_projectile.gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@icon("res://addons/cogito/Graphics/Editor/Icon_CogitoObject.svg")
@icon("res://addons/cogito/Assets/Graphics/Editor/Icon_CogitoObject.svg")
extends CogitoObject
## Derived from CogitoObject, this class handles additional information for projectiles like lifespan, damage, destroy_on_impact. Some of these are inherited from the Wieldable that spawns this projectile.
class_name CogitoProjectile
Expand Down
2 changes: 1 addition & 1 deletion addons/cogito/CogitoObjects/cogito_security_camera.gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@icon("res://addons/cogito/Graphics/Editor/Icon_CogitoObject.svg")
@icon("res://addons/cogito/Assets/Graphics/Editor/Icon_CogitoObject.svg")
extends Node3D
class_name CogitoSecurityCamera

Expand Down
1 change: 0 additions & 1 deletion addons/cogito/CogitoObjects/cogito_switch.gd
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,3 @@ func save():

}
return state_dict

1 change: 0 additions & 1 deletion addons/cogito/Components/Interactions/BasicInteraction.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ func interact(_player_interaction_component):

func _on_object_state_change(_interaction_text: String):
interaction_text = _interaction_text

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@icon("res://COGITO/Assets/Graphics/Editor/Icon_InteractionComponent.svg")
@icon("res://addons/cogito/Assets/Graphics/Editor/Icon_InteractionComponent.svg")
extends Node3D
## Base class for any interactions based on input map actions.
class_name InteractionComponent
Expand Down
1 change: 0 additions & 1 deletion addons/cogito/Components/Interactions/LockInteraction.gd
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ func start_hold_check(interactor) -> bool:
return true
else:
return false

2 changes: 1 addition & 1 deletion addons/cogito/Components/Properties/cogito_properties.gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@icon("res://COGITO/Assets/Graphics/Editor/Icon_CogitoProperties.svg")
@icon("res://addons/cogito/Assets/Graphics/Editor/Icon_CogitoProperties.svg")
extends Node3D
## This class handles systeminc properties. Needs to be attached to a CogitoObject to work properly. For proper processing, said Object needs to have a signal hooked up to call check_for_systemic_interactions(collider).
class_name CogitoProperties
Expand Down
10 changes: 7 additions & 3 deletions addons/cogito/DemoScenes/COGITO_1_LegacyDemo.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=140 format=3 uid="uid://cud7jwvomj24d"]
[gd_scene load_steps=141 format=3 uid="uid://cud7jwvomj24d"]

[ext_resource type="PackedScene" uid="uid://kicjwmh02uwf" path="res://addons/cogito/PackedScenes/cogito_player.tscn" id="1_7d2n7"]
[ext_resource type="Script" path="res://addons/cogito/SceneManagement/cogito_scene.gd" id="1_b15oo"]
Expand All @@ -22,6 +22,7 @@
[ext_resource type="PackedScene" uid="uid://d1rq8gm20sjo1" path="res://addons/cogito/PackedScenes/lamp_standing.tscn" id="18_oxm1j"]
[ext_resource type="PackedScene" uid="uid://sfypssn0rllo" path="res://addons/cogito/PackedScenes/Pickups/pickup_stamina_extension.tscn" id="18_pobhb"]
[ext_resource type="PackedScene" uid="uid://cjs44e1ow53rv" path="res://addons/cogito/PackedScenes/heal_zone.tscn" id="19_2mngh"]
[ext_resource type="PackedScene" uid="uid://bbt5twbnrlcfj" path="res://addons/cogito/Components/Interactions/LockInteraction.tscn" id="19_f55px"]
[ext_resource type="PackedScene" uid="uid://8h462cd7whew" path="res://addons/cogito/PackedScenes/hazard_zone.tscn" id="20_dgnbq"]
[ext_resource type="PackedScene" uid="uid://bnygtkw3tvet6" path="res://addons/cogito/PackedScenes/press_and_hold_wheel.tscn" id="22_ni6um"]
[ext_resource type="Script" path="res://addons/cogito/CogitoObjects/cogito_door.gd" id="23_rfav8"]
Expand Down Expand Up @@ -352,7 +353,7 @@ size = Vector3(1.5, 0.01, 1.5)
[sub_resource type="BoxShape3D" id="BoxShape3D_ht4uj"]
size = Vector3(100, 3, 100)

[sub_resource type="Resource" id="Resource_via4e"]
[sub_resource type="Resource" id="Resource_nrxhb"]
resource_local_to_scene = true
script = ExtResource("2_chxar")
grid = true
Expand Down Expand Up @@ -1303,6 +1304,8 @@ key = ExtResource("9_g1bqh")
key_hint = "Locked. Is there a key nearby?"
open_rotation_deg = -95.0

[node name="LockInteraction" parent="INTERACTIVE_OBJECTS/DoorLocked" instance=ExtResource("19_f55px")]

[node name="Cabinet_Prefab" parent="INTERACTIVE_OBJECTS" instance=ExtResource("35_ee66c")]
transform = Transform3D(1, 0, -1.74846e-07, 0, 1, 0, 1.74846e-07, 0, 1, -12.0996, 0.600001, 14.2231)

Expand Down Expand Up @@ -1621,7 +1624,7 @@ spawn_on_death = Array[PackedScene]([])

[node name="Player" parent="." instance=ExtResource("1_7d2n7")]
transform = Transform3D(-1, 0, 7.45058e-07, 0, 1, 0, -7.45058e-07, 0, -1, -7.5375, 0.905039, -3.30884)
inventory_data = SubResource("Resource_via4e")
inventory_data = SubResource("Resource_nrxhb")
step_height_camera_lerp = 1.5

[node name="Ladder" parent="." instance=ExtResource("41_q27ev")]
Expand Down Expand Up @@ -1876,6 +1879,7 @@ vertical_alignment = 0
[connection signal="body_entered" from="QuestTriggerBprogress" to="QuestTriggerBprogress" method="_on_body_entered"]
[connection signal="body_entered" from="QuestTriggerBprogress2" to="QuestTriggerBprogress2" method="_on_body_entered"]

[editable path="INTERACTIVE_OBJECTS/DoorLocked"]
[editable path="INTERACTIVE_OBJECTS/Cabinet_Prefab/Pickup_Battery"]
[editable path="INTERACTIVE_OBJECTS/Cabinet_Prefab/Pickup_Battery2"]
[editable path="TargetDestructable"]
Expand Down
Loading