Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mctwist

Pages: 1 ... 14 15 16 17 18 [19] 20 21 22 23 24 ... 70
271
Add-Ons / Re: New Duplicator 1.5.2 | Supercut Released
« on: November 15, 2016, 04:36:45 PM »
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.

272
Add-Ons / Re: New Duplicator 1.5.2 | Supercut Released
« on: November 15, 2016, 04:00:43 PM »
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?

273
Add-Ons / Re: New Duplicator 1.5.2 | Supercut Released
« on: November 15, 2016, 03:10:11 PM »
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?

274
Add-Ons / Re: New Duplicator 1.5.2 | Supercut Released
« on: November 15, 2016, 09:58:42 AM »
I found an issue together with Apartment, which refuses to plant selected bricks onto the apartment brick. It is entirely relying on the getTrustLevel function, which most mods should rely on, but I found out that on several places in both server/functions.cs and server/selection.cs you do the check manually. I could note people about this in my add-on by telling them to only plant duplications on bricks that is already planted on the apartment brick, but it sure shouldn't be necessary.

Would you mind finding a way where you could use getTrustLevel or is there anything else I could do to make it compatible with your mod?

275
Add-Ons / Re: Torii Brick (A Big Ass Japanese Gate) [.blend included]
« on: November 12, 2016, 04:22:51 PM »
That's only half of the reason. The brick has uses in a Japanese themed build.
Sorry. One word too much. Fixed.

276
Add-Ons / Re: Torii Brick (A Big Ass Japanese Gate) [.blend included]
« on: November 12, 2016, 03:04:39 PM »
certainly cool but tbh that seems like something that would be really easy to build with normal bricks.
Sure, it is. But he's using this to advertise his Blender BL Exporter. It's a really nice example of how advanced it really is.

277
Add-Ons / Re: [Event] Apartment - Landlord like a boss
« on: November 09, 2016, 02:50:24 AM »
I thought of the idea to add a feature but wanted to see if it's something that anyone will think is useful:

Currently to get build rights directly on the baseplate that got this event enabled, you need to manually specify which these persons are. I think that to make this easier to use, you only give one ownership over the baseplate and then that guy give permission with the trust system to those that should be able to build on it.

Maybe this is even expected to work out of the box... I'll make a version if there is anyone interested in this feature.

278
Add-Ons / Re: Blockland Glass 3.2.0
« on: November 08, 2016, 05:47:44 AM »
Why though? You already have your own system, why not implement preventative measures and have the 'bad messages' never show to begin with?
Like, Blockbot and this never made sense to me. If something is wrong, why let it through and then punish?
I agree with this. Having a bot to check the chat all the time will result in false positives. On the other hand, checking the message before it's sent and apply rules in the server will block the message from reaching the user and tell the user that is doing this to stop is a much better approach. As well as disconnecting the user if it doesn't behave, like for instance when spamming so much that the server cannot handle it that well. You got full control over the chat channel so it shouldn't be a problem doing this, right?

279
Add-Ons / Re: [Server] Autosaver - [Version 2.0] [Beta 3.0 coming soon]
« on: November 07, 2016, 02:35:46 AM »
Well, you did use fileCopy, but you still are using WriteFromToFile in the old saving system. I've taken the liberty to adjust the code so it should work as before.
Support_AutoSaver.zip
Feel free to update it with your current version. Compare server.cs if you don't believe me.

Also, I think I remember now why I made that function: It's because fileCopy does not work with add-ons, hence I made that so I could move out config files to be used outside. It was never intended to be used this way, as it's slower and only works for text files. Not sure if it was fixed or Badspot was not informed or doesn't care.

Btw, maybe remove old code and comments so the reader wont get offended. :cookieMonster:

Looks good and I am awaiting version 3.0 with anticipation.

280
It sure is. That's why it's so odd. Something happened, though. Either someone downloaded something too many times, or he did something himself. No one knows, as Dropbox refuses to give out that kind of information.

What we know now is that he needs to put it somewhere else or no one will be able to download it.

281
Dropbox has a file limit, but it is rare that it happens. I would recommend to use a dedicated host to avoid this issue from raising again. Latency is not an issue, as long as the site is not blocked or the bandwidth is throttled, you're doing fine with any host you seem fit for the subject.

I myself looked over recently on my download links and put them on a dedicated host to avoid this issue to raise.

282

You okay there, buddy?

283
Add-Ons / Re: Blockland Glass 3.1.4
« on: October 21, 2016, 12:57:39 AM »
He doesn't mean a preview image.
The feature was called "Server Info" and it added an extra button to the join server window, and would allow you to press it if you had an rtb server highlighted. When pressed, it would show you a list of add-ons the server had enabled, as well as the player list, their bl_ids, and admin status.
The add-ons list would allow you to click a button to download 'content only' versions of the add-ons the host had through RTB. These would allow you to bypass some of the download time while loading, up until the cache update, in which, this part became a useless feature.
I interpreted it as such. It was too long time for me to remember exactly what the feature included. Thank you for refreshing my memory.

284
Add-Ons / Re: Blockland Glass 3.1.4
« on: October 20, 2016, 06:54:10 AM »
There's a server preview provided by Blockland already:
http://blockland.us/browse.php
Although, it would be nice to have it ingame so you don't need visit the site to get the previews all the time.

285
I couldn't find a way to remove the connection header.
Then how about use "Connection: close"? Shouldn't hurt a tiniest bit and it tells more what your code want to accomplish.

That reminds me. Why print out the errors when they could be put somewhere else?

The user agent is the same one Blockland sends.
I spent a couple of minutes to throw together a function that could get the newest revision from the Development board:
Code: [Select]
<?php
function GetBlocklandRevision()
{
// Prepare http request
$options = [];
$options['http'] = [];
$options['http']['method'] = 'GET';
$options['http']['header'] = "Connection: close\r\n";

$context stream_context_create($options);

// Get content from Development board
$content file_get_contents('https://forum.blockland.us/index.php?board=41.0'false$context);

// Locate revision numbers
preg_match_all("/[^0-9a-zA-Z](r[0-9]{4})[^0-9a-zA-Z]/"$content$result);

// Avoid possible errors that could arise
if (count($result) != || count($result[1]) == 0)
return false;

// Get result and sort it
$result $result[1];
$result rsort($result);

return $result[0];
}

Not perfect, but it indeed works.

Pages: 1 ... 14 15 16 17 18 [19] 20 21 22 23 24 ... 70