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

Shift some donor jobs flags #1732

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

m-dzianishchyts
Copy link
Collaborator

@m-dzianishchyts m-dzianishchyts commented Jan 5, 2025

Что этот PR делает

Сдвигает оставшиеся джобки, которые я забыл сдвинуть. Теперь уже с миграцией.

-- Сдвигать только указанные биты
UPDATE characters
SET 
    job_engsec_low = (job_engsec_low & ~(1 << 17 | 1 << 18 | 1 << 19 | 1 << 20 | 1 << 21 | 1 << 22)) -- Очистить указанные биты
                     | ((job_engsec_low & (1 << 17 | 1 << 18 | 1 << 19 | 1 << 20 | 1 << 21 | 1 << 22)) << 1), -- Сдвинуть их на 1 бит
    job_engsec_med = (job_engsec_med & ~(1 << 17 | 1 << 18 | 1 << 19 | 1 << 20 | 1 << 21 | 1 << 22))
                     | ((job_engsec_med & (1 << 17 | 1 << 18 | 1 << 19 | 1 << 20 | 1 << 21 | 1 << 22)) << 1),
    job_engsec_high = (job_engsec_high & ~(1 << 17 | 1 << 18 | 1 << 19 | 1 << 20 | 1 << 21 | 1 << 22))
                      | ((job_engsec_high & (1 << 17 | 1 << 18 | 1 << 19 | 1 << 20 | 1 << 21 | 1 << 22)) << 1);

Summary by Sourcery

Chores:

  • Update job bit flags and include a database migration.

@m-dzianishchyts m-dzianishchyts added the 📜 CL не требуется Эти изменения не влияют на игровой процесс или игроки по какой-то причине не должны о них знать label Jan 5, 2025
Copy link

sourcery-ai bot commented Jan 5, 2025

Reviewer's Guide by Sourcery

This PR shifts several job bit flags by one position to the left. It includes a database migration to apply these changes to existing characters.

Class diagram showing job bit flag changes

classDiagram
    class JobFlags {
        <<enumeration>>
        JOB_CADET: 1<<17
        JOB_REPRESENTATIVE_TSF: 1<<18 (was 1<<17)
        JOB_REPRESENTATIVE_USSP: 1<<19 (was 1<<18)
        JOB_DEALER: 1<<20 (was 1<<19)
        JOB_VIP_GUEST: 1<<21 (was 1<<20)
        JOB_BANKER: 1<<22 (was 1<<21)
        JOB_SECURITY_CLOWN: 1<<23 (was 1<<22)
    }
    note for JobFlags "All donor job flags shifted one bit left"
Loading

File-Level Changes

Change Details Files
Shifted job bit flags for several roles.
  • JOB_REPRESENTATIVE_TSF shifted from 1<<17 to 1<<18
  • JOB_REPRESENTATIVE_USSP shifted from 1<<18 to 1<<19
  • JOB_DEALER shifted from 1<<19 to 1<<20
  • JOB_VIP_GUEST shifted from 1<<20 to 1<<21
  • JOB_BANKER shifted from 1<<21 to 1<<22
  • JOB_SECURITY_CLOWN shifted from 1<<22 to 1<<23
modular_ss220/_defines220/code/job_defines.dm

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added the 🔧 Фикс Переписываем ошибку так, чтобы она проявлялась в других обстоятельствах label Jan 5, 2025
@m-dzianishchyts m-dzianishchyts marked this pull request as draft January 5, 2025 10:14
@m-dzianishchyts m-dzianishchyts marked this pull request as ready for review January 5, 2025 10:16
@Legendaxe Legendaxe merged commit dacc106 into ss220club:master Jan 5, 2025
17 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📜 CL не требуется Эти изменения не влияют на игровой процесс или игроки по какой-то причине не должны о них знать 🔧 Фикс Переписываем ошибку так, чтобы она проявлялась в других обстоятельствах
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants