This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where do I find the repair bay code?
Looking to start fiddling with the zero tech and assigned tech at top ideas but need to see how the whole repair code is setup to see if I can.
I think I found part of what I was looking for... So, when repairing a mech does it use fixPart(IPartWork partWork, Person tech) (line 1455 from For the tech list does it call getTech (line 979)? What I can't seem to find is where the techs are sorted. I know at some point it has to call the compare function from techsorter but i can't seem to find this.

If I'm right I should be able to modify getTech to drop the 0 minute techs (provided if refreshes each time a new mech is selected or after each repair) but that still leaves the function that handles the refresh I guess.
Ok, got my 0 minute techs out of the way but it causes an annoying bug. If I try to bring my astech teams up to full strength while some techs has no time left I cannot get the proper amount. It just doesn't count the techs toward the needed number of astech. So, off I go trying to chase down where getTech is called to figure the number of needed astechs.

Does eclipse has a nice find function that will search the ENTIRE project for something? Limiting my search to whatever page has focus is tedious. I miss that from visual studio.. Sad
Right click -> References -> Workspace will show you everywhere in your work space references whatever symbol your cursor is on (variable, method, etc).

Right click -> Declarations -> Workspace will show you everywhere in your work space that declares whatever symbol your cursor is on. 

These two are ridiculously powerful.  Ctrl-Shft-G for References, Ctrl-G for Declarations (the context menu tells you the short cuts to).
I tried the first two in the branch but it didn't work. Should have thought about using it on trunk (which DOES work) but never gave it another thought.

Thanks for the reminder or i never would have thought to try it on trunk after it failed on the branch.

After looking around earlier though I see a lot of places that call getTechs() so I will have to find where the repair bay calls it so I can add a second function or find a way to cleanly alter the original. Fun fun.
I am trying to get a patch started to finish #162 Repair Bay: Assigned Tech at top of list but I can't seem to find where the damaged part is located in the code. I keep going in circles looking for the selected part and how it pulls up the list of techs. getTechs() and its cousins go nowhere as does refreshTechList and several other functions. Help!
Thought I might have had it nailed down in filtertechs() but it turned out to be a dead end. There isn't much in the way of labels for the repair bay tab but the code is so confusing it is difficult to tell what applies to what and where I should look to update the tech list to include the units assigned tech at the top rather than entirely sorted by experience. I know if you click on the unit it brings up a list of parts for repair. Click on a part and it brings up the list of techs.
Just FYI... the code for this is already in my latest work that hasn't been committed. You're way off on what you're doing Wink
Gee thanks lol At least when you do put it up I can kick myself for being so far off base.

The best I could find was getSelectedTech and filterTechs()... I did however manage to get my assigned tech to the top of the "Assign all Tasks" list Smile was wasn't a complete loss.

*EDIT* Just saw that the code was up. I had thought about going for the techsorter code but dismissed it since getTechs was setup to handle the UUID by Deric. Thought that was the proper route so just went with it. Hence, the going around in circles Sad Oh well, its done and will probably make the AtB crowd happy as well as a great many others.
Umm... your code didn't work

(08-01-2014, 12:19 AM)pheonixstorm link Wrote:Umm... your code didn't work


Worked just fine for me... make sure you're checking out the trunk and not my branch. I haven't merged into the branch yet and wont until I'm actually ready to do a release.
I did, though that was also only using the first commit. Did not notice the other two until just now.
(08-01-2014, 12:42 AM)pheonixstorm link Wrote:I did, though that was also only using the first commit. Did not notice the other two until just now.

Well, I literally just fixed the bug, so... yeah lol.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Code review - Time in Service and Refurbishment pheonixstorm 17 5,599 02-01-2016, 01:49 PM
Last Post: BeeRockxs
  Code - Large crew requirements? pheonixstorm 5 2,322 06-17-2014, 09:53 PM
Last Post: pheonixstorm
  Dropping zero minute techs - code questions pheonixstorm 5 2,602 06-09-2014, 04:26 AM
Last Post: pheonixstorm

Forum Jump:

Users browsing this thread: 1 Guest(s)