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

Add Building Markers #704

Merged
merged 23 commits into from
Mar 8, 2023

Conversation

ampersand38
Copy link
Member

@ampersand38 ampersand38 commented Jan 31, 2023

When merged this pull request will:

  • Add the Building Marker attribute to building objects to add or remove marker from editable buildings, multiple at a time
  • Add setting to create building markers when placing buildings
  • Marker updates when building is moved
  • Marker is deleted if building is deleted
  • https://youtu.be/ZjzdFPfDdwQ

@Kexanone
Copy link
Member

As I mentioned on Discord, I don't really see a use case for enabling markers for individual buildings. I think it makes more sense to have a global setting for it.

@Kexanone Kexanone added the feature Adds a new feature label Jan 31, 2023
@mharis001
Copy link
Member

Do the markers update (position) if the building is moved by Zeus?

@ampersand38
Copy link
Member Author

ampersand38 commented Jan 31, 2023

Not currently. That would definitely be needed for the setting, but wasn't in the workflow I had in mind. (Now it does!)

@mharis001
Copy link
Member

The code for this feature is spread out over 3 components. Let's consolidate all of this functionality in a new component for better maintainability - maybe building_markers.

@mharis001 mharis001 added this to the 1.13.0 milestone Jan 31, 2023
addons/attributes/initAttributes.sqf Outdated Show resolved Hide resolved
addons/attributes/initAttributes.sqf Outdated Show resolved Hide resolved
addons/common/XEH_postInit.sqf Outdated Show resolved Hide resolved
addons/common/functions/fnc_setBuildingMarker.sqf Outdated Show resolved Hide resolved
addons/common/functions/fnc_setBuildingMarker.sqf Outdated Show resolved Hide resolved
addons/common/functions/fnc_setBuildingMarker.sqf Outdated Show resolved Hide resolved
addons/editor/functions/fnc_handleObjectEdited.sqf Outdated Show resolved Hide resolved
addons/editor/functions/fnc_handleObjectEdited.sqf Outdated Show resolved Hide resolved
@ampersand38
Copy link
Member Author

Having an issue where placement preview is making the marker spawn at [-1000, -1000], and then CuratorObjectEdited is not being triggered.

@ampersand38 ampersand38 changed the title Add Building marker attribute Add Building markers Feb 1, 2023
Copy link
Member

@mharis001 mharis001 left a comment

Choose a reason for hiding this comment

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

I think this is mostly good and a nice useful feature. Just needs some cleanup.

addons/placement/functions/fnc_handleObjectPlaced.sqf Outdated Show resolved Hide resolved
addons/area_markers/XEH_preInit.sqf Outdated Show resolved Hide resolved
addons/attributes/initAttributes.sqf Outdated Show resolved Hide resolved
addons/editor/XEH_preInit.sqf Outdated Show resolved Hide resolved
addons/building_markers/script_component.hpp Outdated Show resolved Hide resolved
@mharis001 mharis001 changed the title Add Building markers Add Building Markers Feb 1, 2023
@mharis001
Copy link
Member

mharis001 commented Mar 7, 2023

I did some minor cleanup and fixes. Building markers were being created for all objects when the placement preview was enabled. Also, changed the marker size calculation to take the difference between the two bounding box extremes.

@ampersand38 Please look my changes over and merge when ready.

@ampersand38 ampersand38 merged commit 87b9d3c into zen-mod:master Mar 8, 2023
@ampersand38 ampersand38 deleted the building-bounding-marker branch March 8, 2023 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants