Spent today pieceing together the vehicle return system. Much of the old system was still in place with ///TODO:s and ifdefs etc. Kept a yellow notepad out and traced flow diagrams of the various routines. Every vehicle that is reserved or spawned is “posted”, and posted weapons have their own rather complex state engine. The diagrams allowed me to mark off chunks of self-perpetuating complexity.
Around 3pm I went into the code and removed 3,707 lines of code from strtSupply.cpp, strtSpawn.cpp, strtPostedWeaponList.cpp and strtWeaponEntry.cpp, replaced 41 lines in “_returnWeapon” with “unit.deliverWeapon(…);”; changed a line in WeaponsReturn and PostRequest process() functions to call facility->getSupplyingUnit() instead of just using the player’s brigade.
Built it, logged into the server, and began testing that posts/vehicles that are manually returned to the spawn list now work again, including Division->Brigade (overstock is disabled now).
Have to admit I had some distractions but … Ok, so here is the Todo List for tomorrow.
1. Search the host code for the word “country” and visit every instance of its use. 2. Review mission posting rules on the host 3. Investigate why vehicle reservations are not being returned to the free pool.
4. Review with Gophur our “support brigade” solution.
5. Audit use of the word “branch”.
6. Setup vehicle level saving to database.
7. Re-interate automatic resupply.
8. Review LUA scripts.
9. Convert the RDP perl scripts.
10. Review outstanding ///TODO:TOE entries.
- Work with Ramp to get the client allowing cross-country posting
- Various capture testing
- Division->Brigade oversupply
- Depot spawning/missions
- Allow hot swapping of brigade templates?
I have to say, while testing today, it was blaringly obvious that we need to follow this up with the on-the-fly mission system I’ve been going on about since before I started on TOEs.