Author Topic: New Duplicator 1.6.2 | Now on BL Glass  (Read 191717 times)

*i double-posted and ruined the joke*
« Last Edit: November 15, 2016, 12:54:26 PM by McZealot »


*i double-posted and ruined the joke*

you also ruined the quote pyramid


It seems that the new duplicator crashes my se

Console

No, you just installed too many add-ons.

Also get rid of system_returntoblockland.zip.

I was kind to expecting that
Also get rid of system_returntoblockland.zip.
I would but i need the rtb preferences

You don't, you have blockland glass for that now

Why are we doing this i just said Yes. Cause this addon is awesome

I'm not using getTrustLevel because it does a lot of unnecessary checks to first figure out the class of each object, when I already know that I'm dealing with a brick and a client.
So my function is a lot faster, while also handling the admin override and stuff.

This is kind of a worst case for the trust check:

-snip img-

Planting the plate requires testing trust with each of the 1x1 plates below. My simple loop runs fast enough that you can't measure it with getRealTime(), but calling getTrustLevel(brick, client) takes 60ms.
I guessed that was the reason, but it still has this issue with my add-on. Any recommendation on how I should do to go around it without packaging all your functions?

I would [remove System_ReturnToBlockland] but i need the rtb preferences

Just in case you didn't get what Zeblote said, Glass has full compatibility with RTB preferences. I've tested it, it works perfectly fine.

I guessed that was the reason, but it still has this issue with my add-on. Any recommendation on how I should do to go around it without packaging all your functions?

I could move these checks to a seperate method that can be packaged:



Would you be able to fix it with that?


I threw this together real quick, not tested:



Would that suffice?

Btw, in its current condition, the lines 150-159 is not used but will be added later due to a new feature I'm adding.



On an another note. What editor are you using? If it's Sublime Text, would you mind tell me where you got that syntax highlighting?

It is sublime text! Whole thing looks like this:




I'm actually not sure how much you need to get the syntax highlight to work.

I installed this theme from package control:
https://packagecontrol.io/packages/Theme%20-%20SoDaReloaded

Then put all this stuff in AppData/Sublime Text 3/Packages/User/:
https://dl.dropboxusercontent.com/u/143512782/ShareX/2016/11/Blah.zip

And this in your preferences:
{
   "always_show_minimap_viewport": true,
   "auto_find_in_selection": true,
   "color_scheme": "Packages/User/Monokai Soda.tmTheme",
   "enable_hexadecimal_encoding": false,
   "ensure_newline_at_eof_on_save": true,
   "font_size": 13,
   "highlight_line": true,
   "highlight_modified_tabs": true,
   "hot_exit": false,
   "ignored_packages":
   [
      "Vintage"
   ],
   "show_full_path": false,
   "show_tab_close_buttons": false,
   "soda_rect_scrollbars": true,
   "soda_tabs_autowidth": true,
   "theme": "SoDaReloaded Dark.sublime-theme"
}




That function you wrote though, looks awfully slow to me... you should never use any string operations in code that needs to run many times.

Yes, Sublime Text is awesome. I use it as well. I got the syntax working. Thanks.

That function you wrote though, looks awfully slow to me... you should never use any string operations in code that needs to run many times.
It sure is. Currently I'm limiting the mod so I don't need to care if it's duplicated or anything. However, I might add some sort of cache to reduce the load significantly. Currently I'm unsure of how to do that so it persists if the brick is duplicated or someone manually modifies the events through an another mod.

Well, this shouldn't be discussed in this topic. I'll try to find a way to make it faster. You make sure you make your code fast and I'll try to optimize mine.
« Last Edit: November 16, 2016, 03:45:44 AM by mctwist »