TODO/2.2/Code Cleanup
Jump to navigation
Jump to search
Some code cleanup is needed as well as finishing some currently unfinished features.
- [open] remove baseCurrent assignments from every place except base selecting (taken by Zenerka)
- See also TODO/2.2/baseCurrent for a summary on the situation and some hints on what is needed.
src/client/cl_aircraft.c: baseCurrent = aircraft->homebase; src/client/cl_main.c: baseCurrent = &gd.bases[0]; src/client/cl_popup.c: baseCurrent = aircraft->homebase; src/client/cl_basemanagement.c: baseCurrent = &gd.bases[baseID]; src/client/cl_basemanagement.c: baseCurrent = &gd.bases[baseID]; src/client/cl_basemanagement.c: baseCurrent = &gd.bases[0]; src/client/cl_basemanagement.c: baseCurrent = &gd.bases[baseID]; src/client/cl_basemanagement.c: baseCurrent = b; src/client/cl_campaign.c: baseCurrent = aircraft->homebase; src/client/cl_campaign.c: baseCurrent = aircraft->homebase; src/client/cl_campaign.c: baseCurrent = AIR_AircraftGetFromIdx(gd.interceptAircraft)->homebase; src/client/cl_campaign.c: baseCurrent = NULL; src/client/cl_basesummary.c: baseCurrent = NULL;
- [done] replace int baseidx in Alien Containment function calls with base pointer (taken by Zenerka)
- [done] handling a mission, the aircraft should be selected by comparing aircraft->mission with selected mission - remove every baseCurrent, baseCurrent->aircraftCurrent usage (see baseCurrent for more), fix team selection (taken by Zenerka)
- [open] clean a mess with assigning employees to buildings and removing them
- [open] cl_basemanagement.c/B_HireForBuilding()
- [open] cl_employee.c/E_AssignEmployeeToBuilding() (currently commented out)
- [open] cl_employee.c/E_RemoveEmployeeFromBuilding()
- [open] destroying building (cl_basemanagement.c/B_BuildingDestroy()) should:
- [done] update capacities
- [open] remove/update personel from building (in case of worker or scientist)
- [done] remove/update aliens for B_ALIEN_CONTAINMENT (taken by Zenerka)
- [open] remove/update items for B_STORAGE - not so easy, because equipment being used by soldiers in teams is still stored in storage too; that needs to be changed first, see Inventory to team assignment TODO entry
- [done] remove antimatter for B_ANTIMATTER
- [done] rename all armor variables to armour - hoehrer started this already
- [done] (try to) merge nameCat and teamDesc arrays - store all info about given character type in one array
- [done] merge craftitems with struct objDef_s - thanks to that no new code will be needed for producing, purchasing, transfering, selling, disassembling, storing subsystems