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

fix LYTHIUM surface names and make always detected on road #29

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ahmed007boss
Copy link

@ahmed007boss ahmed007boss commented Nov 3, 2024

fix LYTHIUM surface names and make always detected on road

What purpose does this PR serve?

  1. Bug
  2. Change
  3. Miscellaneous

What have you changed (In a short summary).

Details:

Why was this change necessary?

Details:

Does this pull request change core HATG functionality?

  1. No
  2. Yes

If yes, what core functionality does it change and why?

HATG Automated Testing Result:

Paste Below

Does this PR resolve any open issues?

  1. No
  2. Yes

If applicable, fill out below.

This PR closes #ISSUENUMBER

Is any extra work required or advised?

  1. No
  2. Yes (Explain below)

Details:

@@ -29,12 +29,16 @@ private _surfaceTexture = toLowerANSI (surfaceTexture _pos);
[_surface, 2, _fnc_scriptName] call HATG_fnc_log;
[_surfaceTexture, 2, _fnc_scriptName] call HATG_fnc_log;

private _surfacesNames = ["grass", "forest", "thorn", "field", "hlina", "trava"];
private _surfacesNames = ["grass", "forest", "thorn", "field", "hlina", "trava","gbr_es_plevel1","gbr_es_tierra1","gbr_es_tierra2","gbr_es_tierra3","gbr_es_tierra10"];
Copy link
Owner

Choose a reason for hiding this comment

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

Rather than giving absolute classnames of surface types, could you not just add "plevel", "tierra"?

In the case that only some of the type123 numbers are actually grass, it would still be better to do the above and make the blacklist actually useful

@@ -29,12 +29,16 @@ private _surfaceTexture = toLowerANSI (surfaceTexture _pos);
[_surface, 2, _fnc_scriptName] call HATG_fnc_log;
[_surfaceTexture, 2, _fnc_scriptName] call HATG_fnc_log;

private _surfacesNames = ["grass", "forest", "thorn", "field", "hlina", "trava"];
private _surfacesNames = ["grass", "forest", "thorn", "field", "hlina", "trava","gbr_es_plevel1","gbr_es_tierra1","gbr_es_tierra2","gbr_es_tierra3","gbr_es_tierra10"];
private _surfacesNamesBlackList = ["gbr_es_tierra12"];
Copy link
Owner

Choose a reason for hiding this comment

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

Why is a blacklist necessary if you are going to only add absolute names?


if !(hatg_setting_surfaces) exitWith {true};
if (hatg_setting_simple) exitWith {true};
if ([_unit] call HATG_fnc_isInBuilding) exitWith {true};
if ([_unit] call HATG_fnc_isInBuilding) exitWith {true;};
if isOnRoad _unit exitWith {false};
Copy link
Owner

Choose a reason for hiding this comment

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

isOnRoad is checked in canCreateMirror. That makes this addition obsolete?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants