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

Handling of initial FOB Box, FOB placement #411

Merged
merged 8 commits into from
May 13, 2018
Merged

Handling of initial FOB Box, FOB placement #411

merged 8 commits into from
May 13, 2018

Conversation

veteran29
Copy link
Member

@veteran29 veteran29 commented May 12, 2018

Q A
Bug fix? no
New feature? yes
Needs wipe? YES
Fixed issues #391

Description:

Handling of initial FOB box and functionality of FOB creation

Content:

  • Spawn of the FOB Box on the USS Freedom (only if no FOB has yet been built).
  • Respawn handling if the FOB Box (sunken, destroyed) as long as there is no FOB.
  • Action on the FOB Box for FOB deployment when distance to Freedom exceeds Xm.
  • Deletion of the Box and registering the FOB for the save procedures.
  • FOB marker creation

Tested on:

  • Local MP Vanilla
  • Local MP ACE
  • Dedicated MP Vanilla
  • Dedicated MP ACE

@veteran29 veteran29 self-assigned this May 12, 2018
@veteran29 veteran29 requested a review from Wyqer May 12, 2018 18:16
@Wyqer Wyqer added this to the Sprint 1: Basic CTI Functionalities milestone May 12, 2018

params ["_box", "_player"];

private _canBuild = false;
Copy link
Member

Choose a reason for hiding this comment

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

Guess this false isn't needed.
Just directly the bool condition, which will return true or false.
Maybe even no _canbuild variable at all and just the expression as return value.

*/
params ["_position"];

private _index = count KPLIB_sectors_fobs;
Copy link
Member

Choose a reason for hiding this comment

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

I think this could be an issue later.
Imagine you've 5 FOBs -> index is 5, so it creates KPLIB_fob_5. This is fine so far and now an index would be 6 due to the count.
Now the player loose FOB 2 and creates a new one. Count returns 5 and it would be another KPLIB_fob_5.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe for marker name we could do "KPLIB_fob_" + mapGridPosition _position and after count of FOBs changes I will just loop on every of them and reassign Alphabet names?

Do you think is it even worth to store markers here? I wanted to do it for unification as capturable sectors are stored as markers, FOB is kind of sector too.

Copy link
Member

Choose a reason for hiding this comment

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

I think you're right concerning just store the positions for the FOBs. This also eliminates the need to have the getMarkerPosition conversion.

@veteran29
Copy link
Member Author

I've decided to keep markers instead of positions for consistency. Markers use mapGridPosition for their name so there is no risk of duplicate names.

Function checking if FOB can be build was improved (It does not check if another fob is near but this should be added when we will add actions to fobs as I want to experiment with few different approaches to this problem).

Requesting second review from @Wyqer

@veteran29 veteran29 added Done and removed Review/QA labels May 13, 2018
@veteran29 veteran29 merged commit 55dca4e into v0.97 May 13, 2018
@Wyqer Wyqer mentioned this pull request May 13, 2018
@Wyqer Wyqer deleted the v0.97-391 branch May 18, 2018 05:00
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