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

Photo Code Refactoring #4636

Merged
merged 4 commits into from
Oct 12, 2023
Merged

Conversation

Drulikar
Copy link
Contributor

@Drulikar Drulikar commented Oct 11, 2023

About the pull request

This PR is a partial revival of #4584 in addition to just a general refactor of the code it was affecting. Now after every blend or getFlatIcon call there is a CHECK_TICK. Various loops use the as anything usage as possible to help with type checking. Additionally, the descriptions for mobs is a little more fluid, and now there is actually a description for a photo with no mobs in it.

Explain why it's good for the game

This should hopefully mitigate issues where photos cause the server to stutter, but hard to know for sure without testing on live. Also the description was annoyingly rigid.

Testing Photographs and Procedure

Screenshots & Videos

image
(There was an additional space in this photo's description that was since removed)

Changelog

🆑 Drathek
refactor: Refactored camera code to be less blocking, use typechecks less often, and provide somewhat more fluid descriptions to photos.
/:cl:

@github-actions github-actions bot added the Refactor Make the code harder to read label Oct 11, 2023
code/modules/paperwork/photography.dm Outdated Show resolved Hide resolved
code/modules/paperwork/photography.dm Outdated Show resolved Hide resolved
@Huffie56

This comment was marked as resolved.

@Drulikar
Copy link
Contributor Author

hope it won't bother you to much going to put the link to every photo related issues i found here: #4016 #3855 let you check them if you want don't know if this PR is fixing them....

This PR does not address either of those issues.

@Drulikar Drulikar added the Testmerge Candidate we'll test this while you're asleep and the server has 10 players label Oct 11, 2023
Copy link
Member

@fira fira left a comment

Choose a reason for hiding this comment

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

it's all performance and games to add sleeps in the middle of code but unfortunately it also has consequences in terms of integrity and garbage collection...

i think everything else is safe sleep wise. turfs in particular we can shortcut a lot of assumptions in regard to deletions. movable atoms are bit of an issue due to deletion and movement

code/modules/paperwork/photography.dm Show resolved Hide resolved
code/modules/paperwork/photography.dm Show resolved Hide resolved
code/modules/paperwork/photography.dm Outdated Show resolved Hide resolved
code/modules/paperwork/photography.dm Show resolved Hide resolved
@harryob harryob added this pull request to the merge queue Oct 12, 2023
Merged via the queue into cmss13-devs:master with commit 11891d6 Oct 12, 2023
25 checks passed
cm13-github added a commit that referenced this pull request Oct 12, 2023
@Drulikar Drulikar deleted the Drathek_Camera_Tick branch October 12, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Make the code harder to read Testmerge Candidate we'll test this while you're asleep and the server has 10 players
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants