diff --git a/TODO_LIST b/TODO_LIST index 6a91611..c97cd10 100644 --- a/TODO_LIST +++ b/TODO_LIST @@ -2,8 +2,6 @@ Current plans: Molikman's abilities: - Molik: - Visuals Flashbang: Visuals Icon diff --git a/materials/fire_wall.tres b/materials/fire_wall.tres new file mode 100644 index 0000000..48d6ced --- /dev/null +++ b/materials/fire_wall.tres @@ -0,0 +1,27 @@ +[gd_resource type="ShaderMaterial" load_steps=6 format=3 uid="uid://bw3uex67yy8e7"] + +[ext_resource type="Shader" uid="uid://dr0p2owhwp4i" path="res://shaders/firewall.gdshader" id="1_i6b38"] + +[sub_resource type="Gradient" id="Gradient_i6b38"] +interpolation_mode = 1 +offsets = PackedFloat32Array(0.0056179776, 0.24719101, 0.4550562) +colors = PackedColorArray(1, 0, 0, 1, 1, 0.38039216, 0, 1, 1, 0.77357376, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_qwxnu"] +gradient = SubResource("Gradient_i6b38") + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_i6b38"] +noise_type = 2 +cellular_jitter = 2.405 + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_qwxnu"] +width = 1280 +noise = SubResource("FastNoiseLite_i6b38") +seamless = true + +[resource] +render_priority = 0 +shader = ExtResource("1_i6b38") +shader_parameter/noise_texture = SubResource("NoiseTexture2D_qwxnu") +shader_parameter/fire_gradient = SubResource("GradientTexture1D_qwxnu") +shader_parameter/height = 0.16999999620016 diff --git a/shaders/firewall.gdshader b/shaders/firewall.gdshader new file mode 100644 index 0000000..c855e8d --- /dev/null +++ b/shaders/firewall.gdshader @@ -0,0 +1,21 @@ +shader_type spatial; + +render_mode unshaded, cull_disabled,depth_prepass_alpha; + +uniform sampler2D noise_texture: repeat_enable; +uniform sampler2D fire_gradient; +uniform float height: hint_range(0.0, 1.0, 0.01); + +void fragment() { + float noise = texture(noise_texture,UV + vec2(0,fract(TIME/5.0))).x; + + ALBEDO = texture(fire_gradient,vec2(UV.y+noise*0.1,0)).rgb; + float interpolated = 0.; + if (UV.y > 0.0) { + interpolated = UV.y/height; + } + + if (UV.y < height) { + ALPHA = step(0.5,mix(noise,1.0,interpolated-0.3)); + } +} \ No newline at end of file diff --git a/shaders/firewall.gdshader.uid b/shaders/firewall.gdshader.uid new file mode 100644 index 0000000..ff73c40 --- /dev/null +++ b/shaders/firewall.gdshader.uid @@ -0,0 +1 @@ +uid://dr0p2owhwp4i diff --git a/systems/weapon_system/weapon_substate_machine.gd b/systems/weapon_system/weapon_substate_machine.gd index e33d0fe..02ae1f4 100644 --- a/systems/weapon_system/weapon_substate_machine.gd +++ b/systems/weapon_system/weapon_substate_machine.gd @@ -84,3 +84,11 @@ func alternate_state() -> void: func switch_mode() -> void: if current_state != null: current_state.switch_mode() + +func play(animation_name: StringName): + if animation_player.current_animation == animation_prefix + animation_name: + animation_player.stop() + animation_player.play(animation_prefix + animation_name) + +func queue(animation_name: StringName): + animation_player.queue(animation_prefix + animation_name) diff --git a/weapons/bomb/bomb_idle_state.gd b/weapons/bomb/bomb_idle_state.gd index 08a3ed9..514d0e1 100644 --- a/weapons/bomb/bomb_idle_state.gd +++ b/weapons/bomb/bomb_idle_state.gd @@ -2,7 +2,7 @@ extends WeaponState func _enter() -> void: - machine.animation_player.play(machine.animation_prefix+"idle") + machine.play("idle") func _exit() -> void: pass diff --git a/weapons/bomb/bomb_intro_state.gd b/weapons/bomb/bomb_intro_state.gd index 66f4813..bade4e5 100644 --- a/weapons/bomb/bomb_intro_state.gd +++ b/weapons/bomb/bomb_intro_state.gd @@ -1,7 +1,7 @@ extends WeaponState func _enter() -> void: - machine.animation_player.play(machine.animation_prefix+"intro") + machine.play("intro") machine.animation_player.animation_finished.connect(on_animation_finished) func _exit() -> void: diff --git a/weapons/bomb/bomb_main_state.gd b/weapons/bomb/bomb_main_state.gd index 86e6a2a..610b9d0 100644 --- a/weapons/bomb/bomb_main_state.gd +++ b/weapons/bomb/bomb_main_state.gd @@ -3,7 +3,7 @@ extends WeaponState @export var bomb_scene: PackedScene func _enter(): - machine.animation_player.play(machine.animation_prefix+"plant") + machine.play("plant") machine.animation_player.animation_finished.connect(on_animation_finished) if is_multiplayer_authority(): machine.speed_modifier = 0.0 diff --git a/weapons/gun/idle_state.gd b/weapons/gun/idle_state.gd index 1ff2028..e865b05 100644 --- a/weapons/gun/idle_state.gd +++ b/weapons/gun/idle_state.gd @@ -3,7 +3,7 @@ extends WeaponState @export var emptyable: bool func _enter() -> void: - machine.animation_player.play(with_morphems("idle")) + machine.play(with_morphems("idle")) if is_multiplayer_authority(): machine.player.get_node("PlayerInput").reload.connect(init_reload) @@ -21,4 +21,4 @@ func init_reload(): transition.emit("Reload") func with_morphems(animation): - return machine.animation_prefix + ((animation+"_empty") if emptyable and machine.ammo == 0 else animation) + return ((animation+"_empty") if emptyable and machine.ammo == 0 else animation) diff --git a/weapons/gun/intro_state.gd b/weapons/gun/intro_state.gd index 56fd77e..331b0be 100644 --- a/weapons/gun/intro_state.gd +++ b/weapons/gun/intro_state.gd @@ -3,7 +3,7 @@ extends WeaponState @export var emptyable: bool func _enter() -> void: - machine.animation_player.play(with_morphems("intro")) + machine.play(with_morphems("intro")) machine.animation_player.animation_finished.connect(on_animation_finished) func _exit() -> void: @@ -11,8 +11,8 @@ func _exit() -> void: machine.animation_player.animation_finished.disconnect(on_animation_finished) func on_animation_finished(animation): - if animation == with_morphems("intro"): + if animation == machine.animation_prefix + with_morphems("intro"): transition.emit("Idle") func with_morphems(animation): - return machine.animation_prefix + ((animation+"_empty") if emptyable and machine.ammo == 0 else animation) + return ((animation+"_empty") if emptyable and machine.ammo == 0 else animation) diff --git a/weapons/gun/reload_state.gd b/weapons/gun/reload_state.gd index 36fcb99..a9c320a 100644 --- a/weapons/gun/reload_state.gd +++ b/weapons/gun/reload_state.gd @@ -3,14 +3,14 @@ extends WeaponState @export var emptyable: bool func _enter() -> void: - machine.animation_player.play(with_morphems("reload")) + machine.play(with_morphems("reload")) machine.animation_player.animation_finished.connect(on_animation_finished) func _exit() -> void: machine.animation_player.animation_finished.disconnect(on_animation_finished) func on_animation_finished(animation): - if animation == with_morphems("reload"): + if animation == machine.animation_prefix + with_morphems("reload"): if machine.remaining_ammo > machine.max_ammo: machine.remaining_ammo -= machine.max_ammo-machine.ammo machine.ammo = machine.max_ammo @@ -20,4 +20,4 @@ func on_animation_finished(animation): transition.emit("Idle") func with_morphems(animation): - return machine.animation_prefix + ((animation+"_empty") if emptyable and machine.ammo == 0 else animation) + return ((animation+"_empty") if emptyable and machine.ammo == 0 else animation) diff --git a/weapons/gun/semi_pellet_shoot_state.gd b/weapons/gun/semi_pellet_shoot_state.gd index 8488c8c..80d89dd 100644 --- a/weapons/gun/semi_pellet_shoot_state.gd +++ b/weapons/gun/semi_pellet_shoot_state.gd @@ -24,7 +24,7 @@ func _exit() -> void: machine.animation_player.animation_finished.disconnect(on_animation_finished) func on_animation_finished(animation): - if animation == with_morphems("shoot"): + if animation == machine.animation_prefix + with_morphems("shoot"): transition.emit("Idle") func _use_begin() -> void: @@ -38,8 +38,7 @@ func fire() -> void: machine.ammo -= 1 bullets_shot += 1 - machine.animation_player.stop() - machine.animation_player.play(with_morphems("shoot")) + machine.play(with_morphems("shoot")) if is_multiplayer_authority(): Session.shoot_pellets(int(machine.player.name),limb_pellet_damage,torso_pellet_damage,head_pellet_damage,shoot_distance,pellet_spread.get_dots(),damage_reduction_curve) @@ -49,4 +48,4 @@ func fire() -> void: machine.player_camera.recoil(horizontal_curve.sample(bullets_shot),vertical_curve.sample(bullets_shot)) func with_morphems(animation): - return machine.animation_prefix + ((animation+"_empty") if emptyable and machine.ammo == 0 else animation) + return ((animation+"_empty") if emptyable and machine.ammo == 0 else animation) diff --git a/weapons/gun/semi_shoot_state.gd b/weapons/gun/semi_shoot_state.gd index 4a9ccf9..b0783d9 100644 --- a/weapons/gun/semi_shoot_state.gd +++ b/weapons/gun/semi_shoot_state.gd @@ -23,7 +23,7 @@ func _exit() -> void: machine.animation_player.animation_finished.disconnect(on_animation_finished) func on_animation_finished(animation): - if animation == with_morphems("shoot"): + if animation == machine.animation_prefix + with_morphems("shoot"): transition.emit("Idle") func _use_begin() -> void: @@ -37,8 +37,7 @@ func fire() -> void: machine.ammo -= 1 bullets_shot += 1 - machine.animation_player.stop() - machine.animation_player.play(with_morphems("shoot")) + machine.play(with_morphems("shoot")) if is_multiplayer_authority(): Session.shoot(int(machine.player.name),limb_damage,torso_damage,head_damage,shoot_distance,damage_reduction_curve) @@ -48,4 +47,4 @@ func fire() -> void: machine.player_camera.recoil(horizontal_curve.sample(bullets_shot),vertical_curve.sample(bullets_shot)) func with_morphems(animation): - return machine.animation_prefix + ((animation+"_empty") if emptyable and machine.ammo == 0 else animation) + return ((animation+"_empty") if emptyable and machine.ammo == 0 else animation) diff --git a/weapons/knife/knife_attack_heavy.gd b/weapons/knife/knife_attack_heavy.gd index f9d84b2..cf39a88 100644 --- a/weapons/knife/knife_attack_heavy.gd +++ b/weapons/knife/knife_attack_heavy.gd @@ -3,7 +3,7 @@ extends WeaponState @export var damage: int func _enter() -> void: - machine.animation_player.play(machine.animation_prefix + "heavy_attack") + machine.play("heavy_attack") machine.animation_player.animation_finished.connect(on_animation_finished) attack() diff --git a/weapons/knife/knife_idle.gd b/weapons/knife/knife_idle.gd index 16d1b2c..ce038c7 100644 --- a/weapons/knife/knife_idle.gd +++ b/weapons/knife/knife_idle.gd @@ -1,7 +1,7 @@ extends WeaponState func _enter() -> void: - machine.animation_player.play(machine.animation_prefix + "idle") + machine.play("idle") func _exit() -> void: pass diff --git a/weapons/knife/knife_intro.gd b/weapons/knife/knife_intro.gd index 7579ea0..2c882e3 100644 --- a/weapons/knife/knife_intro.gd +++ b/weapons/knife/knife_intro.gd @@ -1,7 +1,7 @@ extends WeaponState func _enter() -> void: - machine.animation_player.play(machine.animation_prefix + "intro") + machine.play("intro") machine.animation_player.animation_finished.connect(on_animation_finished) func _exit() -> void: diff --git a/weapons/molikman/fire_smoke/fire_smoke.tscn b/weapons/molikman/fire_smoke/fire_smoke.tscn new file mode 100644 index 0000000..8708188 --- /dev/null +++ b/weapons/molikman/fire_smoke/fire_smoke.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=3 format=3 uid="uid://4g5vi7dxef6d"] + +[ext_resource type="Material" uid="uid://bw3uex67yy8e7" path="res://materials/fire_wall.tres" id="1_w3iei"] + +[sub_resource type="CylinderMesh" id="CylinderMesh_cqb3p"] +material = ExtResource("1_w3iei") +top_radius = 3.5 +bottom_radius = 3.5 +height = 4.362 +rings = 0 +cap_top = false +cap_bottom = false + +[node name="FireSmoke" type="Node3D"] + +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1039104, 0) +mesh = SubResource("CylinderMesh_cqb3p") diff --git a/weapons/molikman/molik/idle_state.gd b/weapons/molikman/molik/idle_state.gd index 3caf4a5..77780f2 100644 --- a/weapons/molikman/molik/idle_state.gd +++ b/weapons/molikman/molik/idle_state.gd @@ -1,7 +1,7 @@ extends WeaponState func _enter() -> void: - machine.animation_player.play(machine.animation_prefix +"idle") + machine.play("idle") func _exit() -> void: pass diff --git a/weapons/molikman/molik/intro_state.gd b/weapons/molikman/molik/intro_state.gd index 80177fb..af68583 100644 --- a/weapons/molikman/molik/intro_state.gd +++ b/weapons/molikman/molik/intro_state.gd @@ -3,7 +3,7 @@ extends WeaponState @export var emptyable: bool func _enter() -> void: - machine.animation_player.play(machine.animation_prefix + "intro") + machine.play("intro") machine.animation_player.animation_finished.connect(on_animation_finished) func _exit() -> void: diff --git a/weapons/molikman/molik/molikman_molotov_fire.tscn b/weapons/molikman/molik/molikman_molotov_fire.tscn index 2b9ed8e..fbfd888 100644 --- a/weapons/molikman/molik/molikman_molotov_fire.tscn +++ b/weapons/molikman/molik/molikman_molotov_fire.tscn @@ -93,8 +93,12 @@ curve = SubResource("Curve_wpp30") [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_hr7p8"] resource_local_to_scene = true -emission_shape = 3 -emission_box_extents = Vector3(3.75, 0, 3.75) +emission_shape = 6 +emission_ring_axis = Vector3(0, 1, 0) +emission_ring_height = 0.0 +emission_ring_radius = 3.5 +emission_ring_inner_radius = 1.0 +emission_ring_cone_angle = 90.0 direction = Vector3(0, 1, 0) spread = 0.0 initial_velocity_min = 1.0 @@ -116,6 +120,7 @@ vertex_color_is_srgb = true albedo_texture = ExtResource("7_18xly") texture_filter = 0 billboard_mode = 3 +billboard_keep_scale = true particles_anim_h_frames = 1 particles_anim_v_frames = 1 particles_anim_loop = false @@ -131,7 +136,7 @@ colors = PackedColorArray(1, 1, 1, 1, 1, 0, 0, 1) gradient = SubResource("Gradient_wpp30") [sub_resource type="Curve" id="Curve_bt4sy"] -_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.7422681, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.47435898, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] point_count = 3 [sub_resource type="CurveTexture" id="CurveTexture_m625o"] @@ -155,6 +160,7 @@ vertex_color_is_srgb = true albedo_texture = ExtResource("7_18xly") texture_filter = 0 billboard_mode = 3 +billboard_keep_scale = true particles_anim_h_frames = 1 particles_anim_v_frames = 1 particles_anim_loop = false