-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
base: master
Are you sure you want to change the base?
Conversation
* Port hotkey system from paradise * Заменил для некоторых вещей клик СКМ на Альт+СКМ, в целом ни на что не влияет, т.к. у них были аналоги в виде обычного Альт клика
* resolve conflicts * Хоткей для кобуры
* Фиксы хоткеев * Гит ну емаё
TODO: пофиксить дёрганное диагональное движение, сменив glide size |
There was a problem hiding this 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" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Заменить на существующий макрос any2ref, если возможно.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Оно в принципе и не нужно как я понял.
// 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Чо за костыли?
// 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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
Этот ПР добавляет диагональное перемещение? |
О, и не маловажное. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ещё немного ревью.
//intent defines | ||
#define INTENT_HELP "help" | ||
#define INTENT_GRAB "grab" | ||
#define INTENT_DISARM "disarm" | ||
#define INTENT_HARM "harm" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно убрать. У нас есть дефайны I_HELP
и прочие.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это должно быть выше if(modifiers["middle"])
т.к. выше проеряется голый вариант без модификатора альта и отбрасывает последующие проверки.
Этот PR был неактивен достаточно долго, поэтому он был автоматически помечен как устаревший. Это означает, что существует риск того, что он будет автоматически закрыт через ~ 7 дней. Пожалуйста, устраните все нерешенные вопросы и убедитесь, что ваш PR завершен. Если ваш PR готов, вы должны попросить специалиста по обслуживанию удалить устаревшую метку на вашем PR, чтобы сбросить таймер. Если вы думаете, что за это время ни один сопровождающий не ответит, вы можете закрыть этот PR самостоятельно и переоткрыть его когда будете готовы. |
Этот PR был неактивен достаточно долго, поэтому он был автоматически помечен как устаревший. Это означает, что существует риск того, что он будет автоматически закрыт через ~ 7 дней. Пожалуйста, устраните все нерешенные вопросы и убедитесь, что ваш PR завершен. Если ваш PR готов, вы должны попросить специалиста по обслуживанию удалить устаревшую метку на вашем PR, чтобы сбросить таймер. Если вы думаете, что за это время ни один сопровождающий не ответит, вы можете закрыть этот PR самостоятельно и переоткрыть его когда будете готовы. |
ЭЭ бот ты чё офигел. |
|
Этот PR был неактивен достаточно долго, поэтому он был автоматически помечен как устаревший. Это означает, что существует риск того, что он будет автоматически закрыт через ~ 14 дней. Пожалуйста, устраните все нерешенные вопросы и убедитесь, что ваш PR завершен. Если ваш PR готов, вы должны попросить специалиста по обслуживанию удалить устаревшую метку на вашем PR, чтобы сбросить таймер. Если вы думаете, что за это время ни один сопровождающий не ответит, вы можете закрыть этот PR самостоятельно и переоткрыть его когда будете готовы. |
movement_keys = default_movement_keys.Copy() | ||
alt_movement_keys = azerty_movement_keys.Copy() | ||
|
||
// Badmins just wanna have fun ♪ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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>") |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
обязательно было делать этот файл .dm? почему бы не .md или как этот формат у гитовского риадми, ну хотя бы .txt
ПР настолько старый что логов по юниттестам не осталось плак |
Помимо этого, есть информация, что сама система не очень-то рабочая. Большую часть клавиш тупо нельзя переназначить, а некоторые назначения были сломаны, что делает управление очень неудобным. А ещё парадизы - 🤮 |
Vallat: перенес привычные всем на SS220 хоткеи с парадайза, подогнав под них некоторые существующие. В целом всё должно работать, но в идеале протестить не одним мной, хоть я и пробежался по хуманам/роботам/призракам и вроде бы всё нормально.
Для инфинити скорее всего понадобятся твики биндингов клавиш под привычные, а не под наши.
Добавлен хоткей на кобуру, а так же исправлено несрабатывание кнопок для передвижения персонажа
В чем была проблема: DoMove() возвращал флаг совершенного передвижения даже тогда, когда передвижение было отменено из-за кулдауна на это самое передвижение, из-за чего сбрасывалось закэшированное направление передвижения, которое иначе выполнилось бы на следующий тик. Поэтому и возникало ощущение того, что кнопки не откликаются на их нажатие.
За основу был взят этот PR ParadiseSS13/Paradise#11358, однако без AZERTY раскладки.
Changelog
🆑 Vallat
wip: портирована система хоткеев с SS220 Paradise
/:cl: