shoutbox with new users and message display

master
chimchooree 2 years ago
commit a5cce3cba7

@ -0,0 +1,3 @@
source_md5="b3ee3b197af6bdf6b469f88bc97a2b5b"
dest_md5="5cc453001da2def085d615be60a0b9c4"

@ -0,0 +1,3 @@
source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
dest_md5="26ea799ea0a3da9e753b3ebe822e0570"

@ -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()

@ -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"

@ -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 dont 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 dont 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 cant 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 cant in good conscious let you use this. Instead, try a string of four memorable words like “correcthorsebatterystaple."""
foifb7,,Your passwords dont match.
foifb8,,Your email isnt 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
1 id pr en
2 sbshou shoutbox
3 sbchin shout something…
4 sbjoin join
5 sbhost host
6 sbleav leave
7 sbusna username
8 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.
9 stwe02 Well, you look like a slacker. I don’t know – the boss might be mad.
10 stwe03 You look like a good kid. I want to help you get here, but the boss would get mad.
11 stwe04 You must have come a long way, tho’, so I would hate to see you turned away.
12 stwe05
13 stwe06 Mmmm – here. Just fill out these forms real quick. /n The boss could return any minute.
14 acwe01 take forms
15 foifna Name
16 foifdo Date of Birth
17 foifge Gender
18 foifbo Boy
19 foifgi Girl
20 foifal Alien
21 foifpa Password
22 foifap Password Again
23 foifse You must pick either an email OR a Security Q&A, so you can retrieve your documentation when you inevitably lose it.
24 foifem Email
25 foifsq Security Question
26 foifsa Security Answer
27 foifrp Pets!
28 foifrc Collecting!
29 foifrg Playing games!
30 foifrf Making friends!
31 foifri I don’t know!
32 foifre Exploring!
33 foifbs Submit Form
34 foifb1 Fill these forms real quick. The boss will be here any minute.
35 foifb2 I've never seen a name like that. How...exotic. Can you spell it out in English characters to make it more...normal?
36 tijanu January
37 tifebu February
38 timarc March
39 tiapri April
40 timaya May
41 tijune June
42 tijuly July
43 tiaugu August
44 tiocto October
45 tinove November
46 tidece December
47 tisept September
48 tiun13 Under 13 years old
49 tiov13 13 years old or older
50 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.
51 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.
52 ru0002 Do not share your account information with anyone, even staff. Keep your username, email, password, security questions, etc secret.
53 ru0003 Do not share personally identifiable information or photos. If you do, your content may be redacted to protect your privacy.
54 ru0004 Do not trade in-game assets for real world currency, goods, or services.
55 ru0005 Targeted harassment is not allowed. Make no attempts to evade chat filters or blocklists.
56 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.
57 ru0007 No spamming. Do not obstruct chat or gameplay for others.
58 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.
59 foifb4 I already know a {name}. Having two would just be awkward. Can you use a nickname instead or choose a totally different name?
60 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?
61 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."
62 foifb7 Your passwords don’t match.
63 foifb8 Your email isn’t valid. Fix it or use a security Q&A instead. Or both!
64 foifb9 You must use at least one: an email OR a security Q&A.
65 foif10 You forgot your name.
66 foif11 You forgot to write your password.
67 acwe02 Begin the immigration process
68 acwe03 Why join Lemonland?
69 acwe04 View laws of the land

@ -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

Binary file not shown.

Binary file not shown.

@ -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

@ -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()

@ -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")

@ -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")

@ -0,0 +1,9 @@
extends Button
export(String) var tl
func translate():
set_text(tr(tl))
func _ready():
add_to_group("translate")

@ -0,0 +1,9 @@
extends RichTextLabel
var storyteller
func update_dialog(dict):
set_text(tr(dict['line']))
func _ready():
add_to_group("dialog_box")

@ -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")

@ -0,0 +1,7 @@
extends OptionButton
func _ready():
var x = 1
while x < 32:
add_item(str(x))
x += 1

@ -0,0 +1,7 @@
extends OptionButton
var keys = ["foifal","foifbo","foifgi"]
func _ready():
for k in keys:
add_item(tr(k))

@ -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?"

@ -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))

@ -0,0 +1,7 @@
extends OptionButton
var keys = ["foifri", "foifrp", "foifrc", "foifrg", "foifrf", "foifre"]
func _ready():
for k in keys:
add_item(tr(k))

@ -0,0 +1,7 @@
extends OptionButton
var keys = ["tiun13", "tiov13"]
func _ready():
for k in keys:
add_item(tr(k))

@ -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")

@ -0,0 +1,9 @@
extends Label
export(String) var tl
func translate():
set_text(tr(tl))
func _ready():
add_to_group("translate")

@ -0,0 +1,9 @@
extends LineEdit
export(String) var tl
func translate():
placeholder_text = tr(tl)
func _ready():
add_to_group("translate")

@ -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

@ -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")

@ -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"

@ -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 )

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -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

@ -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"
Loading…
Cancel
Save