46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
|
[gd_scene load_steps=6 format=2]
|
||
|
|
||
|
[ext_resource path="res://Graphics/tgstation/socket.png" type="Texture" id=1]
|
||
|
[ext_resource path="res://Actors/Objects/ElectricSocket/ElectricSocket.gd" type="Script" id=2]
|
||
|
|
||
|
[sub_resource type="Shader" id=4]
|
||
|
code = "shader_type canvas_item;
|
||
|
render_mode blend_mix;
|
||
|
|
||
|
uniform vec4 cable_color: hint_color;
|
||
|
|
||
|
void fragment() {
|
||
|
vec4 col = texture(TEXTURE, UV);
|
||
|
if (col.r/col.g > 2.) {
|
||
|
col.rgb = cable_color.rgb * length(col.rgb);
|
||
|
}
|
||
|
COLOR = col;
|
||
|
}"
|
||
|
custom_defines = ""
|
||
|
|
||
|
[sub_resource type="ShaderMaterial" id=5]
|
||
|
shader = SubResource( 4 )
|
||
|
shader_param/cable_color = Color( 0.0823529, 0.937255, 0.27451, 1 )
|
||
|
|
||
|
[sub_resource type="CircleShape2D" id=6]
|
||
|
radius = 12.0
|
||
|
|
||
|
[node name="ElectricSocket" type="Area2D"]
|
||
|
collision_layer = 4
|
||
|
collision_mask = 2147483652
|
||
|
script = ExtResource( 2 )
|
||
|
direction = 1
|
||
|
source_color = Color( 0.937255, 0.0823529, 0.0823529, 1 )
|
||
|
sink_color = Color( 0.0901961, 0.533333, 0.960784, 1 )
|
||
|
|
||
|
[node name="socket" type="Sprite" parent="."]
|
||
|
material = SubResource( 5 )
|
||
|
texture = ExtResource( 1 )
|
||
|
centered = false
|
||
|
region_enabled = true
|
||
|
region_rect = Rect2( 0, 32, 32, 32 )
|
||
|
|
||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||
|
position = Vector2( 16, 16 )
|
||
|
shape = SubResource( 6 )
|