From a0fbb8180f676a8935cb215e9dc883f7697ffeec Mon Sep 17 00:00:00 2001 From: Spencer Killen Date: Tue, 3 Jan 2023 12:20:47 -0700 Subject: [PATCH] --- blends/npcs.blend | 2 +- godot/assets/meat_bore/level.tscn | 5 +- godot/assets/meat_creek/DialogTrigger.gd | 2 + .../assets/meat_creek/DialogTriggerObelisk.gd | 2 + godot/assets/meat_creek/side_tunnel_1.tscn | 32 +++++---- godot/effects/MeatSinkParameters.gd | 9 +++ godot/effects/MeatSinkParameters.tscn | 6 ++ godot/export_presets.cfg | 67 +++++++++++++++++++ godot/player/Overlay.gd | 2 +- godot/player/PlatformMechanics.gd | 5 +- godot/util.gd | 1 + 11 files changed, 113 insertions(+), 20 deletions(-) create mode 100644 godot/effects/MeatSinkParameters.gd create mode 100644 godot/effects/MeatSinkParameters.tscn create mode 100644 godot/export_presets.cfg diff --git a/blends/npcs.blend b/blends/npcs.blend index 27a68d5..1bd52ca 100644 --- a/blends/npcs.blend +++ b/blends/npcs.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c3a255299d1a9c1881d32cfd5fd6a180198dff642bcfb2184b386845e55da287 +oid sha256:ef8057297bf18797976b9b5c8b348b95b7e6d5dfc504ff6aa8ead721303e998d size 58932318 diff --git a/godot/assets/meat_bore/level.tscn b/godot/assets/meat_bore/level.tscn index 4f61873..b075823 100644 --- a/godot/assets/meat_bore/level.tscn +++ b/godot/assets/meat_bore/level.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=13 format=2] +[gd_scene load_steps=14 format=2] [ext_resource path="res://assets/meat_bore/meat_tunnel_top.tscn" type="PackedScene" id=1] [ext_resource path="res://assets/meat_bore/meat_module/level_wally.tscn" type="PackedScene" id=2] [ext_resource path="res://player/player.tscn" type="PackedScene" id=3] [ext_resource path="res://effects/WorldEnvironment.tscn" type="PackedScene" id=4] [ext_resource path="res://effects/grainy_shader.tscn" type="PackedScene" id=5] +[ext_resource path="res://effects/MeatSinkParameters.tscn" type="PackedScene" id=6] [ext_resource path="res://assets/meat_bore/meat_module/level_clark.tscn" type="PackedScene" id=7] [ext_resource path="res://assets/meat_bore/meat_module/level_alexis.tscn" type="PackedScene" id=8] [ext_resource path="res://assets/meat_bore/meat_module/level_lee.tscn" type="PackedScene" id=9] @@ -40,6 +41,8 @@ glow_bloom = 1.0 [node name="bore_level" type="Spatial"] +[node name="MeatSinkParameters" parent="." instance=ExtResource( 6 )] + [node name="meat_tunnel_top" parent="." instance=ExtResource( 1 )] [node name="Player" parent="." instance=ExtResource( 3 )] diff --git a/godot/assets/meat_creek/DialogTrigger.gd b/godot/assets/meat_creek/DialogTrigger.gd index a81888d..a423cb6 100644 --- a/godot/assets/meat_creek/DialogTrigger.gd +++ b/godot/assets/meat_creek/DialogTrigger.gd @@ -12,5 +12,7 @@ func _on_DialogTrigger_body_entered(body): add_child(dialog) func _on_DialogTrigger_body_exited(body): + if body.get_parent() != Util.player: + return if dialog != null: dialog = null diff --git a/godot/assets/meat_creek/DialogTriggerObelisk.gd b/godot/assets/meat_creek/DialogTriggerObelisk.gd index 64a1505..6b5fb9a 100644 --- a/godot/assets/meat_creek/DialogTriggerObelisk.gd +++ b/godot/assets/meat_creek/DialogTriggerObelisk.gd @@ -12,6 +12,8 @@ func _on_DialogTrigger_body_entered(body): add_child(dialog) func _on_DialogTrigger_body_exited(body): + if body.get_parent() != Util.player: + return if dialog != null: if is_a_parent_of(dialog): call_deferred("remove_child", dialog) diff --git a/godot/assets/meat_creek/side_tunnel_1.tscn b/godot/assets/meat_creek/side_tunnel_1.tscn index 1c40872..ffdc141 100644 --- a/godot/assets/meat_creek/side_tunnel_1.tscn +++ b/godot/assets/meat_creek/side_tunnel_1.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=26 format=2] +[gd_scene load_steps=27 format=2] [ext_resource path="res://assets/meat_creek/side_tunnel_1.glb" type="PackedScene" id=1] [ext_resource path="res://player/player.tscn" type="PackedScene" id=2] [ext_resource path="res://effects/WorldEnvironment.tscn" type="PackedScene" id=3] +[ext_resource path="res://effects/MeatSinkParameters.tscn" type="PackedScene" id=4] [ext_resource path="res://effects/SinkBlock.tscn" type="PackedScene" id=5] [ext_resource path="res://assets/meat_creek/creek_platform.tscn" type="PackedScene" id=6] [ext_resource path="res://effects/grainy_shader.tscn" type="PackedScene" id=7] @@ -55,21 +56,24 @@ glow_bloom = 1.0 [node name="side_tunnel_1" instance=ExtResource( 1 )] +[node name="MeatSinkParameters" parent="." index="0" instance=ExtResource( 4 )] +mind_fuck = true + [node name="StaticBody" parent="Canvas001" index="0" instance=ExtResource( 8 )] -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" parent="." index="2"] autoplay = "Canvas001" -[node name="Player" parent="." index="2" instance=ExtResource( 2 )] +[node name="Player" parent="." index="3" instance=ExtResource( 2 )] transform = Transform( -0.647561, 0, -0.762014, 0, 1, 0, 0.762014, 0, -0.647561, -70.375, 4.37653, -106.953 ) -[node name="LessFogWorldEnvironment" parent="." index="3" instance=ExtResource( 3 )] +[node name="LessFogWorldEnvironment" parent="." index="4" instance=ExtResource( 3 )] environment = SubResource( 3 ) -[node name="SinkBlock" parent="." index="4" instance=ExtResource( 5 )] +[node name="SinkBlock" parent="." index="5" instance=ExtResource( 5 )] transform = Transform( 80, 0, 0, 0, 3.87358, 0, 0, 0, 80, 0, -3.3489, -43.3626 ) -[node name="platforms" type="Spatial" parent="." index="5"] +[node name="platforms" type="Spatial" parent="." index="6"] [node name="creek_platform" parent="platforms" index="0" instance=ExtResource( 6 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -55.8201, 0.216419, -98.2347 ) @@ -131,7 +135,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -51.3312, 0.216419, -8.51924 ) [node name="creek_platform19" parent="platforms" index="19" instance=ExtResource( 6 )] transform = Transform( 0.65383, 0, 0.756641, 0, 1, 0, -0.756641, 0, 0.65383, 21.6703, 0.216419, -0.752861 ) -[node name="decorations" type="Spatial" parent="." index="6"] +[node name="decorations" type="Spatial" parent="." index="7"] [node name="tentacle_cluster_1" type="Spatial" parent="decorations" index="0"] transform = Transform( 3.25905, -1.14546, -0.587008, 0.249992, 2.72876, 1.3984, 0, -0.737517, 4.60518, 57.5945, 7.50309, 11.9759 ) @@ -312,7 +316,7 @@ light_color = Color( 0.470588, 0.054902, 0.054902, 1 ) light_energy = 12.0 shadow_enabled = true -[node name="blackboxes" type="Spatial" parent="." index="7"] +[node name="blackboxes" type="Spatial" parent="." index="8"] [node name="black_box0" parent="blackboxes" index="0" instance=ExtResource( 19 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -41.0261, 1.80736, -111.427 ) @@ -333,11 +337,11 @@ id = 3 transform = Transform( 0.900076, -0.435734, 0, 0.430268, 0.888784, -0.1579, 0.0688022, 0.142122, 0.987455, -1.60433, 2.16359, 17.6124 ) id = 4 -[node name="shader" parent="." index="8" instance=ExtResource( 7 )] +[node name="shader" parent="." index="9" instance=ExtResource( 7 )] -[node name="creek_cage" parent="." index="9" instance=ExtResource( 9 )] +[node name="creek_cage" parent="." index="10" instance=ExtResource( 9 )] -[node name="elevator" parent="." index="10" instance=ExtResource( 10 )] +[node name="elevator" parent="." index="11" instance=ExtResource( 10 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0735546, -123.027, -41.1766 ) [node name="DialogTrigger" type="Area" parent="elevator" index="1"] @@ -348,16 +352,16 @@ script = ExtResource( 22 ) transform = Transform( 10, 0, 0, 0, 1, 0, 0, 0, 10, 0, 0, 0 ) shape = SubResource( 5 ) -[node name="SignalGenerator" parent="." index="11" instance=ExtResource( 12 )] +[node name="SignalGenerator" parent="." index="12" instance=ExtResource( 12 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.489914, -122.635, -41.5684 ) stream = ExtResource( 16 ) max_db = 6.0 max_distance = 200.0 -[node name="upper_shelf" parent="." index="12" instance=ExtResource( 13 )] +[node name="upper_shelf" parent="." index="13" instance=ExtResource( 13 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.09789, 0 ) -[node name="AmbientSounds" type="Node" parent="." index="13"] +[node name="AmbientSounds" type="Node" parent="." index="14"] [node name="WaterSound" type="AudioStreamPlayer" parent="AmbientSounds" index="0"] stream = ExtResource( 14 ) diff --git a/godot/effects/MeatSinkParameters.gd b/godot/effects/MeatSinkParameters.gd new file mode 100644 index 0000000..14b6510 --- /dev/null +++ b/godot/effects/MeatSinkParameters.gd @@ -0,0 +1,9 @@ +extends Spatial + +export var sink_factor = Vector3(0.7, 0.1, 0.7) +export var mind_fuck = false + +func _ready(): + Util.meat_sink_parameters = self + + diff --git a/godot/effects/MeatSinkParameters.tscn b/godot/effects/MeatSinkParameters.tscn new file mode 100644 index 0000000..205d2b6 --- /dev/null +++ b/godot/effects/MeatSinkParameters.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://effects/MeatSinkParameters.gd" type="Script" id=1] + +[node name="MeatSinkParameters" type="Spatial"] +script = ExtResource( 1 ) diff --git a/godot/export_presets.cfg b/godot/export_presets.cfg new file mode 100644 index 0000000..a60c420 --- /dev/null +++ b/godot/export_presets.cfg @@ -0,0 +1,67 @@ +[preset.0] + +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="../../Downloads/mm_test_export/meat_madness_redux.exe" +script_export_mode=1 +script_encryption_key="" + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +binary_format/64_bits=true +binary_format/embed_pck=false +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true +codesign/enable=false +codesign/identity_type=0 +codesign/identity="" +codesign/password="" +codesign/timestamp=true +codesign/timestamp_server_url="" +codesign/digest_algorithm=1 +codesign/description="" +codesign/custom_options=PoolStringArray( ) +application/modify_resources=true +application/icon="" +application/file_version="" +application/product_version="" +application/company_name="" +application/product_name="" +application/file_description="" +application/copyright="" +application/trademarks="" + +[preset.1] + +name="Linux/X11" +platform="Linux/X11" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="" +script_export_mode=1 +script_encryption_key="" + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +binary_format/64_bits=true +binary_format/embed_pck=false +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true diff --git a/godot/player/Overlay.gd b/godot/player/Overlay.gd index ab8cf15..480c1ab 100644 --- a/godot/player/Overlay.gd +++ b/godot/player/Overlay.gd @@ -24,7 +24,7 @@ func _process(delta): if will_fall_hard and OnFootPhysics.is_on_floor(): will_fall_hard = false $HurtScreen/HurtScreenOpacityAnimation.play("opacity") - if in_water: + if in_water and Util.meat_sink_parameters.mind_fuck: $WaterScreen.color.a = Util.clamped_lerp($WaterScreen.color.a, 0.55, delta, 0.05) else: $WaterScreen.color.a = Util.clamped_lerp($WaterScreen.color.a, 0.0, delta*5, 0.05) diff --git a/godot/player/PlatformMechanics.gd b/godot/player/PlatformMechanics.gd index d9243f5..654cea6 100644 --- a/godot/player/PlatformMechanics.gd +++ b/godot/player/PlatformMechanics.gd @@ -2,7 +2,6 @@ extends Node onready var global_event_bus = get_node("/root/GlobalEventBus") var sink_counter = 0 -export var SINK_BLOCK_SLOWDOWN_AMOUNT = Vector3(0.7, 0.1, 0.7) func _ready(): global_event_bus.connect("player_entered_meat_sink", self, "on_player_enter_meat_sink") @@ -10,10 +9,10 @@ func _ready(): func on_player_enter_meat_sink(): if sink_counter == 0: - $"../OnFootPhysics".increase_velocity_factor(SINK_BLOCK_SLOWDOWN_AMOUNT) + $"../OnFootPhysics".increase_velocity_factor(Util.meat_sink_parameters.sink_factor) sink_counter += 1 func on_player_exited_meat_sink(): sink_counter -= 1 if sink_counter == 0: - $"../OnFootPhysics".decrease_velocity_factor(SINK_BLOCK_SLOWDOWN_AMOUNT) + $"../OnFootPhysics".decrease_velocity_factor(Util.meat_sink_parameters.sink_factor) diff --git a/godot/util.gd b/godot/util.gd index 7b66ad5..dd8297d 100644 --- a/godot/util.gd +++ b/godot/util.gd @@ -2,6 +2,7 @@ extends Node # Updated by player onready var player = null +onready var meat_sink_parameters = null func vec3_componentwise_clamp(vec: Vector3, lower: float, upper: float) -> Vector3: return Vector3(