From d1891a6d87e75bd2ec0add788e3de593bea75063 Mon Sep 17 00:00:00 2001
From: Aylong <69762909+AyIong@users.noreply.github.com>
Date: Thu, 9 Jan 2025 00:10:45 +0200
Subject: [PATCH 1/3] Add some space
---
.../title_screen/code/title_screen_html.dm | 4 ++--
.../html/title_screen_default.css | 18 +++++++-----------
.../title_screen/icons/lobby_human_ai.png | Bin 225 -> 226 bytes
.../title_screen/icons/lobby_pun_pun.png | Bin 251 -> 257 bytes
.../title_screen/icons/lobby_toggle_ready.png | Bin 456 -> 425 bytes
5 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/modular_bandastation/title_screen/code/title_screen_html.dm b/modular_bandastation/title_screen/code/title_screen_html.dm
index cb2969b97af5b..d816574a213bb 100644
--- a/modular_bandastation/title_screen/code/title_screen_html.dm
+++ b/modular_bandastation/title_screen/code/title_screen_html.dm
@@ -1,4 +1,4 @@
-#define MAX_STATION_TRAIT_BUTTONS_VERTICAL 3
+#define MAX_STATION_TRAIT_BUTTONS_VERTICAL 4
/**
* Get the HTML of title screen.
@@ -54,10 +54,10 @@
html += {""}
html += {"
"}
- html += create_icon_button(player, "changelog", "Открыть чейнджлог")
html += create_icon_button(player, "settings", "Настройки игры")
html += create_icon_button(player, "manifest", "Манифест персонала")
html += create_icon_button(player, "wiki", "Перейти на вики")
+ html += create_icon_button(player, "changelog", "Открыть чейнджлог")
html += {"
"}
if(length(GLOB.lobby_station_traits))
diff --git a/modular_bandastation/title_screen/html/title_screen_default.css b/modular_bandastation/title_screen/html/title_screen_default.css
index 4226e23bf9f85..dd9370352c6b5 100644
--- a/modular_bandastation/title_screen/html/title_screen_default.css
+++ b/modular_bandastation/title_screen/html/title_screen_default.css
@@ -256,12 +256,12 @@ input,
}
.lobby_buttons-left {
- left: -3px;
+ left: -1.5px;
bottom: 12px;
}
.lobby_buttons-right {
- right: -3px;
+ right: -1.5px;
bottom: 12px;
}
@@ -272,7 +272,6 @@ input,
.lobby_buttons-bottom {
display: flex;
- flex-direction: row-reverse;
bottom: -17.5px;
right: 32.5px;
z-index: 4;
@@ -286,7 +285,7 @@ input,
.lobby_buttons-left .lobby_button,
.lobby_buttons-right .lobby_button {
- margin-top: 4px;
+ margin-top: 1.5px;
}
.lobby_buttons-left .lobby_button:last-of-type,
@@ -295,11 +294,11 @@ input,
}
.lobby_buttons-bottom .lobby_button {
- margin-left: 4px;
+ margin-right: 4px;
}
.lobby_buttons-bottom .lobby_button:last-of-type {
- margin-left: 0;
+ margin-right: 0;
}
/**
@@ -332,12 +331,9 @@ input,
/**
* MARK: Main buttons
*/
+.lobby-late_join .lobby-text,
.lobby-toggle_ready .lobby-text {
- transform: translateY(5.25px) translateX(2px);
-}
-
-.lobby-late_join .lobby-text {
- transform: translateY(6.25px) translateX(3px);
+ transform: translateY(6.75px) translateX(3px);
}
.lobby-toggle_ready.bad .lobby-text::before,
diff --git a/modular_bandastation/title_screen/icons/lobby_human_ai.png b/modular_bandastation/title_screen/icons/lobby_human_ai.png
index 3ed39a9caee2831034f89da2efcb47239d1d46fa..77d43346b0e9872a5bf66481cdc66abd7ffc9575 100644
GIT binary patch
delta 128
zcmV-`0Du4C0pbCWX?bKxL_t(2k)@Ff4!|G?L(8_h``>t?`?ydtlf7sHG<-zBB!Dfe
z!d$Qz?n0X3@QUy)@M+7r4EOIdE%dRaKq)Y9UT4;&{y#7-_hY-8#K8EiZ3Hj@ES0?s
iG>5$u&pQ}MYT*DRAqKKjdfI^i0000210?Ll(nZ$
hwU9;W+}!~|77if+2C`6((c}OC002ovPDHLkV1nifGur?F
diff --git a/modular_bandastation/title_screen/icons/lobby_pun_pun.png b/modular_bandastation/title_screen/icons/lobby_pun_pun.png
index c3321ebe89187e0832a30b98b4790d3fc117d599..223df20a42769e91cbe915a4a480563577a4ab00 100644
GIT binary patch
delta 160
zcmV;R0AK(60f7RLX@7%BL_t(2k%f@~7K0!RLz7|L{cmgoPP+K_
O0000Gy0{a1wX@7l5L_t(2k*$$S5`Z8KLlZH2{~JrdPpz;sqn*klH44C?04`-D
z8t}W^!PN0DkcymA?gH>q%SPh>yx*y7scjln&g(U*^lhPefVx8&IFLD+9W{?y$sZ`Y
zo_85s=DXy-EAq}}unt9Ne6)flg0`xC3u+JQqjcV(!DJQ=AQLYJvRYV|b^rhX07*qo
IM6N<$g8Aq}`Tzg`
diff --git a/modular_bandastation/title_screen/icons/lobby_toggle_ready.png b/modular_bandastation/title_screen/icons/lobby_toggle_ready.png
index db1e6d113abc37cf77ff9a9b01b7689fe192ef54..64bc0c186f7e23822f2d20290b84e5b1c63c21c9 100644
GIT binary patch
delta 252
zcmVCTV8>?ef720AzAa9eq!Qy>NNBWu
zDFV~<@-h$`i~%bM^D+diVJWy~5TPEp%w2+8!m6rJ4@4Rtx)OAY?*!3f(_q4p8UKVx
z<3h3OE=c`|p?erdK|w64&%7YSQBV+y>PH|7xEOp|7p(-nA33~`Yco)a2
zyWLJL7>=2Uq+kkr-<5)&3{{7EAkzGFP*Z~W9iZw^4@8=7!J9Ce6VzZv02+d0zzgE>
zhVq0jWarrEpx^grCpF$Ozh2_oM^13kW5D{oJdrQ2fI>%2j9Zxi00003?J>mu8*E(MC?bSJ>V&?{
zgh_KC2xL)$xM1Nk{0L@&n@2zpS0;jXLg>3kKrmLOKE<3rJbwa$p>nYXv%u3MAQ&ni
zZ4&t@KCwwwf=jbD!=yRbB>RH&4sdB&FA_G*DZzML_I@l_*u6<6t{Z6Emvn~}K1Ai+
zt?EtJ0y{L!F*AT*76rXE_p!AB1T&v65Of~^q?>}?C^9t22cj1cK`{y+NLnzAAn_Sq
iP^ATcSArm!&lL;4T1W|ZI7p=c0000
Date: Thu, 9 Jan 2025 01:10:51 +0200
Subject: [PATCH 2/3] Add start and delay control buttons
---
.../title_screen/code/asset_lobby.dm | 3 +-
.../title_screen/code/new_player.dm | 29 ++++++++++++++++--
.../title_screen/code/title_screen_html.dm | 3 +-
.../title_screen/icons/lobby_delay.png | Bin 0 -> 256 bytes
.../title_screen/icons/lobby_start_now.png | Bin 0 -> 254 bytes
5 files changed, 30 insertions(+), 5 deletions(-)
create mode 100644 modular_bandastation/title_screen/icons/lobby_delay.png
create mode 100644 modular_bandastation/title_screen/icons/lobby_start_now.png
diff --git a/modular_bandastation/title_screen/code/asset_lobby.dm b/modular_bandastation/title_screen/code/asset_lobby.dm
index 91cf9a82b7eb5..5653ed19ad0f1 100644
--- a/modular_bandastation/title_screen/code/asset_lobby.dm
+++ b/modular_bandastation/title_screen/code/asset_lobby.dm
@@ -17,7 +17,8 @@
"lobby_changelog.png" = 'modular_bandastation/title_screen/icons/lobby_changelog.png',
"lobby_picture.png" = 'modular_bandastation/title_screen/icons/lobby_picture.png',
"lobby_notice.png" = 'modular_bandastation/title_screen/icons/lobby_notice.png',
- "lobby_css.png" = 'modular_bandastation/title_screen/icons/lobby_css.png',
+ "lobby_start_now.png" = 'modular_bandastation/title_screen/icons/lobby_start_now.png',
+ "lobby_delay.png" = 'modular_bandastation/title_screen/icons/lobby_delay.png',
"lobby_human_ai.png" = 'modular_bandastation/title_screen/icons/lobby_human_ai.png',
"lobby_bridge_assistant.png" = 'modular_bandastation/title_screen/icons/lobby_bridge_assistant.png',
diff --git a/modular_bandastation/title_screen/code/new_player.dm b/modular_bandastation/title_screen/code/new_player.dm
index 7bc6e9854c971..308a073aee19e 100644
--- a/modular_bandastation/title_screen/code/new_player.dm
+++ b/modular_bandastation/title_screen/code/new_player.dm
@@ -80,14 +80,37 @@
lobby_button_sound()
SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/change_title_screen_notice)
- else if(href_list["css"])
- if(!check_rights(R_DEBUG))
+ else if(href_list["start_now"])
+ if(!check_rights(R_SERVER))
log_admin("Title Screen: Possible href exploit attempt by [key_name(usr)]!")
message_admins("Title Screen: Possible href exploit attempt by [key_name(usr)]!")
return
lobby_button_sound()
- SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/change_title_screen_css)
+ SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/start_now)
+
+ else if(href_list["delay"])
+ if(!check_rights(R_SERVER))
+ log_admin("Title Screen: Possible href exploit attempt by [key_name(usr)]!")
+ message_admins("Title Screen: Possible href exploit attempt by [key_name(usr)]!")
+ return
+
+ lobby_button_sound()
+ if(SSticker.current_state > GAME_STATE_PREGAME)
+ return tgui_alert(usr, "Too late... The game has already started!")
+
+ var/static/time = 1.5 MINUTES
+ if(time == 1.5 MINUTES)
+ time = 1984 DAYS
+ else
+ time = 1.5 MINUTES
+
+ SSticker.SetTimeLeft(time)
+ SSticker.start_immediately = FALSE
+ to_chat(world, span_infoplain(span_bold("Игра начнётся через [DisplayTimeText(time)].")), confidential = TRUE)
+ SEND_SOUND(world, sound('sound/announcer/default/attention.ogg'))
+ log_admin("[key_name(usr)] set the pre-game delay to [DisplayTimeText(time)].")
+ BLACKBOX_LOG_ADMIN_VERB("Delay Game Start")
else if(href_list["collapse"])
title_collapsed = !title_collapsed
diff --git a/modular_bandastation/title_screen/code/title_screen_html.dm b/modular_bandastation/title_screen/code/title_screen_html.dm
index d816574a213bb..3e1bd42de4540 100644
--- a/modular_bandastation/title_screen/code/title_screen_html.dm
+++ b/modular_bandastation/title_screen/code/title_screen_html.dm
@@ -97,7 +97,8 @@
html += {""}
html += create_icon_button(player, "picture", "Сменить изображение", "right")
html += create_icon_button(player, "notice", "Оставить уведомление", "right")
- html += create_icon_button(player, "css", "Заменить CSS лобби", "right")
+ html += create_icon_button(player, "delay", "Отложить начало раунда", "right", SSticker && SSticker.current_state <= GAME_STATE_PREGAME)
+ html += create_icon_button(player, "start_now", "Запустить раунд", "right", SSticker && SSticker.current_state <= GAME_STATE_PREGAME)
html += {"
"}
html += {"
diff --git a/modular_bandastation/title_screen/icons/lobby_delay.png b/modular_bandastation/title_screen/icons/lobby_delay.png
new file mode 100644
index 0000000000000000000000000000000000000000..f30763dda7cced2e7f9b862e6beb77234056af65
GIT binary patch
literal 256
zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaAF%}28J29*~C-V{{6W|l#df>o;
z!0@O2yb1#q11-gd8)78&qol`;+0F=&Um;e9(
literal 0
HcmV?d00001
diff --git a/modular_bandastation/title_screen/icons/lobby_start_now.png b/modular_bandastation/title_screen/icons/lobby_start_now.png
new file mode 100644
index 0000000000000000000000000000000000000000..b042c97ee0c7b6960146e67eb72711dc938060cc
GIT binary patch
literal 254
zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaAF%}28J29*~C-V{{6W|l#df>o;
z!0@o`%%i8%J2G9RwJcF=_a#Sv|-s7nrnauToCF?M0SLzI}T*EqvZN
zNPVbKVf$di=E<1v@ZaIK%e!v1;Fp%6x`JQ-Xhg)Vd!-#{8}=yUmh7C
Date: Thu, 9 Jan 2025 01:44:01 +0200
Subject: [PATCH 3/3] Fixes
---
.../title_screen/code/title_screen_html.dm | 8 +++----
.../html/title_screen_default.css | 21 ++++++++++++++----
.../html/title_screen_minimalistic.css | 22 +++++++++++++++----
3 files changed, 39 insertions(+), 12 deletions(-)
diff --git a/modular_bandastation/title_screen/code/title_screen_html.dm b/modular_bandastation/title_screen/code/title_screen_html.dm
index 3e1bd42de4540..a05eccaede06f 100644
--- a/modular_bandastation/title_screen/code/title_screen_html.dm
+++ b/modular_bandastation/title_screen/code/title_screen_html.dm
@@ -71,7 +71,7 @@
if(!trait.can_display_lobby_button(player.client))
continue
- if(number > MAX_STATION_TRAIT_BUTTONS_VERTICAL) // 3 is a maximum
+ if(number > MAX_STATION_TRAIT_BUTTONS_VERTICAL)
break
number++
@@ -95,10 +95,10 @@
html += {""}
html += {""}
- html += create_icon_button(player, "picture", "Сменить изображение", "right")
- html += create_icon_button(player, "notice", "Оставить уведомление", "right")
- html += create_icon_button(player, "delay", "Отложить начало раунда", "right", SSticker && SSticker.current_state <= GAME_STATE_PREGAME)
html += create_icon_button(player, "start_now", "Запустить раунд", "right", SSticker && SSticker.current_state <= GAME_STATE_PREGAME)
+ html += create_icon_button(player, "delay", "Отложить начало раунда", "right", SSticker && SSticker.current_state <= GAME_STATE_PREGAME)
+ html += create_icon_button(player, "notice", "Оставить уведомление", "right")
+ html += create_icon_button(player, "picture", "Сменить изображение", "right")
html += {"
"}
html += {"
diff --git a/modular_bandastation/title_screen/html/title_screen_default.css b/modular_bandastation/title_screen/html/title_screen_default.css
index dd9370352c6b5..f5176d84acb5e 100644
--- a/modular_bandastation/title_screen/html/title_screen_default.css
+++ b/modular_bandastation/title_screen/html/title_screen_default.css
@@ -280,19 +280,32 @@ input,
.lobby_buttons-left,
.lobby_buttons-right {
display: flex;
+}
+
+.lobby_buttons-left {
flex-direction: column-reverse;
}
-.lobby_buttons-left .lobby_button,
-.lobby_buttons-right .lobby_button {
+.lobby_buttons-right {
+ flex-direction: column;
+}
+
+.lobby_buttons-left .lobby_button {
margin-top: 1.5px;
}
-.lobby_buttons-left .lobby_button:last-of-type,
-.lobby_buttons-right .lobby_button:last-of-type {
+.lobby_buttons-left .lobby_button:last-of-type {
margin-top: 0;
}
+.lobby_buttons-right .lobby_button {
+ margin-bottom: 1.5px;
+}
+
+.lobby_buttons-right .lobby_button:last-of-type {
+ margin-bottom: 0;
+}
+
.lobby_buttons-bottom .lobby_button {
margin-right: 4px;
}
diff --git a/modular_bandastation/title_screen/html/title_screen_minimalistic.css b/modular_bandastation/title_screen/html/title_screen_minimalistic.css
index 9725aa7d1c0b7..34ddcdb6eef85 100644
--- a/modular_bandastation/title_screen/html/title_screen_minimalistic.css
+++ b/modular_bandastation/title_screen/html/title_screen_minimalistic.css
@@ -193,6 +193,16 @@ a.lobby_element.good .lobby-text:before {
margin-right: 0.33em;
}
+a.lobby_element.disabled {
+ pointer-events: none;
+ color: hsl(345, 100%, 70%);
+}
+
+a.lobby_element.disabled:after {
+ background-color: hsl(345, 100%, 70%);
+ transform: scaleY(1);
+}
+
/**
* MARK: Traits
*/
@@ -319,16 +329,20 @@ a.lobby_element.good .lobby-text:before {
content: '\f02d';
}
-.lobby-picture .lobby-tooltip .lobby-tooltip-content:before {
- content: '\f03e';
+.lobby-start_now .lobby-tooltip .lobby-tooltip-content:before {
+ content: '\f144';
+}
+
+.lobby-delay .lobby-tooltip .lobby-tooltip-content:before {
+ content: '\f28b';
}
.lobby-notice .lobby-tooltip .lobby-tooltip-content:before {
content: '\f06a';
}
-.lobby-css .lobby-tooltip .lobby-tooltip-content:before {
- content: '\f1c9';
+.lobby-picture .lobby-tooltip .lobby-tooltip-content:before {
+ content: '\f03e';
}
/**