Compare commits
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
63312425e9 | |||
fbacee48f0 | |||
35d61c4169 | |||
|
6e3cebb653 | ||
|
1b1c72e86a | ||
|
20d1ade391 | ||
|
f985225515 | ||
|
9c45bd7f69 | ||
|
e279f80793 | ||
|
4bdd594045 | ||
|
9140220ef1 | ||
|
4c58781fb6 | ||
|
15b938e0a0 | ||
f149fa7c53 | |||
7bff319b39 | |||
86ffc9682b | |||
d05cbb2260 | |||
8208919dd2 | |||
6fedaad0b3 | |||
57f1bd959e | |||
6c71aa302c | |||
ca77ad3fc1 | |||
33c8c127e7 | |||
e9241eff46 | |||
b79884e5d2 | |||
a8409c76ad | |||
3ecd50fc45 | |||
fbe731136f | |||
9734d53d62 | |||
7cbf5c634d | |||
fc84f8889f | |||
86d6563975 | |||
a94ee84718 | |||
a118a259c9 | |||
4318ba1982 | |||
4f58350f83 | |||
ee9d33f6ec | |||
b93207ba23 | |||
d9576d76cc | |||
edfa2b715c |
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.0.0-rc.5">
|
||||
<Project Sdk="Godot.NET.Sdk/4.0.2">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.0.0-rc.1">
|
||||
<Project Sdk="Godot.NET.Sdk/4.0.1">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
|
3
assets/lang/en/dialogue/npcs/message_one.json
Normal file
3
assets/lang/en/dialogue/npcs/message_one.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"<message>": "[cuss]FUCKING HELL[/cuss]"
|
||||
}
|
@@ -1,58 +1,60 @@
|
||||
{
|
||||
"dialogType": "villager",
|
||||
"intro": [
|
||||
"<dialogType>": "villager",
|
||||
"<intro>": [
|
||||
[
|
||||
"Hello i'm {title}. Your name must be {player}!",
|
||||
0
|
||||
]
|
||||
],
|
||||
"welcome": [
|
||||
"<welcome>": [
|
||||
[
|
||||
"Oh hello, {player}... You look great!",
|
||||
"<goto:>begindialog"
|
||||
"<goto:0:begindialog>"
|
||||
],
|
||||
[
|
||||
"Hey, {player}! Hope you have fun today!",
|
||||
"<goto:>begindialog"
|
||||
"<goto:0:begindialog>"
|
||||
],
|
||||
[
|
||||
"Hi! What's up {player}?",
|
||||
"<goto:>begindialog"
|
||||
"<goto:0:begindialog>"
|
||||
]
|
||||
],
|
||||
"begindialog": [
|
||||
"<begindialog>": [
|
||||
[
|
||||
"What can I do for you?",
|
||||
{
|
||||
"I just wanna talk": "<goto:>tipp",
|
||||
"Nevermind!": "<goto:>goodbye"
|
||||
"<eventBeginAnswers>": true,
|
||||
"I just wanna talk": "<goto:0:tipp>",
|
||||
"Nevermind!": "<goto:0:goodbye>"
|
||||
}
|
||||
],
|
||||
[
|
||||
"So what do you want?",
|
||||
{
|
||||
"What's up": "<goto:>tipp",
|
||||
"Nothing": "<goto:>goodbye"
|
||||
"<eventBeginAnswers>": true,
|
||||
"What's up": "<goto:0:tipp>",
|
||||
"Nothing": "<goto:0:goodbye>"
|
||||
}
|
||||
]
|
||||
],
|
||||
"else": [
|
||||
"<else>": [
|
||||
[
|
||||
"Do you need something else?",
|
||||
{
|
||||
"Can you tell me more?": "<goto:>tipp",
|
||||
"No, thanks!": "<goto:>goodbye"
|
||||
"Can you tell me more?": "<goto:0:tipp>",
|
||||
"No, thanks!": "<goto:0:goodbye>"
|
||||
}
|
||||
],
|
||||
[
|
||||
"So can i help you with something else?",
|
||||
{
|
||||
"Tell me a bit more": "<goto:>tipp",
|
||||
"I'm good, thank you!": "<goto:>goodbye"
|
||||
"Tell me a bit more": "<goto:0:tipp>",
|
||||
"I'm good, thank you!": "<goto:0:goodbye>"
|
||||
}
|
||||
]
|
||||
],
|
||||
"goodbye": [
|
||||
"<goodbye>": [
|
||||
[
|
||||
"Was nice talking to you goodbye!"
|
||||
],
|
||||
@@ -60,20 +62,20 @@
|
||||
"Have a great day, {player}!"
|
||||
]
|
||||
],
|
||||
"tipp": [
|
||||
"<tipp>": [
|
||||
[
|
||||
"[font s=6]░░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄░░░░░░░░\n░░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄░░░░\n░░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█░░░\n░░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░░█░░\n░▄▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░░█░\n█░▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒░█\n█░▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█\n░█░▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█░\n░░█░░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█░░\n░░░█░░░░██░░▀█▄▄▄█▄▄█▄████░█░░░\n░░░░█░░░░▀▀▄░█░░░█░█▀██████░█░░\n░░░░░▀▄░░░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█░░\n░░░░░░░▀▄▄░▒▒▒▒░░░░░░░░░░▒░░░█░\n░░░░░░░░░░▀▀▄▄░▒▒▒▒▒▒▒▒▒▒░░░░█░\n░░░░░░░░░░░░░░▀▄▄▄▄▄░░░░░░░░█░░[/font]",
|
||||
"<goto:>else"
|
||||
"<goto:0:else>"
|
||||
],
|
||||
[
|
||||
"[center][font s=80][wave amp=50 freq=15][rainbow]This is cool test text[/rainbow][/wave][/font][/center]",
|
||||
"sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,",
|
||||
"sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.",
|
||||
"Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
|
||||
"<goto:>else"
|
||||
"<goto:0:else>"
|
||||
]
|
||||
],
|
||||
"story": [
|
||||
"<story>": [
|
||||
[
|
||||
"test1test1test1test1test1test1test1test1test1test1test1test1test1test1test1",
|
||||
"test2test2test2test2test2test2test2test2test2test2test2test2test2test2test2",
|
||||
|
4
assets/lang/en/warnings.json
Normal file
4
assets/lang/en/warnings.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"cheatalert_message": "This game closed any suspicious software automatically. If this causes problems, please exit the game and contact support for help immediately.",
|
||||
"cheatalert_title": "Cheat process detected in your operating system! D:<"
|
||||
}
|
@@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/banana.png-50380ed0796f86b0b05039176725d8eb.c
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
|
@@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/cupcake.png-e641a112586eeca5f723ee6aa32d7f28.
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
|
@@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/debugitem_one64.png-7941e59d1b01f784439647bcf
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/dummy-player-atlas.png-68f05802eecc35f4774851
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
|
@@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/dummy-player-normal.png-45a5eb1f003876b79db5d
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
|
@@ -21,7 +21,7 @@ compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
|
BIN
assets/textures/enemies/slime_green_atlas.png
Normal file
BIN
assets/textures/enemies/slime_green_atlas.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
34
assets/textures/enemies/slime_green_atlas.png.import
Normal file
34
assets/textures/enemies/slime_green_atlas.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ca1es3hoj53wg"
|
||||
path="res://.godot/imported/slime_green_atlas.png-e4460cfe974755b8ce33e1b93831e12b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/textures/enemies/slime_green_atlas.png"
|
||||
dest_files=["res://.godot/imported/slime_green_atlas.png-e4460cfe974755b8ce33e1b93831e12b.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=false
|
||||
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=1
|
@@ -10,9 +10,10 @@ config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="RPG Test gd4"
|
||||
config/name="RPG Test"
|
||||
run/main_scene="res://scenes/overworld.tscn"
|
||||
config/features=PackedStringArray("4.0", "C#", "Forward Plus")
|
||||
config/features=PackedStringArray("4.0", "Forward Plus")
|
||||
run/max_fps=60
|
||||
boot_splash/show_image=false
|
||||
config/icon="res://assets/textures/debug/dummy-player-normal.png"
|
||||
|
||||
@@ -21,14 +22,16 @@ config/icon="res://assets/textures/debug/dummy-player-normal.png"
|
||||
Essential="res://src/essential.cs"
|
||||
PlayerVariables="*res://src/player_variables.cs"
|
||||
Console="*res://scenes/gui/console.tscn"
|
||||
Anticheat="*res://src/anticheat.cs"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1537
|
||||
window/size/viewport_height=864
|
||||
mouse_cursor/custom_image="res://assets/textures/cursor.png"
|
||||
window/size/viewport_width=1844
|
||||
window/size/viewport_height=1037
|
||||
window/size/window_width_override=1537
|
||||
window/size/window_height_override=864
|
||||
window/stretch/mode="canvas_items"
|
||||
window/snap/snap_2d_transforms_to_pixel=false
|
||||
mouse_cursor/custom_image="res://assets/textures/cursor.png"
|
||||
|
||||
[dotnet]
|
||||
|
||||
@@ -36,17 +39,12 @@ project/assembly_name="RPG Test gd4"
|
||||
|
||||
[editor]
|
||||
|
||||
naming/default_signal_callback_name="On{NodeName}{SignalName}"
|
||||
naming/default_signal_callback_to_self_name="On{SignalName}"
|
||||
naming/node_name_num_separator=2
|
||||
naming/node_name_casing=2
|
||||
naming/default_signal_callback_name="On{NodeName}{SignalName}"
|
||||
naming/default_signal_callback_to_self_name="On{SignalName}"
|
||||
node_naming/name_casing=2
|
||||
|
||||
[filesystem]
|
||||
|
||||
import/blender/enabled=false
|
||||
import/fbx/enabled=false
|
||||
|
||||
[input]
|
||||
|
||||
ui_accept={
|
||||
@@ -137,7 +135,6 @@ cheat_start={
|
||||
[internationalization]
|
||||
|
||||
locale/translation_remaps={}
|
||||
locale/translations_pot_files=PackedStringArray()
|
||||
|
||||
[layer_names]
|
||||
|
||||
@@ -146,7 +143,4 @@ locale/translations_pot_files=PackedStringArray()
|
||||
|
||||
[rendering]
|
||||
|
||||
global_illumination/gi/use_half_resolution=true
|
||||
shading/overrides/force_vertex_shading=true
|
||||
occlusion_culling/use_occlusion_culling=true
|
||||
shading/use_occlusion_culling=true
|
||||
camera/depth_of_field/depth_of_field_bokeh_quality=2
|
||||
|
@@ -3,52 +3,52 @@
|
||||
[ext_resource type="Texture2D" uid="uid://boewsqe4b5yxm" path="res://assets/textures/debug/dummy-npc-atlas.png" id="1_feq0g"]
|
||||
[ext_resource type="PackedScene" uid="uid://bu1xkt4xi58ox" path="res://scenes/dialog_trigger_area.tscn" id="2_cjcdi"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0drx1"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dtvay"]
|
||||
atlas = ExtResource("1_feq0g")
|
||||
region = Rect2(0, 0, 84, 128)
|
||||
region = Rect2(0, 0, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gmcfr"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4vo8e"]
|
||||
atlas = ExtResource("1_feq0g")
|
||||
region = Rect2(84, 0, 84, 128)
|
||||
region = Rect2(59, 0, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1fq5y"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qf4lj"]
|
||||
atlas = ExtResource("1_feq0g")
|
||||
region = Rect2(168, 0, 84, 128)
|
||||
region = Rect2(118, 0, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8pv6w"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ix2cs"]
|
||||
atlas = ExtResource("1_feq0g")
|
||||
region = Rect2(252, 0, 84, 128)
|
||||
region = Rect2(177, 0, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rrbg8"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_y6ifs"]
|
||||
atlas = ExtResource("1_feq0g")
|
||||
region = Rect2(252, 128, 84, 128)
|
||||
region = Rect2(177, 90, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dwitn"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tlb85"]
|
||||
atlas = ExtResource("1_feq0g")
|
||||
region = Rect2(0, 128, 84, 128)
|
||||
region = Rect2(0, 90, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cg6mx"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_b18m1"]
|
||||
atlas = ExtResource("1_feq0g")
|
||||
region = Rect2(84, 128, 84, 128)
|
||||
region = Rect2(59, 90, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bk3e1"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5wb27"]
|
||||
atlas = ExtResource("1_feq0g")
|
||||
region = Rect2(168, 128, 84, 128)
|
||||
region = Rect2(118, 90, 59, 90)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_rr6ht"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0drx1")
|
||||
"texture": SubResource("AtlasTexture_dtvay")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gmcfr")
|
||||
"texture": SubResource("AtlasTexture_4vo8e")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0drx1")
|
||||
"texture": SubResource("AtlasTexture_dtvay")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1fq5y")
|
||||
"texture": SubResource("AtlasTexture_qf4lj")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"move_down",
|
||||
@@ -56,10 +56,10 @@ animations = [{
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8pv6w")
|
||||
"texture": SubResource("AtlasTexture_ix2cs")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_rrbg8")
|
||||
"texture": SubResource("AtlasTexture_y6ifs")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"move_side",
|
||||
@@ -67,16 +67,16 @@ animations = [{
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dwitn")
|
||||
"texture": SubResource("AtlasTexture_tlb85")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cg6mx")
|
||||
"texture": SubResource("AtlasTexture_b18m1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dwitn")
|
||||
"texture": SubResource("AtlasTexture_tlb85")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bk3e1")
|
||||
"texture": SubResource("AtlasTexture_5wb27")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"move_up",
|
||||
@@ -84,27 +84,25 @@ animations = [{
|
||||
}]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_rsgcw"]
|
||||
radius = 9.0
|
||||
height = 60.0
|
||||
radius = 7.99467
|
||||
height = 55.9998
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sgrqb"]
|
||||
size = Vector2(64, 79)
|
||||
size = Vector2(54, 71)
|
||||
|
||||
[node name="base_npc" type="CharacterBody2D"]
|
||||
collision_mask = 0
|
||||
collision_priority = 15.0
|
||||
|
||||
[node name="animated_sprite_2d" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
scale = Vector2(0.733398, 0.733398)
|
||||
sprite_frames = SubResource("SpriteFrames_rr6ht")
|
||||
animation = &"move_down"
|
||||
frame_progress = 0.781605
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="collision_shape" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, 38)
|
||||
position = Vector2(0, 37)
|
||||
rotation = 1.57345
|
||||
shape = SubResource("CapsuleShape2D_rsgcw")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="dialog_trigger_area" parent="." instance=ExtResource("2_cjcdi")]
|
||||
file = "res://assets/lang/en/dialogue/npcs/villager_normal.json"
|
||||
@@ -112,7 +110,7 @@ title = "Debug NPC"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="collision_shape_2d" parent="dialog_trigger_area" index="0"]
|
||||
position = Vector2(0, -10.5)
|
||||
position = Vector2(0, -6.5)
|
||||
shape = SubResource("RectangleShape2D_sgrqb")
|
||||
|
||||
[editable path="dialog_trigger_area"]
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
[node name="popup_panel" type="PopupPanel"]
|
||||
transparent_bg = true
|
||||
size = Vector2i(1537, 193)
|
||||
size = Vector2i(1844, 193)
|
||||
visible = true
|
||||
always_on_top = true
|
||||
script = ExtResource("1_gdt1r")
|
||||
@@ -12,7 +12,7 @@ script = ExtResource("1_gdt1r")
|
||||
[node name="v_box_container" type="VBoxContainer" parent="."]
|
||||
offset_left = 4.0
|
||||
offset_top = 4.0
|
||||
offset_right = 1533.0
|
||||
offset_right = 1840.0
|
||||
offset_bottom = 189.0
|
||||
|
||||
[node name="rich_text_label" type="RichTextLabel" parent="v_box_container"]
|
||||
|
@@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://bkm7365u1mm3o"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://di368n7hi66po"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/scene-scripts/dialogue-system/dialog_bubble.cs" id="1_xtj1q"]
|
||||
[ext_resource type="Script" path="res://src/scene-scripts/dialog_bubble.cs" id="1_xtj1q"]
|
||||
[ext_resource type="FontFile" uid="uid://cx6bvqk0ghmjv" path="res://assets/fonts/urbane-rounded-medium.otf" id="2_qrihj"]
|
||||
[ext_resource type="AudioStream" uid="uid://cg6grs5k5m33n" path="res://assets/audios/typewrite/default_tw.wav" id="2_wg62u"]
|
||||
[ext_resource type="RichTextEffect" uid="uid://0o1lbwcdjg28" path="res://src/gdscript/tool/bbcodeeffects/cuss.tres" id="3_lmnhk"]
|
||||
[ext_resource type="Texture2D" uid="uid://04pdpdvkg2s" path="res://assets/textures/dialogue/dialogue_answer_ninepatch.png" id="3_n3y1v"]
|
||||
[ext_resource type="AudioStream" uid="uid://7si4jccoofsf" path="res://assets/audios/ui/small_btn.wav" id="5_w6jq7"]
|
||||
|
||||
@@ -11,6 +12,7 @@
|
||||
[node name="dialog_bubble" type="CanvasLayer"]
|
||||
process_mode = 4
|
||||
script = ExtResource("1_xtj1q")
|
||||
eventBeginAnswers = {}
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="typewriter_audio_stream" type="AudioStreamPlayer" parent="."]
|
||||
@@ -51,9 +53,10 @@ grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme_override_colors/default_color = Color(1, 1, 1, 1)
|
||||
theme_override_fonts/normal_font = ExtResource("2_qrihj")
|
||||
theme_override_font_sizes/normal_font_size = 32
|
||||
theme_override_font_sizes/normal_font_size = 42
|
||||
bbcode_enabled = true
|
||||
scroll_active = false
|
||||
custom_effects = [ExtResource("3_lmnhk")]
|
||||
visible_characters_behavior = 1
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
@@ -70,7 +73,7 @@ offset_right = 0.389984
|
||||
offset_bottom = 0.118996
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_fonts/font = ExtResource("2_qrihj")
|
||||
theme_override_font_sizes/font_size = 36
|
||||
theme_override_font_sizes/font_size = 38
|
||||
text = "???"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
@@ -82,16 +85,15 @@ anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -146.0
|
||||
offset_top = -337.0
|
||||
offset_right = 34.0
|
||||
offset_bottom = -237.0
|
||||
offset_left = -187.88
|
||||
offset_top = -367.402
|
||||
offset_right = 28.12
|
||||
offset_bottom = -247.402
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 8
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_5w2xu")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="nine_patch_rect" type="NinePatchRect" parent="box/panel_container"]
|
||||
layout_mode = 2
|
||||
@@ -104,10 +106,10 @@ metadata/_edit_lock_ = true
|
||||
|
||||
[node name="margin_container" type="MarginContainer" parent="box/panel_container"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 40
|
||||
theme_override_constants/margin_top = 30
|
||||
theme_override_constants/margin_right = 60
|
||||
theme_override_constants/margin_bottom = 30
|
||||
theme_override_constants/margin_left = 48
|
||||
theme_override_constants/margin_top = 36
|
||||
theme_override_constants/margin_right = 72
|
||||
theme_override_constants/margin_bottom = 36
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="answerbtn_audio_stream" type="AudioStreamPlayer" parent="."]
|
||||
|
@@ -34,7 +34,7 @@ theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/icon_disabled_color = Color(1, 1, 1, 0)
|
||||
theme_override_fonts/font = ExtResource("1_2bkol")
|
||||
theme_override_font_sizes/font_size = 28
|
||||
theme_override_font_sizes/font_size = 36
|
||||
theme_override_styles/normal = SubResource("StyleBoxEmpty_mvyo0")
|
||||
theme_override_styles/hover = SubResource("StyleBoxEmpty_h66dw")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxEmpty_2axga")
|
||||
|
File diff suppressed because one or more lines are too long
@@ -2,54 +2,54 @@
|
||||
|
||||
[ext_resource type="Script" path="res://src/scene-scripts/player.cs" id="1_qehox"]
|
||||
[ext_resource type="Texture2D" uid="uid://olceowuycu8c" path="res://assets/textures/debug/dummy-player-atlas.png" id="2_yu1q5"]
|
||||
[ext_resource type="PackedScene" uid="uid://bkm7365u1mm3o" path="res://scenes/gui/dialog_bubble.tscn" id="3_8f573"]
|
||||
[ext_resource type="PackedScene" uid="uid://di368n7hi66po" path="res://scenes/gui/dialog_bubble.tscn" id="3_8f573"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tokqm"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_068kt"]
|
||||
atlas = ExtResource("2_yu1q5")
|
||||
region = Rect2(0, 0, 83, 127)
|
||||
region = Rect2(0, 0, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qomfj"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tubtg"]
|
||||
atlas = ExtResource("2_yu1q5")
|
||||
region = Rect2(168, 0, 84, 128)
|
||||
region = Rect2(59, 0, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bsfbd"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ck0si"]
|
||||
atlas = ExtResource("2_yu1q5")
|
||||
region = Rect2(84, 0, 83, 127)
|
||||
region = Rect2(118, 0, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ulejc"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_48laa"]
|
||||
atlas = ExtResource("2_yu1q5")
|
||||
region = Rect2(252, 0, 84, 128)
|
||||
region = Rect2(177, 0, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1x805"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dp3ld"]
|
||||
atlas = ExtResource("2_yu1q5")
|
||||
region = Rect2(252, 128, 84, 128)
|
||||
region = Rect2(177, 90, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_x338k"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7t6sn"]
|
||||
atlas = ExtResource("2_yu1q5")
|
||||
region = Rect2(0, 128, 84, 128)
|
||||
region = Rect2(0, 90, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6ynw8"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w5lt5"]
|
||||
atlas = ExtResource("2_yu1q5")
|
||||
region = Rect2(84, 128, 84, 128)
|
||||
region = Rect2(59, 90, 59, 90)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2yirn"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0gngb"]
|
||||
atlas = ExtResource("2_yu1q5")
|
||||
region = Rect2(168, 128, 84, 128)
|
||||
region = Rect2(118, 90, 59, 90)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_2x1cy"]
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_65gi3"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tokqm")
|
||||
"texture": SubResource("AtlasTexture_068kt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qomfj")
|
||||
"texture": SubResource("AtlasTexture_tubtg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tokqm")
|
||||
"texture": SubResource("AtlasTexture_068kt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bsfbd")
|
||||
"texture": SubResource("AtlasTexture_ck0si")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"move_down",
|
||||
@@ -57,10 +57,10 @@ animations = [{
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ulejc")
|
||||
"texture": SubResource("AtlasTexture_48laa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1x805")
|
||||
"texture": SubResource("AtlasTexture_dp3ld")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"move_side",
|
||||
@@ -68,16 +68,16 @@ animations = [{
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_x338k")
|
||||
"texture": SubResource("AtlasTexture_7t6sn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6ynw8")
|
||||
"texture": SubResource("AtlasTexture_w5lt5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_x338k")
|
||||
"texture": SubResource("AtlasTexture_7t6sn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_2yirn")
|
||||
"texture": SubResource("AtlasTexture_0gngb")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"move_up",
|
||||
@@ -85,13 +85,14 @@ animations = [{
|
||||
}]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_38v5o"]
|
||||
height = 59.9998
|
||||
height = 54.0
|
||||
|
||||
[node name="player" type="CharacterBody2D"]
|
||||
process_mode = 1
|
||||
floor_stop_on_slope = false
|
||||
collision_layer = 5
|
||||
collision_mask = 5
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_qehox")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="rotation_center" type="Marker2D" parent="."]
|
||||
metadata/_edit_lock_ = true
|
||||
@@ -106,27 +107,18 @@ collide_with_bodies = false
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="animated_sprite_2d" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
scale = Vector2(0.733398, 0.733398)
|
||||
sprite_frames = SubResource("SpriteFrames_2x1cy")
|
||||
sprite_frames = SubResource("SpriteFrames_65gi3")
|
||||
animation = &"move_down"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="main_cam" type="Camera2D" parent="."]
|
||||
zoom = Vector2(0.8, 0.8)
|
||||
process_callback = 0
|
||||
position_smoothing_enabled = true
|
||||
position_smoothing_speed = 3.0
|
||||
drag_horizontal_enabled = true
|
||||
drag_vertical_enabled = true
|
||||
drag_left_margin = 0.15
|
||||
drag_top_margin = 0.15
|
||||
drag_right_margin = 0.15
|
||||
drag_bottom_margin = 0.15
|
||||
editor_draw_drag_margin = true
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="cheat_cam" type="Camera2D" parent="."]
|
||||
zoom = Vector2(0.8, 0.8)
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="audio_listener_2d" type="AudioListener2D" parent="."]
|
||||
@@ -136,8 +128,10 @@ metadata/_edit_lock_ = true
|
||||
visible = false
|
||||
|
||||
[node name="collision_shape" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, 38)
|
||||
rotation = 1.57345
|
||||
position = Vector2(0, 34)
|
||||
rotation = 1.5708
|
||||
shape = SubResource("CapsuleShape2D_38v5o")
|
||||
|
||||
[connection signal="animation_changed" from="animated_sprite_2d" to="." method="OnAnimationChanged"]
|
||||
[node name="globalposition_timer" type="Timer" parent="."]
|
||||
wait_time = 1.5
|
||||
autostart = true
|
||||
|
@@ -22,6 +22,7 @@ pass
|
||||
|
||||
[node name="static_body_2d" type="StaticBody2D" parent="."]
|
||||
position = Vector2(0, 1)
|
||||
collision_priority = 20.0
|
||||
|
||||
[node name="collision_shape_2d" type="CollisionShape2D" parent="static_body_2d"]
|
||||
position = Vector2(1, -2)
|
||||
|
@@ -6,6 +6,7 @@
|
||||
size = Vector2(64, 14.625)
|
||||
|
||||
[node name="dialogdebug_cupcake" type="StaticBody2D"]
|
||||
collision_priority = 20.0
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
|
62
scenes/tiles/enemies/slime.tscn
Normal file
62
scenes/tiles/enemies/slime.tscn
Normal file
@@ -0,0 +1,62 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cpu7t7csffoxg"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ca1es3hoj53wg" path="res://assets/textures/enemies/slime_green_atlas.png" id="1_bw6us"]
|
||||
[ext_resource type="Script" path="res://src/scene-scripts/enemies/slime.cs" id="1_l1742"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_eghup"]
|
||||
atlas = ExtResource("1_bw6us")
|
||||
region = Rect2(0, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8p5ni"]
|
||||
atlas = ExtResource("1_bw6us")
|
||||
region = Rect2(64, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j8570"]
|
||||
atlas = ExtResource("1_bw6us")
|
||||
region = Rect2(128, 0, 64, 64)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_bwr2v"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_eghup")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8p5ni")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_j8570")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_eghup")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_e6mi3"]
|
||||
radius = 6.0
|
||||
height = 40.0
|
||||
|
||||
[node name="slime" type="CharacterBody2D" groups=["enemies"]]
|
||||
collision_layer = 8
|
||||
collision_mask = 9
|
||||
motion_mode = 1
|
||||
floor_stop_on_slope = false
|
||||
floor_constant_speed = true
|
||||
script = ExtResource("1_l1742")
|
||||
|
||||
[node name="animated_sprite_2d" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(0, 24)
|
||||
sprite_frames = SubResource("SpriteFrames_bwr2v")
|
||||
frame_progress = 0.348187
|
||||
|
||||
[node name="collision_shape_2d" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, 33)
|
||||
rotation = 1.5708
|
||||
shape = SubResource("CapsuleShape2D_e6mi3")
|
||||
|
||||
[node name="visible_notifier_2d" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
position = Vector2(0, 9)
|
||||
rect = Rect2(-25, 0, 50, 30)
|
@@ -6,6 +6,9 @@
|
||||
radius = 33.1361
|
||||
|
||||
[node name="rigid_body_2d" type="RigidBody2D"]
|
||||
collision_layer = 2
|
||||
collision_mask = 11
|
||||
collision_priority = 25.0
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
|
@@ -22,6 +22,7 @@ func OnAudioFinished():
|
||||
radius = 30.8058
|
||||
|
||||
[node name="sound_debug_tile" type="StaticBody2D"]
|
||||
collision_priority = 20.0
|
||||
script = SubResource("GDScript_krkfl")
|
||||
soundOn = false
|
||||
|
||||
|
29
src/anticheat.cs
Normal file
29
src/anticheat.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Diagnostics;
|
||||
using Godot;
|
||||
|
||||
public partial class anticheat : Node
|
||||
{
|
||||
string[] suspiciousProcesses = { "cheat", "wemod" };
|
||||
string alertMessage;
|
||||
string alertTitle;
|
||||
public override void _Ready()
|
||||
{
|
||||
var lang = Json.ParseString(FileAccess.Open("res://assets/lang/en/warnings.json", FileAccess.ModeFlags.Read).GetAsText()).AsGodotDictionary();
|
||||
alertMessage = lang["cheatalert_message"].ToString();
|
||||
alertTitle = lang["cheatalert_title"].ToString();
|
||||
}
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
foreach (Process p in Process.GetProcesses())
|
||||
foreach (string s in suspiciousProcesses)
|
||||
{
|
||||
if (p.ProcessName.Find(s) >= 0) //cheat gets detected
|
||||
{
|
||||
GetTree().Paused = true;
|
||||
OS.Kill(p.Id);
|
||||
OS.Alert(alertMessage, alertTitle);
|
||||
GetTree().Paused = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
33
src/gdscript/tool/bbcodeeffects/cuss.gd
Normal file
33
src/gdscript/tool/bbcodeeffects/cuss.gd
Normal file
@@ -0,0 +1,33 @@
|
||||
@tool
|
||||
extends RichTextEffect
|
||||
|
||||
|
||||
# Syntax: [cuss][/cuss]
|
||||
var bbcode = "cuss"
|
||||
|
||||
var VOWELS : PackedInt32Array = [97,101,105,111,117,65,69,73,79,85]#a,e,i,o,u,A,E,I,O,U
|
||||
var CHARS : PackedInt32Array = [38,36,33,64,42,35,37]#&,$,!,@,*,#,%
|
||||
var SPACE : int = 32
|
||||
|
||||
var _was_space = false
|
||||
|
||||
func get_text_server():
|
||||
return TextServerManager.get_primary_interface()
|
||||
|
||||
func _process_custom_fx(char_fx):
|
||||
var c = char_fx.glyph_index
|
||||
|
||||
var vowelBool : bool = false
|
||||
for x in VOWELS:
|
||||
if char_fx.glyph_index == get_text_server().font_get_glyph_index(char_fx.font, 1, x, 0):
|
||||
vowelBool = true
|
||||
|
||||
if not _was_space and not char_fx.relative_index == 0 and not c == get_text_server().font_get_glyph_index(char_fx.font, 1, SPACE, 0):
|
||||
var t = char_fx.elapsed_time + char_fx.glyph_index * 10.2 + char_fx.relative_index * 2
|
||||
t *= 4.3
|
||||
if vowelBool or sin(t) > 0.0:
|
||||
char_fx.glyph_index = get_text_server().font_get_glyph_index(char_fx.font, 1, CHARS[int(t) % len(CHARS)], 0)
|
||||
|
||||
_was_space = c == get_text_server().font_get_glyph_index(char_fx.font, 1, SPACE, 0)
|
||||
|
||||
return true
|
7
src/gdscript/tool/bbcodeeffects/cuss.tres
Normal file
7
src/gdscript/tool/bbcodeeffects/cuss.tres
Normal file
@@ -0,0 +1,7 @@
|
||||
[gd_resource type="RichTextEffect" load_steps=2 format=3 uid="uid://0o1lbwcdjg28"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/gdscript/tool/bbcodeeffects/cuss.gd" id="1_ctc4u"]
|
||||
|
||||
[resource]
|
||||
resource_name = "cuss"
|
||||
script = ExtResource("1_ctc4u")
|
@@ -7,13 +7,13 @@ public partial class player_variables : Node
|
||||
private static string _playername = "Yannik";
|
||||
public static string PlayerName
|
||||
{
|
||||
get { return _playername; }
|
||||
set
|
||||
get
|
||||
{
|
||||
_playername = Regex.Replace(value, @"\[[^]]+\]", "");
|
||||
_playername = Regex.Replace(_playername, @"<[^>]*>", "");
|
||||
if (PlayerName.Length > 12)
|
||||
_playername = PlayerName.Substring(0, 12);
|
||||
_playername = Regex.Replace(_playername, @"[<卐卍࿕࿖࿗࿘ꖦ⃠\uD83C-\uDBFF\uDC00-\uDFFF]", "").StripEdges(); //todo swearword censoring with bbcode effect
|
||||
if (_playername.Length > 12)
|
||||
_playername = _playername.Substring(0, 12);
|
||||
return _playername.Replace(@"\s+", " ").Replace(@"\", @"\\").Replace("\"", "\\\"").Replace("'", "\\'");
|
||||
}
|
||||
set { _playername = value; }
|
||||
}
|
||||
}
|
||||
|
@@ -3,13 +3,13 @@ using Godot.Collections;
|
||||
|
||||
public partial class console : PopupPanel
|
||||
{
|
||||
private string[] gamepadCheatcode = { "ui_up", "ui_up", "ui_down", "ui_down", "ui_left", "ui_right", "ui_left", "ui_right", "ui_cancel", "ui_accept", "cheat_start" };
|
||||
private int gpCcIndexer = 0;
|
||||
private InputEvent inputEvent;
|
||||
string[] gamepadCheatcode = { "ui_up", "ui_up", "ui_down", "ui_down", "ui_left", "ui_right", "ui_left", "ui_right", "ui_cancel", "ui_accept", "cheat_start" };
|
||||
int gpCcIndexer = 0;
|
||||
InputEvent inputEvent;
|
||||
private static RichTextLabel textblock;
|
||||
private LineEdit line;
|
||||
private Dictionary commandDict;
|
||||
private string error = "Not found! :(";
|
||||
LineEdit line;
|
||||
Dictionary commandDict;
|
||||
string error = "Not found! :(";
|
||||
|
||||
//functions with capital letters can't be used inside the console
|
||||
public override void _Ready()
|
||||
@@ -38,18 +38,15 @@ public partial class console : PopupPanel
|
||||
//Normal keyboard hotkey
|
||||
if (Input.IsActionJustPressed("console"))
|
||||
ToggleVisible();
|
||||
//OS console
|
||||
/*if (OS.ReadStringFromStdIn() != "") //not tested yet
|
||||
OnLineEditTextSubmitted(OS.ReadStringFromStdIn());*/
|
||||
}
|
||||
private void ToggleVisible()
|
||||
void ToggleVisible()
|
||||
{
|
||||
Visible = !Visible;
|
||||
player.allowMovement = !Visible;
|
||||
line.GrabFocus();
|
||||
}
|
||||
private void OnPopupHide() { if (dialog_bubble.isTalking == false) player.allowMovement = true; }
|
||||
private void OnLineEditTextSubmitted(string command)
|
||||
void OnPopupHide() { if (dialog_bubble.isTalking == false) player.allowMovement = true; }
|
||||
void OnLineEditTextSubmitted(string command)
|
||||
{
|
||||
line.Clear();
|
||||
//repeat user input to console
|
||||
@@ -83,7 +80,7 @@ public partial class console : PopupPanel
|
||||
}
|
||||
|
||||
|
||||
private void help()
|
||||
void help()
|
||||
{
|
||||
Print("==================================== Help ====================================");
|
||||
for (int i = 0; i < commandDict.Count; i++)
|
||||
@@ -92,7 +89,7 @@ public partial class console : PopupPanel
|
||||
+ Json.ParseString(commandDict.Values.ToString()).AsStringArray()[i]);
|
||||
}
|
||||
}
|
||||
private void help(string key) //Optional parameters aren't optional in Call()/Callv() so i use overloads instead
|
||||
void help(string key) //Optional parameters aren't optional in Call()/Callv() so i use overloads instead
|
||||
{
|
||||
key = key.ToLower();
|
||||
if (key.Length != 0 && commandDict.ContainsKey(key))
|
||||
@@ -106,13 +103,13 @@ public partial class console : PopupPanel
|
||||
help("help");
|
||||
};
|
||||
}
|
||||
private void consoleclear() => textblock.Clear();
|
||||
private void speed(float multiplier)
|
||||
void consoleclear() => textblock.Clear();
|
||||
void speed(float multiplier)
|
||||
{
|
||||
player.speed = Mathf.Clamp(multiplier, 0.01f, 15f);
|
||||
Print("Set player speed to " + Mathf.Clamp(multiplier, 0.01f, 15f));
|
||||
}
|
||||
private void noclip()
|
||||
void noclip()
|
||||
{
|
||||
try { Print(player.CollisionToggle()); }
|
||||
catch
|
||||
@@ -121,7 +118,7 @@ public partial class console : PopupPanel
|
||||
help("noclip");
|
||||
}
|
||||
}
|
||||
private void stickycamera()
|
||||
void stickycamera()
|
||||
{
|
||||
try { Print(player.CheatCam()); }
|
||||
catch
|
||||
@@ -130,22 +127,29 @@ public partial class console : PopupPanel
|
||||
help("stickycamera");
|
||||
}
|
||||
}
|
||||
private void playername(string name)
|
||||
void playername(string name)
|
||||
{
|
||||
string tmpPlayerName = player_variables.PlayerName;
|
||||
player_variables.PlayerName = name;
|
||||
Print("Your new name is now: " + player_variables.PlayerName);
|
||||
if (player_variables.PlayerName == "")
|
||||
{
|
||||
player_variables.PlayerName = tmpPlayerName;
|
||||
Print("The name had too much incorrect symbols and would be empty when changed.");
|
||||
}
|
||||
else
|
||||
Print("Your new name is now: " + player_variables.PlayerName);
|
||||
}
|
||||
private void closedialogue()
|
||||
void closedialogue()
|
||||
{
|
||||
dialog_bubble.forceClose = true;
|
||||
Print("Dialogue got closed!");
|
||||
}
|
||||
private void reload()
|
||||
void reload()
|
||||
{
|
||||
GetTree().ReloadCurrentScene();
|
||||
Print("Level got reloaded!");
|
||||
}
|
||||
private void visiblecollision()
|
||||
void visiblecollision()
|
||||
{
|
||||
GetTree().DebugCollisionsHint = !GetTree().DebugCollisionsHint;
|
||||
Print("Visible collision shapes and hitmarker now set to: " + GetTree().DebugCollisionsHint + "Use 'reload' to see changes!");
|
||||
|
@@ -1,15 +1,18 @@
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
public partial class dialog_bubble : CanvasLayer
|
||||
{
|
||||
public Variant parsedDlg;
|
||||
public Variant dlgLines;
|
||||
public int dlgPointer = 0;
|
||||
public RichTextLabel richText;
|
||||
public Timer typewriterTimer;
|
||||
public string title;
|
||||
public Area2D triggerArea;
|
||||
[Export] Dictionary eventBeginAnswers;
|
||||
Variant parsedDlg;
|
||||
Variant dlgLines;
|
||||
int dlgPointer = 0;
|
||||
int parsedDlgPointer = 0;
|
||||
RichTextLabel richText;
|
||||
Timer typewriterTimer;
|
||||
string title;
|
||||
Area2D triggerArea;
|
||||
public static bool forceClose;
|
||||
public static bool isTalking;
|
||||
/*TODO:
|
||||
@@ -17,8 +20,8 @@ public partial class dialog_bubble : CanvasLayer
|
||||
- add tree support (example: "story" key)
|
||||
- ability to add dialogue begin answers on the fly (special ones are colored)
|
||||
they will be in a dictionary with event IDs or Dictionary keys it also needs an array wich ones are active
|
||||
-strings like in the "goodbye" key should be randomized without the array brackets so they are only needed for multiline texts
|
||||
-answers should work more like dialogue for tree support*/
|
||||
-answers should work more like gatherdialogue for tree support
|
||||
- the int in <goto:0 <- should represent the parsedDlgPointer*/
|
||||
public override void _Ready()
|
||||
{
|
||||
richText = GetNode<RichTextLabel>("box/rich_text_label");
|
||||
@@ -26,51 +29,66 @@ public partial class dialog_bubble : CanvasLayer
|
||||
}
|
||||
public void GetDialog(string file, Area2D actor)
|
||||
{
|
||||
console.Print("Loaded dialogue from: " + file + "\nClose dialogue with 'closedialogue'");
|
||||
console.Print("Loaded dialogue from: " + file + "\nClose dialogue with \"closedialogue\"");
|
||||
triggerArea = actor;
|
||||
title = actor.Get("title").AsString();
|
||||
bool introducedVillager = actor.Get("introducedVillager").AsBool();
|
||||
|
||||
parsedDlg = Json.ParseString(FileAccess.Open(file, FileAccess.ModeFlags.Read).GetAsText()
|
||||
.Replace("{player}", "[color=cyan]" + player_variables.PlayerName + "[/color]").Replace("{title}", "[color=purple]" + title + "[/color]"));
|
||||
|
||||
if (parsedDlg.AsGodotDictionary()["dialogType"].AsString() != "villager" || introducedVillager)
|
||||
if (introducedVillager)
|
||||
GetNode<Label>("box/name_label").Text = title;
|
||||
|
||||
player.allowMovement = false;
|
||||
|
||||
//Get first key
|
||||
if (parsedDlg.AsGodotDictionary()["dialogType"].AsString() == "villager")
|
||||
if (introducedVillager)
|
||||
GatherDialog("welcome");
|
||||
else
|
||||
GatherDialog("intro");
|
||||
|
||||
else if (parsedDlg.AsGodotDictionary()["dialogType"].AsString() == "message")
|
||||
GatherDialog("message");
|
||||
if (introducedVillager && parsedDlg.AsGodotDictionary().ContainsKey("<welcome>"))
|
||||
GatherDialog("<welcome>");
|
||||
else if (parsedDlg.AsGodotDictionary().ContainsKey("<intro>"))
|
||||
GatherDialog("<intro>");
|
||||
else if (parsedDlg.AsGodotDictionary().ContainsKey("<message>"))
|
||||
{
|
||||
GetNode<Label>("box/name_label").Text = title;
|
||||
GatherDialog("<message>");
|
||||
}
|
||||
|
||||
Visible = true;
|
||||
isTalking = true;
|
||||
}
|
||||
public void GatherDialog(string key)
|
||||
void GatherDialog(string key)
|
||||
{
|
||||
dlgPointer = 0;
|
||||
dlgLines = parsedDlg.AsGodotDictionary()[key].AsGodotArray();
|
||||
dlgLines = dlgLines.AsGodotArray()[GD.RandRange(0, dlgLines.AsGodotArray().Count - 1)];
|
||||
if (parsedDlg.AsGodotDictionary()[key].VariantType == Variant.Type.String)
|
||||
{
|
||||
string[] oneline = { parsedDlg.AsGodotDictionary()[key].AsString() };
|
||||
dlgLines = oneline;
|
||||
}
|
||||
if (parsedDlg.AsGodotDictionary()[key].VariantType == Variant.Type.Array)
|
||||
dlgLines = parsedDlg.AsGodotDictionary()[key].AsGodotArray();
|
||||
if (dlgLines.AsGodotArray()[0].VariantType == Variant.Type.Array)
|
||||
dlgLines = dlgLines.AsGodotArray()[GD.RandRange(0, dlgLines.AsGodotArray().Count - 1)];
|
||||
//TODO:copy a clean default array and remove already used indexes and copy from clean array when its empty
|
||||
}
|
||||
public void OnVisibilityChanged()
|
||||
void OnVisibilityChanged()
|
||||
{
|
||||
if (Visible)
|
||||
ProcessMode = ProcessModeEnum.Inherit;
|
||||
else ProcessMode = ProcessModeEnum.Disabled;
|
||||
else if (richText != null)
|
||||
{
|
||||
dlgPointer = 0;
|
||||
richText.VisibleCharacters = -1;
|
||||
GetNode<Label>("box/name_label").Text = "???";
|
||||
richText.Text = "";
|
||||
if (GetParent().Name == "player") player.allowMovement = true;
|
||||
isTalking = false;
|
||||
forceClose = false;
|
||||
ProcessMode = ProcessModeEnum.Disabled;
|
||||
}
|
||||
}
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
DialogControlls();
|
||||
AnswerBoxControlls();
|
||||
}
|
||||
public void DialogControlls()
|
||||
void DialogControlls()
|
||||
{
|
||||
if (Input.IsActionJustPressed("ui_cancel")) richText.VisibleCharacters = richText.Text.Length;
|
||||
|
||||
@@ -82,11 +100,11 @@ public partial class dialog_bubble : CanvasLayer
|
||||
//read and write the dialogue
|
||||
if (dlgLines.AsGodotArray()[dlgPointer].VariantType == Variant.Type.Float)
|
||||
InDialogEvents((int)dlgLines.AsGodotArray()[dlgPointer]);
|
||||
else if (dlgLines.AsGodotArray()[dlgPointer].VariantType == Variant.Type.String && !dlgLines.AsGodotArray()[dlgPointer].AsString().StartsWith("<goto:>"))
|
||||
else if (dlgLines.AsGodotArray()[dlgPointer].VariantType == Variant.Type.String && !dlgLines.AsGodotArray()[dlgPointer].AsString().StartsWith("<goto:"))
|
||||
UpdateDialog();
|
||||
else if (dlgLines.AsGodotArray()[dlgPointer].VariantType == Variant.Type.String && dlgLines.AsGodotArray()[dlgPointer].AsString().StartsWith("<goto:>"))
|
||||
else if (dlgLines.AsGodotArray()[dlgPointer].VariantType == Variant.Type.String && dlgLines.AsGodotArray()[dlgPointer].AsString().StartsWith("<goto:"))
|
||||
{
|
||||
GatherDialog(dlgLines.AsGodotArray()[dlgPointer].AsString().Replace("<goto:>", ""));
|
||||
GatherDialog(dlgLines.AsGodotArray()[dlgPointer].AsString().Replace("goto:0:", ""));
|
||||
UpdateDialog();
|
||||
}
|
||||
else if (dlgLines.AsGodotArray()[dlgPointer].VariantType == Variant.Type.Dictionary)
|
||||
@@ -94,10 +112,9 @@ public partial class dialog_bubble : CanvasLayer
|
||||
}
|
||||
dlgPointer++;
|
||||
}
|
||||
if (dlgPointer > dlgLines.AsGodotArray().Count || forceClose)
|
||||
CloseDialog();
|
||||
Visible = !(dlgPointer > dlgLines.AsGodotArray().Count || forceClose);
|
||||
}
|
||||
public void UpdateDialog()
|
||||
void UpdateDialog()
|
||||
{
|
||||
richText.Text = dlgLines.AsGodotArray()[dlgPointer].ToString();
|
||||
richText.VisibleCharacters = 0;
|
||||
@@ -112,7 +129,7 @@ public partial class dialog_bubble : CanvasLayer
|
||||
}
|
||||
else typewriterTimer.Stop();
|
||||
}
|
||||
public void MakeAnswerBox(string[] dialogOptions)
|
||||
void MakeAnswerBox(string[] dialogOptions)
|
||||
{
|
||||
var parent = GetNode("box/panel_container/margin_container");
|
||||
if (parent.GetChildCount() == 1) parent.GetChild(0).Free();
|
||||
@@ -127,45 +144,33 @@ public partial class dialog_bubble : CanvasLayer
|
||||
GetNode<PanelContainer>("box/panel_container").Visible = true;
|
||||
parent.GetChild<Button>(0).GrabFocus();
|
||||
}
|
||||
public void AnswerBoxControlls()
|
||||
void AnswerBoxControlls()
|
||||
{
|
||||
if (GetNode<PanelContainer>("box/panel_container").Visible == true
|
||||
&& GetNode("box/panel_container/margin_container").GetChild(0).GetChild<Button>(0).ButtonGroup.GetPressedButton() != null)
|
||||
{
|
||||
GetNode<AudioStreamPlayer>("answerbtn_audio_stream").Play(); //BUG: dialogue box breaks while game console is open.
|
||||
GetNode<AudioStreamPlayer>("answerbtn_audio_stream").Play();
|
||||
var answer = dlgLines.AsGodotArray()[dlgPointer - 1].AsGodotDictionary()[GetNode<Button>(GetNode("box/panel_container/margin_container")
|
||||
.GetChild(0).GetChild<Button>(0).ButtonGroup.GetPressedButton().GetPath()).Text];
|
||||
GetNode<PanelContainer>("box/panel_container").Visible = false;
|
||||
if (answer.VariantType == Variant.Type.String && answer.AsString().StartsWith("<goto:>"))
|
||||
if (answer.VariantType == Variant.Type.String && answer.AsString().StartsWith("<goto:"))
|
||||
{
|
||||
GatherDialog(answer.AsString().Replace("<goto:>", ""));
|
||||
GatherDialog(answer.AsString().Replace("goto:0:", ""));
|
||||
UpdateDialog();
|
||||
}
|
||||
dlgPointer++;
|
||||
}
|
||||
}
|
||||
public void InDialogEvents(int eventID)
|
||||
void InDialogEvents(int eventID)
|
||||
{
|
||||
switch (eventID)
|
||||
{
|
||||
case 0:
|
||||
GetNode<Label>("box/name_label").Text = title;
|
||||
triggerArea.Set("introducedVillager", true);
|
||||
GatherDialog("begindialog");
|
||||
GatherDialog("<begindialog>");
|
||||
UpdateDialog();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseDialog()
|
||||
{
|
||||
Visible = false;
|
||||
dlgPointer = 0;
|
||||
richText.VisibleCharacters = -1;
|
||||
GetNode<Label>("box/name_label").Text = "???";
|
||||
richText.Text = "";
|
||||
if (GetParent().Name == "player") player.allowMovement = true;
|
||||
isTalking = false;
|
||||
forceClose = false;
|
||||
}
|
||||
}
|
17
src/scene-scripts/enemies/slime.cs
Normal file
17
src/scene-scripts/enemies/slime.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class slime : CharacterBody2D
|
||||
{
|
||||
[Export] int speed = 70;
|
||||
Vector2 motion = Vector2.Zero;
|
||||
public override void _Ready() => GetNode<AnimatedSprite2D>("animated_sprite_2d").Play();
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
if (GetNode<VisibleOnScreenNotifier2D>("visible_notifier_2d").IsOnScreen())
|
||||
motion = Position.DirectionTo(player.globalPlayerPosition) * speed;
|
||||
else motion = Vector2.Zero;
|
||||
Velocity = motion;
|
||||
MoveAndSlide();
|
||||
}
|
||||
}
|
@@ -6,14 +6,15 @@ public partial class player : CharacterBody2D
|
||||
{
|
||||
[Export] public static float speed = 1;
|
||||
public static bool allowMovement = true;
|
||||
public Vector2 movement;
|
||||
public AnimatedSprite2D animatedSprite;
|
||||
public Marker2D rotCenter;
|
||||
public RayCast2D dialogRayCast;
|
||||
Vector2 movement;
|
||||
AnimatedSprite2D animatedSprite;
|
||||
Marker2D rotCenter;
|
||||
RayCast2D dialogRayCast;
|
||||
public static Vector2 globalPlayerPosition;
|
||||
//console cheats:
|
||||
private static Camera2D cheatCam;
|
||||
private static Camera2D mainCam;
|
||||
private static CollisionShape2D collision;
|
||||
static Camera2D cheatCam;
|
||||
static Camera2D mainCam;
|
||||
static CollisionShape2D collision;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
@@ -26,6 +27,7 @@ public partial class player : CharacterBody2D
|
||||
}
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
globalPlayerPosition = Position;
|
||||
if (allowMovement)
|
||||
movement = Input.GetVector("move_left", "move_right", "move_up", "move_down");
|
||||
else movement = Vector2.Zero;
|
||||
@@ -65,11 +67,7 @@ public partial class player : CharacterBody2D
|
||||
animatedSprite.SpeedScale = Math.Abs(movement.Y * speed * 1.3f);
|
||||
}
|
||||
}
|
||||
public int BeginDialogue(int i)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
public void OnAnimationChanged()
|
||||
void OnAnimationChanged()
|
||||
{
|
||||
if (animatedSprite.Animation == "move_side")
|
||||
{
|
||||
@@ -89,18 +87,18 @@ public partial class player : CharacterBody2D
|
||||
{
|
||||
cheatCam.Enabled = true;
|
||||
mainCam.Enabled = false;
|
||||
return "cheat_cam has been enabled\n";
|
||||
return "cheat_cam has been enabled";
|
||||
}
|
||||
else
|
||||
{
|
||||
cheatCam.Enabled = false;
|
||||
mainCam.Enabled = true;
|
||||
return "cheat_cam has been disabled\n";
|
||||
return "cheat_cam has been disabled";
|
||||
}
|
||||
}
|
||||
public static string CollisionToggle()
|
||||
{
|
||||
collision.Disabled = !collision.Disabled;
|
||||
return ("Noclip is now set to: " + collision.Disabled + "\n");
|
||||
return ("Noclip is now set to: " + collision.Disabled);
|
||||
}
|
||||
}
|
||||
|
@@ -1,36 +1,30 @@
|
||||
[gd_resource type="TileSet" load_steps=11 format=3 uid="uid://dcg1tdmkkx22p"]
|
||||
[gd_resource type="TileSet" load_steps=10 format=3 uid="uid://dcg1tdmkkx22p"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dk7fqaw2b3w1k" path="res://scenes/tiles/first_debug_tile.tscn" id="1_uxmn6"]
|
||||
[ext_resource type="PackedScene" uid="uid://dckxciecwjfgf" path="res://scenes/tiles/cupcake.tscn" id="2_v4037"]
|
||||
[ext_resource type="PackedScene" uid="uid://c4dkrtswpv8cv" path="res://scenes/tiles/sound_debug_tile.tscn" id="3_lf2fs"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3l4uomk1gw8c" path="res://assets/textures/debug/grass_tile.png" id="4_k7c1q"]
|
||||
[ext_resource type="PackedScene" uid="uid://ct6s1gfjkciva" path="res://scenes/tiles/3d_cube_tile.tscn" id="5_x3uol"]
|
||||
[ext_resource type="PackedScene" uid="uid://cpu7t7csffoxg" path="res://scenes/tiles/enemies/slime.tscn" id="6_mcy76"]
|
||||
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_lcrun"]
|
||||
resource_name = "test"
|
||||
resource_name = "debug"
|
||||
scenes/0/scene = ExtResource("1_uxmn6")
|
||||
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_eskkr"]
|
||||
resource_name = "cupcake"
|
||||
scenes/1/scene = ExtResource("5_x3uol")
|
||||
scenes/2/scene = ExtResource("2_v4037")
|
||||
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_xtxu0"]
|
||||
resource_name = "sounddebug"
|
||||
scenes/1/scene = ExtResource("3_lf2fs")
|
||||
scenes/3/scene = ExtResource("3_lf2fs")
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_na45g"]
|
||||
texture = ExtResource("4_k7c1q")
|
||||
texture_region_size = Vector2i(64, 64)
|
||||
0:0/0 = 0
|
||||
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_loadc"]
|
||||
resource_name = "3d cube"
|
||||
scenes/1/scene = ExtResource("5_x3uol")
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_d4uti"]
|
||||
resource_name = "enemies"
|
||||
scenes/1/scene = ExtResource("6_mcy76")
|
||||
|
||||
[resource]
|
||||
tile_size = Vector2i(64, 64)
|
||||
sources/0 = SubResource("TileSetScenesCollectionSource_lcrun")
|
||||
sources/1 = SubResource("TileSetScenesCollectionSource_eskkr")
|
||||
sources/2 = SubResource("TileSetScenesCollectionSource_xtxu0")
|
||||
sources/3 = SubResource("TileSetAtlasSource_na45g")
|
||||
sources/4 = SubResource("TileSetScenesCollectionSource_loadc")
|
||||
sources/5 = SubResource("TileSetScenesCollectionSource_d4uti")
|
||||
|
Reference in New Issue
Block a user