Species Component (#130)
* Fix this fug oksure Creates the initial species component, damage states, and threshold templates and hooks them into the damageable component * More rebase fixes * test * Pre future rebase * Please * Lol * Lol2 * SHADERS * Update Engine * yml file * Fix an initialization issue, injects dependencies * Fix error in loading shaders * Makes a master character ui controller component added upon client attachment to entity and remove upon client detachment from entity * Fixes just about everytrhing * Address PJB's comments * geeze * Make overlays work in worldspace instead of screen space and not cover user interfaces * update submodule
@@ -47,6 +47,10 @@
|
||||
|
||||
- type: Input
|
||||
context: "human"
|
||||
|
||||
- type: Species
|
||||
Template: Human
|
||||
- type: Damageable
|
||||
|
||||
- type: Eye
|
||||
zoom: 0.5, 0.5
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
sprite: Objects/laser_retro.rsi
|
||||
state: 100
|
||||
- type: HitscanWeapon
|
||||
damage: 30
|
||||
sprite: "Objects/laser.png"
|
||||
- type: Item
|
||||
Size: 24
|
||||
sprite: Objects/laser_retro.rsi
|
||||
|
||||
9
Resources/Prototypes/Shaders/shaders.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
- type: shader
|
||||
id: circlemask
|
||||
kind: source
|
||||
path: "/Shaders/circlemask.gdsl"
|
||||
|
||||
- type: shader
|
||||
id: gradientcirclemask
|
||||
kind: source
|
||||
path: "/Shaders/gradientcirclemask.gdsl"
|
||||
32
Resources/Scenes/Mobs/CharacterWindow.tscn
Normal file
@@ -0,0 +1,32 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
|
||||
|
||||
[node name="SS14Window" index="0" instance=ExtResource( 1 )]
|
||||
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 0.0
|
||||
margin_top = 0.0
|
||||
margin_right = 240.0
|
||||
margin_bottom = 0.0
|
||||
rect_clip_content = false
|
||||
_sections_unfolded = [ "Anchor", "Margin" ]
|
||||
|
||||
[node name="Contents" parent="." index="0"]
|
||||
|
||||
rect_clip_content = false
|
||||
|
||||
[node name="Header" parent="." index="1"]
|
||||
|
||||
rect_clip_content = false
|
||||
|
||||
[node name="Header Text" parent="Header" index="0"]
|
||||
|
||||
rect_clip_content = false
|
||||
text = "Character Info"
|
||||
|
||||
[node name="CloseButton" parent="Header" index="1"]
|
||||
|
||||
rect_clip_content = false
|
||||
|
||||
|
||||
@@ -1,22 +1,12 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
[gd_scene format=2]
|
||||
|
||||
[ext_resource path="res://Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
|
||||
|
||||
[node name="SS14Window" index="0" instance=ExtResource( 1 )]
|
||||
|
||||
margin_right = 403.0
|
||||
rect_clip_content = false
|
||||
|
||||
[node name="Contents" parent="." index="0"]
|
||||
|
||||
rect_clip_content = false
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="Contents" index="0"]
|
||||
[node name="PanelContainer" type="PanelContainer"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
anchor_bottom = 0.0
|
||||
margin_bottom = 400.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
@@ -25,7 +15,7 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
_sections_unfolded = [ "Anchor", "Grow Direction", "Margin", "Mouse", "Rect", "Size Flags", "Theme" ]
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="Contents/PanelContainer" index="0"]
|
||||
[node name="CenterContainer" type="CenterContainer" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
@@ -33,8 +23,8 @@ anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 276.0
|
||||
margin_bottom = 424.0
|
||||
margin_right = 1017.0
|
||||
margin_bottom = 393.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
@@ -44,16 +34,16 @@ size_flags_vertical = 1
|
||||
use_top_left = false
|
||||
_sections_unfolded = [ "Anchor", "Focus", "Grow Direction", "Hint", "Margin", "Mouse", "Rect", "Size Flags", "Theme" ]
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="Contents/PanelContainer/CenterContainer" index="0"]
|
||||
[node name="GridContainer" type="GridContainer" parent="CenterContainer" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 134.0
|
||||
margin_top = 208.0
|
||||
margin_right = 134.0
|
||||
margin_bottom = 208.0
|
||||
margin_left = 505.0
|
||||
margin_top = 193.0
|
||||
margin_right = 505.0
|
||||
margin_bottom = 193.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
@@ -63,17 +53,4 @@ size_flags_vertical = 1
|
||||
columns = 3
|
||||
_sections_unfolded = [ "Anchor", "Focus", "Grow Direction", "Hint", "Margin", "Material", "Mouse", "Rect", "Size Flags", "Theme", "custom_constants" ]
|
||||
|
||||
[node name="Header" parent="." index="1"]
|
||||
|
||||
rect_clip_content = false
|
||||
|
||||
[node name="Header Text" parent="Header" index="0"]
|
||||
|
||||
rect_clip_content = false
|
||||
text = "I dont how to not use a window"
|
||||
|
||||
[node name="CloseButton" parent="Header" index="1"]
|
||||
|
||||
rect_clip_content = false
|
||||
|
||||
|
||||
34
Resources/Scenes/Mobs/Species.tscn
Normal file
@@ -0,0 +1,34 @@
|
||||
[gd_scene format=2]
|
||||
|
||||
[node name="Control" type="Control" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.0
|
||||
margin_bottom = 64.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
_sections_unfolded = [ "Anchor", "Grow Direction", "Margin", "Rect" ]
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
expand = true
|
||||
stretch_mode = 6
|
||||
_sections_unfolded = [ "Anchor", "Grow Direction", "Margin" ]
|
||||
|
||||
|
||||
16
Resources/Shaders/circlemask.gdsl
Normal file
@@ -0,0 +1,16 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
float circle(in vec2 _st, in float _radius){
|
||||
vec2 dist = _st-vec2(0.5);
|
||||
return smoothstep(_radius-(_radius*0.01),
|
||||
_radius+(_radius*0.01),
|
||||
dot(dist,dist)*4.0);
|
||||
}
|
||||
|
||||
void fragment(){
|
||||
vec2 st = FRAGCOORD.xy*SCREEN_PIXEL_SIZE.xy;
|
||||
|
||||
COLOR = texture(TEXTURE, UV);
|
||||
COLOR.rgb = vec3(0);
|
||||
COLOR.a = circle(st,0.05);
|
||||
}
|
||||
10
Resources/Shaders/gradientcirclemask.gdsl
Normal file
@@ -0,0 +1,10 @@
|
||||
shader_type canvas_item;
|
||||
uniform float percentagedistanceshow = 0.1;
|
||||
uniform float gradientfalloffwidth = 0.2;
|
||||
|
||||
void fragment() {
|
||||
float dist = distance(UV, vec2(0.5, 0.5));
|
||||
float fromdiskdist = dist - percentagedistanceshow;
|
||||
COLOR.a = max(0, min(1.0, 2.0*dist/percentagedistanceshow - 2.0));
|
||||
COLOR.rgb = vec3(1,1,1) - vec3(fromdiskdist,fromdiskdist,fromdiskdist)/gradientfalloffwidth;
|
||||
}
|
||||
BIN
Resources/Textures/Mob/UI/Human/human0.png
Normal file
|
After Width: | Height: | Size: 233 B |
BIN
Resources/Textures/Mob/UI/Human/human1.png
Normal file
|
After Width: | Height: | Size: 214 B |
BIN
Resources/Textures/Mob/UI/Human/human2.png
Normal file
|
After Width: | Height: | Size: 214 B |
BIN
Resources/Textures/Mob/UI/Human/human3.png
Normal file
|
After Width: | Height: | Size: 214 B |
BIN
Resources/Textures/Mob/UI/Human/human4.png
Normal file
|
After Width: | Height: | Size: 214 B |
BIN
Resources/Textures/Mob/UI/Human/human5.png
Normal file
|
After Width: | Height: | Size: 214 B |
BIN
Resources/Textures/Mob/UI/Human/human6-0.png
Normal file
|
After Width: | Height: | Size: 214 B |
BIN
Resources/Textures/Mob/UI/Human/human6-1.png
Normal file
|
After Width: | Height: | Size: 240 B |
BIN
Resources/Textures/Mob/UI/Human/humancrit-0.png
Normal file
|
After Width: | Height: | Size: 252 B |
BIN
Resources/Textures/Mob/UI/Human/humancrit-1.png
Normal file
|
After Width: | Height: | Size: 252 B |
BIN
Resources/Textures/Mob/UI/Human/humandead.png
Normal file
|
After Width: | Height: | Size: 207 B |