enabled enforced static typing

This commit is contained in:
2024-02-22 06:22:22 +11:00
parent e1a867d2a9
commit a93660f755
1645 changed files with 24730 additions and 2078 deletions

View File

@ -0,0 +1,17 @@
[gd_resource type="Resource" script_class="Card" load_steps=6 format=3 uid="uid://cvto66tp7rrst"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_5html"]
[ext_resource type="Resource" uid="uid://nxl5wabgl36t" path="res://PCs/Mechanic/ClassCards/Gatling/tower_stats.tres" id="3_4hykq"]
[ext_resource type="PackedScene" uid="uid://dkxi1ssoa44jn" path="res://PCs/Mechanic/ClassCards/Gatling/weapon_gatling.tscn" id="3_wkjyf"]
[ext_resource type="Resource" uid="uid://cj2x1jvo8l4ot" path="res://PCs/Mechanic/ClassCards/Gatling/weapon_stats.tres" id="4_76fd1"]
[ext_resource type="PackedScene" uid="uid://bjuc3x7u3f271" path="res://PCs/Mechanic/ClassCards/Gatling/tower_gatling.tscn" id="4_thk7u"]
[resource]
script = ExtResource("1_5html")
rarity = 0
faction = 0
turret_scene = ExtResource("4_thk7u")
weapon_scene = ExtResource("3_wkjyf")
weapon_stats = ExtResource("4_76fd1")
tower_stats = ExtResource("3_4hykq")
display_name = "Gatling"

Binary file not shown.

View File

@ -0,0 +1,47 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://c8l43de2o07kb"
path="res://.godot/imported/gatling.glb-b1cdb057de83f85b535d782b44473471.scn"
[deps]
source_file="res://PCs/Mechanic/ClassCards/Gatling/gatling.glb"
dest_files=["res://.godot/imported/gatling.glb-b1cdb057de83f85b535d782b44473471.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={
"meshes": {
"gatling_Cube": {
"generate/lightmap_uv": 0,
"generate/lods": 0,
"generate/shadow_meshes": 0,
"lods/normal_merge_angle": 60.0,
"lods/normal_split_angle": 25.0,
"save_to_file/enabled": false,
"save_to_file/make_streamable": "",
"save_to_file/path": "res://gattlemesh.res"
}
}
}
gltf/naming_version=0
gltf/embedded_image_handling=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bjh6e8t8br6rq"
path="res://.godot/imported/gatling.png-5b9cafa84c7fff64bbbb5f97ee9dcdd4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://PCs/Mechanic/ClassCards/Gatling/gatling.png"
dest_files=["res://.godot/imported/gatling.png-5b9cafa84c7fff64bbbb5f97ee9dcdd4.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=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

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://1j0rquv4awjs"
path="res://.godot/imported/shot1.wav-609b18f764f81167875f9b6fe5cf0123.sample"
[deps]
source_file="res://PCs/Mechanic/ClassCards/Gatling/shot1.wav"
dest_files=["res://.godot/imported/shot1.wav-609b18f764f81167875f9b6fe5cf0123.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

View File

@ -0,0 +1,37 @@
class_name GatlingTower extends HitscanTower
var time_since_firing_started: float = 0.0
var time_to_reach_max_speed: float = 0.0
var max_speed_multiplier: float = 0.0
var current_time_between_shots: float = 0.0
var final_time_between_shots: float = 0.0
func _ready() -> void:
super._ready()
time_to_reach_max_speed = stats.get_attribute("Speed Time")
max_speed_multiplier = stats.get_attribute("Speed Multiplier")
final_time_between_shots = time_between_shots / max_speed_multiplier
func _process(delta: float) -> void:
if time_since_firing < current_time_between_shots:
time_since_firing += delta
func _physics_process(delta: float) -> void:
if !targeted_enemy:
acquire_target()
else:
if !targeted_enemy.alive or global_position.distance_to(targeted_enemy.global_position) > target_range:
targeted_enemy = null
time_since_firing_started = 0.0
current_time_between_shots = time_between_shots
if targeted_enemy:
aim()
time_since_firing_started += delta
var progress: float = clamp(time_since_firing_started / time_to_reach_max_speed, 0, 1.0)
current_time_between_shots = lerpf(time_between_shots, final_time_between_shots, progress)
if time_since_firing >= current_time_between_shots:
time_since_firing -= current_time_between_shots
shoot()

View File

@ -0,0 +1,27 @@
[gd_scene load_steps=7 format=3 uid="uid://bjuc3x7u3f271"]
[ext_resource type="PackedScene" uid="uid://dumiyjlnea4gq" path="res://Scenes/Towers/hitscan_tower.tscn" id="1_su74p"]
[ext_resource type="Script" path="res://PCs/Mechanic/ClassCards/Gatling/tower_gatling.gd" id="2_ipjp1"]
[ext_resource type="Resource" uid="uid://nxl5wabgl36t" path="res://PCs/Mechanic/ClassCards/Gatling/tower_stats.tres" id="3_oicqw"]
[ext_resource type="ArrayMesh" uid="uid://dler7wcqj0bm6" path="res://PCs/Mechanic/ClassCards/Gatling/gattlemesh.res" id="4_wihc0"]
[ext_resource type="AudioStream" uid="uid://1j0rquv4awjs" path="res://PCs/Mechanic/ClassCards/Gatling/shot1.wav" id="5_vv714"]
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_wpani"]
random_pitch = 1.1
streams_count = 1
stream_0/stream = ExtResource("5_vv714")
stream_0/weight = 1.0
[node name="GatlingTower" instance=ExtResource("1_su74p")]
script = ExtResource("2_ipjp1")
stats = ExtResource("3_oicqw")
[node name="Pitch" parent="." index="1"]
visible = false
[node name="Yaw" parent="." index="2"]
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0.426474, 0)
mesh = ExtResource("4_wihc0")
[node name="AudioStreamPlayer3D" parent="Yaw" index="0"]
stream = SubResource("AudioStreamRandomizer_wpani")

View File

@ -0,0 +1,37 @@
[gd_resource type="Resource" script_class="CardText" load_steps=8 format=3 uid="uid://nxl5wabgl36t"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_w20qq"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_ky46y"]
[sub_resource type="Resource" id="Resource_oayfg"]
script = ExtResource("1_w20qq")
key = "Fire Delay"
value = 0.6
[sub_resource type="Resource" id="Resource_fekle"]
script = ExtResource("1_w20qq")
key = "Damage"
value = 1.0
[sub_resource type="Resource" id="Resource_ud8xi"]
script = ExtResource("1_w20qq")
key = "Range"
value = 10.0
[sub_resource type="Resource" id="Resource_cvkxf"]
script = ExtResource("1_w20qq")
key = "Speed Multiplier"
value = 2.0
[sub_resource type="Resource" id="Resource_pivwn"]
script = ExtResource("1_w20qq")
key = "Speed Time"
value = 3.0
[resource]
script = ExtResource("2_ky46y")
target_type = 1
attributes = Array[ExtResource("1_w20qq")]([SubResource("Resource_oayfg"), SubResource("Resource_fekle"), SubResource("Resource_ud8xi"), SubResource("Resource_cvkxf"), SubResource("Resource_pivwn")])
text = "Fires a shot every /Fire Delay\\ seconds dealing /Damage\\ damage at a range of /Range\\m
While attacking the same target, gradually accelerates to /Speed Multiplier\\x the fire rate over /Speed Time\\s"

View File

@ -0,0 +1,40 @@
class_name GatlingWeapon extends HitscanWeapon
var time_since_firing_started: float = 0.0
var time_to_reach_max_speed: float = 0.0
var max_speed_multiplier: float = 0.0
var current_time_between_shots: float = 0.0
var final_time_between_shots: float = 0.0
func _ready() -> void:
super._ready()
time_to_reach_max_speed = stats.get_attribute("Speed Time")
max_speed_multiplier = stats.get_attribute("Speed Multiplier")
final_time_between_shots = time_between_shots / max_speed_multiplier
func _process(delta: float) -> void:
super._process(delta)
if trigger_held:
time_since_firing_started += delta
var progress: float = clamp(time_since_firing_started / time_to_reach_max_speed, 0.0, 1.0)
current_time_between_shots = lerpf(time_between_shots, final_time_between_shots, progress)
if current_energy < energy_cost:
time_since_firing_started = 0.0
current_time_between_shots = time_between_shots
func _physics_process(_delta: float) -> void:
if trigger_held and current_energy >= energy_cost and time_since_firing >= current_time_between_shots:
time_since_firing -= current_time_between_shots
current_energy -= energy_cost
energy_changed.emit(current_energy)
shoot()
networked_shoot.rpc()
func release_trigger() -> void:
super.release_trigger()
time_since_firing_started = 0.0
current_time_between_shots = time_between_shots

View File

@ -0,0 +1,27 @@
[gd_scene load_steps=8 format=3 uid="uid://dkxi1ssoa44jn"]
[ext_resource type="PackedScene" uid="uid://difwo7wlyqr3h" path="res://Scenes/Weapons/hitscan_weapon.tscn" id="1_fwlu5"]
[ext_resource type="Resource" uid="uid://cj2x1jvo8l4ot" path="res://PCs/Mechanic/ClassCards/Gatling/weapon_stats.tres" id="2_fnyjd"]
[ext_resource type="Texture2D" uid="uid://bjh6e8t8br6rq" path="res://PCs/Mechanic/ClassCards/Gatling/gatling.png" id="2_rv8ps"]
[ext_resource type="Script" path="res://PCs/Mechanic/ClassCards/Gatling/weapon_gatling.gd" id="2_wm4al"]
[ext_resource type="AudioStream" uid="uid://1j0rquv4awjs" path="res://PCs/Mechanic/ClassCards/Gatling/shot1.wav" id="5_gelfi"]
[sub_resource type="AtlasTexture" id="AtlasTexture_0im1y"]
atlas = ExtResource("2_rv8ps")
region = Rect2(0, 0, 64, 64)
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_778e1"]
random_pitch = 1.1
streams_count = 1
stream_0/stream = ExtResource("5_gelfi")
stream_0/weight = 1.0
[node name="WeaponGatling" instance=ExtResource("1_fwlu5")]
script = ExtResource("2_wm4al")
stats = ExtResource("2_fnyjd")
[node name="Sprite3D" parent="." index="0"]
texture = SubResource("AtlasTexture_0im1y")
[node name="AudioStreamPlayer3D" parent="." index="5"]
stream = SubResource("AudioStreamRandomizer_778e1")

View File

@ -0,0 +1,42 @@
[gd_resource type="Resource" script_class="CardText" load_steps=9 format=3 uid="uid://cj2x1jvo8l4ot"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_7oh83"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_y36gr"]
[sub_resource type="Resource" id="Resource_fi7tc"]
script = ExtResource("1_7oh83")
key = "Fire Delay"
value = 0.4
[sub_resource type="Resource" id="Resource_r6h5d"]
script = ExtResource("1_7oh83")
key = "Damage"
value = 2.0
[sub_resource type="Resource" id="Resource_gwg1i"]
script = ExtResource("1_7oh83")
key = "Range"
value = 20.0
[sub_resource type="Resource" id="Resource_ogk1x"]
script = ExtResource("1_7oh83")
key = "Speed Multiplier"
value = 3.0
[sub_resource type="Resource" id="Resource_wdp3h"]
script = ExtResource("1_7oh83")
key = "Speed Time"
value = 4.0
[sub_resource type="Resource" id="Resource_d1lvi"]
script = ExtResource("1_7oh83")
key = "Energy"
value = 1.0
[resource]
script = ExtResource("2_y36gr")
target_type = 0
attributes = Array[ExtResource("1_7oh83")]([SubResource("Resource_fi7tc"), SubResource("Resource_r6h5d"), SubResource("Resource_gwg1i"), SubResource("Resource_ogk1x"), SubResource("Resource_wdp3h"), SubResource("Resource_d1lvi")])
text = "Fires a shot every /Fire Delay\\ seconds dealing /Damage\\ damage at a range of /Range\\m
While held, gradually accelerates to /Speed Multiplier\\x the fire rate over /Speed Time\\s"