From a5cce3cba7f0fc670bf322234175e89c5e8c16f6 Mon Sep 17 00:00:00 2001 From: chimchooree Date: Sat, 4 Mar 2023 16:57:31 -0600 Subject: [PATCH] shoutbox with new users and message display --- .import/.gdignore | 1 + ...t.csv-faa6f290f79c1ee2595317848795c782.md5 | 3 + ...n.png-487276ed1e3a0c39cad0279d744ee560.md5 | 3 + ....png-487276ed1e3a0c39cad0279d744ee560.stex | Bin 0 -> 1496 bytes Lemon.gd | 60 +++ Lemon.tscn | 91 +++++ Res/Text/Text.csv | 69 ++++ Res/Text/Text.csv.import | 16 + Res/Text/Text.en.translation | Bin 0 -> 4413 bytes Res/Text/Text.pr.translation | Bin 0 -> 2300 bytes Res/Text/censor.txt | 144 +++++++ Singletons/Server.gd | 21 + Story/Story.gd | 12 + UI/Action.gd | 12 + UI/Button.gd | 9 + UI/DialogBox.gd | 9 + UI/Form.gd | 94 +++++ UI/Form/Immigration/Day.gd | 7 + UI/Form/Immigration/Gender.gd | 7 + UI/Form/Immigration/Immigration.tscn | 370 ++++++++++++++++++ UI/Form/Immigration/Month.gd | 7 + UI/Form/Immigration/Reason.gd | 7 + UI/Form/Immigration/Year.gd | 7 + UI/Form/Question.gd | 13 + UI/Label.gd | 9 + UI/LineEdit.gd | 9 + UI/Room/CustomsOffice-NoAccount.tscn | 99 +++++ UI/Shoutbox/Shoutbox.gd | 33 ++ UI/Shoutbox/Shoutbox.tscn | 87 ++++ default_env.tres | 7 + export_presets.cfg | 24 ++ icon.png | Bin 0 -> 3305 bytes icon.png.import | 35 ++ project.godot | 35 ++ 34 files changed, 1300 insertions(+) create mode 100644 .import/.gdignore create mode 100644 .import/Text.csv-faa6f290f79c1ee2595317848795c782.md5 create mode 100644 .import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5 create mode 100644 .import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex create mode 100644 Lemon.gd create mode 100644 Lemon.tscn create mode 100644 Res/Text/Text.csv create mode 100644 Res/Text/Text.csv.import create mode 100644 Res/Text/Text.en.translation create mode 100644 Res/Text/Text.pr.translation create mode 100644 Res/Text/censor.txt create mode 100644 Singletons/Server.gd create mode 100644 Story/Story.gd create mode 100644 UI/Action.gd create mode 100644 UI/Button.gd create mode 100644 UI/DialogBox.gd create mode 100644 UI/Form.gd create mode 100644 UI/Form/Immigration/Day.gd create mode 100644 UI/Form/Immigration/Gender.gd create mode 100644 UI/Form/Immigration/Immigration.tscn create mode 100644 UI/Form/Immigration/Month.gd create mode 100644 UI/Form/Immigration/Reason.gd create mode 100644 UI/Form/Immigration/Year.gd create mode 100644 UI/Form/Question.gd create mode 100644 UI/Label.gd create mode 100644 UI/LineEdit.gd create mode 100644 UI/Room/CustomsOffice-NoAccount.tscn create mode 100644 UI/Shoutbox/Shoutbox.gd create mode 100644 UI/Shoutbox/Shoutbox.tscn create mode 100644 default_env.tres create mode 100644 export_presets.cfg create mode 100644 icon.png create mode 100644 icon.png.import create mode 100644 project.godot diff --git a/.import/.gdignore b/.import/.gdignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.import/.gdignore @@ -0,0 +1 @@ + diff --git a/.import/Text.csv-faa6f290f79c1ee2595317848795c782.md5 b/.import/Text.csv-faa6f290f79c1ee2595317848795c782.md5 new file mode 100644 index 0000000..878331d --- /dev/null +++ b/.import/Text.csv-faa6f290f79c1ee2595317848795c782.md5 @@ -0,0 +1,3 @@ +source_md5="b3ee3b197af6bdf6b469f88bc97a2b5b" +dest_md5="5cc453001da2def085d615be60a0b9c4" + diff --git a/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5 b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5 new file mode 100644 index 0000000..5328bc7 --- /dev/null +++ b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5 @@ -0,0 +1,3 @@ +source_md5="47313fa4c47a9963fddd764e1ec6e4a8" +dest_md5="26ea799ea0a3da9e753b3ebe822e0570" + diff --git a/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex new file mode 100644 index 0000000000000000000000000000000000000000..71f69131f1bad5ac84f9f5fb77b8014d6f855868 GIT binary patch literal 1496 zcmV;}1t8#jQIRc$f~c)tQiw!~w%QUQ6exqX5cknk z0+d35DiDbTDuoE4>Lo>6B7>ey@m$S@5kjOuv{fWhh-@ho&(;2WkwS$K6`&Ldl|Us> zi4+J0k-+z7D#fx5bCy(4v8-W?7^7rF3d=UlIm}g3kr8v2*TVsYG0L(HsaUol6{$#J zzu%jyB(dI3x&O7SY0hEJfqi2jQf;@JF@lOwkr88**UM&PLd-R!kcy0;loU$Knm#_B zpssT<`uctM`T6EPm%A7K9*tSP|39fzMMT%Jh>GrWxv%zI|5WGxr!+(rs;IWI7+u$| ztA8kAM1hddg9IT6zY$?4T#831gq|cT869IJntT)|=01mwu*fe$Smy`ebi^HL+s-xg7chk284pq%~oy)o1W?`nc*zBC=zRt+_#M70<6PFG z6}tee5v>KVd&MI&-P+`h3e5&K^|-6M0EkEyjlf*9+`s@4^=sduefxeS9)KHW zxry#hT9*zlA+*bJIQpy4c0ZhsA-z^ z>#WBV&J`yU4D>m2?bqM)mFeH8@`b;@t{w3iXa*Wm8VHI_5p)5%2vTB$fYL+A6hukG z$!S`fHfaJP8lFT>jWhoL$`1ibnR*S{w;v;KO#Alr>y=RgAjwy$tV9ApAt(LXJMHJB z5CB9fl}q_biX|eNFsP!BlcI21)QL~UK@*6GVkMnytRt$6Bte>2l|jNPUTK0P)Fok~ z<8pRY5;Z~3$-3c)Ct*B>>n8U^6H%qzayG_@T0>t#DTYp>PAI07fWEaTdcB-^=q5<& z*tTB18j2DbF@k^@@+ev1QMg zL5#haz6F3%uU@HhjobH`e9qrvh%#pS={PAR-X0k%SWDWbr)+o y|M)fYRW9dto5g$WGgZ~$_?(~f&V283@;^HqstN$fY}?!b literal 0 HcmV?d00001 diff --git a/Lemon.gd b/Lemon.gd new file mode 100644 index 0000000..2d60905 --- /dev/null +++ b/Lemon.gd @@ -0,0 +1,60 @@ +extends Node + +# Lemonland Shoutbox Client + +onready var ui = $UI +export var websocket_url = "ws://127.0.0.1:8080" +var _client = WebSocketClient.new() +var chat_name + +func join_chat(username): + chat_name = username + _client.get_peer(1).put_packet(JSON.print({'type': "user_joined", 'name': username}).to_utf8()) + +func send_message(message): + _client.get_peer(1).put_packet(JSON.print({'type': 'shout', 'name': chat_name, 'message': message}).to_utf8()) + +sync func receive_message(packet): + ui.display_message(packet) + +func _ready(): + TranslationServer.set_locale("en") + for text in get_tree().get_nodes_in_group("translate"): + text.translate() + + _client.connect("connection_closed", self, "_closed") + _client.connect("connection_error", self, "_error") + _client.connect("connection_established", self, "_connected") + _client.connect("data_received", self, "_on_data_received") + + var err = _client.connect_to_url(websocket_url) + if err != OK: + print_debug("Unable to connect") + set_process(false) + +func _error(was_clean = false): + print_debug("Error, clean: ", was_clean) + set_process(false) + +func _closed(was_clean = false): + print_debug("Closed, clean: ", was_clean) + set_process(false) + +func _connected(protocol = ""): + print_debug("Connected with protocol: ", protocol) + _client.get_peer(1).put_packet(JSON.print({'type': 'test', 'message': "Client test packet"}).to_utf8()) + ui.join_button.show() + ui.username.show() + +func _on_data_received(): + var json = JSON.parse(_client.get_peer(1).get_packet().get_string_from_utf8()) + var packet = json.result + if typeof(packet) != 18: + push_error("%s is not a dictionary" % [packet]) + get_tree().quit() + print_debug("Got data from server: ", packet) + if packet['type'] == "shout" or packet['type'] == "server_message": + receive_message(packet) + +func _process(_delta): + _client.poll() diff --git a/Lemon.tscn b/Lemon.tscn new file mode 100644 index 0000000..595c83c --- /dev/null +++ b/Lemon.tscn @@ -0,0 +1,91 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://Lemon.gd" type="Script" id=1] +[ext_resource path="res://UI/LineEdit.gd" type="Script" id=2] +[ext_resource path="res://UI/Button.gd" type="Script" id=3] +[ext_resource path="res://UI/Label.gd" type="Script" id=4] +[ext_resource path="res://UI/Shoutbox/Shoutbox.gd" type="Script" id=5] + +[node name="LemonChat" type="Node"] +script = ExtResource( 1 ) + +[node name="UI" type="PanelContainer" parent="."] +margin_right = 170.0 +margin_bottom = 600.0 +rect_min_size = Vector2( 170, 0 ) +size_flags_horizontal = 0 +size_flags_vertical = 3 +script = ExtResource( 5 ) + +[node name="VBox" type="VBoxContainer" parent="UI"] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 163.0 +margin_bottom = 593.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="UI/VBox"] +margin_right = 156.0 +margin_bottom = 14.0 +size_flags_horizontal = 3 +align = 1 +script = ExtResource( 4 ) +tl = "sbshou" + +[node name="ChatDisplay" type="TextEdit" parent="UI/VBox"] +margin_top = 18.0 +margin_right = 156.0 +margin_bottom = 582.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +readonly = true +show_line_numbers = true +wrap_enabled = true + +[node name="ChatInput" type="LineEdit" parent="UI/VBox"] +visible = false +margin_top = 520.0 +margin_right = 270.0 +margin_bottom = 544.0 +size_flags_horizontal = 3 +script = ExtResource( 2 ) +tl = "sbchin" + +[node name="VBox" type="VBoxContainer" parent="UI/VBox"] +margin_top = 586.0 +margin_right = 156.0 +margin_bottom = 586.0 +size_flags_horizontal = 3 + +[node name="HBox" type="HBoxContainer" parent="UI/VBox/VBox"] +margin_right = 156.0 +size_flags_horizontal = 3 + +[node name="Name" type="LineEdit" parent="UI/VBox/VBox/HBox"] +visible = false +margin_right = 270.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +expand_to_text_length = true +placeholder_text = "Username" + +[node name="JoinButton" type="Button" parent="UI/VBox/VBox/HBox"] +visible = false +margin_left = 137.0 +margin_right = 270.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +text = "join" +script = ExtResource( 3 ) +tl = "sbjoin" + +[node name="LeaveButton" type="Button" parent="UI/VBox/VBox/HBox"] +visible = false +margin_left = 118.0 +margin_right = 645.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +text = "Leave" +script = ExtResource( 3 ) +tl = "sbleav" diff --git a/Res/Text/Text.csv b/Res/Text/Text.csv new file mode 100644 index 0000000..c243953 --- /dev/null +++ b/Res/Text/Text.csv @@ -0,0 +1,69 @@ +id,pr,en +sbshou,,shoutbox +sbchin,,shout something… +sbjoin,,join +sbhost,,host +sbleav,,leave +sbusna,,username +stwe01,,"Yet another immigrant. So you want in, too, huh? Hmmm. \nWhat, are you just going to stand there? Come over. Let me look at you." +stwe02,,"Well, you look like a slacker. I don’t know – the boss might be mad." +stwe03,,"You look like a good kid. I want to help you get here, but the boss would get mad." +stwe04,,"You must have come a long way, tho’, so I would hate to see you turned away." +stwe05,,… +stwe06,,Mmmm – here. Just fill out these forms real quick. /n The boss could return any minute. +acwe01,,take forms +foifna,,Name +foifdo,,Date of Birth +foifge,,Gender +foifbo,,Boy +foifgi,,Girl +foifal,,Alien +foifpa,,Password +foifap,,Password Again +foifse,,"You must pick either an email OR a Security Q&A, so you can retrieve your documentation when you inevitably lose it." +foifem,,Email +foifsq,,Security Question +foifsa,,Security Answer +foifrp,,Pets! +foifrc,,Collecting! +foifrg,,Playing games! +foifrf,,Making friends! +foifri,,I don’t know! +foifre,,Exploring! +foifbs,,Submit Form +foifb1,,Fill these forms real quick. The boss will be here any minute. +foifb2,,I've never seen a name like that. How...exotic. Can you spell it out in English characters to make it more...normal? +tijanu,,January +tifebu,,February +timarc,,March +tiapri,,April +timaya,,May +tijune,,June +tijuly,,July +tiaugu,,August +tiocto,,October +tinove,,November +tidece,,December +tisept,,September +tiun13,,Under 13 years old +tiov13,,13 years old or older +foifb3,,"Whoa, is that really your name? Um, keep in mind we potentially have younger citizens. Of course, if that name is not offensive in your culture, I get it, happens all the time. Just understand the leaders of the land will have you rename yourself if they find it too offensive." +ru0001,,"Avoid being offensive. Keep cussing to a respectful minimum. If you keep it PG-13 and are not mean-spirited, you are probably fine. Violaters with offensive names will either have to rename or be renamed." +ru0002,,"Do not share your account information with anyone, even staff. Keep your username, email, password, security questions, etc secret." +ru0003,,"Do not share personally identifiable information or photos. If you do, your content may be redacted to protect your privacy." +ru0004,,"Do not trade in-game assets for real world currency, goods, or services." +ru0005,,Targeted harassment is not allowed. Make no attempts to evade chat filters or blocklists. +ru0006,,"These are not rules. They are guidelines. If I feel you are harming other members, the site, or the economy, but in a way that is not addressed by the rules, I reserve the right to moderate you." +ru0007,,No spamming. Do not obstruct chat or gameplay for others. +ru0008,,"Do not take advantage of bugs or glitches. If you find any, you will be rewarded a bounty instead. Report typos for a smaller bounty." +foifb4,,I already know a {name}. Having two would just be awkward. Can you use a nickname instead or choose a totally different name? +foifb5,,"Oh, sorry…we can’t accept unacccompanied minors. Come back when you are 13, kid. The adult responsible for you can fill out the form on your behalf, so long as they keep an eye on you while in Lemonland. You...did bring an adult with you, right?" +foifb6,,"Are you aware your password is in the top 10 most common passwords? Sorry. I just can’t in good conscious let you use this. Instead, try a string of four memorable words like “correcthorsebatterystaple.""" +foifb7,,Your passwords don’t match. +foifb8,,Your email isn’t valid. Fix it or use a security Q&A instead. Or both! +foifb9,,You must use at least one: an email OR a security Q&A. +foif10,,You forgot your name. +foif11,,You forgot to write your password. +acwe02,,Begin the immigration process +acwe03,,Why join Lemonland? +acwe04,,View laws of the land diff --git a/Res/Text/Text.csv.import b/Res/Text/Text.csv.import new file mode 100644 index 0000000..d83d200 --- /dev/null +++ b/Res/Text/Text.csv.import @@ -0,0 +1,16 @@ +[remap] + +importer="csv_translation" +type="Translation" + +[deps] + +files=[ "res://Res/Text/Text.pr.translation", "res://Res/Text/Text.en.translation" ] + +source_file="res://Res/Text/Text.csv" +dest_files=[ "res://Res/Text/Text.pr.translation", "res://Res/Text/Text.en.translation" ] + +[params] + +compress=true +delimiter=0 diff --git a/Res/Text/Text.en.translation b/Res/Text/Text.en.translation new file mode 100644 index 0000000000000000000000000000000000000000..f238094371ceb543d87cdb1ca21b1144cd6d1cbe GIT binary patch literal 4413 zcmbtYeNa^fiCo?^I&*N}AnOHDxXJeydle3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zE2d0Od7IlTE;*>vy%1_SQhMlYri?{>gg$i2NP)YkZUSeOFZB!x@PT7`x*vkb*@Evi z9~cjn_^R&vdq=ZCmx(^P5Z|7C2!|dS{ zi{VQk@>Nh-iEcJj`gO0_qz4*Xyg>ifmZLll@*8GLtKVbPG_`p2rkX%Yjp;GGh888q zyn3^tg@H61rm5E(rnU^hLWQA)quYSp)dcj~CPRxvSljA3YXodSE13a*qqqJ~nd$L2 z`T~HO76Pq+7G}!J%*@sz2%#yjITQo(#`ydiAs3`W)aHX4&CV!V^ocowV$PH9Le5qw z%g)_pdx7mT_n?CDcnQWzp<_@rbQ+?E$m8vzPwZk)d?`RnaI#jT}@a}gpYMjEIaOrgiiG1tF(R_!_P^gPtqL?Cys%Kh`OD_~qK{R0VfVS^dch{&?29 zOYbAk%dQ`vt)!2HW8Qby)zpqXg6B+HeVilx1g@u08yH&PEaGrM@e68SN!`Ag| z5p!Pm8>>4}@La4iaHi`engx=)82?~m_GBCZ$sFYiNLtcW>32G1o* zaIU|F{7r(#B9HgTwdB3XqjOd=>bpb2v(gm2zi}{?&Z*%1x*6*>eV4&J3G3!7cmntq z1y2NbE4TxEn}R#RcMHzf|6s7%nJIW2^60$h{qY$vdgfZeO2MlxJ?%^paXjjZM9lSv zoe`h*DtJ%YM8K)wV>q9Z6nq?fvx1L+(~lvq$369>#bc;4c7)=loy*m>k-h&;|e8kio)5uDbh^Sl`P KAFUk!dwv5He48}@ literal 0 HcmV?d00001 diff --git a/Res/Text/censor.txt b/Res/Text/censor.txt new file mode 100644 index 0000000..b59ad2a --- /dev/null +++ b/Res/Text/censor.txt @@ -0,0 +1,144 @@ +abortion +anal +antifa +anus +areola +ass +bastard +bdsm +beaner +beastiality +bicurious +bisexual +bitch +blowjob +blueball +boob +breast +bunghole +butt +chink +clit +cock +coitus +commie +communist +condom +crackpipe +crap +crotch +cuck +cum +cunt +damn +darkie +darky +deadname +deepthroat +dick +dildo +drug +dyke +erection +faeces +fag +fart +feces +femboy +femoid +fister +fisting +foreskin +fornicate +fuck +gasm +gay +gender +genital +goldenshower +gook +goy +gyp +heroin +hitler +homo +horny +hump +hymen +incest +intercourse +jackoff +jerkoff +jew +jizz +kink +kkk +kike +lactate +lesbian +lesbo +lezbo +lsd +lube +marijuana +masturbate +menstral +meth +molest +muff +nazi +negroid +nig +nipple +orgy +pedo +penis +pimp +piss +poop +porn +prostitute +pubic +pussy +queef +queer +racial +racist +rapist +rimjob +roastie +schizo +scrotum +semen +sex +shit +skank +slanteye +slut +sodom +spastic +spaz +sucker +swastika +syphilis +tarbaby +tard +testicle +tits +titty +titties +tranny +trans +twat +urinary +urinate +uterus +vagina +vestite +vibrator +virgin +vulva +wank +weed +whore +zipperhead diff --git a/Singletons/Server.gd b/Singletons/Server.gd new file mode 100644 index 0000000..963c9fd --- /dev/null +++ b/Singletons/Server.gd @@ -0,0 +1,21 @@ +extends Node + +var network = NetworkedMultiplayerENet.new() +var ip = "127.0.0.1" +var port = 3000 + +func connect_to_server(): + network.create_client(ip, port) + get_tree().set_network_peer(network) + network.connect("connection_failed", self, "_connection_failed") + network.connect("connection_succeeded", self, "_connection_succeeded") + +func _connection_failed(): + print_debug("Failed to connect") + +func _connection_succeeded(): + print_debug("Connected") + +func _ready(): + connect_to_server() + diff --git a/Story/Story.gd b/Story/Story.gd new file mode 100644 index 0000000..72b69e4 --- /dev/null +++ b/Story/Story.gd @@ -0,0 +1,12 @@ +extends Node + +var action_box +var dialog_box + +func setup(): + dialog_box.update_dialog({'portrait': '', 'name': '', 'line': "stwe01"}) + action_box.update_actions({'actions': ['acwe02','acwe03','acwe04']}) + +func _ready(): + add_to_group("setup") + add_to_group("storyteller") diff --git a/UI/Action.gd b/UI/Action.gd new file mode 100644 index 0000000..9ea5850 --- /dev/null +++ b/UI/Action.gd @@ -0,0 +1,12 @@ +extends GridContainer + +var storyteller + +func update_actions(dict): + for a in dict['actions']: + var b = Button.new() + b.set_text(tr(a)) + add_child(b) + +func _ready(): + add_to_group("action_box") diff --git a/UI/Button.gd b/UI/Button.gd new file mode 100644 index 0000000..97102bd --- /dev/null +++ b/UI/Button.gd @@ -0,0 +1,9 @@ +extends Button + +export(String) var tl + +func translate(): + set_text(tr(tl)) + +func _ready(): + add_to_group("translate") diff --git a/UI/DialogBox.gd b/UI/DialogBox.gd new file mode 100644 index 0000000..43dbd9d --- /dev/null +++ b/UI/DialogBox.gd @@ -0,0 +1,9 @@ +extends RichTextLabel + +var storyteller + +func update_dialog(dict): + set_text(tr(dict['line'])) + +func _ready(): + add_to_group("dialog_box") diff --git a/UI/Form.gd b/UI/Form.gd new file mode 100644 index 0000000..0a02320 --- /dev/null +++ b/UI/Form.gd @@ -0,0 +1,94 @@ +extends VBoxContainer + +onready var legal_name = $Questions/Col1/HBox/Name +onready var day = $Questions/Col1/HBox2/Day +onready var month = $Questions/Col1/HBox2/Month +onready var year = $Questions/Col1/HBox2/Year +onready var gender = $Questions/Col1/HBox3/Gender +onready var password = $Questions/Col1/HBox4/Password +onready var password2 = $Questions/Col1/HBox5/Password2 +onready var email = $Questions/Col2/HBox/Email +onready var secq = $Questions/Col2/HBox2/SecurityQ +onready var seca = $Questions/Col2/HBox3/SecurityA +onready var reason = $HBox/Reason +onready var etc = $HBox2/Etc +onready var submit = $Submit +onready var message = $HBox3/VBox/Message +onready var action = $HBox3/VBox/Action +onready var censor = 'res://Res/Text/censor.txt' + +func check(): + var form = collect_answers() + # Check Name is filled + if !form['name']: + message.set_text(tr("foif10")) + return false + # Check Name has special characters + for c in ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '{', + '}', '\'', '\"', ':', ';']: + if c in form['name']: + message.set_text(tr("foifb2")) + return false + # Check Name is offensive + var file = File.new() + file.open(censor, file.READ) + var line_counter = 0 + while not file.eof_reached(): + line_counter+=1 + if file.get_line() in form['name']: + message.set_text(tr("foifb3")) + file.close() + return false + file.close() + # Check Name is taken +# message.set_text(tr("foifb4")) + # Check if >= 13 + if form['age'] < 1: + message.set_text(tr("foifb5")) + return false + # Check Password is filled + if !form['password'] or !form['password2']: + message.set_text(tr("foif11")) + return false + # Check Password in top passwords + for p in ["123456","123456789","qwerty","password","12345","qwerty123","1q2w3e","12345678","111111","1234567890"]: + if form['password'] == p: + message.set_text(tr("foifb6")) + return false + # Check Passwords match + if form['password'] != form['password2']: + message.set_text(tr("foifb7")) + return false + # Check Email is valid + if !form['email']: + message.set_text(tr("foifb8")) + return false + # Check Account Recovery filled out + if !form['email'] and !form['secq'] and !form['seca']: + message.set_text(tr("foifb8")) + return false + # Also no name, etc + return true + +func collect_answers(): + return { + 'name': legal_name.get_text(), + 'dob': str(month.get_selected_id() + 1) + "/" + str(day.get_selected_id() + 1), + 'age': year.get_selected_id(), + 'gender': gender.get_selected_id(), + 'password': password.get_text(), + 'password2': password2.get_text(), + 'email': email.get_text(), + 'secq': secq.get_text(), + 'seca': seca.get_text(), + 'reason': reason.get_selected_id(), + 'etc': etc.get_text() + } + +func create_account(): + if !check(): + return + get_parent().get_parent().queue_free() + +func _ready(): + submit.connect("button_up", self, "create_account") diff --git a/UI/Form/Immigration/Day.gd b/UI/Form/Immigration/Day.gd new file mode 100644 index 0000000..5ff105d --- /dev/null +++ b/UI/Form/Immigration/Day.gd @@ -0,0 +1,7 @@ +extends OptionButton + +func _ready(): + var x = 1 + while x < 32: + add_item(str(x)) + x += 1 diff --git a/UI/Form/Immigration/Gender.gd b/UI/Form/Immigration/Gender.gd new file mode 100644 index 0000000..c5ca22f --- /dev/null +++ b/UI/Form/Immigration/Gender.gd @@ -0,0 +1,7 @@ +extends OptionButton + +var keys = ["foifal","foifbo","foifgi"] + +func _ready(): + for k in keys: + add_item(tr(k)) diff --git a/UI/Form/Immigration/Immigration.tscn b/UI/Form/Immigration/Immigration.tscn new file mode 100644 index 0000000..f5b10e7 --- /dev/null +++ b/UI/Form/Immigration/Immigration.tscn @@ -0,0 +1,370 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://UI/Form/Immigration/Gender.gd" type="Script" id=1] +[ext_resource path="res://UI/Form.gd" type="Script" id=2] +[ext_resource path="res://UI/Form/Immigration/Day.gd" type="Script" id=3] +[ext_resource path="res://UI/Button.gd" type="Script" id=4] +[ext_resource path="res://icon.png" type="Texture" id=5] +[ext_resource path="res://UI/Form/Immigration/Month.gd" type="Script" id=6] +[ext_resource path="res://UI/Form/Immigration/Reason.gd" type="Script" id=7] +[ext_resource path="res://UI/Form/Immigration/Year.gd" type="Script" id=8] + +[node name="CharCreate" type="PanelContainer"] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 605.0 +margin_bottom = 579.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 591.0 +margin_bottom = 565.0 + +[node name="Form" type="VBoxContainer" parent="VBoxContainer"] +margin_right = 584.0 +margin_bottom = 464.0 +script = ExtResource( 2 ) + +[node name="Title" type="Label" parent="VBoxContainer/Form"] +margin_right = 584.0 +margin_bottom = 14.0 +text = "Immigration Forms" + +[node name="Desc" type="Label" parent="VBoxContainer/Form"] +margin_top = 18.0 +margin_right = 584.0 +margin_bottom = 32.0 +text = "Fill out the following questions." + +[node name="HSeparator" type="HSeparator" parent="VBoxContainer/Form"] +margin_top = 36.0 +margin_right = 584.0 +margin_bottom = 40.0 + +[node name="Questions" type="HBoxContainer" parent="VBoxContainer/Form"] +margin_top = 44.0 +margin_right = 584.0 +margin_bottom = 192.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Col1" type="VBoxContainer" parent="VBoxContainer/Form/Questions"] +margin_right = 290.0 +margin_bottom = 148.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="HBox" type="HBoxContainer" parent="VBoxContainer/Form/Questions/Col1"] +margin_right = 290.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/Questions/Col1/HBox"] +margin_top = 5.0 +margin_right = 143.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "Name:" + +[node name="Name" type="LineEdit" parent="VBoxContainer/Form/Questions/Col1/HBox"] +margin_left = 147.0 +margin_right = 290.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="HBox2" type="HBoxContainer" parent="VBoxContainer/Form/Questions/Col1"] +margin_top = 28.0 +margin_right = 290.0 +margin_bottom = 48.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/Questions/Col1/HBox2"] +margin_top = 3.0 +margin_right = 191.0 +margin_bottom = 17.0 +size_flags_horizontal = 3 +text = "Date of Birth:" + +[node name="Day" type="OptionButton" parent="VBoxContainer/Form/Questions/Col1/HBox2"] +margin_left = 195.0 +margin_right = 224.0 +margin_bottom = 20.0 +script = ExtResource( 3 ) + +[node name="Month" type="OptionButton" parent="VBoxContainer/Form/Questions/Col1/HBox2"] +margin_left = 228.0 +margin_right = 257.0 +margin_bottom = 20.0 +script = ExtResource( 6 ) + +[node name="Year" type="OptionButton" parent="VBoxContainer/Form/Questions/Col1/HBox2"] +margin_left = 261.0 +margin_right = 290.0 +margin_bottom = 20.0 +script = ExtResource( 8 ) + +[node name="HBox3" type="HBoxContainer" parent="VBoxContainer/Form/Questions/Col1"] +margin_top = 52.0 +margin_right = 290.0 +margin_bottom = 72.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/Questions/Col1/HBox3"] +margin_top = 3.0 +margin_right = 143.0 +margin_bottom = 17.0 +size_flags_horizontal = 3 +text = "Gender:" + +[node name="Gender" type="OptionButton" parent="VBoxContainer/Form/Questions/Col1/HBox3"] +margin_left = 147.0 +margin_right = 290.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +script = ExtResource( 1 ) + +[node name="HBox4" type="HBoxContainer" parent="VBoxContainer/Form/Questions/Col1"] +margin_top = 76.0 +margin_right = 290.0 +margin_bottom = 100.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/Questions/Col1/HBox4"] +margin_top = 5.0 +margin_right = 143.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "Password:" + +[node name="Password" type="LineEdit" parent="VBoxContainer/Form/Questions/Col1/HBox4"] +margin_left = 147.0 +margin_right = 290.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="HBox5" type="HBoxContainer" parent="VBoxContainer/Form/Questions/Col1"] +margin_top = 104.0 +margin_right = 290.0 +margin_bottom = 128.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/Questions/Col1/HBox5"] +margin_top = 5.0 +margin_right = 143.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "Password Again:" + +[node name="Password2" type="LineEdit" parent="VBoxContainer/Form/Questions/Col1/HBox5"] +margin_left = 147.0 +margin_right = 290.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="Col2" type="VBoxContainer" parent="VBoxContainer/Form/Questions"] +margin_left = 294.0 +margin_right = 584.0 +margin_bottom = 148.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/Questions/Col2"] +margin_right = 290.0 +margin_bottom = 48.0 +text = "You must pick either an email OR a Security Q&A, so you can retrieve your documentation when you inevitably lose it." +autowrap = true + +[node name="HSeparator" type="HSeparator" parent="VBoxContainer/Form/Questions/Col2"] +margin_top = 52.0 +margin_right = 290.0 +margin_bottom = 56.0 + +[node name="HBox" type="HBoxContainer" parent="VBoxContainer/Form/Questions/Col2"] +margin_top = 60.0 +margin_right = 290.0 +margin_bottom = 84.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/Questions/Col2/HBox"] +margin_top = 5.0 +margin_right = 143.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "email:" + +[node name="Email" type="LineEdit" parent="VBoxContainer/Form/Questions/Col2/HBox"] +margin_left = 147.0 +margin_right = 290.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="HSeparator2" type="HSeparator" parent="VBoxContainer/Form/Questions/Col2"] +margin_top = 88.0 +margin_right = 290.0 +margin_bottom = 92.0 + +[node name="HBox2" type="HBoxContainer" parent="VBoxContainer/Form/Questions/Col2"] +margin_top = 96.0 +margin_right = 290.0 +margin_bottom = 120.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/Questions/Col2/HBox2"] +margin_top = 5.0 +margin_right = 143.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "Security Question:" + +[node name="SecurityQ" type="LineEdit" parent="VBoxContainer/Form/Questions/Col2/HBox2"] +margin_left = 147.0 +margin_right = 290.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="HBox3" type="HBoxContainer" parent="VBoxContainer/Form/Questions/Col2"] +margin_top = 124.0 +margin_right = 290.0 +margin_bottom = 148.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/Questions/Col2/HBox3"] +margin_top = 5.0 +margin_right = 143.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "Security Answer:" + +[node name="SecurityA" type="LineEdit" parent="VBoxContainer/Form/Questions/Col2/HBox3"] +margin_left = 147.0 +margin_right = 290.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="HSeparator2" type="HSeparator" parent="VBoxContainer/Form"] +margin_top = 196.0 +margin_right = 584.0 +margin_bottom = 200.0 + +[node name="HBox" type="HBoxContainer" parent="VBoxContainer/Form"] +margin_top = 204.0 +margin_right = 584.0 +margin_bottom = 224.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/HBox"] +margin_top = 3.0 +margin_right = 290.0 +margin_bottom = 17.0 +size_flags_horizontal = 3 +text = "Reason for Immigrating:" + +[node name="Reason" type="OptionButton" parent="VBoxContainer/Form/HBox"] +margin_left = 294.0 +margin_right = 584.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +script = ExtResource( 7 ) + +[node name="HBox2" type="HBoxContainer" parent="VBoxContainer/Form"] +margin_top = 228.0 +margin_right = 584.0 +margin_bottom = 252.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="VBoxContainer/Form/HBox2"] +margin_top = 5.0 +margin_right = 290.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "Additional Comments:" + +[node name="Etc" type="LineEdit" parent="VBoxContainer/Form/HBox2"] +margin_left = 294.0 +margin_right = 584.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +text = "ajsdfrjosdijfosdiajfoisdjfoai hahaha" + +[node name="HSeparator3" type="HSeparator" parent="VBoxContainer/Form"] +margin_top = 256.0 +margin_right = 584.0 +margin_bottom = 260.0 + +[node name="Submit" type="Button" parent="VBoxContainer/Form"] +margin_top = 264.0 +margin_right = 584.0 +margin_bottom = 284.0 +script = ExtResource( 4 ) +tl = "foifbs" + +[node name="HSeparator4" type="HSeparator" parent="VBoxContainer/Form"] +margin_top = 288.0 +margin_right = 584.0 +margin_bottom = 292.0 + +[node name="HBox3" type="HBoxContainer" parent="VBoxContainer/Form"] +margin_top = 296.0 +margin_right = 584.0 +margin_bottom = 464.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +alignment = 2 + +[node name="VBox2" type="VBoxContainer" parent="VBoxContainer/Form/HBox3"] +margin_right = 150.0 +margin_bottom = 168.0 +alignment = 2 + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Form/HBox3/VBox2"] +margin_right = 150.0 +margin_bottom = 150.0 +rect_min_size = Vector2( 150, 150 ) +texture = ExtResource( 5 ) +expand = true + +[node name="Label" type="Label" parent="VBoxContainer/Form/HBox3/VBox2"] +margin_top = 154.0 +margin_right = 150.0 +margin_bottom = 168.0 +size_flags_horizontal = 3 +size_flags_vertical = 1 +text = "Bless the Child" +align = 1 + +[node name="VBox" type="VBoxContainer" parent="VBoxContainer/Form/HBox3"] +margin_left = 154.0 +margin_right = 584.0 +margin_bottom = 168.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +alignment = 2 + +[node name="Message" type="RichTextLabel" parent="VBoxContainer/Form/HBox3/VBox"] +margin_top = 129.0 +margin_right = 430.0 +margin_bottom = 144.0 +size_flags_horizontal = 3 +text = "\"Fill these forms real quick. The boss will be here any minute.\"" +fit_content_height = true + +[node name="Action" type="GridContainer" parent="VBoxContainer/Form/HBox3/VBox"] +margin_top = 148.0 +margin_right = 430.0 +margin_bottom = 168.0 +size_flags_horizontal = 3 +columns = 3 + +[node name="Button2" type="Button" parent="VBoxContainer/Form/HBox3/VBox/Action"] +margin_right = 248.0 +margin_bottom = 20.0 +text = "why not let me in without the forms?" + +[node name="Button3" type="Button" parent="VBoxContainer/Form/HBox3/VBox/Action"] +margin_left = 252.0 +margin_right = 426.0 +margin_bottom = 20.0 +text = "how do you use this info?" diff --git a/UI/Form/Immigration/Month.gd b/UI/Form/Immigration/Month.gd new file mode 100644 index 0000000..2c718cd --- /dev/null +++ b/UI/Form/Immigration/Month.gd @@ -0,0 +1,7 @@ +extends OptionButton + +var keys = ["tijanu", "tifebu", "timarc", "tiapri", "timaya", "tijune", "tijuly", "tiaugu", "tisept", "tiocto", "tinove", "tidece"] + +func _ready(): + for k in keys: + add_item(tr(k)) diff --git a/UI/Form/Immigration/Reason.gd b/UI/Form/Immigration/Reason.gd new file mode 100644 index 0000000..b778aba --- /dev/null +++ b/UI/Form/Immigration/Reason.gd @@ -0,0 +1,7 @@ +extends OptionButton + +var keys = ["foifri", "foifrp", "foifrc", "foifrg", "foifrf", "foifre"] + +func _ready(): + for k in keys: + add_item(tr(k)) diff --git a/UI/Form/Immigration/Year.gd b/UI/Form/Immigration/Year.gd new file mode 100644 index 0000000..2bc795a --- /dev/null +++ b/UI/Form/Immigration/Year.gd @@ -0,0 +1,7 @@ +extends OptionButton + +var keys = ["tiun13", "tiov13"] + +func _ready(): + for k in keys: + add_item(tr(k)) diff --git a/UI/Form/Question.gd b/UI/Form/Question.gd new file mode 100644 index 0000000..59e04b4 --- /dev/null +++ b/UI/Form/Question.gd @@ -0,0 +1,13 @@ +extends "res://UI/Label.gd" + +export(String) var tl_tooltip + +func show_tooltip(): + var label = Label.new() + label.set_text(tr(tl_tooltip)) + label.set_global_position(get_global_position()) + add_child(label) + +func _ready(): + tl = "?" + connect("mouse_entered", self, "show_tooltip") diff --git a/UI/Label.gd b/UI/Label.gd new file mode 100644 index 0000000..0f37d4d --- /dev/null +++ b/UI/Label.gd @@ -0,0 +1,9 @@ +extends Label + +export(String) var tl + +func translate(): + set_text(tr(tl)) + +func _ready(): + add_to_group("translate") diff --git a/UI/LineEdit.gd b/UI/LineEdit.gd new file mode 100644 index 0000000..327f474 --- /dev/null +++ b/UI/LineEdit.gd @@ -0,0 +1,9 @@ +extends LineEdit + +export(String) var tl + +func translate(): + placeholder_text = tr(tl) + +func _ready(): + add_to_group("translate") diff --git a/UI/Room/CustomsOffice-NoAccount.tscn b/UI/Room/CustomsOffice-NoAccount.tscn new file mode 100644 index 0000000..2b79417 --- /dev/null +++ b/UI/Room/CustomsOffice-NoAccount.tscn @@ -0,0 +1,99 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://icon.png" type="Texture" id=1] +[ext_resource path="res://UI/DialogBox.gd" type="Script" id=2] +[ext_resource path="res://UI/Action.gd" type="Script" id=3] + +[sub_resource type="Theme" id=1] + +[sub_resource type="StyleBoxTexture" id=2] +texture = ExtResource( 1 ) +region_rect = Rect2( 0, 0, 64, 64 ) + +[node name="Game" type="PanelContainer"] +margin_right = 172.0 +margin_bottom = 40.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VBox" type="VBoxContainer" parent="."] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 315.0 +margin_bottom = 500.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="HBox" type="HBoxContainer" parent="VBox"] +margin_right = 308.0 +margin_bottom = 335.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="View" type="TextureRect" parent="VBox/HBox"] +margin_right = 99.0 +margin_bottom = 335.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +texture = ExtResource( 1 ) +expand = true + +[node name="PDA" type="PanelContainer" parent="VBox/HBox"] +margin_left = 103.0 +margin_right = 308.0 +margin_bottom = 335.0 +rect_min_size = Vector2( 205, 335 ) +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme = SubResource( 1 ) +custom_styles/panel = SubResource( 2 ) + +[node name="Messages" type="RichTextLabel" parent="VBox"] +margin_top = 339.0 +margin_right = 308.0 +margin_bottom = 339.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +text = "You are in the Customs Office. +WARNING: You have no light source. +Dan is hungry. You should feed him soon." +script = ExtResource( 2 ) + +[node name="HBox2" type="HBoxContainer" parent="VBox"] +margin_top = 343.0 +margin_right = 308.0 +margin_bottom = 493.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VBox" type="VBoxContainer" parent="VBox/HBox2"] +margin_right = 154.0 +margin_bottom = 150.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="WhatNow" type="Label" parent="VBox/HBox2/VBox"] +margin_right = 154.0 +margin_bottom = 73.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +text = "What will you do now...?" + +[node name="Action" type="GridContainer" parent="VBox/HBox2/VBox"] +margin_top = 77.0 +margin_right = 154.0 +margin_bottom = 150.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +columns = 2 +script = ExtResource( 3 ) + +[node name="Partner" type="TextureRect" parent="VBox/HBox2"] +margin_left = 158.0 +margin_right = 308.0 +margin_bottom = 150.0 +rect_min_size = Vector2( 150, 150 ) +size_flags_horizontal = 3 +size_flags_vertical = 3 +texture = ExtResource( 1 ) +expand = true diff --git a/UI/Shoutbox/Shoutbox.gd b/UI/Shoutbox/Shoutbox.gd new file mode 100644 index 0000000..4c18606 --- /dev/null +++ b/UI/Shoutbox/Shoutbox.gd @@ -0,0 +1,33 @@ +extends Control + +# Lemonland Shoutbox UI + +onready var chat_display = $VBox/ChatDisplay +onready var chat_input = $VBox/ChatInput +onready var leave_button = $VBox/VBox/HBox/LeaveButton +onready var join_button = $VBox/VBox/HBox/JoinButton +onready var username = $VBox/VBox/HBox/Name + +func display_message(packet): # shout, alert, server_message, user_joined, user_left + if packet['type'] == "shout": + chat_display.text += packet['name'] + ": " + packet['message'] + "\n" + else: + chat_display.text += packet['message'] + "\n" + +func join_chat(): + if !username.text: + display_message({'type': "alert", "message": "!!! Enter your username before joining chat."}) + else: + get_parent().join_chat(username.text) + chat_input.show() + join_button.hide() + username.hide() + +func _input(event): + if event is InputEventKey and get_parent().chat_name: + if event.pressed and event.scancode == KEY_ENTER: + get_parent().send_message(chat_input.text) + chat_input.text = "" + +func _ready(): + join_button.connect("button_up", self, "join_chat") diff --git a/UI/Shoutbox/Shoutbox.tscn b/UI/Shoutbox/Shoutbox.tscn new file mode 100644 index 0000000..2e17936 --- /dev/null +++ b/UI/Shoutbox/Shoutbox.tscn @@ -0,0 +1,87 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://UI/Shoutbox/Shoutbox.gd" type="Script" id=1] +[ext_resource path="res://UI/Label.gd" type="Script" id=2] +[ext_resource path="res://UI/Button.gd" type="Script" id=3] +[ext_resource path="res://UI/LineEdit.gd" type="Script" id=4] + +[node name="Shoutbox" type="PanelContainer"] +margin_left = 502.0 +margin_right = 786.0 +margin_bottom = 586.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +script = ExtResource( 1 ) + +[node name="VBox" type="VBoxContainer" parent="."] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 277.0 +margin_bottom = 579.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="VBox"] +margin_right = 270.0 +margin_bottom = 14.0 +size_flags_horizontal = 3 +align = 1 +script = ExtResource( 2 ) +tl = "sbshou" + +[node name="ChatDisplay" type="TextEdit" parent="VBox"] +margin_top = 18.0 +margin_right = 270.0 +margin_bottom = 568.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +readonly = true +show_line_numbers = true +wrap_enabled = true + +[node name="ChatInput" type="LineEdit" parent="VBox"] +visible = false +margin_top = 520.0 +margin_right = 270.0 +margin_bottom = 544.0 +size_flags_horizontal = 3 +script = ExtResource( 4 ) +tl = "sbchin" + +[node name="VBox" type="VBoxContainer" parent="VBox"] +margin_top = 572.0 +margin_right = 270.0 +margin_bottom = 572.0 +size_flags_horizontal = 3 + +[node name="HBox" type="HBoxContainer" parent="VBox/VBox"] +margin_right = 270.0 +size_flags_horizontal = 3 + +[node name="Name" type="LineEdit" parent="VBox/VBox/HBox"] +visible = false +margin_right = 270.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +expand_to_text_length = true +placeholder_text = "Username" + +[node name="JoinButton" type="Button" parent="VBox/VBox/HBox"] +visible = false +margin_left = 137.0 +margin_right = 270.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +text = "join" +script = ExtResource( 3 ) +tl = "sbjoin" + +[node name="LeaveButton" type="Button" parent="VBox/VBox/HBox"] +visible = false +margin_left = 118.0 +margin_right = 645.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +text = "Leave" +script = ExtResource( 3 ) +tl = "sbleav" diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..20207a4 --- /dev/null +++ b/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] + +[resource] +background_mode = 2 +background_sky = SubResource( 1 ) diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..3403b1d --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,24 @@ +[preset.0] + +name="Linux/X11" +platform="Linux/X11" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="../Exports/Lemonland/Lemonland.x86_64" +script_export_mode=1 +script_encryption_key="" + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +binary_format/64_bits=true +binary_format/embed_pck=false +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c98fbb601c83c81ec8c22b1dba7d1d57c62b323c GIT binary patch literal 3305 zcmVNc=P)Px>qe(&U$es`gSqKCHF-lq>v1vga#%UF>TTrLR zW%{UNJKZi|Pj@Rc9GyPBD1CamMMf6SL~V^ag9~Vzut^L^0!Tv0LK0FTdnJ`x->EF(MZIP5kY*1-@^egP~7mH>({qi7{6 zQF;bN-XMq~+RzA8lI9AtJuz@PY*+{SP-Gbd@mZ(r*eE&`XO5!C>w#-pcmS28K^qzY zfTGCjor*I@ltgKb03nh#Fh$KpDL=o}gj-g4v6{}ZR1*mvXv?|gEA&Yr#r;Zw*d zUabIx8iHf+WoIO_c11Ba&!34XihSMF&C#YFDjU0)mmbXz3ex!D&t9UYp>;&R%(O(_ z*z^;&A84SWzKiQpqsdQ+Vs?rFS(f?R;c8xg_ft;Roec_~1KsVww}wzq5D}*5x6k|& zf~2A3@L4|ix|Q=L>rnmKE;B3UB=OMQxAK$Ce;LvDp?hwn-{Rn}Uo~U4IXTs4V%MQY zCWULcZFU0R%gbU;_Ef(A#76r1%|YWis0t`9$R{cyjFnsV(POrI)SGQi-l{mu{e?5R zepcp?AQ54D3g_mswd@RLn{z~;^Cl}>%j@}TWixL+audY``MmSV{-E(3R0Ws^U9%mk zmAond;N8k*{(f!}e^~d(i1Hq@jdv@XN2MLAl}3yaECf{nz5N3KMCjDCFzB_7)gkjj z>2Z={^e74l7u>P4oo1{Kc~sgFI`xP#f`uR}z_p~qLwws5)h)eLxAX=?+fB2_6kG)a zeE3U}YSi;Qc}gq*;kw|Tu5Oy{F)l`0;$$RA6)@d^I9>n9N^W1g0D!WJYJT&d@6p`W zfmWmD=^x$2@|)+=&@n(wn<-#M#zIY-iH42=UU>XI3i7l0^?#ILwb@CU63f5b_jeS| zn+d@CpB>^?Ti*1WuHSaRniWO-^Xl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;xCPfRb{~T>uo#5rL4L+z9n`rSUt3Tt nAZ`TZm+q1gPVN84&*%Ra7her>#-hHS00000NkvXXu0mjf|6N@O literal 0 HcmV?d00001 diff --git a/icon.png.import b/icon.png.import new file mode 100644 index 0000000..a4c02e6 --- /dev/null +++ b/icon.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..3b727ed --- /dev/null +++ b/project.godot @@ -0,0 +1,35 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + +[application] + +config/name="Shoutbox" +run/main_scene="res://Lemon.tscn" +config/icon="res://icon.png" + +[display] + +window/size/width=170 + +[gui] + +common/drop_mouse_on_gui_input_disabled=true + +[locale] + +translations=PoolStringArray( "res://Res/Text/Text.en.translation", "res://Res/Text/Text.pr.translation" ) + +[physics] + +common/enable_pause_aware_picking=true + +[rendering] + +environment/default_environment="res://default_env.tres"