Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Not another deserialiser!
On the other hand, I've created this .dll to allow a user to keep an up to date struct array of all the blocks in the world with only two lines of code!
Line 1:
public/static Deserialiser.Block[,] b;
Line 2 (at the very start of the con_OnMessage void/delegate):
Deserialiser.Deserialise(m, ref b);
The "Deserialise()" method will filter all incoming bot messages for block messages such as "br" (spikes) and "ts" (signs) and update the struct accordingly, as well as deserialising the world data in "init".
The struct in the Deserialiser called "Block" contains the following data:
- FG - Foreground block ID;
- BG - Background block ID;
- deaths - Deaths needed to open/close a death door or gate;
- coins - Coins needed to open/close a coin door or gate;
- purpleID - ID of a switch, purple door or purple gate;
- soundID - ID of a sound block
- rotation - Rotation of a portal, spike or one-way block (0 = down, 1 = left, 2 = up, 3 = right);
- portalID - ID of a regular or invisible portal
- targetID - Target ID of a regular or invisible portal
- text - Text on a sign, or on Guardian/Mod text
- roomID - Room ID of a world portal
Examples:
string signText = b[50, 50].text; // Gets the text written on a sign at position (50, 50);
if (b[25, 30].FG == 242) { con.Send("say", "Portal at (25, 30)"); } //Announces the presence of a normal portal at (25, 30);
if (b[50, 50].FG == 374) { con.Send("say", "Room ID of world portal: " + b[50, 50].roomID); } //Checks for a world portal at (50, 50).
I'll be updating this software regularly to accompany every EE update that adds new special blocks.
Download Page: http://tomabot.weebly.com/tomabot-deserialiser.html
The .dll comes with an almost foolproof instruction manual. I say "almost" because most don't bother to read the damn thing. (Please do, there's more stuff!)
Enjoy!
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
This seems to be a good alternative to all these frameworks, if you only need init parsing. (And it turns out that my init parse is very popular, so there is a need for it )
but but but... this breaks after updates! and it shouldn't be a great concern, as long as you keep this up to date.
Some suggestions:
- Make this Open Source: Chances are you leave EE some day, all our bots depending on this shouldn't break because of that!
- Put this on NuGet so I get update notifications automatically without having to call your ugly method
- Clear doesn't re-draw the border
- USE THE DAMN NAMING CONVENTIONS
I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.
Offline
[ Started around 1732805615.7732 - Generated in 0.055 seconds, 12 queries executed - Memory usage: 1.39 MiB (Peak: 1.49 MiB) ]