Author Topic: Maintenance time displayed in Intercept Window  (Read 6786 times)

Offline bslaveboy

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Maintenance time displayed in Intercept Window
« on: November 04, 2014, 02:02:42 pm »
Hey guys

I found it annoying to need to click through Bases -> Equip Craft -> <Craft> just to see how long it would be before that particular craft would be ready again. Additionally, the Equip Craft screen only shows how long the current operation will take, then you'd have to look again after repairing (for example) to see how long refuelling would take, then potentially again to see how long re-arming would take before your craft is ready to be deployed.

So I altered the code to add the total maintenance time required before that craft will be available in the Intercept Window. Now you don't have to leave the geoscape screen to know how long it'll take before you can deploy that craft. (See attachments)

I created a branch called add_maintenance_time_to_intercept_window here:
https://github.com/bslaveboy/OpenXcom.git

bslaveboy

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Maintenance time displayed in Intercept Window
« Reply #1 on: November 04, 2014, 03:55:17 pm »
This is lovely. :D

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #2 on: November 04, 2014, 05:08:58 pm »
That's a lovely addition! Have you made a pull request? There's not really any reason not to have that in the main build.

Now I'm just missing changing the order from Repair -> Refuel -> Rearm to Refuel -> Rearm -> Repair to get the most use of the ability to send damaged crafts out again. (If you're willing to send damaged crafts out, as the option enables, you might as well refuel and rearm them.. especially as they are the faster steps).

Offline bslaveboy

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #3 on: November 04, 2014, 05:16:02 pm »
I have put in a pull request. Hopefully done it correctly (I followed the git guide thing).

I'll take a look at the maintenance order thing.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #4 on: November 04, 2014, 05:24:30 pm »
Awesome! I'm looking forward to your work! :D

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #5 on: November 04, 2014, 05:47:55 pm »
Very user-friendly, but I hope you don't forget about localization...
It can be easier for translators if you combine the two strings in a single "REPAIRING (X hours)", because a language with a longer name for "REPAIRING" can abbreviate "hours" to compensate, and vice versa.

Offline bslaveboy

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #6 on: November 04, 2014, 08:17:09 pm »
Very user-friendly, but I hope you don't forget about localization...
It can be easier for translators if you combine the two strings in a single "REPAIRING (X hours)", because a language with a longer name for "REPAIRING" can abbreviate "hours" to compensate, and vice versa.

That's a good point. I did try it by concatenating the maintenance time on to the status, but it seemed a little messy to me (see screenshot), so I went with seperate columns figuring that a truncation would be preferable.

I'm easy though, what does everyone else think? Should I modify it to look like the screenshot below?


Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #7 on: November 04, 2014, 08:39:48 pm »
You know, now that you point it out, since numbers don't all have the same length, and "hour" gets the "s", it doesn't look really lined up in the original example either.

I would be tempted to say it looks better in the 2nd version, although both are pretty much the same to me. Whichever is most convenient in programming and translating would get my vote. I can deal with the look of either.

Offline bslaveboy

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #8 on: November 04, 2014, 09:55:33 pm »
Okay cool... I've changed it so that the hour string is added on to the end of the status.

I think you guys are right and that this makes more sense and should make it easier for translators. Unfortunately, there isn't that much room to work with so I've replaced the brackets with a colon. In French, if I used brackets then it'd get truncated but with a colon there's enough space (just).

Damn... just noticed that the HWP part gets truncated in French. Hmmm.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #9 on: November 04, 2014, 10:23:43 pm »
Hum.. maybe you can move the Status and Weapons/Crew/HWPs columns to the left a bit (and drag the bases along).

Even if it makes sense to have them equally spaced, it doesn't make sense to have extra space in some columns and not enough in others.

Offline bslaveboy

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #10 on: November 05, 2014, 06:25:41 am »
Hum.. maybe you can move the Status and Weapons/Crew/HWPs columns to the left a bit (and drag the bases along).

Even if it makes sense to have them equally spaced, it doesn't make sense to have extra space in some columns and not enough in others.

Yeah, I decided to sleep on it. The columns aren't actually evenly spaced, I had to extend the space for the status column to get English to fit in and reduce the space between the margins.

I'll go through the languages I have and play around with the spacing until hopefully everything fits. :)

Offline bslaveboy

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #11 on: November 05, 2014, 03:23:10 pm »
Okay, I played around a bit with the column widths. Basically, I looked through the language files, found the ones which have the longest strings for STR_CRAFT, STR_BASE, and STR_WEAPONS_CREW_HWPS. I minimised those column lengths to get the maximum possible column width for Status (to add my hour string).

It would probably be better if there was a STR_HR thing so that I could report like, "(5 hrs)" instead of "(5 hours)", but there isn't, and I'm not sure how to add that. For now, I think that this should work okay with lots of languages. There's sometimes a little truncation, but considering the severe width constraints, I can live with that. Polish is a real squeeze.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Maintenance time displayed in Intercept Window
« Reply #12 on: November 05, 2014, 05:03:09 pm »
Looking good! Nice work :) I knew French took longer since being a kid, but it's always impressive to see how short English is compared to other languages.