Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repair - Fix facility is like vehicle #6478

Merged
merged 1 commit into from
Aug 6, 2018

Conversation

Dystopian
Copy link
Contributor

When merged this pull request will:

  • (1) fix config-based facility acts as repair vehicles;
  • fix repair at dead facility (if it's possible);
  • optimize fnc_isInRepairFacility a little.

(1) Config-based facilities have the same config value name as repair vehicles (GVAR(canRepair)). When there is a dead config-based repair vehicle near it becomes repair facility and can affect repair routines. This PR excludes AllVehicles child classes from facilities. Maybe simulation check would be more efficient but I think it's OK.

Copy link
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@PabstMirror
Copy link
Contributor

I'm not sure, but should we also change the default setting to vehicleAndFacility?
This would ensure consistent behaviour with previous versions

https://github.com/acemod/ACE3/blob/master/addons/repair/initSettings.sqf#L61
2->3

@PabstMirror PabstMirror added this to the 3.12.3 milestone Aug 4, 2018
@Dystopian
Copy link
Contributor Author

Dystopian commented Aug 4, 2018

Looks like it was always default repairVehicleOnlyrepairFacilityOnly and now it's the same. It was added by @thojkooi in #186:

value = 2;
values[] = {CSTRING(useAnywhere), CSTRING(repairVehicleOnly), CSTRING(repairFacilityOnly), CSTRING(vehicleAndFacility), ECSTRING(common,Disabled)};

and at the same time module had repairFacilityOnly as default:
class facility { name = CSTRING(repairFacilityOnly); value = 2; default = 1; };

So I think at least his opinion is important.

@kymckay
Copy link
Member

kymckay commented Aug 4, 2018

@Dystopian You mean repairFacilityOnly in the first sentence, right?

@Dystopian
Copy link
Contributor Author

@SilentSpike No, I meant exactly repairVehicleOnly. I decided value is counted from 1 because near

value = 3;
values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_RepairSpecialistOnly)};

@Dystopian
Copy link
Contributor Author

And it was fixed in #2364 😆 Then repairFacilityOnly was default.

@PabstMirror PabstMirror merged commit 2d5892f into acemod:master Aug 6, 2018
@Dystopian Dystopian deleted the fix_repair_facility branch August 6, 2018 16:49
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants