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

Fixes a freeze when opening the 'Create Object' panel #5125

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

SabreML
Copy link
Member

@SabreML SabreML commented Dec 4, 2023

About the pull request

Removes the long freeze when opening the 'Create Object' interface through the game panel.
This was caused by line 40 of create_object.html, which attempts to fill the object list with every subtype of /obj when the interface is first opened. The "fix" was just removing that line.

<script language="JavaScript">
var old_search = "";
var object_list = document.spawner.object_list;
var object_paths = null /* object types */;
var objects = object_paths == null ? new Array() : object_paths.split(";");
document.spawner.filter.focus();
populateList(objects);
function populateList(from_list) {

This does mean that the user has to search for a type before anything shows up, but I would consider that a pretty minor trade-off.


I also increased the window size so that the 'Spawn' button is on the screen by default, removed a couple of empty values, and added some spaces so that the HTML code lines up a bit more with the final UI.

Explain why it's good for the game

Fixes a 30ish second freeze for admins. (Give or take a bit, but it's still long either way.)

Testing Photographs and Procedure

Videos

Before:

Before.mp4

After:

After.mp4

Changelog

🆑
admin: Fixed a freeze when opening the the 'Create Object' interface.
admin: Adjusted the size and positioning of the 'Create Object/Mob/Turf' panels so that everything fits into the window.
/:cl:

@github-actions github-actions bot added the Admin Make things harder for admins label Dec 4, 2023
@harryob harryob added this pull request to the merge queue Dec 6, 2023
Merged via the queue into cmss13-devs:master with commit 48e26a8 Dec 6, 2023
28 checks passed
cm13-github added a commit that referenced this pull request Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Make things harder for admins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants