theme fix

This commit is contained in:
Michael Wain 2024-07-04 21:20:38 +03:00
parent 5bdb74e573
commit 42f1a65f3c
3 changed files with 11 additions and 4 deletions

View File

@ -14,7 +14,7 @@ public interface Constants {
String THANK_YOU = "Спасибо.";
String ALREADY_IN_GAME = "Ты уже в игре.";
String CANT_JOIN_NOT_STARTED = "Не могу добавить вас в игру, тк вы не разрешили вам писать сообщения.";
String HELP = "Help";
String HELP = "Смотрите закреп или обратитесь к администратору.";
String START_GAME_BTN = "Начать игру";
String NOT_ADMIN_EXCEPTION = "Вы не администратор";
String ACCOUNT = "Ваша анкета:\ол: %s (смертный: %s, мужчина: %s, женщина: %s)\nВозраст: %d\рофессия: %s (%s)\агаж: %s (%s)\nХобби: %s\nЗдоровье: %s (%s) %d%%, бесплоден: %s";

View File

@ -201,7 +201,7 @@ public class BunkerBot extends TelegramLongPollingBot {
players.get(i).setLuggage((Luggage) BotUtils.getRandomFromList(luggs, random));
players.get(i).setHobby((Hobby) BotUtils.getRandomFromList(hobbies, random));
players.get(i).setHealth((Health) BotUtils.getRandomFromList(healths, random));
if( (random.nextInt(100) >= 60 || (i == (players.size()-1) && isNoOneHasScripts())) && !scripts.isEmpty() ) {
if( (random.nextInt(100) >= 45 || (i == (players.size()-1) && isNoOneHasScripts())) && !scripts.isEmpty() ) {
ActionScript asc = (ActionScript) BotUtils.getRandomFromList(scripts, random);
scripts.removeIf(p -> p.getId().longValue() == asc.getId().longValue());
players.get(i).setScripts(Collections.singletonList(asc));

View File

@ -286,8 +286,9 @@
</th:block>
<th:block th:case="actions">
<div class="mb-3">
<label for="action_body_text" class="form-label" th:text="#{inlaction}"></label>
<textarea class="form-control" id="action_body_text" name="action_body_text" rows="3"></textarea>
<label for="script_editor" class="form-label" th:text="#{inlaction}"></label>
<div class="form-control" id="script_editor"></div>
<!-- <textarea id="action_body_text" name="action_body_text" rows="3"></textarea> -->
</div>
<div class="mb-3">
<label for="action_name_text" class="col-form-label" th:text="#{inlaname}"></label>
@ -321,6 +322,12 @@
</div>
<script src="/static/javascript/base32.js" type="text/javascript"></script>
<script src="/static/javascript/panel-script.js" type="text/javascript"></script>
<script src="/static/javascript/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("script_editor");
editor.setTheme("ace/theme/monokai");
editor.session.setMode("ace/mode/lua");
</script>
</main>
<div th:replace="~{fragments/footer :: div}"></div>
</body>