Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Порт системы хоткеев с SS220 Paradise #2065

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Bizzonium
Copy link
Contributor

Vallat: перенес привычные всем на SS220 хоткеи с парадайза, подогнав под них некоторые существующие. В целом всё должно работать, но в идеале протестить не одним мной, хоть я и пробежался по хуманам/роботам/призракам и вроде бы всё нормально.

Для инфинити скорее всего понадобятся твики биндингов клавиш под привычные, а не под наши.

Добавлен хоткей на кобуру, а так же исправлено несрабатывание кнопок для передвижения персонажа
В чем была проблема: DoMove() возвращал флаг совершенного передвижения даже тогда, когда передвижение было отменено из-за кулдауна на это самое передвижение, из-за чего сбрасывалось закэшированное направление передвижения, которое иначе выполнилось бы на следующий тик. Поэтому и возникало ощущение того, что кнопки не откликаются на их нажатие.

За основу был взят этот PR ParadiseSS13/Paradise#11358, однако без AZERTY раскладки.

Changelog

🆑 Vallat
wip: портирована система хоткеев с SS220 Paradise
/:cl:

* Port hotkey system from paradise

* Заменил для некоторых вещей клик СКМ на Альт+СКМ, в целом ни на что не влияет, т.к. у них были аналоги в виде обычного Альт клика
* resolve conflicts

* Хоткей для кобуры
* Фиксы хоткеев

* Гит ну емаё
@Bizzonium Bizzonium changed the title Port hotkeys from SS220 Paradise Порт системы хоткеев с SS220 Paradise Jul 2, 2021
@Bizzonium
Copy link
Contributor Author

Bizzonium commented Jul 2, 2021

TODO: пофиксить дёрганное диагональное движение, сменив glide size

Copy link
Contributor

@quardbreak quardbreak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пробежался по коду, увидел закоммичечные изменения и хз как относиться к этому.
Но есть штуки которые меня интересуют.

@@ -181,3 +181,6 @@
#define COLOR_DARKMODE_BACKGROUND "#202020"
#define COLOR_DARKMODE_DARKBACKGROUND "#171717"
#define COLOR_DARKMODE_TEXT "#a4bad6"

#define COLOR_INPUT_DISABLED "#F0F0F0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Цвета и буквы в них с маленькой. У нас стоит ЮнитТест на это.

@@ -1118,3 +1118,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
M.start_pulling(t)
else
step(user.pulling, get_dir(user.pulling.loc, A))

/proc/REF(input)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Заменить на существующий макрос any2ref, если возможно.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Оно в принципе и не нужно как я понял.

Comment on lines +269 to +272
// if(not_turf_contains_dense_objects(get_turf(get_step(loc, dir)))) //Because of new input system, I don't want to write more cruthes in it
// occupant.dropInto(get_step(loc, dir))
// else
occupant.dropInto(loc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чо за костыли?

Comment on lines +589 to +592
// if(not_turf_contains_dense_objects(get_turf(get_step(loc, dir)))) //Because of new input system, I don't want to write more cruthes in it
// occupant.dropInto(get_step(loc, dir))
// else
occupant.dropInto(loc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Опять же, что за костыли?

@@ -278,7 +278,7 @@
if (occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(get_step(loc, SOUTH))
occupant.forceMove(loc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@IvanDonFon
Copy link
Contributor

Этот ПР добавляет диагональное перемещение?
Это отвратительно

@quardbreak
Copy link
Contributor

О, и не маловажное.
Сделайте диагональное движение как опцию в конфиге.
Так можнл сохранить фичу и контролировать её.

Copy link
Contributor

@quardbreak quardbreak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ещё немного ревью.

Comment on lines +296 to +300
//intent defines
#define INTENT_HELP "help"
#define INTENT_GRAB "grab"
#define INTENT_DISARM "disarm"
#define INTENT_HARM "harm"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно убрать. У нас есть дефайны I_HELP и прочие.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

К тому же это не используется нигде, по крайней мере сейчас.

@@ -10,6 +10,7 @@
#define SS_PRIORITY_ICON_UPDATE 20 // Queued icon updates. Mostly used by APCs and tables.

// Normal
#define SS_PRIORITY_INPUT 1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#define SS_PRIORITY_INPUT 20 по рекомендации Lohikar.

@@ -1118,3 +1118,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
M.start_pulling(t)
else
step(user.pulling, get_dir(user.pulling.loc, A))

/proc/REF(input)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Оно в принципе и не нужно как я понял.

@@ -65,6 +65,9 @@
if(modifiers["middle"])
MiddleClickOn(A)
return 1
if(modifiers["middle"] && modifiers["alt"])
AltMiddleClickOn(A)
return 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это должно быть выше if(modifiers["middle"]) т.к. выше проеряется голый вариант без модификатора альта и отбрасывает последующие проверки.

@github-actions
Copy link

Этот PR был неактивен достаточно долго, поэтому он был автоматически помечен как устаревший. Это означает, что существует риск того, что он будет автоматически закрыт через ~ 7 дней. Пожалуйста, устраните все нерешенные вопросы и убедитесь, что ваш PR завершен. Если ваш PR готов, вы должны попросить специалиста по обслуживанию удалить устаревшую метку на вашем PR, чтобы сбросить таймер. Если вы думаете, что за это время ни один сопровождающий не ответит, вы можете закрыть этот PR самостоятельно и переоткрыть его когда будете готовы.

@github-actions github-actions bot added the Stale Пуллреквесты и Ишшуи, которые давно не обновлялись и кандидаты на закрытие. label Jul 11, 2021
@quardbreak quardbreak added Unclosable Не может быть автоматически закрыто and removed Stale Пуллреквесты и Ишшуи, которые давно не обновлялись и кандидаты на закрытие. labels Jul 11, 2021
@github-actions
Copy link

Этот PR был неактивен достаточно долго, поэтому он был автоматически помечен как устаревший. Это означает, что существует риск того, что он будет автоматически закрыт через ~ 7 дней. Пожалуйста, устраните все нерешенные вопросы и убедитесь, что ваш PR завершен. Если ваш PR готов, вы должны попросить специалиста по обслуживанию удалить устаревшую метку на вашем PR, чтобы сбросить таймер. Если вы думаете, что за это время ни один сопровождающий не ответит, вы можете закрыть этот PR самостоятельно и переоткрыть его когда будете готовы.

@github-actions github-actions bot added the Stale Пуллреквесты и Ишшуи, которые давно не обновлялись и кандидаты на закрытие. label Jul 19, 2021
@quardbreak
Copy link
Contributor

ЭЭ бот ты чё офигел.

@quardbreak quardbreak removed the Stale Пуллреквесты и Ишшуи, которые давно не обновлялись и кандидаты на закрытие. label Jul 19, 2021
@SidVeld
Copy link
Contributor

SidVeld commented Jul 19, 2021

@quardbreak

ЭЭ бот ты чё офигел.
Untitled-2

@github-actions
Copy link

github-actions bot commented Aug 3, 2021

Этот PR был неактивен достаточно долго, поэтому он был автоматически помечен как устаревший. Это означает, что существует риск того, что он будет автоматически закрыт через ~ 14 дней. Пожалуйста, устраните все нерешенные вопросы и убедитесь, что ваш PR завершен. Если ваш PR готов, вы должны попросить специалиста по обслуживанию удалить устаревшую метку на вашем PR, чтобы сбросить таймер. Если вы думаете, что за это время ни один сопровождающий не ответит, вы можете закрыть этот PR самостоятельно и переоткрыть его когда будете готовы.

@github-actions github-actions bot added the Stale Пуллреквесты и Ишшуи, которые давно не обновлялись и кандидаты на закрытие. label Aug 3, 2021
@Archemagus Archemagus removed the Stale Пуллреквесты и Ишшуи, которые давно не обновлялись и кандидаты на закрытие. label Aug 3, 2021
movement_keys = default_movement_keys.Copy()
alt_movement_keys = azerty_movement_keys.Copy()

// Badmins just wanna have fun ♪
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ода юникодовские значки в коментариях

set name = "LOOC"
set desc = "Local OOC, seen only by those in view. Remember: Just because you see someone that doesn't mean they see you."
set category = "OOC"

if(!message)
message = input(src.mob, "", "looc \"text\"") as text|null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Фу так делать, я привык при отправке пустого сообщения что бы оно закрывалось, и не надо было лезть мышкой за крестиком, а теперь его закрыть только тянувшись мышкой

if("F5")
// if(user.keys_held["Shift"])
// user.get_mentor_say()
// else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

комментарии что бы да?

//The "tripped" system is to confirm that flooding is still happening after one spike
//not entirely sure how byond commands interact in relation to lag
//don't want to kick people if a lag spike results in a huge flood of commands being sent
if(cache >= MAX_KEYPRESS_AUTOKICK)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

уже вижу как за то что люди крутятся на стрелочки их кикают pepega


///Check if the key is short enough to even be a real key
if(LAZYLEN(_key) > MAX_KEYPRESS_COMMANDLENGTH)
to_chat(src, "<span class='userdanger'>Invalid KeyDown detected! You have been disconnected from the server automatically.</span>")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

какой страшный текст, можно использовать SPAN_DANGER("")?

switch(_key)
if("F1")
if(keys_held["Ctrl"] && keys_held["Shift"]) // Is this command ever used?
winset(src, null, "command=.options")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это что бы что?

to_chat(user, "<span class='notice'>There's nothing in your backpack to take out.</span>")
return
var/obj/item/stored = equipped_back.contents[equipped_back.contents.len]
if(!stored || stored.on_found(src))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ыыы мусорные комментарии

@@ -0,0 +1,42 @@
# In-code keypress handling system
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

обязательно было делать этот файл .dm? почему бы не .md или как этот формат у гитовского риадми, ну хотя бы .txt

@HaCsO
Copy link
Contributor

HaCsO commented Jan 4, 2022

ПР настолько старый что логов по юниттестам не осталось плак

@IvanDonFon
Copy link
Contributor

Помимо этого, есть информация, что сама система не очень-то рабочая. Большую часть клавиш тупо нельзя переназначить, а некоторые назначения были сломаны, что делает управление очень неудобным. А ещё парадизы - 🤮

@Archemagus Archemagus closed this Jan 7, 2022
@Archemagus Archemagus reopened this Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unclosable Не может быть автоматически закрыто
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants