TF2Maps / TF2MChatBots

An Application that can run various bots for TF2M, but instead just runs VBot
http://vbot.website/
1 stars 3 forks source link

!map and !delete improvements. Automatically remove maps when tested on the server. #8

Closed Trainfire closed 8 years ago

Trainfire commented 8 years ago

1) Map struct is now a class. This is more appropriate than a struct, as a Map is technically an object, and not a value.

The other advantage is that it can be null, so if you use FirstOrDefault (like you did), it will return a null value that you can check against. A struct would just have its default values which isn't particularly useful.

2) Map fields are now properties. It is standard to make exposed values properties instead of fields.

3) New Chat format for !map command:

Under Limit cp_map , cp_map_2 , cp_map_3

Over Limit (Limit of 2) cp_map , cp_map_2 (and 1 more...)

4) New PM format for !map command:

No Notes cp_map // www.link.com cp_map_2 // www.link.com cp_map_3 // www.link.com

With Notes cp_map // www.link.com Notes: Uploaded cp_map_2 // www.link.com cp_map_3 // www.link.com Notes: Added more doggos

5) !delete commands now checks if the map exists and offers feedback:

\ Map Not Found ** "Map 'cp_map' was not found."

Supernova4422 commented 8 years ago

This looks good, I'll merge it soon because I'm too busy to update it right now, but will likely be committed

Trainfire commented 8 years ago

Maps are now automatically removed from the list when they appear on a server.

Supernova4422 commented 8 years ago

The servermodule turning back on is likely to cause crashes within MONO, i'm a bit busy right now to commit it, but in 3 weeks I will and will double check these changes