commit c6daf954159b01eac13bab2fd0c08eb01624a974 Author: Jacob Schmidt Date: Wed Jan 1 14:35:12 2025 -0600 Initial Repo Setup diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..7450016 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Report a bug related to the framework. +title: "[addon name] - [short description]" +labels: bug +assignees: JSchmidt92 + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Mission file** +The mission where the issue occured. + +**Log file** +The log file generated by the game. + +**Additional context** +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..dba31c7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: Request - [short description] +labels: '' +assignees: JSchmidt92 + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..cc878bf --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,4 @@ +**When merged this pull request will:** +- Describe what this pull request will do +- Each change in a separate line +- Follow title standard `Module - Add|Fix|Improve|Change|Remove things` \ No newline at end of file diff --git a/.github/release_drafter.yml b/.github/release_drafter.yml new file mode 100644 index 0000000..f83a4a4 --- /dev/null +++ b/.github/release_drafter.yml @@ -0,0 +1,33 @@ +branches: + - master + +name-template: "forge_client_v$NEXT_PATCH_VERSION" +tag-template: "$NEXT_PATCH_VERSION" + +categories: + - title: "**ADDED:**" + labels: + - "feature" + - title: "**FIXED:**" + labels: + - "bug fix" + - title: "**IMPROVED:**" + labels: + - "enhancement" + - title: "**CHANGED:**" + labels: + - "cleanup" + +exclude-labels: + - "ignore changelog" + +change-template: "- $TITLE (#$NUMBER)" +template: | + ## Change Log Summary + + $CHANGES + +replacers: + # Category titles + - search: '/\#\# (\*\*(ADDED|FIXED|IMPROVED|CHANGED):\*\*)/g' + replace: "$1" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0b78e31 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +name: Build + +on: + push: + branches: [master] + paths-ignore: + - ".github/**" + - "addons/main/script_version.hpp" + - "docs/**" + - "tools/**" + - "LICENSE" + - "README.md" + - "*.json" + workflow_dispatch: + +jobs: + build: + name: Build + runs-on: ubuntu-22.04 + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Bump Version + id: bump-version + run: python3 tools/version_bumper.py increment_build push_commit + + - name: Setup HEMTT + uses: arma-actions/hemtt@v1 + + - name: Run HEMTT build + run: hemtt release + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: 'stable' + + - name: Initialize or Update Go module + run: | + if [ ! -f go.mod ]; then + go mod init gitea.innovativedevsolutions.org/IDSolutions/client + fi + go get code.gitea.io/sdk/gitea + + - name: Run Release Action + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ steps.bump-version.outputs.VERSION }} + run: go run main.go \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7cd12b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,410 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + +# Hemtt +*.pbo +.hemttout +hemtt +hemtt.exe +*.biprivatekey + + +# Added by cargo + +/target diff --git a/.hemtt/project.toml b/.hemtt/project.toml new file mode 100644 index 0000000..bb6087e --- /dev/null +++ b/.hemtt/project.toml @@ -0,0 +1,21 @@ +name = "FORGE Client" +author = "IDSolutions" +prefix = "forge_client" +mainprefix = "z" + +[files] +include = [ + "*.dll", + "*.so", + "*.json", + "mod.cpp", + "README.md", + "LICENSE", + "icon_64_ca.paa", + "icon_128_ca.paa", + "icon_128_highlight_ca.paa", + "title_co.paa" +] + +[version] +git_hash = 0 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7388a16 --- /dev/null +++ b/LICENSE @@ -0,0 +1,112 @@ +Copyright (c) 2024 IDSolutions + +Brief summary of this Licence + +PLEASE, NOTE THAT THIS SUMMARY HAS NO LEGAL EFFECT AND IS ONLY OF AN INFORMATORY NATURE DESIGNED FOR YOU TO GET THE BASIC INFORMATION ABOUT THE CONTENT OF THIS LICENCE. THE ONLY LEGALLY BINDING PROVISIONS ARE THOSE IN THE ORIGINAL AND FULL TEXT OF THIS LICENCE. + +With this licence you are free to adapt (i.e. modify, rework or update) and share (i.e. copy, distribute or transmit) the material under the following conditions: + + Attribution - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material). + Noncommercial - You may not use this material for any commercial purposes. + Arma Only - You may not convert or adapt this material to be used in other games than Arma. + No Derivatives - If you remix, transform, or build upon the material, you may not distribute the modified material. + +Full version of licence + +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Arma Public License – No Derivatives ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. +Section 1 – Definitions + + Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. + ArmaOnly means primarily intended for or directed towards the use in any of existing and future Arma games, including but not limited to Arma: Cold War Assault, Arma, Arma 2 and Arma 3 and its official sequels and expansion packs. + Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. + Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. + Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. + Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. + Licensor means the individual(s) or entity(ies) granting rights under this Public License. + NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. + Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. + Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. + You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. + +Section 2 – Scope + + License grant + 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: + reproduce and Share the Licensed Material, in whole or in part, for NonCommercial and ArmaOnly purposes only; and + produce and reproduce for NonCommercial and ArmaOnly purposes only, but not Share Adapted Material. + Exceptions and Limitations For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. + Term. The term of this Public License is specified in Section 6(a). + Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. + Downstream recipients. + Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. + No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. + No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(a)(i). + Other rights + Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. + Patent and trademark rights are not licensed under this Public License. + To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial and ArmaOnly purposes. + +Section 3 – License Conditions + +Your exercise of the Licensed Rights is expressly made subject to the following conditions. + + Attribution + + If You Share the Licensed Material, You must: + retain the following if it is supplied by the Licensor with the Licensed Material: + identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); + a copyright notice; + a notice that refers to this Public License; + a notice that refers to the disclaimer of warranties; + a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + indicate if You modified the Licensed Material and retain an indication of any previous modifications; and + indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. + + For the avoidance of doubt, You do not have permission under this Public License to Share Adapted Material. + You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. + If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(a) to the extent reasonably practicable. + +Section 4 – Sui Generis Database Rights + +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: + + for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial and ArmaOnly purposes only, provided You do not Share Adapted Material; + if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and + You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. +Section 5 – Disclaimer of Warranties and Limitation of Liability + + Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. + To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. + The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination + + This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. + + Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: + automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or + upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. + Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions + + The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. + Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. + +Section 8 – Interpretation + + For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. + To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. + No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. + Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. + +Bohemia Interactive Notices + + Bohemia Interactive a.s. is not a party to this License, and makes no warranty whatsoever in connection with the Licensed Material. Bohemia Interactive a.s. will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, Bohemia Interactive a.s. may elect to apply the Public License to material it publishes and in those instances it becomes the "Licensor". + Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s. diff --git a/README.md b/README.md new file mode 100644 index 0000000..1f738b2 --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +

+ + latest-release + + open-issues + + build-status +

+ +Arma 3 FORGE: Build Your Legacy\ +Version: Alpha 0.1.0 + +[Development Status: Active] + +--- + +Step into a new era of military simulation with Arma 3 FORGE, a revolutionary framework that transforms Arma 3 into a dynamic persistent world. Create powerful organizations, manage complex operations, and leave your mark on the battlefield. + +Key Features: +--- +* Strategic Command: From recruitment to deployment, shape your organization into a formidable fighting force. Train operatives, establish hierarchies, and build a name that others will respect or fear +* Living Battlefield: Take on missions that evolve based on your reputation and past actions. Every choice ripples through the world, opening new opportunities or creating powerful enemies +* Financial Empire: Master a deep economic system where success breeds opportunity. Manage operational funds, invest in equipment, and watch your influence grow through smart resource management +* Combat Readiness: Unlock and customize an expanding arsenal of weapons and equipment. Your armory grows with your success, giving your operatives the edge they need +* Logistics Network: Command a fleet of vehicles and assets. From transport to combat support, build the infrastructure that keeps your operations running +* Operations Hub: Transform your headquarters into a powerhouse of strategic planning. Coordinate missions, manage resources, and direct your forces from a central command center +* Global Influence: Form alliances, manipulate rivalries, and navigate complex political landscapes that shift with your actions +* Endless Possibilities: A modular foundation designed for expansion. Seamlessly integrate new content and shape your perfect military simulation +* Connected World: Forge your path in a persistent multiplayer environment where organizations clash and cooperate for dominance + +Arma 3 FORGE delivers a foundation for endless possibilities. Whether commanding elite PMC units, running tactical operations, or building a military empire, your choices create lasting impact. + +Perfect for: +* Commanders seeking strategic depth +* Communities wanting persistent progression +* Players driven by meaningful advancement +* Mod developers building next-gen experiences + +Arma 3 FORGE - Where every decision shapes your legacy, every mission builds your reputation, and every operation writes your story. + +Join us in forging the future of military simulation. + +Coming Features: +* Advanced Multiplayer Competition +* Rival Organization Mechanics + +Support & Contributions +--- +* Lead Developer: Jacob Schmidt +* Contributors: + * Creedcoder for his invaluable assistance and input. +* Special Thanks: To the Arma 3 community for their ongoing support and feedback. + +License: +--- +This mod is licensed under the [Arma Public License (APL-SA)](https://www.bohemia.net/community/licenses/arma-public-license-share-alike). Please refer to the LICENSE file for more information on usage and distribution rights. diff --git a/a3f_client_version.json b/a3f_client_version.json new file mode 100644 index 0000000..1587a66 --- /dev/null +++ b/a3f_client_version.json @@ -0,0 +1,3 @@ +{ + "version": "1.0.0" +} diff --git a/addons/admin/$PBOPREFIX$ b/addons/admin/$PBOPREFIX$ new file mode 100644 index 0000000..68e9f12 --- /dev/null +++ b/addons/admin/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\admin \ No newline at end of file diff --git a/addons/admin/CfgEventHandlers.hpp b/addons/admin/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/admin/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/admin/XEH_PREP.hpp b/addons/admin/XEH_PREP.hpp new file mode 100644 index 0000000..d510380 --- /dev/null +++ b/addons/admin/XEH_PREP.hpp @@ -0,0 +1,7 @@ +PREP(adminMessage); +PREP(adminPromote); +PREP(adminRefresh); +PREP(adminTransfer); +PREP(initAdmin); +PREP(openAdmin); +PREP(printAddonName); \ No newline at end of file diff --git a/addons/admin/XEH_postInit.sqf b/addons/admin/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/admin/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/admin/XEH_postInit_client.sqf b/addons/admin/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/admin/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/admin/XEH_preInit.sqf b/addons/admin/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/admin/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/admin/XEH_preInit_server.sqf b/addons/admin/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/admin/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/admin/XEH_preStart.sqf b/addons/admin/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/admin/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/admin/config.cpp b/addons/admin/config.cpp new file mode 100644 index 0000000..26e0730 --- /dev/null +++ b/addons/admin/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ui\RscCommon.hpp" +#include "ui\RscAdmin.hpp" \ No newline at end of file diff --git a/addons/admin/functions/fnc_adminMessage.sqf b/addons/admin/functions/fnc_adminMessage.sqf new file mode 100644 index 0000000..31115c7 --- /dev/null +++ b/addons/admin/functions/fnc_adminMessage.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" + +private ["_data", "_dialog", "_list", "_target", "_targetValue", "_textBox", "_textMessage"]; + +_dialog = findDisplay 202303; +_list = _dialog displayCtrl 2023001; +_textBox = _dialog displayCtrl 2023006; +_targetValue = lbCurSel _list; +_data = _list lbData _targetValue; + +if ((isNil {_data})) exitWith { hintSilent "You did not select a player!" }; + +{ + if (str (name (_x)) == str _data) then { + _target = _x; + }; +} forEach playableUnits; + +hintSilent format ["Player Selected. You have selected %1", _target]; + +if (isNil "_target") then { + hintSilent "Please Select an Active Player First!" +} else { + _textMessage = ctrlText _textBox; + [_target, _textMessage] remoteExec ["forge_server_misc_fnc_textMessage", 2]; + + // [format ["Message sent to %1:
%2", _target, _textMessage], "blue-grey", 3] call EFUNC(misc,notify); +}; + +["dummy"] call FUNC(adminRefresh); \ No newline at end of file diff --git a/addons/admin/functions/fnc_adminPromote.sqf b/addons/admin/functions/fnc_adminPromote.sqf new file mode 100644 index 0000000..b28272f --- /dev/null +++ b/addons/admin/functions/fnc_adminPromote.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" + +params [["_condition", "", [""]]]; +private ["_data", "_data2", "_dialog", "_list", "_list2", "_paygrade", "_rankValue", "_target", "_targetValue"]; + +_dialog = findDisplay 202303; +_list = _dialog displayCtrl 2023001; +_list2 = _dialog displayCtrl 2023003; +_targetValue = lbCurSel _list; +_rankValue = lbCurSel _list2; +_data = _list lbData _targetValue; +_data2 = call compile format ["%1", (_list2 lbData _rankValue)]; +_paygrade = _data2 select 0; + +if ((isNil {_data})) exitWith { hintSilent "You did not select a player!" }; +{ + if (str (name (_x)) == str _data) then { + _target = _x; + }; +} forEach playableUnits; + +switch (_condition) do { + case ("promote"): { + SETPVAR(_target,PayGrade,_paygrade) + }; + case ("demote"): { + SETPVAR(_target,PayGrade,_paygrade) + }; +}; + +["dummy"] call FUNC(adminRefresh); \ No newline at end of file diff --git a/addons/admin/functions/fnc_adminRefresh.sqf b/addons/admin/functions/fnc_adminRefresh.sqf new file mode 100644 index 0000000..01a1127 --- /dev/null +++ b/addons/admin/functions/fnc_adminRefresh.sqf @@ -0,0 +1,53 @@ +#include "..\script_component.hpp" + +params [["_condition", "", [""]], ["_amount", 0, [0]]]; + +private _newFunds = 0; +private _dialog = findDisplay 202303; +private _list = _dialog displayCtrl 2023001; + +switch (_condition) do { + case ("deduct"): { + _newFunds = companyFunds - _amount; + ctrlSetText [2023002, format ["$%1", (_newFunds call EFUNC(misc,formatNumber))]]; + }; + case ("advance"): { + _newFunds = companyFunds + _amount; + ctrlSetText [2023002, format ["$%1", (_newFunds call EFUNC(misc,formatNumber))]]; + }; + default { + lbClear _list; + + { + if (str (side _x) == str (playerSide)) then { + private _name = name (_x); + private _defaultPaygrade = "E1"; + private _paygrade = GETVAR(_x,PayGrade,_defaultPaygrade); + private _index = _list lbAdd format["%1 - %2", _name, _paygrade]; + + _list lbSetData [_index, name (_x)]; + }; + } forEach playableUnits; + + lbSetCurSel [2023001, 0]; + ctrlSetText [2023005, ""]; + ctrlSetText [2023006, ""]; + }; +}; + +lbClear _list; + +{ + if (str (side _x) == str (playerSide)) then { + private _name = name (_x); + private _defaultPaygrade = "E1"; + private _paygrade = GETVAR(_x,PayGrade,_defaultPaygrade); + private _index = _list lbAdd format["%1 - %2", _name, _paygrade]; + + _list lbSetData [_index, name (_x)]; + }; +} forEach playableUnits; + +lbSetCurSel [2023001, 0]; +ctrlSetText [2023005, ""]; +ctrlSetText [2023006, ""]; \ No newline at end of file diff --git a/addons/admin/functions/fnc_adminTransfer.sqf b/addons/admin/functions/fnc_adminTransfer.sqf new file mode 100644 index 0000000..9e64d41 --- /dev/null +++ b/addons/admin/functions/fnc_adminTransfer.sqf @@ -0,0 +1,92 @@ +#include "..\script_component.hpp" + +params [["_condition", "", [""]]]; + +private _dialog = findDisplay 202303; +private _list = _dialog displayCtrl 2023001; +private _targetValue = lbCurSel _list; +private _data = _list lbData _targetValue; +private _amount = round (parseNumber (ctrlText 2023005)); + +if ((isNil {_data})) exitWith { hint "You did not select a player!" }; + +{ + if (str (name (_x)) == str _data) then { + private _target = _x; + }; +} count playableUnits; + +switch (_condition) do { + case ("advance"): { + private _bank = GETVAR(_target,FORGE_Bank,0); + private _newBalance = _bank + _amount; + + if (_amount > companyFunds) exitWith { ["Not enough money in the company's account!", "warning", 3] call EFUNC(misc,notify) }; + + SETPVAR(_target,FORGE_Bank,_newBalance); + + ["deduct", _amount] call FUNC(adminRefresh); + ["deduct", _amount] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + }; + case ("advanceAll"): { + private _count = count playableUnits; + + if ((10000 * _count) > companyFunds) exitWith { ["Not enough money in the company's account!", "warning", 3] call EFUNC(misc,notify) }; + + { + private _bank = GETVAR(_x,Cash_Bank,0); + private _newBalance = _bank + 10000; + + SETPVAR(_x,Cash_Bank,_newBalance); + } count playableUnits; + + ["deduct", (10000 * _count)] call FUNC(adminRefresh); + ["deduct", (10000 * _count)] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + }; + case ("deduct"): { + private _bank = GETVAR(_target,FORGE_Bank,0); + private _newBalance = _bank - _amount; + + if (_amount > _bank) exitWith { ["Not enough money in the player's account!", "warning", 3] call EFUNC(misc,notify) }; + + SETPVAR(_target,FORGE_Bank,_newBalance); + + ["advance", _amount] call FUNC(adminRefresh); + ["advance", _amount] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + }; + case ("payday"): { + private _totalPayment = 0; + private _paymentToDo = []; + private _payGrades = (missionConfigFile >> "FORGE_CfgPaygrades" >> "payGrades") call BIS_fnc_getCfgData; + + { + private _player = _x; + private _payGrade = GETVAR(_player,PayGrade,nil); + + { + _x params ["_payGradeIndex", "_payGradeBonus"]; + + if ((_x select 0) == _payGrade) then { + _paymentToDo pushBack [_player, _payGradeBonus]; + _totalPayment = _totalPayment + _payGradeBonus; + }; + } forEach _payGrades; + } count playableUnits; + + if (_totalPayment > companyFunds) exitWith { ["Not enough money in the company's account!", "warning", 3] call EFUNC(misc,notify) }; + + { + _x params ["_player", "_bonus"]; + + private _bank = GETVAR(_player,FORGE_Bank,0); + private _newBalance = _bank + _bonus; + + SETPVAR(_player,FORGE_Bank,_newBalance); + } count _paymentToDo; + + ["deduct", _totalPayment] call FUNC(adminRefresh); + ["deduct", _totalPayment] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + }; +}; + +ctrlSetText [2023005, ""]; \ No newline at end of file diff --git a/addons/admin/functions/fnc_initAdmin.sqf b/addons/admin/functions/fnc_initAdmin.sqf new file mode 100644 index 0000000..5ce6fed --- /dev/null +++ b/addons/admin/functions/fnc_initAdmin.sqf @@ -0,0 +1,18 @@ +#include "..\script_component.hpp" + +{ + private _configName = configName(_x); + private _className = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "className") call BFUNC(getCfgData); + private _pos = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "pos") call BFUNC(getCfgData); + private _dir = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "dir") call BFUNC(getCfgData); + + private _cpof = createSimpleObject [_className, [0, 0, 0]]; + + _cpof setPosATL _pos; + _cpof setDir _dir; + _cpof allowDamage false; + _cpof setVariable ["isCPOF", true, true]; + + diag_log text format ["[FORGE Admin] ClassName: '%1' Pos: '%2' Dir: '%3'", _className, _pos, _dir]; + +} forEach ("true" configClasses (missionConfigFile >> "CfgCpofs" >> "cpofs")); \ No newline at end of file diff --git a/addons/admin/functions/fnc_openAdmin.sqf b/addons/admin/functions/fnc_openAdmin.sqf new file mode 100644 index 0000000..d8b17ba --- /dev/null +++ b/addons/admin/functions/fnc_openAdmin.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" + +disableSerialization; +createDialog "RscAdmin"; + +private _dialog = findDisplay 202303; +private _list = _dialog displayCtrl 2023001; +private _list2 = _dialog displayCtrl 2023003; + +{ + if (str (side _x) == str (playerSide)) then { + private _name = name (_x); + private _payGrade = GETVAR(_x,paygrade,nil); + private _index = _list lbAdd format["%1 - %2", _name, _payGrade]; + + _list lbSetData [_index, _name]; + }; +} count (allPlayers); + +lbSetCurSel [2023001, 0]; + +private _payGrades = (missionConfigFile >> "FORGE_CfgPaygrades" >> "payGrades") call BFUNC(getCfgData); + +{ + private _index = _list2 lbAdd format ["%1 - $%2", (_x select 0), ((_x select 1) call EFUNC(misc,formatNumber))]; + + _list2 lbSetData [_index, str _x]; +} forEach _payGrades; + +lbSetCurSel [2023003, 0]; +ctrlSetText [2023002, format ["$%1", (companyFunds call EFUNC(misc,formatNumber))]]; \ No newline at end of file diff --git a/addons/admin/functions/fnc_printAddonName.sqf b/addons/admin/functions/fnc_printAddonName.sqf new file mode 100644 index 0000000..511d7b1 --- /dev/null +++ b/addons/admin/functions/fnc_printAddonName.sqf @@ -0,0 +1,3 @@ +#include "..\script_component.hpp" + +systemChat format ["Thank you for using the %1", 'ADDON']; \ No newline at end of file diff --git a/addons/admin/script_component.hpp b/addons/admin/script_component.hpp new file mode 100644 index 0000000..0b5b258 --- /dev/null +++ b/addons/admin/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT admin +#define COMPONENT_BEAUTIFIED Admin +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_ADMIN + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_ADMIN + #define DEBUG_SETTINGS DEBUG_SETTINGS_ADMIN +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/admin/ui/RscAdmin.hpp b/addons/admin/ui/RscAdmin.hpp new file mode 100644 index 0000000..8c07dc0 --- /dev/null +++ b/addons/admin/ui/RscAdmin.hpp @@ -0,0 +1,190 @@ +class RscAdmin { + idd = 202303; + class Controls { + class RscAdminFrame: RscText { + idc = -1; + colorBackground[] = {0,0.25,0.5,1}; + colorText[] = {1,1,1,1}; + text = ""; + x = "0.25 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.5 * safezoneW"; + h = "0.725 * safezoneH"; + }; + class RscAdminPage: RscText { + idc = -1; + colorBackground[] = {1,1,1,1}; + colorText[] = {0,0,0,1}; + text = ""; + x = "0.25 * safezoneW + safezoneX"; + y = "0.1575 * safezoneH + safezoneY"; + w = "0.5 * safezoneW"; + h = "0.6925 * safezoneH"; + }; + class RscAdminRefresh: RscButton { + idc = -1; + colorText[] = {1,1,1,1}; + onButtonClick = "[""dummy""] call forge_client_admin_fnc_adminRefresh;"; + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; + text = "Refresh"; + x = "0.38625 * safezoneW + safezoneX"; + y = "0.2 * safezoneH + safezoneY"; + w = "0.05 * safezoneW"; + h = "0.0275 * safezoneH"; + }; + class RscAdminActive: RscText { + idc = -1; + colorBackground[] = {1,1,1,1}; + colorText[] = {0,0,0,1}; + text = "Active Operators: "; + sizeEx = 0.035; + x = "0.275 * safezoneW + safezoneX"; + y = "0.1775 * safezoneH + safezoneY"; + w = "0.1 * safezoneW"; + h = "0.05 * safezoneH"; + }; + class RscAdminUserList: RscListBox { + idc = 2023001; + x = "0.275 * safezoneW + safezoneX"; + y = "0.25 * safezoneH + safezoneY"; + w = "0.16125 * safezoneW"; + h = "0.555 * safezoneH"; + colorBackground[] = {0,0,0,0.25}; + tooltip = "Double Click to Activate an Operator Selection"; //--- ToDo: Localize; + }; + class RscAdminCash: RscText { + idc = -1; + colorText[] = {0,0,0,1}; + text = "Company Account Balance:"; + sizeEx = 0.035; + x = "0.575 * safezoneW + safezoneX"; + y = "0.2 * safezoneH + safezoneY"; + w = "0.075 * safezoneW"; + h = "0.05 * safezoneH"; + }; + class RscAdminCashSum: RscText { + idc = 2023002; + colorText[] = {0,0,0,1}; + text = ""; + sizeEx = 0.035; + x = "0.65 * safezoneW + safezoneX"; + y = "0.2 * safezoneH + safezoneY"; + w = "0.075 * safezoneW"; + h = "0.05 * safezoneH"; + }; + class RscAdminRank: RscCombo { + idc = 2023003; + text = "SELECT RANK"; + x = "0.575 * safezoneW + safezoneX"; + y = "0.2775 * safezoneH + safezoneY"; + w = "0.1 * safezoneW"; + h = "0.0275 * safezoneH"; + }; + class RscAdminPromote: RscButton { + idc = -1; + colorText[] = {1,1,1,1}; + onButtonClick = "['promote'] call forge_client_admin_fnc_adminPromote;"; + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; + text = "Promote"; + x = "0.675 * safezoneW + safezoneX"; + y = "0.2775 * safezoneH + safezoneY"; + w = "0.05 * safezoneW"; + h = "0.0275 * safezoneH"; + tooltip = "Promote the player currently selected."; //--- ToDo: Localize; + }; + class RscAdminVal1: RscEdit { + idc = 2023005; + colorText[] = {0,0,0,1}; + text = ""; + x = "0.45 * safezoneW + safezoneX"; + y = "0.2 * safezoneH + safezoneY"; + w = "0.1125 * safezoneW"; + h = "0.0275 * safezoneH"; + tooltip = "Enter a dollar amount here"; //--- ToDo: Localize; + }; + class RscAdminAdvance: RscButton { + idc = -1; + colorText[] = {1,1,1,1}; + onButtonClick = "['advance'] call forge_client_admin_fnc_adminTransfer;"; + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; + text = "Advance"; + x = "0.45 * safezoneW + safezoneX"; + y = "0.25 * safezoneH + safezoneY"; + w = "0.05 * safezoneW"; + h = "0.0275 * safezoneH"; + tooltip = "Advance the amount in the box to the player currently selected."; //--- ToDo: Localize; + }; + class RscAdminDeduct: RscButton { + idc = -1; + colorText[] = {1,1,1,1}; + onButtonClick = "['deduct'] call forge_client_admin_fnc_adminTransfer;"; + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; + text = "Deduct"; + x = "0.5125 * safezoneW + safezoneX"; + y = "0.25 * safezoneH + safezoneY"; + w = "0.05 * safezoneW"; + h = "0.0275 * safezoneH"; + tooltip = "Deduct the amount in the box to the player currently selected."; //--- ToDo: Localize; + }; + class RscAdminAdvanceAll: RscButton { + idc = -1; + colorText[] = {1,1,1,1}; + onButtonClick = "['advanceAll'] call forge_client_admin_fnc_adminTransfer;"; + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; + text = "$10K To All"; + x = "0.45 * safezoneW + safezoneX"; + y = "0.3 * safezoneH + safezoneY"; + w = "0.05 * safezoneW"; + h = "0.0275 * safezoneH"; + tooltip = "Advance $10,000 to each connected player from the company budget."; //--- ToDo: Localize; + }; + class RscAdminPayday: RscButton { + idc = -1; + colorText[] = {1,1,1,1}; + onButtonClick = "['payday'] call forge_client_admin_fnc_adminTransfer;"; + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; + text = "Payday"; + x = "0.5125 * safezoneW + safezoneX"; + y = "0.3 * safezoneH + safezoneY"; + w = "0.05 * safezoneW"; + h = "0.0275 * safezoneH"; + tooltip = "Players Payday."; //--- ToDo: Localize; + }; + class RscAdminVal2: RscEdit { + idc = 2023006; + x = "0.45 * safezoneW + safezoneX"; + y = "0.35 * safezoneH + safezoneY"; + w = "0.275 * safezoneW"; + h = "0.15 * safezoneH"; + style = "0x10"; + lineSpacing = 1; + tooltip = "Type a message here."; //--- ToDo: Localize; + }; + class RscAdminSend: RscButton { + idc = -1; + colorText[] = {1,1,1,1}; + onButtonClick = "[] call forge_client_admin_fnc_adminMessage;"; + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; + text = "Send Message"; + x = "0.6125 * safezoneW + safezoneX"; + y = "0.525 * safezoneH + safezoneY"; + w = "0.1125 * safezoneW"; + h = "0.0275 * safezoneH"; + tooltip = "Select an operator from the list, type a message, and hit this button to send it, "; //--- ToDo: Localize; + }; + class RscAdminExit: RscButton { + idc = -1; + colorBackground[] = {0.9,0,0,1}; + colorBackgroundActive[] = {1,0,0,1}; + colorFocused[] = {0.9,0,0,1}; + colorText[] = {1,1,1,1}; + onButtonClick = "closeDialog 0;"; + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; + text = "X"; + x = "0.73 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.02 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + }; +}; \ No newline at end of file diff --git a/addons/admin/ui/RscCommon.hpp b/addons/admin/ui/RscCommon.hpp new file mode 100644 index 0000000..9170d02 --- /dev/null +++ b/addons/admin/ui/RscCommon.hpp @@ -0,0 +1,268 @@ +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// Default grid +// #define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) +// #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) +// #define GUI_GRID_W (GUI_GRID_WAbs / 40) +// #define GUI_GRID_H (GUI_GRID_HAbs / 25) +// #define GUI_GRID_X (safezoneX) +// #define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) + +// Default text sizes +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +class ScrollBar; +class RscObject; +class RscText; +class RscTextSmall; +class RscTitle; +class RscProgress; +class RscProgressNotFreeze; +class RscPicture; +class RscLadderPicture; +class RscPictureKeepAspect; +class RscHTML; +class RscButton; +class RscShortcutButton; +class RscButtonSmall; +class RscEdit; +class RscCombo; +class RscListBox; +class RscListNBox; +class RscXListBox; +class RscTree; +class RscSlider; +class RscSliderH; +class RscXSliderH; +class RscActiveText; +class RscStructuredText; +class RscControlsGroup; +class RscToolbox; +class RscMapControl; +class RscCheckBox; +class RscFrame; +class ctrlDefault; +class ctrlControlsGroup; +class ctrlDefaultText; +class ctrlDefaultButton; +class RscBackgroundStripeTop; +class RscBackgroundStripeBottom; +class RscIGText; +class RscIGProgress; +class RscListBoxKeys; +class RscControlsGroupNoScrollbars; +class RscControlsGroupNoHScrollbars; +class RscControlsGroupNoVScrollbars; +class RscLine; +class RscActivePicture; +class RscButtonTextOnly; +class RscShortcutButtonMain; +class RscButtonEditor; +class RscIGUIShortcutButton; +class RscGearShortcutButton; +class RscButtonMenu; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenuSteam; +class RscLoadingText; +class RscIGUIListBox; +class RscIGUIListNBox; +class RscBackground; +class RscBackgroundGUI; +class RscBackgroundGUILeft; +class RscBackgroundGUIRight; +class RscBackgroundGUIBottom; +class RscBackgroundGUITop; +class RscBackgroundGUIDark; +class RscBackgroundLogo; +class RscMapControlEmpty; +class RscVignette; +class CA_Mainback; +class CA_Back; +class CA_Title_Back; +class CA_Black_Back; +class CA_Title; +class CA_Logo; +class CA_Logo_Small; +class CA_RscButton; +class CA_RscButton_dialog; +class CA_Ok; +class CA_Ok_image; +class CA_Ok_image2; +class CA_Ok_text; +class ctrlCheckbox; +class ctrlCheckboxBaseline; +class ctrlStatic; +class ctrlControlsGroupNoScrollbars; +class ctrlStructuredText; +class RscTextMulti; +class RscTreeSearch; +class RscVideo; +class RscVideoKeepAspect; +class RscActivePictureKeepAspect; +class RscEditMulti; +class RscMapSignalBackground; +class RscMapSignalPicture; +class RscMapSignalText; +class RscColorPicker; +class RscInterlacingScreen; +class RscFeedback; +class RscTrafficLight; +class RscButtonSearch; +class RscIGUIText; +class RscOpticsText; +class RscOpticsValue; +class RscIGUIValue; +class RscButtonMenuMain; +class RscButtonTestCentered; +class RscDisplaySingleMission_ChallengeOverviewGroup; +class RscDisplayDebriefing_RscTextMultiline; +class RscDisplayDebriefing_ListGroup; +class RscButtonArsenal; +class RscTextNoShadow; +class RscButtonNoColor; +class RscToolboxButton; +class ctrlStaticPicture; +class ctrlStaticPictureKeepAspect; +class ctrlStaticPictureTile; +class ctrlStaticFrame; +class ctrlStaticLine; +class ctrlStaticMulti; +class ctrlStaticBackground; +class ctrlStaticOverlay; +class ctrlStaticTitle; +class ctrlStaticFooter; +class ctrlStaticBackgroundDisable; +class ctrlStaticBackgroundDisableTiles; +class ctrlButton; +class ctrlButtonPicture; +class ctrlButtonPictureKeepAspect; +class ctrlButtonOK; +class ctrlButtonCancel; +class ctrlButtonClose; +class ctrlButtonToolbar; +class ctrlButtonSearch; +class ctrlButtonExpandAll; +class ctrlButtonCollapseAll; +class ctrlButtonFilter; +class ctrlEdit; +class ctrlEditMulti; +class ctrlSliderV; +class ctrlSliderH; +class ctrlCombo; +class ctrlComboToolbar; +class ctrlListbox; +class ctrlToolbox; +class ctrlToolboxPicture; +class ctrlToolboxPictureKeepAspect; +class ctrlCheckboxes; +class ctrlCheckboxesCheckbox; +class ctrlProgress; +class ctrlHTML; +class ctrlActiveText; +class ctrlActivePicture; +class ctrlActivePictureKeepAspect; +class ctrlTree; +class ctrlControlsGroupNoHScrollbars; +class ctrlControlsGroupNoVScrollbars; +class ctrlShortcutButton; +class ctrlShortcutButtonOK; +class ctrlShortcutButtonCancel; +class ctrlShortcutButtonSteam; +class ctrlXListbox; +class ctrlXSliderV; +class ctrlXSliderH; +class ctrlMenu; +class ctrlMenuStrip; +class ctrlMap; +class ctrlMapEmpty; +class ctrlMapMain; +class ctrlListNBox; +class ctrlCheckboxToolbar; \ No newline at end of file diff --git a/addons/ambient/$PBOPREFIX$ b/addons/ambient/$PBOPREFIX$ new file mode 100644 index 0000000..7bd77ab --- /dev/null +++ b/addons/ambient/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\ambient \ No newline at end of file diff --git a/addons/ambient/CfgEventHandlers.hpp b/addons/ambient/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/ambient/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/ambient/XEH_PREP.hpp b/addons/ambient/XEH_PREP.hpp new file mode 100644 index 0000000..8e0994d --- /dev/null +++ b/addons/ambient/XEH_PREP.hpp @@ -0,0 +1 @@ +PREP(ambientSound); \ No newline at end of file diff --git a/addons/ambient/XEH_postInit.sqf b/addons/ambient/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/ambient/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/ambient/XEH_postInit_client.sqf b/addons/ambient/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/ambient/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/ambient/XEH_preInit.sqf b/addons/ambient/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/ambient/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/ambient/XEH_preInit_server.sqf b/addons/ambient/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/ambient/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/ambient/XEH_preStart.sqf b/addons/ambient/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/ambient/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/ambient/config.cpp b/addons/ambient/config.cpp new file mode 100644 index 0000000..338b901 --- /dev/null +++ b/addons/ambient/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/ambient/functions/fnc_ambientSound.sqf b/addons/ambient/functions/fnc_ambientSound.sqf new file mode 100644 index 0000000..e32818d --- /dev/null +++ b/addons/ambient/functions/fnc_ambientSound.sqf @@ -0,0 +1,47 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_ambient_fnc_ambientSound + * Author: J.Schmidt + * Edit: 07.15.2024 + * Copyright © 2024 J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Create a sound source and play an ambient sfx sound. + * + * Arguments: + * 0: The sound source + * 1: The name of the SFX sound + * 2: Number of seconds before SFX sound will be deleted + * + * Return Value: + * N/A + * + * Examples: + * [this, "sfx_sound_name"] spawn forge_client_ambient_fnc_ambientSound + * + * Public: Yes + */ + +params [["_source", nil, [objNull, 0, [], sideUnknown, grpNull, ""]], ["_sfx", "", [""]], ["_time", nil, [0]]]; + +private _sound0 = createSoundSource [_sfx, position _source, [], 0]; + +while { alive _source } do { + if (!isNil "_time") exitWith { + uiSleep _time; + deleteVehicle _sound0; + }; + + uiSleep 5; + + if (!alive _source) exitWith { + deleteVehicle _sound0; + }; +}; \ No newline at end of file diff --git a/addons/ambient/script_component.hpp b/addons/ambient/script_component.hpp new file mode 100644 index 0000000..ba89f43 --- /dev/null +++ b/addons/ambient/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT ambient +#define COMPONENT_BEAUTIFIED Ambient +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_AMBIENT + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_AMBIENT + #define DEBUG_SETTINGS DEBUG_SETTINGS_AMBIENT +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/arsenal/$PBOPREFIX$ b/addons/arsenal/$PBOPREFIX$ new file mode 100644 index 0000000..cad3088 --- /dev/null +++ b/addons/arsenal/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\arsenal \ No newline at end of file diff --git a/addons/arsenal/CfgEventHandlers.hpp b/addons/arsenal/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/arsenal/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/arsenal/XEH_PREP.hpp b/addons/arsenal/XEH_PREP.hpp new file mode 100644 index 0000000..910b7e3 --- /dev/null +++ b/addons/arsenal/XEH_PREP.hpp @@ -0,0 +1,8 @@ +PREP(addArmoryItem); +PREP(addGarageVehicle); +PREP(addVirtualVehicle); +PREP(initArsenal); +PREP(openArmory); +PREP(openGarage); +PREP(saveUnlocks); +PREP(updateUnlocks); \ No newline at end of file diff --git a/addons/arsenal/XEH_postInit.sqf b/addons/arsenal/XEH_postInit.sqf new file mode 100644 index 0000000..9ac9b55 --- /dev/null +++ b/addons/arsenal/XEH_postInit.sqf @@ -0,0 +1,10 @@ +#include "script_component.hpp" + +[{ + GETVAR(player,value_loadDone,false) +}, { + private _armoryUnlocks = GETVAR(player,Armory_Unlocks,[]); + private _garageUnlocks = GETVAR(player,Garage_Unlocks,[]); + + [_armoryUnlocks, _garageUnlocks] call FUNC(initArsenal); +}] call CFUNC(waitUntilAndExecute); \ No newline at end of file diff --git a/addons/arsenal/XEH_postInit_client.sqf b/addons/arsenal/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/arsenal/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/arsenal/XEH_preInit.sqf b/addons/arsenal/XEH_preInit.sqf new file mode 100644 index 0000000..a4eaba0 --- /dev/null +++ b/addons/arsenal/XEH_preInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +GVAR(armory_unlocks) = []; +GVAR(garage_unlocks) = []; + +ADDON = true; \ No newline at end of file diff --git a/addons/arsenal/XEH_preInit_server.sqf b/addons/arsenal/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/arsenal/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/arsenal/XEH_preStart.sqf b/addons/arsenal/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/arsenal/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/arsenal/config.cpp b/addons/arsenal/config.cpp new file mode 100644 index 0000000..338b901 --- /dev/null +++ b/addons/arsenal/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_addArmoryItem.sqf b/addons/arsenal/functions/fnc_addArmoryItem.sqf new file mode 100644 index 0000000..7ee6de9 --- /dev/null +++ b/addons/arsenal/functions/fnc_addArmoryItem.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" + +/* + * Author: IDSolutions + * Adds item to player's armory unlocks and updates virtual arsenal + */ + +params [["_class","",[""]],["_type",0,[0]]]; + +private _default = [[],[],[],[]]; +private _armory_unlocks = GETVAR(player,Armory_Unlocks,_default); +private _index = (_armory_unlocks select _type) pushBackUnique _class; + +if (_index > -1) then { + SETVAR(player,Armory_Unlocks,_armory_unlocks); + + if (GVAR(armory_type) == 0) then { + [GVAR(gear_box),[_class],false,true,1,_type] call BFUNC(addVirtualItemCargo); + } else { + [GVAR(gear_box),[_class]] call AFUNC(arsenal,addVirtualItems); + }; + + ["armory",_armory_unlocks] call FUNC(updateUnlocks); + ["armory"] call FUNC(saveUnlocks); + + TRACE_2("Item added to armory",_class,_type); + true +} else { + false +}; \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_addGarageVehicle.sqf b/addons/arsenal/functions/fnc_addGarageVehicle.sqf new file mode 100644 index 0000000..6c7dd6d --- /dev/null +++ b/addons/arsenal/functions/fnc_addGarageVehicle.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" + +/* + * Author: IDSolutions + * Adds vehicle to player's garage unlocks and updates virtual garage + */ + + +params [["_class","",[""]],["_type",0,[0]]]; + +private _default = [[],[],[],[],[],[]]; +private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default); +private _index = (_garage_unlocks select _type) pushBackUnique _class; + +if (_index > -1) then { + SETVAR(player,Garage_Unlocks,_garage_unlocks); + [[_class]] call FUNC(addVirtualVehs); + + ["garage",_garage_unlocks] call FUNC(updateUnlocks); + ["garage"] call FUNC(saveUnlocks); + + TRACE_2("Vehicle added to garage",_class,_type); + true +} else { + false +}; \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_addVirtualVehicles.sqf b/addons/arsenal/functions/fnc_addVirtualVehicles.sqf new file mode 100644 index 0000000..fc801db --- /dev/null +++ b/addons/arsenal/functions/fnc_addVirtualVehicles.sqf @@ -0,0 +1,80 @@ +#include "..\script_component.hpp" + +/* + * Author: IDSolutions + * Adds vehicles to virtual garage and categorizes them by type + * + * Arguments: + * 0: Vehicles - Array of vehicle classnames + */ + +params [["_vehicles",[],[[]]]]; + +private _default = [[],[],[],[],[],[]]; +private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default); + +private _cars = _garage_unlocks select 0; +private _armor = _garage_unlocks select 1; +private _helis = _garage_unlocks select 2; +private _planes = _garage_unlocks select 3; +private _naval = _garage_unlocks select 4; +private _static = _garage_unlocks select 5; + +{ + switch true do { + case (_x isKindOf "Car"): { + if ((_x isKindOf "Tank") || (_x isKindOf "Wheeled_APC_F")) exitWith {}; + _cars pushBackUnique _x; + }; + case (_x isKindOf "Tank"): { + _armor pushBackUnique _x; + }; + case (_x isKindOf "Helicopter"): { + _helis pushBackUnique _x; + }; + case (_x isKindOf "Plane"): { + _planes pushBackUnique _x; + }; + case (_x isKindOf "Ship"): { + _naval pushBackUnique _x; + }; + case (_x isKindOf "Static"): { + _static pushBackUnique _x; + }; + }; +} forEach _vehicles; + +GVAR(car_unlocks) = []; +GVAR(armor_unlocks) = []; +GVAR(heli_unlocks) = []; +GVAR(plane_unlocks) = []; +GVAR(naval_unlocks) = []; +GVAR(static_unlocks) = []; + +{ + GVAR(car_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]]; +} forEach _cars; + +{ + GVAR(armor_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]]; +} forEach _armor; + +{ + GVAR(heli_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]]; +} forEach _helis; + +{ + GVAR(plane_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]]; +} forEach _planes; + +{ + GVAR(naval_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]]; +} forEach _naval; + +{ + GVAR(static_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]]; +} forEach _static; + +["garage",_garage_unlocks] call FUNC(updateUnlocks); + +TRACE_1("Virtual vehicles updated",count _vehicles); \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_initArsenal.sqf b/addons/arsenal/functions/fnc_initArsenal.sqf new file mode 100644 index 0000000..d1aaa89 --- /dev/null +++ b/addons/arsenal/functions/fnc_initArsenal.sqf @@ -0,0 +1,29 @@ +#include "..\script_component.hpp" + +params [["_armory_data", [[],[],[],[]], [[]]], ["_garage_data", [[],[],[],[],[],[]], [[]]]]; + +if (count _armory_data != 4) then { _armory_data = [[],[],[],[]] }; +if (count _garage_data != 6) then { _garage_data = [[],[],[],[],[],[]] }; + +GVAR(gear_box) = "ReammoBox_F" createVehicleLocal [0, 0, -999]; +[GVAR(gear_box), false, false] call AFUNC(arsenal,initBox); + +GVAR(pdb_mode) = "PDB_MODE" call BFUNC(getParamValue); +GVAR(armory_type) = "ARS_TYPE" call BFUNC(getParamValue); + +GVAR(armory_unlocks) = _armory_data; +GVAR(garage_unlocks) = _garage_data; + +GVAR(item_unlocks) = _armory_data # 0; +GVAR(weapon_unlocks) = _armory_data # 1; +GVAR(magazine_unlocks) = _armory_data # 2; +GVAR(backpack_unlocks) = _armory_data # 3; + +GVAR(car_unlocks) = _garage_data # 0; +GVAR(armor_unlocks) = _garage_data # 1; +GVAR(heli_unlocks) = _garage_data # 2; +GVAR(plane_unlocks) = _garage_data # 3; +GVAR(naval_unlocks) = _garage_data # 4; +GVAR(static_unlocks) = _garage_data # 5; + +TRACE_2("Arsenal System Initialized with defaults",count GVAR(armory_unlocks),count GVAR(garage_unlocks)); \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_openArmory.sqf b/addons/arsenal/functions/fnc_openArmory.sqf new file mode 100644 index 0000000..006f516 --- /dev/null +++ b/addons/arsenal/functions/fnc_openArmory.sqf @@ -0,0 +1,7 @@ +#include "..\script_component.hpp" + +if (GVAR(armory_type) == 0) then { + ["Open", [false, GVAR(gear_box), player]] call BFUNC(arsenal); +} else { + [GVAR(gear_box), player, false] call AFUNC(arsenal,openBox); +}; \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_openGarage.sqf b/addons/arsenal/functions/fnc_openGarage.sqf new file mode 100644 index 0000000..b5b43bc --- /dev/null +++ b/addons/arsenal/functions/fnc_openGarage.sqf @@ -0,0 +1,57 @@ +#include "..\script_component.hpp" + +_locations = (missionConfigFile >> "FORGE_CfgGarages" >> "locations") call BFUNC(getCfgData); +{ + GVAR(vehSpawnPos) = (_x select 1) getPos [5, (_x select 2)]; +} count _locations; + +private _vehicleSpawn = createVehicle ["Land_HelipadEmpty_F", GVAR(vehSpawnPos), [], 0, "NONE"]; +SETMVAR(BIS_fnc_garage_center,_vehicleSpawn); + +[missionNamespace, "garageOpened", { + params ["_display", "_toggleSpace"]; + private _vehicles = [GVAR(car_unlocks),GVAR(armor_unlocks),GVAR(heli_unlocks),GVAR(plane_unlocks),GVAR(naval_unlocks),GVAR(static_unlocks)]; + SETMVAR(BIS_fnc_garage_data,_vehicles); + + { + lbClear (_display displayCtrl (960 + _forEachIndex)); + } forEach BIS_fnc_garage_data; + + ["ListAdd", [_display]] call BFUNC(garage); +}] call BFUNC(addScriptedEventHandler); + +private _defaultVehicle = getText (configFile >> "CfgVehicles" >> "B_Quadbike_01_F" >> "model"); +SETMVAR(BIS_fnc_garage_centerType,_defaultVehicle); + +["Open", true] call BFUNC(garage); + +[missionNamespace, "garageClosed", { + private _nearestObjects = BIS_fnc_garage_center nearEntities [["Car","Tank","Air","Ship"], 15]; + + if (!isNil "_nearestObjects") then { + _obj = _nearestObjects select 0; + _veh = typeOf _obj; + _textures = getObjectTextures _obj; + _animationNames = animationNames _obj; + { deleteVehicle _x } forEach _nearestObjects; + _createVehicle = createVehicle [_veh, GVAR(vehSpawnPos), [], 0, "CAN_COLLIDE"]; + _createVehicle setVariable ["FORGE_GarageVehicle", true, true]; + + if (count _textures > 0) then { + _count = 0; + { + _createVehicle setObjectTextureGlobal [_count, _x]; + _count = _count + 1; + } forEach _textures; + }; + + if (count _animationNames > 0) then { + _animationPhase = []; + + for "_i" from 0 to count _animationNames -1 do { + _animationPhase pushBack [_animationNames select _i, _obj animationPhase (_animationNames select _i)]; + { _createVehicle animate _x; } forEach _animationPhase; + }; + }; + }; +}] call BFUNC(addScriptedEventHandler); \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_saveUnlocks.sqf b/addons/arsenal/functions/fnc_saveUnlocks.sqf new file mode 100644 index 0000000..5705d5a --- /dev/null +++ b/addons/arsenal/functions/fnc_saveUnlocks.sqf @@ -0,0 +1,60 @@ +#include "..\script_component.hpp" + +/* + * Author: IDSolutions + * Saves arsenal/garage unlocks to appropriate storage based on persistence mode + * + * Arguments: + * 0: Type ("armory" or "garage") + * + * Return Value: + * None + * + * Example: + * ["armory"] call forge_client_arsenal_fnc_saveArsenalUnlocks + */ + +params [["_type","",[""]],["_data",[],[[]]]]; + +private _default_armory_unlocks = [[],[],[],[]]; +private _default_garage_unlocks = [[],[],[],[],[],[]]; + +switch (_type) do { + case "armory": { + private _armory_data = GETVAR(player,Armory_Unlocks,_default_armory_unlocks); + + switch (GVAR(pdb_mode)) do { + case 0: { + SETVAR(profileNamespace,Armory_Unlocks,_armory_data); + }; + case 1: { + ["hsetid",getPlayerUID player,"armory_unlocks",-1,_armory_data,"",false] remoteExec ["dragonfly_db_fnc_addTask",2,false]; + }; + default { + SETVAR(profileNamespace,Armory_Unlocks,_armory_data); + }; + }; + + [_type,_armory_data] call FUNC(updateUnlocks); + }; + + case "garage": { + private _garage_data = GETVAR(player,Garage_Unlocks,_default_garage_unlocks); + + switch (GVAR(pdb_mode)) do { + case 0: { + SETVAR(profileNamespace,Garage_Unlocks,_garage_data); + }; + case 1: { + ["hsetid",getPlayerUID player,"garage_unlocks",-1,_garage_data,"",false] remoteExec ["dragonfly_db_fnc_addTask",2,false]; + }; + default { + SETVAR(profileNamespace,Garage_Unlocks,_garage_data); + }; + }; + + [_type,_garage_data] call FUNC(updateUnlocks); + }; +}; + +TRACE_2("Arsenal Unlocks saved",_type,GVAR(pdb_mode)); diff --git a/addons/arsenal/functions/fnc_updateUnlocks.sqf b/addons/arsenal/functions/fnc_updateUnlocks.sqf new file mode 100644 index 0000000..64c9830 --- /dev/null +++ b/addons/arsenal/functions/fnc_updateUnlocks.sqf @@ -0,0 +1,41 @@ +#include "..\script_component.hpp" + +/* + * Author: IDSolutions + * Updates the arsenal system variables when unlocks change + * + * Arguments: + * 0: Type ("armory" or "garage") + * 1: Data (Array of unlocks) + * + * Example: + * ["armory", _armory_unlocks] call forge_client_arsenal_fnc_updateUnlocks + */ + +params [["_type","",[""]],["_data",[],[[]]]]; + +switch (_type) do { + case "armory": { + GVAR(armory_unlocks) = _data; + + GVAR(item_unlocks) = _data select 0; + GVAR(weapon_unlocks) = _data select 1; + GVAR(magazine_unlocks) = _data select 2; + GVAR(backpack_unlocks) = _data select 3; + + TRACE_1("Armory unlocks updated",count GVAR(armory_unlocks)); + }; + + case "garage": { + GVAR(garage_unlocks) = _data; + + GVAR(car_unlocks) = _data select 0; + GVAR(armor_unlocks) = _data select 1; + GVAR(heli_unlocks) = _data select 2; + GVAR(plane_unlocks) = _data select 3; + GVAR(naval_unlocks) = _data select 4; + GVAR(static_unlocks) = _data select 5; + + TRACE_1("Garage unlocks updated",count GVAR(garage_unlocks)); + }; +}; \ No newline at end of file diff --git a/addons/arsenal/script_component.hpp b/addons/arsenal/script_component.hpp new file mode 100644 index 0000000..0995e23 --- /dev/null +++ b/addons/arsenal/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT arsenal +#define COMPONENT_BEAUTIFIED Arsenal +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_ARSENAL + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_ARSENAL + #define DEBUG_SETTINGS DEBUG_SETTINGS_ARSENAL +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/bank/$PBOPREFIX$ b/addons/bank/$PBOPREFIX$ new file mode 100644 index 0000000..74794b4 --- /dev/null +++ b/addons/bank/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\bank \ No newline at end of file diff --git a/addons/bank/CfgEventHandlers.hpp b/addons/bank/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/bank/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/bank/XEH_PREP.hpp b/addons/bank/XEH_PREP.hpp new file mode 100644 index 0000000..746ca50 --- /dev/null +++ b/addons/bank/XEH_PREP.hpp @@ -0,0 +1,7 @@ +PREP(deposit); +PREP(initBank); +PREP(openBank); +PREP(refresh); +PREP(submit); +PREP(transfer); +PREP(withdraw); \ No newline at end of file diff --git a/addons/bank/XEH_postInit.sqf b/addons/bank/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/bank/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/bank/XEH_postInit_client.sqf b/addons/bank/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/bank/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/bank/XEH_preInit.sqf b/addons/bank/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/bank/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/bank/XEH_preInit_server.sqf b/addons/bank/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/bank/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/bank/XEH_preStart.sqf b/addons/bank/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/bank/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/bank/config.cpp b/addons/bank/config.cpp new file mode 100644 index 0000000..c3688dc --- /dev/null +++ b/addons/bank/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ui\BaseControls.hpp" +#include "ui\RscBankDialog.hpp" \ No newline at end of file diff --git a/addons/bank/functions/fnc_deposit.sqf b/addons/bank/functions/fnc_deposit.sqf new file mode 100644 index 0000000..1ed2136 --- /dev/null +++ b/addons/bank/functions/fnc_deposit.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" + +private _amount = parseNumber (ctrlText IDC_AMOUNTINPUT); +// private _bank = player getVariable ["FORGE_Bank", 0]; +// private _cash = player getVariable ["FORGE_Cash", 0]; + +private _bank = GETVAR(player,FORGE_Bank,0); +private _cash = GETVAR(player,FORGE_Cash,0); + +if (_amount > 0 && _amount <= _cash) then { + _cash = _cash - _amount; + _bank = _bank + _amount; + + // player setVariable ["FORGE_Bank", _bank]; + // player setVariable ["FORGE_Cash", _cash]; + + SETPVAR(player,FORGE_Bank,_bank); + SETPVAR(player,FORGE_Cash,_cash); + + // [] call forge_client_bank_fnc_refresh; + [] call FUNC(refresh); + hint "Money deposited successfully"; +} else { + hint "Invalid amount"; +}; \ No newline at end of file diff --git a/addons/bank/functions/fnc_initBank.sqf b/addons/bank/functions/fnc_initBank.sqf new file mode 100644 index 0000000..33d6331 --- /dev/null +++ b/addons/bank/functions/fnc_initBank.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" + +{ + private _configName = configName(_x); + private _className = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "className") call BFUNC(getCfgData); + private _pos = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "pos") call BFUNC(getCfgData); + private _dir = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "dir") call BFUNC(getCfgData); + private _type = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "type") call BFUNC(getCfgData); + + if (_type == "object") then { + private _bank = createSimpleObject [_className, [0, 0, 0]]; + + _bank setPosATL _pos; + _bank setDir _dir; + _bank allowDamage false; + _bank setVariable ["isBank", true, true]; + } else { + private _group = createGroup civilian; + private _bank = _group createUnit [_className, [0, 0, 0], [], 0, "NONE"]; + + _bank disableAI "MOVE"; + _bank setPosATL _pos; + _bank setDir _dir; + _bank allowDamage false; + _bank setVariable ["isBank", true, true]; + _bank setVariable ["BIS_enableRandomization", false]; + }; + + diag_log text format ["[FORGE Bank] ClassName: '%1' Pos: '%2' Dir: '%3'", _className, _pos, _dir]; +} forEach ("true" configClasses (missionConfigFile >> "CfgBanks" >> "banks")); \ No newline at end of file diff --git a/addons/bank/functions/fnc_openBank.sqf b/addons/bank/functions/fnc_openBank.sqf new file mode 100644 index 0000000..4d9373e --- /dev/null +++ b/addons/bank/functions/fnc_openBank.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" + +// private _bank = player getVariable ["FORGE_Bank", 0]; +// private _cash = player getVariable ["FORGE_Cash", 0]; +// private _rating = player getVariable ["FORGE_Rating", 0]; +private _bank = GETVAR(player,FORGE_Bank,0); +private _cash = GETVAR(player,FORGE_Cash,0); +private _rating = GETVAR(player,FORGE_Rating,0); + +disableSerialization; +createDialog "RscBankDialog"; + +ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _cash]]; +ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _bank]]; +ctrlSetText [IDC_RATINGTEXT, format ["Rating: %1", _rating]]; +ctrlSetText [IDC_TIMESHEETTEXT, "Ready for Timesheet"]; + +{ + lbAdd [IDC_PLAYERINPUT, name _x]; + lbSetData [IDC_PLAYERINPUT, _forEachIndex, netId _x]; +} forEach allPlayers; + +lbSetCurSel [IDC_PLAYERINPUT, 0]; +ctrlSetText [IDC_AMOUNTINPUT, ""]; \ No newline at end of file diff --git a/addons/bank/functions/fnc_refresh.sqf b/addons/bank/functions/fnc_refresh.sqf new file mode 100644 index 0000000..6b63f24 --- /dev/null +++ b/addons/bank/functions/fnc_refresh.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" + +// private _bank = player getVariable ["FORGE_Bank", 0]; +// private _cash = player getVariable ["FORGE_Cash", 0]; +// private _rating = player getVariable ["FORGE_Rating", 0]; +private _bank = GETVAR(player,FORGE_Bank,0); +private _cash = GETVAR(player,FORGE_Cash,0); +private _rating = GETVAR(player,FORGE_Rating,0); + +if (!isNull (findDisplay IDD_BANKDIALOG)) then { + ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _cash]]; + ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _bank]]; + ctrlSetText [IDC_RATINGTEXT, format ["Rating: %1", _rating]]; + ctrlSetText [IDC_TIMESHEETTEXT, "Ready for Timesheet"]; + ctrlSetText [IDC_AMOUNTINPUT, ""]; + ctrlSetText [IDC_PLAYERINPUT, ""]; +}; \ No newline at end of file diff --git a/addons/bank/functions/fnc_submit.sqf b/addons/bank/functions/fnc_submit.sqf new file mode 100644 index 0000000..c0b8e80 --- /dev/null +++ b/addons/bank/functions/fnc_submit.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" + +// private _bank = player getVariable ["FORGE_Bank", 0]; +// private _rating = player getVariable ["FORGE_Rating", 0]; +private _bank = GETVAR(player,FORGE_Bank,0); +private _rating = GETVAR(player,FORGE_Rating,0); +private _pending = rating player; + +_rating = _rating + _pending; +_bank = _bank + _rating; + +player addRating - _pending; +// player setVariable ["FORGE_Bank", _bank]; +// player setVariable ["FORGE_Rating", 0]; +SETPVAR(player,FORGE_Bank,_bank); +SETPVAR(player,FORGE_Rating,0); + +// [] call forge_client_bank_fnc_refresh; +[] call FUNC(refresh); + +// hint format ["Timesheet submitted! Received $%1 bonus based on rating of %2", _rating, _rating]; +[format ["Timesheet submitted! Received $%1 based on rating of %2", _rating, _rating], "info", 3, "right"] call EFUNC(misc,notify); \ No newline at end of file diff --git a/addons/bank/functions/fnc_transfer.sqf b/addons/bank/functions/fnc_transfer.sqf new file mode 100644 index 0000000..a042336 --- /dev/null +++ b/addons/bank/functions/fnc_transfer.sqf @@ -0,0 +1,32 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_BANKDIALOG; +private _input = _display displayCtrl IDC_AMOUNTINPUT; +private _dropdown = _display displayCtrl IDC_PLAYERINPUT; +private _amount = parseNumber (ctrlText _input); +private _selectedTarget = lbCurSel _dropdown; +private _selectedTargetData = _dropdown lbData _selectedTarget; +private _target = objectFromNetId _selectedTargetData; + +// private _bank = player getVariable ["FORGE_Bank", 0]; +// private _targetBank = _target getVariable ["FORGE_Bank", 0]; +private _bank = GETVAR(player,FORGE_Bank,0); +private _targetBank = GETVAR(_target,FORGE_Bank,0); + +if (!isNull _target && _amount > 0 && _amount <= _bank) then { + _targetBank = _targetBank + _amount; + // _target setVariable ["FORGE_Bank", _targetBank, true]; + SETPVAR(_target,FORGE_Bank,_targetBank); + + _bank = _bank - _amount; + // player setVariable ["FORGE_Bank", _bank, true]; + SETPVAR(player,FORGE_Bank,_bank); + + // [] call forge_client_bank_fnc_refresh; + [] call FUNC(refresh); + // hint format ["Transferred $%1", _amount]; + [format ["Transferred $%1", _amount], "info", 3, "right"] call EFUNC(misc,notify); +} else { + // hint "Invalid transfer details"; + [format ["Invalid transfer details"], "warning", 3, "right"] call EFUNC(misc,notify); +}; \ No newline at end of file diff --git a/addons/bank/functions/fnc_withdraw.sqf b/addons/bank/functions/fnc_withdraw.sqf new file mode 100644 index 0000000..eebd664 --- /dev/null +++ b/addons/bank/functions/fnc_withdraw.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_BANKDIALOG; +private _input = _display displayCtrl IDC_AMOUNTINPUT; +private _amount = parseNumber (ctrlText _input); + +// private _bank = player getVariable ["FORGE_Bank", 0]; +// private _cash = player getVariable ["FORGE_Cash", 0]; +private _bank = GETVAR(player,FORGE_Bank,0); +private _cash = GETVAR(player,FORGE_Cash,0); + +if (_amount > 0 && _amount <= _bank) then { + _bank = _bank - _amount; + _cash = _cash + _amount; + + // player setVariable ["FORGE_Bank", _bank]; + // player setVariable ["FORGE_Cash", _cash]; + SETPVAR(player,FORGE_Bank,_bank); + SETPVAR(player,FORGE_Cash,_cash); + + // [] call forge_client_bank_fnc_refresh; + [] call FUNC(refresh); + // hint "Money withdrawn successfully"; + [format ["Money withdrawn successfully"], "info", 3, "right"] call EFUNC(misc,notify); +} else { + // hint "Invalid amount"; + [format ["Invalid amount"], "warning", 3, "right"] call EFUNC(misc,notify); +}; \ No newline at end of file diff --git a/addons/bank/script_component.hpp b/addons/bank/script_component.hpp new file mode 100644 index 0000000..99e23c6 --- /dev/null +++ b/addons/bank/script_component.hpp @@ -0,0 +1,35 @@ +#define COMPONENT bank +#define COMPONENT_BEAUTIFIED Bank +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_BANK + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_BANK + #define DEBUG_SETTINGS DEBUG_SETTINGS_BANK +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" + +#define IDD_BANKDIALOG 82300 +#define IDC_DIALOGNAME 82301 +#define IDC_ACCOUNTINFO 82302 +#define IDC_AMOUNTLABEL 82303 +#define IDC_AMOUNTINPUT 82304 +#define IDC_PLAYERLABEL 82305 +#define IDC_PLAYERINPUT 82306 +#define IDC_DEPOSITBUTTON 82307 +#define IDC_WITHDRAWBUTTON 82308 +#define IDC_TIMESHEETBUTTON 82309 +#define IDC_TRANSFERBUTTON 82310 +#define IDC_CLOSEBUTTON 82311 +#define IDC_WALLETGROUP 82312 +#define IDC_CASHTEXT 82313 +#define IDC_BANKTEXT 82314 +#define IDC_RATINGGROUP 82315 +#define IDC_RATINGTEXT 82316 +#define IDC_TIMESHEETTEXT 82317 \ No newline at end of file diff --git a/addons/bank/stringtable.xml b/addons/bank/stringtable.xml new file mode 100644 index 0000000..f34c6e8 --- /dev/null +++ b/addons/bank/stringtable.xml @@ -0,0 +1,35 @@ + + + + + Amount + + + Close + + + Deposit + + + Bank + + + Player + + + Rating + + + Submit Timesheet + + + Transfer + + + Net Worth + + + Withdraw + + + diff --git a/addons/bank/ui/BaseControls.hpp b/addons/bank/ui/BaseControls.hpp new file mode 100644 index 0000000..5fce5a8 --- /dev/null +++ b/addons/bank/ui/BaseControls.hpp @@ -0,0 +1,265 @@ +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// Default text sizes +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +// Pixel grid +#define pixelScale 0.50 +#define GRID_W (pixelW * pixelGrid * pixelScale) +#define GRID_H (pixelH * pixelGrid * pixelScale) + +class ScrollBar; +class RscObject; +class RscText; +class RscTextSmall; +class RscTitle; +class RscProgress; +class RscProgressNotFreeze; +class RscPicture; +class RscLadderPicture; +class RscPictureKeepAspect; +class RscHTML; +class RscButton; +class RscShortcutButton; +class RscButtonSmall; +class RscEdit; +class RscCombo; +class RscListBox; +class RscListNBox; +class RscXListBox; +class RscTree; +class RscSlider; +class RscSliderH; +class RscXSliderH; +class RscActiveText; +class RscStructuredText; +class RscControlsGroup; +class RscToolbox; +class RscMapControl; +class RscCheckBox; +class RscFrame; +class ctrlDefault; +class ctrlControlsGroup; +class ctrlDefaultText; +class ctrlDefaultButton; +class RscBackgroundStripeTop; +class RscBackgroundStripeBottom; +class RscIGText; +class RscIGProgress; +class RscListBoxKeys; +class RscControlsGroupNoScrollbars; +class RscControlsGroupNoHScrollbars; +class RscControlsGroupNoVScrollbars; +class RscLine; +class RscActivePicture; +class RscButtonTextOnly; +class RscShortcutButtonMain; +class RscButtonEditor; +class RscIGUIShortcutButton; +class RscGearShortcutButton; +class RscButtonMenu; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenuSteam; +class RscLoadingText; +class RscIGUIListBox; +class RscIGUIListNBox; +class RscBackground; +class RscBackgroundGUI; +class RscBackgroundGUILeft; +class RscBackgroundGUIRight; +class RscBackgroundGUIBottom; +class RscBackgroundGUITop; +class RscBackgroundGUIDark; +class RscBackgroundLogo; +class RscMapControlEmpty; +class RscVignette; +class CA_Mainback; +class CA_Back; +class CA_Title_Back; +class CA_Black_Back; +class CA_Title; +class CA_Logo; +class CA_Logo_Small; +class CA_RscButton; +class CA_RscButton_dialog; +class CA_Ok; +class CA_Ok_image; +class CA_Ok_image2; +class CA_Ok_text; +class ctrlCheckbox; +class ctrlCheckboxBaseline; +class ctrlStatic; +class ctrlControlsGroupNoScrollbars; +class ctrlStructuredText; +class RscTextMulti; +class RscTreeSearch; +class RscVideo; +class RscVideoKeepAspect; +class RscActivePictureKeepAspect; +class RscEditMulti; +class RscMapSignalBackground; +class RscMapSignalPicture; +class RscMapSignalText; +class RscColorPicker; +class RscInterlacingScreen; +class RscFeedback; +class RscTrafficLight; +class RscButtonSearch; +class RscIGUIText; +class RscOpticsText; +class RscOpticsValue; +class RscIGUIValue; +class RscButtonMenuMain; +class RscButtonTestCentered; +class RscDisplaySingleMission_ChallengeOverviewGroup; +class RscDisplayDebriefing_RscTextMultiline; +class RscDisplayDebriefing_ListGroup; +class RscButtonArsenal; +class RscTextNoShadow; +class RscButtonNoColor; +class RscToolboxButton; +class ctrlStaticPicture; +class ctrlStaticPictureKeepAspect; +class ctrlStaticPictureTile; +class ctrlStaticFrame; +class ctrlStaticLine; +class ctrlStaticMulti; +class ctrlStaticBackground; +class ctrlStaticOverlay; +class ctrlStaticTitle; +class ctrlStaticFooter; +class ctrlStaticBackgroundDisable; +class ctrlStaticBackgroundDisableTiles; +class ctrlButton; +class ctrlButtonPicture; +class ctrlButtonPictureKeepAspect; +class ctrlButtonOK; +class ctrlButtonCancel; +class ctrlButtonClose; +class ctrlButtonToolbar; +class ctrlButtonSearch; +class ctrlButtonExpandAll; +class ctrlButtonCollapseAll; +class ctrlButtonFilter; +class ctrlEdit; +class ctrlEditMulti; +class ctrlSliderV; +class ctrlSliderH; +class ctrlCombo; +class ctrlComboToolbar; +class ctrlListbox; +class ctrlToolbox; +class ctrlToolboxPicture; +class ctrlToolboxPictureKeepAspect; +class ctrlCheckboxes; +class ctrlCheckboxesCheckbox; +class ctrlProgress; +class ctrlHTML; +class ctrlActiveText; +class ctrlActivePicture; +class ctrlActivePictureKeepAspect; +class ctrlTree; +class ctrlControlsGroupNoHScrollbars; +class ctrlControlsGroupNoVScrollbars; +class ctrlShortcutButton; +class ctrlShortcutButtonOK; +class ctrlShortcutButtonCancel; +class ctrlShortcutButtonSteam; +class ctrlXListbox; +class ctrlXSliderV; +class ctrlXSliderH; +class ctrlMenu; +class ctrlMenuStrip; +class ctrlMap; +class ctrlMapEmpty; +class ctrlMapMain; +class ctrlListNBox; +class ctrlCheckboxToolbar; \ No newline at end of file diff --git a/addons/bank/ui/RscBankDialog.hpp b/addons/bank/ui/RscBankDialog.hpp new file mode 100644 index 0000000..331c4b6 --- /dev/null +++ b/addons/bank/ui/RscBankDialog.hpp @@ -0,0 +1,200 @@ +class RscBankDialog { + idd = IDD_BANKDIALOG; + movingEnable = 1; + enableSimulation = 1; + + class controlsBackground { + class MainBackground: RscText { + idc = -1; + x = "0.25 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.5 * safezoneW"; + h = "0.725 * safezoneH"; + colorBackground[] = {0, 0, 0, 0.7}; + }; + + class DialogTitle: RscText { + idc = IDC_DIALOGNAME; + text = CSTRING(Name); + x = "0.25 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.5 * safezoneW"; + h = "0.0325 * safezoneH"; + colorBackground[] = {0.1, 0.1, 0.1, 1}; + }; + }; + + class controls { + class WalletGroup: RscControlsGroup { + idc = IDC_WALLETGROUP; + x = "0.26 * safezoneW + safezoneX"; + y = "0.17 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.15 * safezoneH"; + + class controls { + class WalletBackground: RscText { + idc = -1; + x = 0; + y = 0; + w = "0.23 * safezoneW"; + h = "0.15 * safezoneH"; + colorBackground[] = {0.1, 0.1, 0.1, 0.8}; + }; + + class WalletTitle: RscText { + idc = -1; + text = CSTRING(Wallet); + x = 0; + y = 0; + w = "0.23 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + + class CashText: RscText { + idc = IDC_CASHTEXT; + x = "0.01 * safezoneW"; + y = "0.04 * safezoneH"; + w = "0.21 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + + class BankText: RscText { + idc = IDC_BANKTEXT; + x = "0.01 * safezoneW"; + y = "0.08 * safezoneH"; + w = "0.21 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + }; + }; + + class RatingGroup: RscControlsGroup { + idc = IDC_RATINGGROUP; + x = "0.51 * safezoneW + safezoneX"; + y = "0.17 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.15 * safezoneH"; + + class controls { + class RatingBackground: RscText { + idc = -1; + x = 0; + y = 0; + w = "0.23 * safezoneW"; + h = "0.15 * safezoneH"; + colorBackground[] = {0.1, 0.1, 0.1, 0.8}; + }; + + class RatingTitle: RscText { + idc = -1; + text = CSTRING(Rating); + x = 0; + y = 0; + w = "0.23 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + + class RatingText: RscText { + idc = IDC_RATINGTEXT; + x = "0.01 * safezoneW"; + y = "0.04 * safezoneH"; + w = "0.21 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + + class TimesheetText: RscText { + idc = IDC_TIMESHEETTEXT; + x = "0.01 * safezoneW"; + y = "0.08 * safezoneH"; + w = "0.21 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + }; + }; + + class AmountLabel: RscText { + idc = IDC_AMOUNTLABEL; + text = CSTRING(Amount); + x = "0.26 * safezoneW + safezoneX"; + y = "0.31 * safezoneH + safezoneY"; + w = "0.48 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + + class AmountInput: RscEdit { + idc = IDC_AMOUNTINPUT; + x = "0.26 * safezoneW + safezoneX"; + y = "0.34 * safezoneH + safezoneY"; + w = "0.48 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + + class PlayerLabel: RscText { + idc = IDC_PLAYERLABEL; + text = CSTRING(Player); + x = "0.26 * safezoneW + safezoneX"; + y = "0.36 * safezoneH + safezoneY"; + w = "0.48 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + + class PlayerInput: RscCombo { + idc = IDC_PLAYERINPUT; + x = "0.26 * safezoneW + safezoneX"; + y = "0.39 * safezoneH + safezoneY"; + w = "0.48 * safezoneW"; + h = "0.0325 * safezoneH"; + }; + + class DepositButton: RscButton { + idc = IDC_DEPOSITBUTTON; + text = CSTRING(Deposit); + x = "0.26 * safezoneW + safezoneX"; + y = "0.44 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "_this call forge_client_bank_fnc_deposit"; + }; + + class WithdrawButton: RscButton { + idc = IDC_WITHDRAWBUTTON; + text = CSTRING(Withdraw); + x = "0.51 * safezoneW + safezoneX"; + y = "0.44 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "_this call forge_client_bank_fnc_withdraw"; + }; + + class TimesheetButton: RscButton { + idc = IDC_TIMESHEETBUTTON; + text = CSTRING(SubmitTimesheet); + x = "0.26 * safezoneW + safezoneX"; + y = "0.49 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "_this call forge_client_bank_fnc_submit"; + }; + + class TransferButton: RscButton { + idc = IDC_TRANSFERBUTTON; + text = CSTRING(Transfer); + x = "0.51 * safezoneW + safezoneX"; + y = "0.49 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "_this call forge_client_bank_fnc_transfer"; + }; + + class CloseButton: RscButton { + idc = IDC_CLOSEBUTTON; + text = "X"; + x = "0.7225 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.0275 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "closeDialog 0"; + }; + }; +}; \ No newline at end of file diff --git a/addons/briefing/$PBOPREFIX$ b/addons/briefing/$PBOPREFIX$ new file mode 100644 index 0000000..2c2a46d --- /dev/null +++ b/addons/briefing/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\briefing \ No newline at end of file diff --git a/addons/briefing/CfgEventHandlers.hpp b/addons/briefing/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/briefing/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/briefing/XEH_PREP.hpp b/addons/briefing/XEH_PREP.hpp new file mode 100644 index 0000000..f1ec2ba --- /dev/null +++ b/addons/briefing/XEH_PREP.hpp @@ -0,0 +1,7 @@ +PREP(endSlideShow); +PREP(initSlideShow); +PREP(nextImage); +PREP(prevImage); +PREP(spawnLecture); +PREP(spawnPresentation); +PREP(startSlideShow); \ No newline at end of file diff --git a/addons/briefing/XEH_postInit.sqf b/addons/briefing/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/briefing/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/briefing/XEH_postInit_client.sqf b/addons/briefing/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/briefing/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/briefing/XEH_preInit.sqf b/addons/briefing/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/briefing/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/briefing/XEH_preInit_server.sqf b/addons/briefing/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/briefing/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/briefing/XEH_preStart.sqf b/addons/briefing/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/briefing/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/briefing/config.cpp b/addons/briefing/config.cpp new file mode 100644 index 0000000..338b901 --- /dev/null +++ b/addons/briefing/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/briefing/functions/fnc_endSlideShow.sqf b/addons/briefing/functions/fnc_endSlideShow.sqf new file mode 100644 index 0000000..a688f89 --- /dev/null +++ b/addons/briefing/functions/fnc_endSlideShow.sqf @@ -0,0 +1,55 @@ +#include "..\script_component.hpp" + +/* + Author: PDT for J. Schmidt + ends the slide show + + Arguments: + 0: _controller - object that controls the slide show + + Return Value: + - true if the slide show was ended; false if not +*/ + +params [["_controller", objNull]]; + +if (isNull _controller) exitWith { + _return = false; + _return +}; + +private _controllers = _controller getVariable ["FORGE_SlideShow_Controllers", []]; +private _currentIndex = 0; +private _images = _controller getVariable ["FORGE_SlideShow_Images", []]; +private _screens = _controller getVariable ["FORGE_SlideShow_Screens", []]; + +if (_images isEqualTo []) exitWith { + _return = false; + _return +}; + +if (_screens isEqualTo []) exitWith { + _return = false; + _return +}; + +if (_controllers isEqualTo []) exitWith { + _return = false; + _return +}; + +{ + _x setObjectTextureGlobal [0, ""]; + true +} count (_screens); + +{ + _x setVariable ["FORGE_SlideShow_Images", _images, true]; + _x setVariable ["FORGE_SlideShow_Screens", _screens, true]; + _x setVariable ["FORGE_SlideShow_CurrentIndex", _currentIndex, true]; + _x setVariable ["FORGE_SlideShow_Started", false, true]; + true +} count (_controllers); + +_return = true; +_return \ No newline at end of file diff --git a/addons/briefing/functions/fnc_initSlideShow.sqf b/addons/briefing/functions/fnc_initSlideShow.sqf new file mode 100644 index 0000000..f63ec5c --- /dev/null +++ b/addons/briefing/functions/fnc_initSlideShow.sqf @@ -0,0 +1,74 @@ +#include "..\script_component.hpp" + +/* + Author: PDT for J. Schmidt + sets up a slide show + + Arguments: + 0: _screen - array of objects to display images on + 1: _controllers - array of objects to use are controlers + 2: _images - array of image paths; images should be powers of 2 + 3: _autoScroll - should the image auto-scroll + 4: _units - unit(s) that should speak + 5: _topic - conversation topic + 6: _sentence - conversation sentence, "" = play all + + Return Value: + - true if slide show was setup; false if not + + Example: + [Screen01, [Controler01], ["images/folder/image.paa"]] call forge_client_briefing_fnc_initSlideShow; +*/ + +params [["_screens", []], ["_controllers", []], ["_images", []], ["_autoScroll", false], ["_units", []], ["_topic", ""], ["_sentence", ""]]; + +if (_screens isEqualTo []) exitWith { + _return = false; + _return +}; + +if (_controllers isEqualTo []) exitWith { + _return = false; + _return +}; + +if (_images isEqualTo []) exitWith { + _return = false; + _return +}; + +{ + _x setVariable ["FORGE_SlideShow_Images", _images, true]; + _x setVariable ["FORGE_SlideShow_Screens", _screens, true]; + _x setVariable ["FORGE_SlideShow_CurrentIndex", 0, true]; + _x setVariable ["FORGE_SlideShow_Controllers", _controllers, true]; + _x setVariable ["FORGE_SlideShow_AutoScroll", _autoScroll, true]; + _x setVariable ["FORGE_SlideShow_Units", _units, true]; + _x setVariable ["FORGE_SlideShow_Topic", _topic, true]; + _x setVariable ["FORGE_SlideShow_Sentence", _sentence, true]; + + [_x, ["Start Slide Show", { + params ["_target", "_caller", "_actionId", "_arguments"]; + _target setVariable ["FORGE_SlideShow_Started", true, true]; + [_target] remoteExec ["forge_client_briefing_fnc_startSlideShow", 2, false]; + }, nil, 1.5, true, true, "", "!(_target getVariable ['FORGE_SlideShow_Started', false])", 2.5, false, "", ""]] remoteExecCall ["addAction", 0, true]; + + [_x, ["Next Image", { + params ["_target", "_caller", "_actionId", "_arguments"]; + [_target] remoteExecCall ["forge_client_briefing_fnc_nextImage", 2, false]; + }, nil, 1.5, true, true, "", "_target getVariable ['FORGE_SlideShow_Started', false] && {!(_target getVariable ['FORGE_SlideShow_AutoScroll', false])}", 2.5, false, "", ""]] remoteExecCall ["addAction", 0, true]; + + [_x, ["Previous Image", { + params ["_target", "_caller", "_actionId", "_arguments"]; + [_target] remoteExecCall ["forge_client_briefing_fnc_prevImage", 2, false]; + }, nil, 1.5, true, true, "", "_target getVariable ['FORGE_SlideShow_Started', false] && {!(_target getVariable ['FORGE_SlideShow_AutoScroll', false])}", 2.5, false, "", ""]] remoteExecCall ["addAction", 0, true]; + + [_x, ["End Slide Show", { + params ["_target", "_caller", "_actionId", "_arguments"]; + [_target] remoteExecCall ["forge_client_briefing_fnc_endSlideShow", 2, false]; + }, nil, 1.5, true, true, "", "_target getVariable ['FORGE_SlideShow_Started', false]", 2.5, false, "", ""]] remoteExecCall ["addAction", 0, true]; + true +} count (_controllers); + +_return = true; +_return \ No newline at end of file diff --git a/addons/briefing/functions/fnc_nextImage.sqf b/addons/briefing/functions/fnc_nextImage.sqf new file mode 100644 index 0000000..7e0ffed --- /dev/null +++ b/addons/briefing/functions/fnc_nextImage.sqf @@ -0,0 +1,60 @@ +#include "..\script_component.hpp" + +/* + Author: PDT for J. Schmidt + displays the next image + + Arguments: + 0: _controller - object that controls the slide show + + Return Value: + - true if the next image was displayed; false if not +*/ + +params [["_controller", objNull]]; + +if (isNull _controller) exitWith { + _return = false; + _return +}; + +private _controllers = _controller getVariable ["FORGE_SlideShow_Controllers", []]; +private _currentIndex = _controller getVariable ["FORGE_SlideShow_CurrentIndex", 0]; +private _images = _controller getVariable ["FORGE_SlideShow_Images", []]; +private _screens = _controller getVariable ["FORGE_SlideShow_Screens", []]; + +if (_images isEqualTo []) exitWith { + _return = false; + _return +}; + +if (_screens isEqualTo []) exitWith { + _return = false; + _return +}; + +if (_controllers isEqualTo []) exitWith { + _return = false; + _return +}; + +private _imageCount = (count _images) - 1; + +if (_currentIndex isEqualTo _imageCount) then { + _currentIndex = 0; +} else { + _currentIndex = _currentIndex + 1; +}; + +{ + _x setObjectTextureGlobal [0, (_images select _currentIndex) select 0]; + true +} count (_screens); + +{ + _x setVariable ["FORGE_SlideShow_CurrentIndex", _currentIndex, true]; + true +} count (_controllers); + +_return = true; +_return \ No newline at end of file diff --git a/addons/briefing/functions/fnc_prevImage.sqf b/addons/briefing/functions/fnc_prevImage.sqf new file mode 100644 index 0000000..608434b --- /dev/null +++ b/addons/briefing/functions/fnc_prevImage.sqf @@ -0,0 +1,60 @@ +#include "..\script_component.hpp" + +/* + Author: PDT for J. Schmidt + displays the previous image + + Arguments: + 0: _controller - object that controls the slide show + + Return Value: + - true if the previous image was displayed; false if not +*/ + +params [["_controller", objNull]]; + +if (isNull _controller) exitWith { + _return = false; + _return +}; + +private _controllers = _controller getVariable ["FORGE_SlideShow_Controllers", []]; +private _currentIndex = _controller getVariable ["FORGE_SlideShow_CurrentIndex", 0]; +private _images = _controller getVariable ["FORGE_SlideShow_Images", []]; +private _screens = _controller getVariable ["FORGE_SlideShow_Screens", []]; + +if (_images isEqualTo []) exitWith { + _return = false; + _return +}; + +if (_screens isEqualTo []) exitWith { + _return = false; + _return +}; + +if (_controllers isEqualTo []) exitWith { + _return = false; + _return +}; + +private _imageCount = (count _images) - 1; + +if (_currentIndex isEqualTo 0) then { + _currentIndex = 0; +} else { + _currentIndex = _currentIndex - 1; +}; + +{ + _x setObjectTextureGlobal [0, (_images select _currentIndex) select 0]; + true +} count (_screens); + +{ + _x setVariable ["FORGE_SlideShow_CurrentIndex", _currentIndex, true]; + true +} count (_controllers); + +_return = true; +_return \ No newline at end of file diff --git a/addons/briefing/functions/fnc_spawnLecture.sqf b/addons/briefing/functions/fnc_spawnLecture.sqf new file mode 100644 index 0000000..e864950 --- /dev/null +++ b/addons/briefing/functions/fnc_spawnLecture.sqf @@ -0,0 +1,40 @@ +#include "..\script_component.hpp" + +/* + Name: forge_client_briefing_fnc_spawnLecture + Date: 8/6/2022 + Version: 1.0 + Author: J. Schmidt + + Description: + AI plays a given sentence/conversation. + + Parameter(s): + 0: Unit that is playing the given sentence/conversation. + 1: Topic that is being talked about. + 2: Sentence partaining to the topic at hand. +*/ + +params ["_unit", "_topic", "_sentence"]; +FORGE_Briefing_inProgress = true; +publicVariable "FORGE_Briefing_inProgress"; + +while { alive _unit } do { + _unit disableAI "ALL"; + _unit switchMove " "; + _handle = [_topic, _sentence, nil, nil, nil, [_unit], 1, false] spawn BIS_fnc_kbTell; + + if (!alive _unit) exitWith { + [_unit] spawn BIS_fnc_kbSkip; + + FORGE_Briefing_inProgress = false; + publicVariable "FORGE_Briefing_inProgress"; + }; + + uiSleep 5; +}; + +waitUntil { scriptDone _handle }; + +FORGE_Briefing_inProgress = false; +publicVariable "FORGE_Briefing_inProgress"; \ No newline at end of file diff --git a/addons/briefing/functions/fnc_spawnPresentation.sqf b/addons/briefing/functions/fnc_spawnPresentation.sqf new file mode 100644 index 0000000..fb8c698 --- /dev/null +++ b/addons/briefing/functions/fnc_spawnPresentation.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" + +/* + Name: forge_client_briefing_fnc_spawnLecture + Date: 8/6/2022 + Version: 1.0 + Author: J. Schmidt + + Description: + Object displays a slideshow presentation. + + Parameter(s): + 0: Object that will display the presentation. + 1: Slides that will be used for the presentation. + 1-0: Texture used for the Slide. + 1-1: Amount of Time the Slide will display. +*/ + +params ["_object", "_slides"]; + +{ + _x params ["_texture", "_delay"]; + _object setObjectTextureGlobal [0, _texture]; + uiSleep _delay; + true +} count (_slides); \ No newline at end of file diff --git a/addons/briefing/functions/fnc_startSlideShow.sqf b/addons/briefing/functions/fnc_startSlideShow.sqf new file mode 100644 index 0000000..786fa36 --- /dev/null +++ b/addons/briefing/functions/fnc_startSlideShow.sqf @@ -0,0 +1,92 @@ +#include "..\script_component.hpp" + +/* + Author: PDT for J. Schmidt + starts the slideshow + + Arguments: + 0: _controller - object that controls the slide show + + Return Value: + - true if slide show was started +*/ + +params [["_controller", objNull], ["_units", []], ["_topic", ""], ["_sentence", ""]]; + +FORGE_Briefing_inProgress = true; +publicVariable "FORGE_Briefing_inProgress"; + +if (isNull _controller) exitWith { + _return = false; + _return +}; + +private _autoScroll = _controller getVariable ["FORGE_SlideShow_AutoScroll", false]; +private _controllers = _controller getVariable ["FORGE_SlideShow_Controllers", []]; +private _currentIndex = _controller getVariable ["FORGE_SlideShow_CurrentIndex", 0]; +private _images = _controller getVariable ["FORGE_SlideShow_Images", []]; +private _screens = _controller getVariable ["FORGE_SlideShow_Screens", []]; +private _units = _controller getVariable ["FORGE_SlideShow_Units", []]; +private _topic = _controller getVariable ["FORGE_SlideShow_Topic", ""]; +private _sentence = _controller getVariable ["FORGE_SlideShow_Sentence", ""]; +private _started = _controller getVariable ["FORGE_SlideShow_Started", true]; + +if (_images isEqualTo []) exitWith { + _return = false; + _return +}; + +if (_screens isEqualTo []) exitWith { + _return = false; + _return +}; + +if (_controllers isEqualTo []) exitWith { + _return = false; + _return +}; + +private _imageCount = (count _images) - 1; + +if (_currentIndex isEqualTo _imageCount) then { + _currentIndex = 0; +}; + +_handle = [_topic, _sentence, nil, nil, nil, _units, 1, false] spawn BIS_fnc_kbTell; + +{ + _x setObjectTextureGlobal [0, (_images select _currentIndex) select 0]; + true +} count (_screens); + +{ + _x setVariable ["FORGE_SlideShow_CurrentIndex", _currentIndex, true]; + true +} count (_controllers); + +if (_autoScroll) then { + { + private _index = _controller getVariable ["FORGE_SlideShow_CurrentIndex", 0]; + private _image = _x select 0; + private _sleep = _x select 1; + + { + _x setObjectTextureGlobal [0, _image]; + true + } count (_screens); + + _index = _index + 1; + _controller setVariable ["FORGE_SlideShow_CurrentIndex", _index, true]; + + uiSleep _sleep; + true + } count (_images); +}; + +waitUntil { scriptDone _handle }; + +FORGE_Briefing_inProgress = false; +publicVariable "FORGE_Briefing_inProgress"; + +_return = true; +_return \ No newline at end of file diff --git a/addons/briefing/script_component.hpp b/addons/briefing/script_component.hpp new file mode 100644 index 0000000..12b9532 --- /dev/null +++ b/addons/briefing/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT briefing +#define COMPONENT_BEAUTIFIED Briefing +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_BRIEFING + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_BRIEFING + #define DEBUG_SETTINGS DEBUG_SETTINGS_BRIEFING +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/db/$PBOPREFIX$ b/addons/db/$PBOPREFIX$ new file mode 100644 index 0000000..4fccdf2 --- /dev/null +++ b/addons/db/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\db \ No newline at end of file diff --git a/addons/db/CfgEventHandlers.hpp b/addons/db/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/db/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/db/XEH_PREP.hpp b/addons/db/XEH_PREP.hpp new file mode 100644 index 0000000..7dbd5dc --- /dev/null +++ b/addons/db/XEH_PREP.hpp @@ -0,0 +1,3 @@ +PREP(saveToMission); +PREP(saveToProfile); +PREP(saveToTempDB); \ No newline at end of file diff --git a/addons/db/XEH_postInit.sqf b/addons/db/XEH_postInit.sqf new file mode 100644 index 0000000..a3c56cd --- /dev/null +++ b/addons/db/XEH_postInit.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +GVAR(tempDB) = []; \ No newline at end of file diff --git a/addons/db/XEH_postInit_client.sqf b/addons/db/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/db/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/db/XEH_preInit.sqf b/addons/db/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/db/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/db/XEH_preInit_server.sqf b/addons/db/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/db/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/db/XEH_preStart.sqf b/addons/db/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/db/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/db/config.cpp b/addons/db/config.cpp new file mode 100644 index 0000000..c26a700 --- /dev/null +++ b/addons/db/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "J. Schmidt"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/db/functions/fnc_saveToMission.sqf b/addons/db/functions/fnc_saveToMission.sqf new file mode 100644 index 0000000..628035c --- /dev/null +++ b/addons/db/functions/fnc_saveToMission.sqf @@ -0,0 +1,113 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_db_fnc_saveToMission + * Author: J.Schmidt + * Edit: 07.23.2024 + * Copyright © 2024 J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Store mission and player data in Mission Namespace. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_db_fnc_saveToMission; + * + * Public: Yes + */ + +if (isNil "companyFunds") then { companyFunds = 0 }; +if (isNil "companyRating") then { companyRating = 0 }; +if (isNil "companyGenerals") then { companyGenerals = [] }; +if (isNil "companyGarageUnlocks") then { companyGarageUnlocks = [] }; +// if (isNil "forge_client_armory_arsenalUnlocks") then { forge_client_armory_arsenalUnlocks = [] }; +// if (isNil "forge_client_armory_garageUnlocks") then { forge_client_armory_garageUnlocks = [] }; +if (isNil EGVAR(arsenal,armory_unlocks)) then { EGVAR(arsenal,armory_unlocks) = [[],[],[],[]] }; +if (isNil EGVAR(arsenal,garage_unlocks)) then { EGVAR(arsenal,garage_unlocks) = [[],[],[],[],[],[]] }; + +private _vdata = []; +private _pdata = []; +private _cdata = [ +["key", "CompanyState"], +["funds", [companyFunds]], +["rating", [companyRating]], +["operations", [companyGenerals]], +["garage_unlocks", [companyGarageUnlocks]] +]; + +private _vehicles = nearestObjects [player, ["LandVehicle"], 50] apply { + createHashMapFromArray [ + ["vehicle", _x], + ["class", [typeOf _x]], + ["position", [getPosATL _x]], + ["direction", [getDir _x]], + ["health", [damage _x]] + ]; +}; + +{ + if (alive _x) then { + _vdata pushBackUnique _x; + }; +} forEach _vehicles; + +{ + private _data = [ + ["key", getPlayerUID player], + // ["armory_unlocks", [forge_client_armory_arsenalUnlocks]], + // ["garage_unlocks", [forge_client_armory_garageUnlocks]], + ["armory_unlocks", [EGVAR(arsenal,armory_unlocks)]], + ["garage_unlocks", [EGVAR(arsenal,garage_unlocks)]], + // ["locker", [player getVariable ["Locker", []]]], + // ["garage", [player getVariable ["Garage", []]]], + ["locker", [GETVAR(player,FORGE_Locker,[])]], + ["garage", [GETVAR(player,FORGE_Garage,[])]], + // ["cash", [player getVariable ["FORGE_Cash", 0]]], + // ["bank", [player getVariable ["FORGE_Bank", 0]]], + ["cash", [GETVAR(player,FORGE_Cash,0)]], + ["bank", [GETVAR(player,FORGE_Bank,0)]], + // ["number", [player getVariable ["FORGE_Phone_Number", "unknown"]]], + // ["email", [player getVariable ["FORGE_Email", "unknown@spearnet.mil"]]], + ["number", [GETVAR(player,FORGE_Phone_Number,"unknown")]], + ["email", [GETVAR(player,FORGE_Email,"unknown@spearnet.mil")]], + // ["paygrade", [player getVariable ["Paygrade", "E1"]]], + ["paygrade", [GETVAR(player,FORGE_Paygrade,"E1")]], + ["reputation", [rating player]], + ["loadout", [getUnitLoadout player]], + // ["holster", [player getVariable ["FORGE_Holster_Weapon", true]]], + ["holster", [GETVAR(player,FORGE_Holster_Weapon,true)]], + ["position", [getPosASLVisual player]], + ["direction", [getDirVisual player]] + ]; + + if (isNull objectParent player) then { + _data pushBack "currentWeapon"; + _data pushBack [currentMuzzle player]; + _data pushBack "stance"; + _data pushBack [stance player]; + }; + + _pdata pushBackUnique _data; +} forEach playableUnits; + +private _cHashMap = createHashMapFromArray _cdata; +private _pHashMap = createHashMapFromArray _pdata; +private _vHashMap = createHashMapFromArray _vdata; + +// missionProfileNamespace setVariable ["FORGE_MissionData", _cHashMap]; +// missionProfileNamespace setVariable ["FORGE_PlayerData", _pHashMap]; +// missionProfileNamespace setVariable ["FORGE_VehicleData", _vHashMap]; +SETPVAR(missionNamespace,FORGE_MissionData,_cHashMap); +SETPVAR(missionNamespace,FORGE_PlayerData,_pHashMap); +SETPVAR(missionNamespace,FORGE_VehicleData,_vHashMap); \ No newline at end of file diff --git a/addons/db/functions/fnc_saveToProfile.sqf b/addons/db/functions/fnc_saveToProfile.sqf new file mode 100644 index 0000000..820ca88 --- /dev/null +++ b/addons/db/functions/fnc_saveToProfile.sqf @@ -0,0 +1,69 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_db_fnc_saveToProfile + * Author: J.Schmidt + * Edit: 07.23.2024 + * Copyright © 2024 J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Store player data in Profile Namespace. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_db_fnc_saveToProfile; + * + * Public: Yes + */ + +// if (isNil "forge_client_armory_arsenalUnlocks") then { forge_client_armory_arsenalUnlocks = [] }; +// if (isNil "forge_client_armory_garageUnlocks") then { forge_client_armory_garageUnlocks = [] }; +if (isNil EGVAR(arsenal,armory_unlocks)) then { EGVAR(arsenal,armory_unlocks) = [[],[],[],[]] }; +if (isNil EGVAR(arsenal,garage_unlocks)) then { EGVAR(arsenal,garage_unlocks) = [[],[],[],[],[],[]] }; + +private _data = [ +["key", getPlayerUID player], +["armory_unlocks", [EGVAR(arsenal,armory_unlocks)]], +["garage_unlocks", [EGVAR(arsenal,garage_unlocks)]], +// ["locker", [player getVariable ["Locker", []]]], +// ["garage", [player getVariable ["Garage", []]]], +["locker", [GETVAR(player,FORGE_Locker,[])]], +["garage", [GETVAR(player,FORGE_Garage,[])]], +// ["cash", [player getVariable ["FORGE_Cash", 0]]], +// ["bank", [player getVariable ["FORGE_Bank", 0]]], +["cash", [GETVAR(player,FORGE_Cash,0)]], +["bank", [GETVAR(player,FORGE_Bank,0)]], +// ["number", [player getVariable ["FORGE_Phone_Number", "unknown"]]], +// ["email", [player getVariable ["FORGE_Email", "unknown@spearnet.mil"]]], +["number", [GETVAR(player,FORGE_PhoneNumber,"unknown")]], +["email", [GETVAR(player,FORGE_Email,"unknown@spearnet.mil")]], +// ["paygrade", [player getVariable ["Paygrade", "E1"]]], +["paygrade", [GETVAR(player,FORGE_Paygrade,"E1")]], +["reputation", [rating player]], +["loadout", [getUnitLoadout player]], +// ["holster", [player getVariable ["FORGE_Holster_Weapon", true]]], +["holster", [GETVAR(player,FORGE_Holster_Weapon,true)]], +["position", [getPosASLVisual player]], +["direction", [getDirVisual player]] +]; + +if (isNull objectParent player) then { + _data pushBack ["currentWeapon", [currentMuzzle player]]; + _data pushBack ["stance", [stance player]]; +}; + +private _hashMap = createHashMapFromArray _data; + +// profileNamespace setVariable ["FORGE_PlayerData", _hashMap]; +SETPVAR(profileNamespace,FORGE_PlayerData,_hashMap); \ No newline at end of file diff --git a/addons/db/functions/fnc_saveToTempDB.sqf b/addons/db/functions/fnc_saveToTempDB.sqf new file mode 100644 index 0000000..ec097f0 --- /dev/null +++ b/addons/db/functions/fnc_saveToTempDB.sqf @@ -0,0 +1,51 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_db_fnc_saveToTempDB + * Author: J.Schmidt + * Edit: 07.23.2024 + * Copyright © 2024 J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Store data in Temp DB. + * + * Arguments: + * 0: Name of Event + * 1: Name of DB + * 2: UID of Player + * 3: Name of Key + * 4: Value to store in key + * + * Return Value: + * N/A + * + * Examples: + * ["playerStatus", "players", "76561198027566824", "status", "available"] call forge_client_db_fnc_saveToTempDB; + * + * Public: Yes + */ + +params [["_event", "", [""]], ["_db", "", [""]], ["_uid", "", [""]], ["_key", "", [""]], ["_value", "", [[], 0, "", false]]]; + +if (isNil "_event") exitWith { ["No Event provided"] call BFUNC(log); }; +if (isNil "_db") exitWith { ["No DB provided"] call BFUNC(log); }; +if (isNil "_uid") exitWith { ["No UID provided"] call BFUNC(log); }; +if (isNil "_key") exitWith { ["No key provided"] call BFUNC(log); }; +if (isNil "_value") exitWith { ["No Value provided"] call BFUNC(log); }; + +["Received event: %1", _this] call BFUNC(logFormat); + +private _response = [GVAR(tempDB), [_db, _uid, _key], _value] call BFUNC(dbValueSet); + +if !(_response) then { + ["Failed to set Key '%1' for UID '%2' with '%3' to DB", _key, _uid, _value] call BFUNC(logFormat); +} else { + SETPVAR(missionNamespace,FORGE_TempDb,GVAR(tempDB)); + ["Successfully set key '%1' for UID '%2' with '%3'", _key, _uid, _value] call BFUNC(logFormat); +}; \ No newline at end of file diff --git a/addons/db/script_component.hpp b/addons/db/script_component.hpp new file mode 100644 index 0000000..b2c6a23 --- /dev/null +++ b/addons/db/script_component.hpp @@ -0,0 +1,15 @@ +#define COMPONENT db +#define COMPONENT_BEAUTIFIED DB +#include "..\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_DB + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_DB + #define DEBUG_SETTINGS DEBUG_SETTINGS_DB +#endif + +#include "..\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/dialogue/$PBOPREFIX$ b/addons/dialogue/$PBOPREFIX$ new file mode 100644 index 0000000..a8c2d57 --- /dev/null +++ b/addons/dialogue/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\dialogue \ No newline at end of file diff --git a/addons/dialogue/CfgEventHandlers.hpp b/addons/dialogue/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/dialogue/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/dialogue/XEH_PREP.hpp b/addons/dialogue/XEH_PREP.hpp new file mode 100644 index 0000000..f8208a5 --- /dev/null +++ b/addons/dialogue/XEH_PREP.hpp @@ -0,0 +1,2 @@ +PREP(selectAI); +PREP(selectDialogue); \ No newline at end of file diff --git a/addons/dialogue/XEH_postInit.sqf b/addons/dialogue/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/dialogue/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/dialogue/XEH_postInit_client.sqf b/addons/dialogue/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/dialogue/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/dialogue/XEH_preInit.sqf b/addons/dialogue/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/dialogue/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/dialogue/XEH_preInit_server.sqf b/addons/dialogue/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/dialogue/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/dialogue/XEH_preStart.sqf b/addons/dialogue/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/dialogue/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/dialogue/config.cpp b/addons/dialogue/config.cpp new file mode 100644 index 0000000..338b901 --- /dev/null +++ b/addons/dialogue/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/dialogue/functions/fnc_selectAI.sqf b/addons/dialogue/functions/fnc_selectAI.sqf new file mode 100644 index 0000000..2a98227 --- /dev/null +++ b/addons/dialogue/functions/fnc_selectAI.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" + +/* + Name: forge_client_dialogue_fnc_selectAI + Date: 8/6/2022 + Version: 1.0 + Author: J. Schmidt + + Description: + Select AI for dialogue. + + Arguments: + 0: OBJECT - The AI unit +*/ + +params [["_units", [], [[]]]]; + +{ + _x disableAI "ALL"; + _x switchMove " "; + [_x] call FUNC(selectDialogue); + true +} count (_units); \ No newline at end of file diff --git a/addons/dialogue/functions/fnc_selectDialogue.sqf b/addons/dialogue/functions/fnc_selectDialogue.sqf new file mode 100644 index 0000000..5bea444 --- /dev/null +++ b/addons/dialogue/functions/fnc_selectDialogue.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" + +/* + Name: forge_client_dialogue_fnc_selectDialogue + Date: 8/6/2022 + Version: 1.0 + Author: J. Schmidt + + Description: + Create dialogue for AI unit. + + Arguments: + 0: OBJECT - The AI unit + 1: STRING - The dialogue +*/ + +params [["_units", [], [[]]], ["_dialogue", [], [[]]]]; + +{ + _x params ["_topic", "_sentence"]; + [_topic, _sentence, nil, false, nil, [_units], 1, false] spawn BFUNC(kbTell); + true +} count (_dialogue); \ No newline at end of file diff --git a/addons/dialogue/script_component.hpp b/addons/dialogue/script_component.hpp new file mode 100644 index 0000000..a155996 --- /dev/null +++ b/addons/dialogue/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT dialogue +#define COMPONENT_BEAUTIFIED Dialogue +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_DIALOGUE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_DIALOGUE + #define DEBUG_SETTINGS DEBUG_SETTINGS_DIALOGUE +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/garage/$PBOPREFIX$ b/addons/garage/$PBOPREFIX$ new file mode 100644 index 0000000..e10766d --- /dev/null +++ b/addons/garage/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\garage \ No newline at end of file diff --git a/addons/garage/CfgEventHandlers.hpp b/addons/garage/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/garage/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/garage/README.md b/addons/garage/README.md new file mode 100644 index 0000000..bb1536d --- /dev/null +++ b/addons/garage/README.md @@ -0,0 +1,4 @@ +forge_garage +========== + +A player garage addon that provides personal storage functionality. Players can store and retrieve their vehicles securely using individual garages. This addon handles the storage and management of player vehicles in a safe and organized way. \ No newline at end of file diff --git a/addons/garage/XEH_PREP.hpp b/addons/garage/XEH_PREP.hpp new file mode 100644 index 0000000..9af9896 --- /dev/null +++ b/addons/garage/XEH_PREP.hpp @@ -0,0 +1,6 @@ +PREP(fetchGarage); +PREP(fetchNearby); +PREP(initGarage); +PREP(openGarage); +PREP(spawnVehicle); +PREP(storeVehicle); \ No newline at end of file diff --git a/addons/garage/XEH_postInit.sqf b/addons/garage/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/garage/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/garage/XEH_postInit_client.sqf b/addons/garage/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/garage/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/garage/XEH_preInit.sqf b/addons/garage/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/garage/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/garage/XEH_preInit_server.sqf b/addons/garage/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/garage/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/garage/XEH_preStart.sqf b/addons/garage/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/garage/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/garage/config.cpp b/addons/garage/config.cpp new file mode 100644 index 0000000..6f2f02c --- /dev/null +++ b/addons/garage/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ui\BaseControls.hpp" +#include "ui\RscGarageDialog.hpp" \ No newline at end of file diff --git a/addons/garage/functions/fnc_fetchGarage.sqf b/addons/garage/functions/fnc_fetchGarage.sqf new file mode 100644 index 0000000..fff3d05 --- /dev/null +++ b/addons/garage/functions/fnc_fetchGarage.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_GARAGEDIALOG; +private _garageList = _display displayCtrl IDC_GARAGEVEHICLELIST; +// private _storedVehicles = player getVariable ["FORGE_Garage", []]; +private _storedVehicles = GETVAR(player,FORGE_Garage,[]); + +lbClear _garageList; + +{ + _x params ["_isGarageVehicle", "_className", "_vehData"]; + + private _index = -1; + private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName"); + private _picture = getText (configFile >> "CfgVehicles" >> _className >> "picture"); + + _index = _garageList lbAdd _displayName; + _garageList lbSetData [_index, str [_isGarageVehicle, _className, _vehData]]; + _garageList lbSetPicture [_index, _picture]; +} forEach _storedVehicles; \ No newline at end of file diff --git a/addons/garage/functions/fnc_fetchNearby.sqf b/addons/garage/functions/fnc_fetchNearby.sqf new file mode 100644 index 0000000..1ff203e --- /dev/null +++ b/addons/garage/functions/fnc_fetchNearby.sqf @@ -0,0 +1,42 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_GARAGEDIALOG; +private _vehicleList = _display displayCtrl IDC_VEHICLELIST; + +lbClear _vehicleList; + +private _temp = []; +private _locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFUNC(getCfgData); + +{ + if ((getPosATLVisual player) distance (_x select 1) < 20) then { + { + // private _isGarageVehicle = _x getVariable ["FORGE_GarageVehicle", false]; + private _isGarageVehicle = GETVAR(_x,FORGE_GarageVehicle,false); + + if (_isGarageVehicle) then { + private _vehData = [ + getAllHitPointsDamage _x, + fuel _x, + damage _x + ]; + + _temp pushBackUnique [_isGarageVehicle, typeOf _x, _vehData, netId _x]; + } else { + ["This vehicle was not spawned from the garage and cannot be stored.", "warning", 3, "right"] call EFUNC(misc,notify); + }; + } forEach (nearestObjects [(_x select 1), ["Land", "Air", "Ship"], 5]) - [player]; + }; +} forEach _locations; + +{ + _x params ["_isGarageVehicle", "_className", "_vehData", "_netID"]; + + private _index = -1; + private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName"); + private _picture = getText (configFile >> "CfgVehicles" >> _className >> "picture"); + + _index = _vehicleList lbAdd _displayName; + _vehicleList lbSetData [_index, str [_isGarageVehicle, _className, _vehData, _netID]]; + _vehicleList lbSetPicture [_index, _picture]; +} forEach _temp; \ No newline at end of file diff --git a/addons/garage/functions/fnc_initGarage.sqf b/addons/garage/functions/fnc_initGarage.sqf new file mode 100644 index 0000000..d21a6b6 --- /dev/null +++ b/addons/garage/functions/fnc_initGarage.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" + +{ + private _configName = configName(_x); + private _className = (missionConfigFile >> "CfgGarages" >> "garages" >> _configName >> "className") call BFUNC(getCfgData); + private _pos = (missionConfigFile >> "CfgGarages" >> "garages" >> _configName >> "pos") call BFUNC(getCfgData); + private _dir = (missionConfigFile >> "CfgGarages" >> "garages" >> _configName >> "dir") call BFUNC(getCfgData); + private _type = (missionConfigFile >> "CfgGarages" >> "garages" >> _configName >> "type") call BFUNC(getCfgData); + + if (_type == "object") then { + private _garage = createSimpleObject [_className, [0, 0, 0]]; + + _garage setPosATL _pos; + _garage setDir _dir; + _garage allowDamage false; + _garage setVariable ["isGarage", true, true]; + } else { + private _group = createGroup civilian; + private _garage = _group createUnit [_className, [0, 0, 0], [], 0, "NONE"]; + + _garage disableAI "MOVE"; + _garage setPosATL _pos; + _garage setDir _dir; + _garage allowDamage false; + _garage setVariable ["isGarage", true, true]; + _garage setVariable ["BIS_enableRandomization", false]; + }; + + diag_log text format ["[FORGE Garage] ClassName: '%1' Pos: '%2' Dir: '%3' Type: '%4'", _className, _pos, _dir, _type]; + +} forEach ("true" configClasses (missionConfigFile >> "CfgGarages" >> "garages")); \ No newline at end of file diff --git a/addons/garage/functions/fnc_openGarage.sqf b/addons/garage/functions/fnc_openGarage.sqf new file mode 100644 index 0000000..334e9b8 --- /dev/null +++ b/addons/garage/functions/fnc_openGarage.sqf @@ -0,0 +1,9 @@ +#include "..\script_component.hpp" + +disableSerialization; +createDialog "RscGarageDialog"; + +ctrlSetText [IDC_DIALOGNAME, format ["%1's Garage", (name player)]]; + +[] call FUNC(fetchGarage); +[] call FUNC(fetchNearby); \ No newline at end of file diff --git a/addons/garage/functions/fnc_spawnVehicle.sqf b/addons/garage/functions/fnc_spawnVehicle.sqf new file mode 100644 index 0000000..1ab3dd3 --- /dev/null +++ b/addons/garage/functions/fnc_spawnVehicle.sqf @@ -0,0 +1,65 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_GARAGEDIALOG; +private _garageList = _display displayCtrl IDC_GARAGEVEHICLELIST; +private _vehicleList = _display displayCtrl IDC_VEHICLELIST; +private _selectedVehicle = lbCurSel _garageList; +private _selectedVehicleData = _garageList lbData _selectedVehicle; +private _data = call compile _selectedVehicleData; + +ctrlEnable [IDC_SPAWNBUTTON, false]; + +if ((isNil { _data })) exitWith { ctrlEnable [IDC_SPAWNBUTTON, true]; }; + +private _isGarageVehicle = _data select 0; +private _className = _data select 1; +private _vehData = _data select 2; +private _locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFUNC(getCfgData); + +{ + if (_isGarageVehicle) exitWith { + private _vehicle = createVehicle [_className, (_x select 1)]; + + private _hitPointsData = _vehData select 0; + + if (count _hitPointsData > 0) then { + private _hitPoints = _hitPointsData select 0; + private _damages = _hitPointsData select 2; + + { + _vehicle setHitPointDamage [_x, _damages select _forEachIndex]; + } forEach _hitPoints; + }; + + { + _vehicle setHitPointDamage [_x, _damages select _forEachIndex]; + } forEach _hitPoints; + + _vehicle setFuel _fuel; + _vehicle setDamage _damage; + // _vehicle setVariable ["FORGE_GarageVehicle", _isGarageVehicle, true]; + SETPVAR(_vehicle,FORGE_GarageVehicle,_isGarageVehicle); + _vehicle setDir (_x select 2); + }; +} forEach _locations; + +lbClear _garageList; +lbClear _vehicleList; +_garageList lbSetCurSel -1; +_vehicleList lbSetCurSel -1; + +// private _garage = player getVariable ["FORGE_Garage", []]; +private _garage = GETVAR(player,FORGE_Garage,[]); +private _index = _garage findIf { (_x select 0) == _isGarageVehicle && (_x select 1) == _className }; + +if (_index != -1) then { + _garage deleteAt _index; + // player setVariable ["FORGE_Garage", _garage, true]; + SETPVAR(player,FORGE_Garage,_garage); +}; + +[] call FUNC(fetchGarage); +[] call FUNC(fetchNearby); + +ctrlEnable [IDC_SPAWNBUTTON, true]; +playSound "FD_Finish_F"; \ No newline at end of file diff --git a/addons/garage/functions/fnc_storeVehicle.sqf b/addons/garage/functions/fnc_storeVehicle.sqf new file mode 100644 index 0000000..f65418f --- /dev/null +++ b/addons/garage/functions/fnc_storeVehicle.sqf @@ -0,0 +1,49 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_GARAGEDIALOG; +private _garageList = _display displayCtrl IDC_GARAGEVEHICLELIST; +private _vehicleList = _display displayCtrl IDC_VEHICLELIST; +private _selectedVehicle = lbCurSel _vehicleList; +private _selectedVehicleData = _vehicleList lbData _selectedVehicle; +private _data = call compile _selectedVehicleData; + +ctrlEnable [IDC_STOREBUTTON, false]; + +if ((isNil { _data })) exitWith { ctrlEnable [IDC_STOREBUTTON, true]; }; + +private _isGarageVehicle = _data select 0; +private _className = _data select 1; +private _netID = _data select 3; + +private _veh = objectFromNetId _netID; +private _vehData = [ + getAllHitPointsDamage _veh, + fuel _veh, + damage _veh +]; + +// private _garage = player getVariable ["FORGE_Garage", []]; +private _garage = GETVAR(player,FORGE_Garage,[]); + +_garage pushBack [_isGarageVehicle, _className, _vehData]; +// player setVariable ["FORGE_Garage", _garage, true]; +SETPVAR(player,FORGE_Garage,_garage); + +lbClear _vehicleList; +lbClear _garageList; +_vehicleList lbSetCurSel -1; +_garageList lbSetCurSel -1; + +_veh spawn { + deleteVehicle _this; + waitUntil { isNull _this }; + + sleep 0.5; + + [] call FUNC(fetchGarage); + [] call FUNC(fetchNearby); + + ctrlEnable [IDC_STOREBUTTON, true]; +}; + +playSound "FD_Finish_F"; \ No newline at end of file diff --git a/addons/garage/script_component.hpp b/addons/garage/script_component.hpp new file mode 100644 index 0000000..528f018 --- /dev/null +++ b/addons/garage/script_component.hpp @@ -0,0 +1,24 @@ +#define COMPONENT garage +#define COMPONENT_BEAUTIFIED Garage +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_GARAGE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_GARAGE + #define DEBUG_SETTINGS DEBUG_SETTINGS_GARAGE +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" + +#define IDD_GARAGEDIALOG 82100 +#define IDC_DIALOGNAME 82101 +#define IDC_VEHICLELIST 82102 +#define IDC_GARAGEVEHICLELIST 82103 +#define IDC_STOREBUTTON 82104 +#define IDC_SPAWNBUTTON 82105 +#define IDC_CLOSEBUTTON 82106 \ No newline at end of file diff --git a/addons/garage/stringtable.xml b/addons/garage/stringtable.xml new file mode 100644 index 0000000..34a9773 --- /dev/null +++ b/addons/garage/stringtable.xml @@ -0,0 +1,17 @@ + + + + + Close + + + Garage + + + Spawn + + + Store + + + diff --git a/addons/garage/ui/BaseControls.hpp b/addons/garage/ui/BaseControls.hpp new file mode 100644 index 0000000..5fce5a8 --- /dev/null +++ b/addons/garage/ui/BaseControls.hpp @@ -0,0 +1,265 @@ +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// Default text sizes +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +// Pixel grid +#define pixelScale 0.50 +#define GRID_W (pixelW * pixelGrid * pixelScale) +#define GRID_H (pixelH * pixelGrid * pixelScale) + +class ScrollBar; +class RscObject; +class RscText; +class RscTextSmall; +class RscTitle; +class RscProgress; +class RscProgressNotFreeze; +class RscPicture; +class RscLadderPicture; +class RscPictureKeepAspect; +class RscHTML; +class RscButton; +class RscShortcutButton; +class RscButtonSmall; +class RscEdit; +class RscCombo; +class RscListBox; +class RscListNBox; +class RscXListBox; +class RscTree; +class RscSlider; +class RscSliderH; +class RscXSliderH; +class RscActiveText; +class RscStructuredText; +class RscControlsGroup; +class RscToolbox; +class RscMapControl; +class RscCheckBox; +class RscFrame; +class ctrlDefault; +class ctrlControlsGroup; +class ctrlDefaultText; +class ctrlDefaultButton; +class RscBackgroundStripeTop; +class RscBackgroundStripeBottom; +class RscIGText; +class RscIGProgress; +class RscListBoxKeys; +class RscControlsGroupNoScrollbars; +class RscControlsGroupNoHScrollbars; +class RscControlsGroupNoVScrollbars; +class RscLine; +class RscActivePicture; +class RscButtonTextOnly; +class RscShortcutButtonMain; +class RscButtonEditor; +class RscIGUIShortcutButton; +class RscGearShortcutButton; +class RscButtonMenu; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenuSteam; +class RscLoadingText; +class RscIGUIListBox; +class RscIGUIListNBox; +class RscBackground; +class RscBackgroundGUI; +class RscBackgroundGUILeft; +class RscBackgroundGUIRight; +class RscBackgroundGUIBottom; +class RscBackgroundGUITop; +class RscBackgroundGUIDark; +class RscBackgroundLogo; +class RscMapControlEmpty; +class RscVignette; +class CA_Mainback; +class CA_Back; +class CA_Title_Back; +class CA_Black_Back; +class CA_Title; +class CA_Logo; +class CA_Logo_Small; +class CA_RscButton; +class CA_RscButton_dialog; +class CA_Ok; +class CA_Ok_image; +class CA_Ok_image2; +class CA_Ok_text; +class ctrlCheckbox; +class ctrlCheckboxBaseline; +class ctrlStatic; +class ctrlControlsGroupNoScrollbars; +class ctrlStructuredText; +class RscTextMulti; +class RscTreeSearch; +class RscVideo; +class RscVideoKeepAspect; +class RscActivePictureKeepAspect; +class RscEditMulti; +class RscMapSignalBackground; +class RscMapSignalPicture; +class RscMapSignalText; +class RscColorPicker; +class RscInterlacingScreen; +class RscFeedback; +class RscTrafficLight; +class RscButtonSearch; +class RscIGUIText; +class RscOpticsText; +class RscOpticsValue; +class RscIGUIValue; +class RscButtonMenuMain; +class RscButtonTestCentered; +class RscDisplaySingleMission_ChallengeOverviewGroup; +class RscDisplayDebriefing_RscTextMultiline; +class RscDisplayDebriefing_ListGroup; +class RscButtonArsenal; +class RscTextNoShadow; +class RscButtonNoColor; +class RscToolboxButton; +class ctrlStaticPicture; +class ctrlStaticPictureKeepAspect; +class ctrlStaticPictureTile; +class ctrlStaticFrame; +class ctrlStaticLine; +class ctrlStaticMulti; +class ctrlStaticBackground; +class ctrlStaticOverlay; +class ctrlStaticTitle; +class ctrlStaticFooter; +class ctrlStaticBackgroundDisable; +class ctrlStaticBackgroundDisableTiles; +class ctrlButton; +class ctrlButtonPicture; +class ctrlButtonPictureKeepAspect; +class ctrlButtonOK; +class ctrlButtonCancel; +class ctrlButtonClose; +class ctrlButtonToolbar; +class ctrlButtonSearch; +class ctrlButtonExpandAll; +class ctrlButtonCollapseAll; +class ctrlButtonFilter; +class ctrlEdit; +class ctrlEditMulti; +class ctrlSliderV; +class ctrlSliderH; +class ctrlCombo; +class ctrlComboToolbar; +class ctrlListbox; +class ctrlToolbox; +class ctrlToolboxPicture; +class ctrlToolboxPictureKeepAspect; +class ctrlCheckboxes; +class ctrlCheckboxesCheckbox; +class ctrlProgress; +class ctrlHTML; +class ctrlActiveText; +class ctrlActivePicture; +class ctrlActivePictureKeepAspect; +class ctrlTree; +class ctrlControlsGroupNoHScrollbars; +class ctrlControlsGroupNoVScrollbars; +class ctrlShortcutButton; +class ctrlShortcutButtonOK; +class ctrlShortcutButtonCancel; +class ctrlShortcutButtonSteam; +class ctrlXListbox; +class ctrlXSliderV; +class ctrlXSliderH; +class ctrlMenu; +class ctrlMenuStrip; +class ctrlMap; +class ctrlMapEmpty; +class ctrlMapMain; +class ctrlListNBox; +class ctrlCheckboxToolbar; \ No newline at end of file diff --git a/addons/garage/ui/RscGarageDialog.hpp b/addons/garage/ui/RscGarageDialog.hpp new file mode 100644 index 0000000..a98563b --- /dev/null +++ b/addons/garage/ui/RscGarageDialog.hpp @@ -0,0 +1,73 @@ +class RscGarageDialog { + idd = IDD_GARAGEDIALOG; + movingEnable = 1; + enableSimulation = 1; + + class controlsBackground { + class MainBackground: RscText { + idc = -1; + x = "0.25 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.5 * safezoneW"; + h = "0.725 * safezoneH"; + colorBackground[] = {0, 0, 0, 0.7}; + }; + class DialogTitle: RscText { + idc = IDC_DIALOGNAME; + text = CSTRING(Name); + x = "0.25 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.5 * safezoneW"; + h = "0.0325 * safezoneH"; + colorBackground[] = {0.1, 0.1, 0.1, 1}; + }; + }; + + class controls { + class PlayerEquipmentList: RscListBox { + idc = IDC_VEHICLELIST; + x = "0.26 * safezoneW + safezoneX"; + y = "0.17 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.615 * safezoneH"; + }; + + class GarageItemsList: RscListBox { + idc = IDC_GARAGEVEHICLELIST; + x = "0.51 * safezoneW + safezoneX"; + y = "0.17 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.615 * safezoneH"; + }; + + class StoreButton: RscButton { + idc = IDC_STOREBUTTON; + text = CSTRING(Store); + x = "0.26 * safezoneW + safezoneX"; + y = "0.80625 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "_this call forge_client_garage_fnc_storeVehicle"; + }; + + class SpawnButton: RscButton { + idc = IDC_SPAWNBUTTON; + text = CSTRING(Spawn); + x = "0.51 * safezoneW + safezoneX"; + y = "0.80625 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "_this call forge_client_garage_fnc_spawnVehicle"; + }; + + class CloseButton: RscButton { + idc = IDC_CLOSEBUTTON; + text = "X"; + x = "0.7225 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.0275 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "closeDialog 0"; + }; + }; +}; diff --git a/addons/init/$PBOPREFIX$ b/addons/init/$PBOPREFIX$ new file mode 100644 index 0000000..e653c85 --- /dev/null +++ b/addons/init/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\init \ No newline at end of file diff --git a/addons/init/CfgEventHandlers.hpp b/addons/init/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/init/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/init/XEH_PREP.hpp b/addons/init/XEH_PREP.hpp new file mode 100644 index 0000000..8b79914 --- /dev/null +++ b/addons/init/XEH_PREP.hpp @@ -0,0 +1,5 @@ +PREP(handlePlayerLoad); +PREP(initPlayer); +PREP(playerDBLoad); +PREP(playerDBSave); +PREP(playerSaveLoop); \ No newline at end of file diff --git a/addons/init/XEH_postInit.sqf b/addons/init/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/init/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/init/XEH_postInit_client.sqf b/addons/init/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/init/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/init/XEH_preInit.sqf b/addons/init/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/init/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/init/XEH_preInit_server.sqf b/addons/init/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/init/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/init/XEH_preStart.sqf b/addons/init/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/init/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/init/config.cpp b/addons/init/config.cpp new file mode 100644 index 0000000..338b901 --- /dev/null +++ b/addons/init/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/init/functions/fnc_handlePlayerLoad.sqf b/addons/init/functions/fnc_handlePlayerLoad.sqf new file mode 100644 index 0000000..9aa690e --- /dev/null +++ b/addons/init/functions/fnc_handlePlayerLoad.sqf @@ -0,0 +1,122 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_init_fnc_handlePlayerLoad + * Author: Creedcoder, J.Schmidt + * Edit: 07.15.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Handle player load from DB. + * + * Arguments: + * 0: Data from key [] (default: []) + * + * Return Value: + * N/A + * + * Examples: + * [[_data]] call forge_client_init_fnc_handlePlayerLoad (Server or Singleplayer Only) + * [[_data]] remoteExecCall ["forge_client_init_fnc_handlePlayerLoad", 2, false] (Multiplayer Only) + * + * Public: Yes + */ + +private _data = _this; +private _defaultEmail = "unknown@spearnet.mil"; +private _defaultPhoneNumber = "unknown"; + +if (_data isEqualTo [""]) then { + 2 cutText ["No Save Found!", "PLAIN DOWN", 1]; + [player] spawn EFUNC(player,firstLogin); +} else { + [format ["Welcome back %1. Your persistent locker, bank, cash and profile have been loaded.", name player], "blue-grey", 5] call EFUNC(misc,notify); + + for "_i" from 0 to (count _data - 1) step 2 do { + private _key = _data select _i; + private _value = _data select (_i + 1); + + if (_value isEqualType []) then { + _value = _value select 0; + }; + + switch (_key) do { + case "reputation": { + SETPVAR(player,Reputation,_value); + player addRating _value; + }; + case "loadout": { + SETPVAR(player,Loadout,_value); + player setUnitLoadout _value; + }; + case "direction": { + SETPVAR(player,Direction,_value); + player setDir _value; + }; + case "cash": { + SETPVAR(player,FORGE_Cash,_value); + }; + case "bank": { + SETPVAR(player,FORGE_Bank,_value); + }; + case "armory_unlocks": { + SETPVAR(player,Armory_Unlocks,_value); + }; + case "garage_unlocks": { + SETPVAR(player,Garage_Unlocks,_value); + }; + case "locker": { + SETPVAR(player,FORGE_Locker,_value); + }; + case "garage": { + SETPVAR(player,FORGE_Garage,_value); + }; + case "email": { + SETPVAR(player,FORGE_Email,_value); + }; + case "number": { + SETPVAR(player,FORGE_Phone_Number,_value); + }; + case "paygrade": { + SETPVAR(player,Paygrade,_value); + }; + case "stance": { + SETPVAR(player,Stance,_value); + player playAction _value; + }; + case "holster": { + SETPVAR(player,FORGE_Holster_Weapon,_value); + if (_value) then { + [player] call AFUNC(weaponselect,putWeaponAway); + }; + }; + case "position": { + SETPVAR(player,Position,_value); + player setPosASL _value; + + private _pAlt = ((getPosATLVisual player) select 2); + private _pVelZ = ((velocity player) select 2); + if (_pAlt > 5 && _pVelZ < 0) then { + player setVelocity [0, 0, 0]; + player setPosATL [((getPosATLVisual player) select 0), ((getPosATLVisual player) select 1), 1]; + hint "You logged off mid air. You were moved to a safe position on the ground."; + }; + }; + }; + }; + + if (needReload player == 1) then { reload player }; + SETPVAR(player,value_loadDone,true); + + // ["listrng", GETVAR(player,FORGE_Email,_defaultEmail), "", -1, [], "forge_client_phone_fnc_addOfflineEmail", true] spawn dragonfly_db_fnc_addTask; + ["listrng", GETVAR(player,FORGE_Email,_defaultEmail), "", -1, [], "forge_client_phone_fnc_addOfflineEmail", true, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; + + // ["listrng", GETVAR(player,FORGE_Phone_Number,_defaultPhoneNumber), "", -1, [], "forge_client_phone_fnc_addOfflineMsg", true] spawn dragonfly_db_fnc_addTask; + ["listrng", GETVAR(player,FORGE_Phone_Number,_defaultPhoneNumber), "", -1, [], "forge_client_phone_fnc_addOfflineMsg", true, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; +}; \ No newline at end of file diff --git a/addons/init/functions/fnc_initPlayer.sqf b/addons/init/functions/fnc_initPlayer.sqf new file mode 100644 index 0000000..0c3ae0d --- /dev/null +++ b/addons/init/functions/fnc_initPlayer.sqf @@ -0,0 +1,91 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_init_fnc_initPlayer + * Author: Creedcoder, J.Schmidt + * Edit: 07.15.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Initialize player. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_init_fnc_initPlayer (Server or Singleplayer Only) + * [] remoteExecCall ["forge_client_init_fnc_initPlayer", 2, false] (Multiplayer Only) + * + * Public: Yes + */ + +waitUntil { !isNull player }; +waitUntil { player == player }; +waitUntil { alive player }; + +removeAllWeapons player; +removeAllAssignedItems player; +removeUniform player; +removeVest player; +removeBackpack player; +removeGoggles player; +removeHeadgear player; + +SETVAR(player,value_loadDone,false); +cutText ["Loading In...", "BLACK", 1]; + +// waitUntil { GETVAR(player,value_armoryDone,false) }; + +// ["hgetall", "", "", -1, [], "forge_client_init_fnc_handlePlayerLoad", true] spawn dragonfly_db_fnc_addTask; +["hgetallid", getPlayerUID player, "", -1, [], "forge_client_init_fnc_handlePlayerLoad", true, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; + +[] spawn FUNC(playerSaveLoop); +[] spawn EFUNC(interaction,initInteraction); + +waitUntil { GETVAR(player,value_loadDone,false) }; +cutText ["", "PLAIN", 1]; + +waitUntil { !(isNull (findDisplay 46)) }; +(findDisplay 46) displayAddEventHandler ["KeyDown", { + switch (_this select 1) do { + // Interaction Interface (default key TAB) + case ((configFile >> "CfgPatches" >> "forge_client_main" >> "interactionKey") call BFUNC(getCfgData)): { + [] call EFUNC(interaction,openInteraction); + false; + }; + // Holster/Unholster (default key H) + case ((configFile >> "CfgPatches" >> "forge_client_main" >> "holsterKey") call BFUNC(getCfgData)): { + if ((currentWeapon player) != "" && !(GETVAR(player,FORGE_Holster_Weapon,true))) then { + player action ["SwitchWeapon", player, player, 299]; + SETPVAR(player,FORGE_Holster_Weapon,true); + } else { + private _weapon = switch (true) do { + case ((primaryWeapon player) != ""): { primaryWeapon player }; + case ((handgunWeapon player) != ""): { handgunWeapon player }; + case ((secondaryWeapon player) != ""): { secondaryWeapon player }; + default {""}; + }; + if (_weapon != "") then { player selectWeapon _weapon }; + SETPVAR(player,FORGE_Holster_Weapon,false); + }; + false; + }; + // Open Phone (default key P) + case ((configFile >> "CfgPatches" >> "forge_client_main" >> "phoneKey") call BFUNC(getCfgData)): { + [] spawn EFUNC(phone,openPhone); + false; + }; + default { + false; + }; + }; +}]; \ No newline at end of file diff --git a/addons/init/functions/fnc_playerDBLoad.sqf b/addons/init/functions/fnc_playerDBLoad.sqf new file mode 100644 index 0000000..0574cbd --- /dev/null +++ b/addons/init/functions/fnc_playerDBLoad.sqf @@ -0,0 +1,32 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_init_fnc_playerDBLoad + * Author: Creedcoder, J.Schmidt + * Edit: 07.15.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Load player from DB. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_init_fnc_playerDBLoad (Server or Singleplayer Only) + * [] remoteExecCall ["forge_client_init_fnc_playerDBLoad", 2, false] (Multiplayer Only) + * + * Public: Yes + */ + +// ["hgetall", "", "", -1, [], "forge_client_init_fnc_handlePlayerLoad", true] spawn dragonfly_db_fnc_addTask; +["hgetallid", getPlayerUID player, "", -1, [], "forge_client_init_fnc_handlePlayerLoad", true, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; \ No newline at end of file diff --git a/addons/init/functions/fnc_playerDBSave.sqf b/addons/init/functions/fnc_playerDBSave.sqf new file mode 100644 index 0000000..33937fd --- /dev/null +++ b/addons/init/functions/fnc_playerDBSave.sqf @@ -0,0 +1,70 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_init_fnc_playerDBSave + * Author: Creedcoder, J.Schmidt + * Edit: 07.15.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Save player to DB. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_init_fnc_playerDBSave (Server or Singleplayer Only) + * [] remoteExecCall ["forge_client_init_fnc_playerDBSave", 2, false] (Multiplayer Only) + * + * Public: Yes + */ + +private _default_armory_unlocks = [[],[],[],[]]; +private _default_garage_unlocks = [[],[],[],[],[],[]]; + +private _data = [ +getPlayerUID player, +// "armory_unlocks", [player getVariable ["Armory_Unlocks", [[],[],[],[]]]], +// "garage_unlocks", [player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]]], +"armory_unlocks", [GETVAR(player,Armory_Unlocks,_default_armory_unlocks)], +"garage_unlocks", [GETVAR(player,Garage_Unlocks,_default_garage_unlocks)], +// "locker", [player getVariable ["FORGE_Locker", []]], +// "garage", [player getVariable ["FORGE_Garage", []]], +"locker", [GETVAR(player,FORGE_Locker,[])], +"garage", [GETVAR(player,FORGE_Garage,[])], +// "cash", [player getVariable ["FORGE_Cash", 0]], +// "bank", [player getVariable ["FORGE_Bank", 0]], +"cash", [GETVAR(player,FORGE_Cash,0)], +"bank", [GETVAR(player,FORGE_Bank,0)], +// "number", [player getVariable ["FORGE_Phone_Number", "unknown"]], +// "email", [player getVariable ["FORGE_Email", "unknown@spearnet.mil"]], +"number", [GETVAR(player,FORGE_Phone_Number,"unknown")], +"email", [GETVAR(player,FORGE_Email,"unknown@spearnet.mil")], +// "paygrade", [player getVariable ["Paygrade", "E1"]], +"paygrade", [GETVAR(player,Paygrade,"E1")], +"reputation", [rating player], +"loadout", [getUnitLoadout player], +// "holster", [player getVariable ["FORGE_Holster_Weapon", true]], +"holster", [GETVAR(player,FORGE_Holster_Weapon,true)], +"position", [getPosASLVisual player], +"direction", [getDirVisual player] +]; + +if (isNull objectParent player) then { + _data pushBack "currentWeapon"; + _data pushBack [currentMuzzle player]; + _data pushBack "stance"; + _data pushBack [stance player]; +}; + +// ["hsetBulk", "", "", -1, _data, "", false] spawn dragonfly_db_fnc_addTask; +["hsetidbulk", "", "", -1, _data, "", false, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; \ No newline at end of file diff --git a/addons/init/functions/fnc_playerSaveLoop.sqf b/addons/init/functions/fnc_playerSaveLoop.sqf new file mode 100644 index 0000000..4d4fd7c --- /dev/null +++ b/addons/init/functions/fnc_playerSaveLoop.sqf @@ -0,0 +1,39 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_init_fnc_playerSaveLoop + * Author: Creedcoder, J.Schmidt + * Edit: 07.15.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Initialize player save loop. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_init_fnc_playerSaveLoop (Server or Singleplayer Only) + * [] remoteExecCall ["forge_client_init_fnc_playerSaveLoop", 2, false] (Multiplayer Only) + * + * Public: Yes + */ + +waitUntil { !isNull player }; +waitUntil { alive player }; + +while { true } do { + sleep ((configFile >> "CfgPatches" >> "forge_client_main" >> "clientSaveLoopTime") call BFUNC(getCfgData)); + + ["Saving player...", "blue-grey", 3] call EFUNC(misc,notify); + [] call FUNC(playerDBSave); +}; \ No newline at end of file diff --git a/addons/init/script_component.hpp b/addons/init/script_component.hpp new file mode 100644 index 0000000..b3cd8ff --- /dev/null +++ b/addons/init/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT init +#define COMPONENT_BEAUTIFIED Init +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_INIT + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_INIT + #define DEBUG_SETTINGS DEBUG_SETTINGS_INIT +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/interaction/$PBOPREFIX$ b/addons/interaction/$PBOPREFIX$ new file mode 100644 index 0000000..f8c6e81 --- /dev/null +++ b/addons/interaction/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\interaction \ No newline at end of file diff --git a/addons/interaction/CfgEventHandlers.hpp b/addons/interaction/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/interaction/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp new file mode 100644 index 0000000..47284b2 --- /dev/null +++ b/addons/interaction/CfgVehicles.hpp @@ -0,0 +1,129 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_MainActions { + class giveCash { + displayName = "Give Cash"; + condition = "isPlayer cursorObject && (player distance cursorObject) <= 5"; + exceptions[] = {}; + statement = QUOTE([cursorObject] spawn EFUNC(money,giveCash)); + // icon = ""; + }; + class addContact { + displayName = "Add Contact"; + condition = "isPlayer cursorObject && (player distance cursorObject) <= 5"; + exceptions[] = {}; + statement = QUOTE([cursorObject] spawn EFUNC(phone,addContact)); + // icon = ""; + }; + class openATM { + displayName = "Access ATM"; + condition = "!(isNil {cursorObject getVariable 'isBank'}) && (player distance cursorObject) <= 5"; + exceptions[] = {}; + statement = QUOTE([cursorObject] spawn EFUNC(bank,openBank)); + // icon = ""; + }; + class openCPOF { + displayName = "Access CPOF"; + condition = "!(isNil {cursorObject getVariable 'isCPOF'}) && (player distance cursorObject) <= 5"; + exceptions[] = {}; + statement = QUOTE([cursorObject] spawn EFUNC(admin,openAdmin)); + // icon = ""; + }; + class openGarage { + displayName = "Open Garage"; + condition = "!(isNil {cursorObject getVariable 'isGarage'}) && (player distance cursorObject) <= 5 && FORGE_Team_Coord == 0"; + exceptions[] = {}; + statement = QUOTE([cursorObject] spawn EFUNC(garage,openGarage)); + // icon = ""; + }; + // class openCompanyGarage { + // displayName = "Open Company Garage"; + // condition = "!(isNil {cursorObject getVariable 'isGarage'}) && (player distance cursorObject) <= 5 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyGenerals"; + // exceptions[] = {}; + // statement = "[cursorObject] spawn forge_client_garage_fnc_openGarage"; + // icon = ""; + // }; + class openVirtualGarage { + displayName = "Virtual Garage"; + condition = "!(isNil {cursorObject getVariable 'isGarage'}) && (player distance cursorObject) <= 5 && FORGE_VA_Enable == 1 && FORGE_Team_Coord == 0"; + exceptions[] = {}; + statement = QUOTE([cursorObject] spawn EFUNC(arsenal,openGarage)); + // icon = ""; + }; + // class openVirtualCompanyGarage { + // displayName = "Virtual Company Garage"; + // condition = "!(isNil {cursorObject getVariable 'isGarage'}) && (player distance cursorObject) <= 5 && FORGE_VA_Enable == 1 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyGenerals"; + // exceptions[] = {}; + // statement = "[cursorObject] spawn forge_client_arsenal_fnc_openGarage"; + // icon = ""; + // }; + class takeCash { + displayName = "Take Cash"; + condition = "!(isNil {cursorObject getVariable 'isCash'}) && (player distance cursorObject) <= 5"; + exceptions[] = {}; + statement = QUOTE([cursorObject] spawn EFUNC(money,takeCash)); + // icon = ""; + }; + class openLocker { + displayName = "Open Locker"; + condition = "!(isNil {cursorObject getVariable 'isLocker'}) && (player distance cursorObject) <= 5"; + exceptions[] = {}; + statement = QUOTE([cursorObject] spawn EFUNC(locker,openLocker)); + // icon = ""; + }; + // class openCompanyLocker { + // displayName = "Open Company Locker"; + // condition = "!(isNil {cursorObject getVariable 'isLocker'}) && (player distance cursorObject) <= 5 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyGenerals"; + // exceptions[] = {}; + // statement = "[cursorObject] spawn forge_client_locker_fnc_openLocker"; + // icon = ""; + // }; + class openVirtualArmory { + displayName = "Virtual Armory"; + condition = "!(isNil {cursorObject getVariable 'isLocker'}) && (player distance cursorObject) <= 5 && FORGE_VA_Enable == 1"; + exceptions[] = {}; + statement = QUOTE([cursorObject] spawn EFUNC(arsenal,openArmory)); + // icon = ""; + }; + // class openVirtualCompanyArmory { + // displayName = "Virtual Company Armory"; + // condition = "!(isNil {cursorObject getVariable 'isLocker'}) && (player distance cursorObject) <= 5 && FORGE_VA_Enable == 1 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyGenerals"; + // exceptions[] = {}; + // statement = "[cursorObject] spawn forge_client_arsenal_fnc_openArmory"; + // icon = ""; + // }; + class openStore { + displayName = "Access Store"; + condition = "!(isNil {cursorObject getVariable 'isStore'}) && (player distance cursorObject) <= 5"; + exceptions[] = {}; + statement = QUOTE([cursorObject] spawn EFUNC(store,openStore)); + // icon = ""; + }; + }; + class ACE_SelfActions { + class getacF110 { + displayName = "Getac F110"; + condition = "('FORGE_Tablet' in (items player))"; + // icon = ""; + class getacOpen { + displayName = "Open"; + condition = "true"; + exceptions[] = {}; + statement = "[] execVM 'CoalaOs\CoalaOsMain.sqf'"; + }; + }; + class phone { + displayName = "Phone"; + condition = "('FORGE_Phone' in (items player))"; + // icon = ""; + class phoneOpen { + displayName = "Open"; + condition = "true"; + exceptions[] = {}; + statement = QUOTE([] spawn EFUNC(phone,openPhone)); + }; + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/interaction/README.md b/addons/interaction/README.md new file mode 100644 index 0000000..d2a9906 --- /dev/null +++ b/addons/interaction/README.md @@ -0,0 +1,4 @@ +forge_interaction +=============== + +Core interaction addon that handles all player interactions with the game world. This system manages how players engage with objects, NPCs, items and other interactive elements in the environment. \ No newline at end of file diff --git a/addons/interaction/XEH_PREP.hpp b/addons/interaction/XEH_PREP.hpp new file mode 100644 index 0000000..c3cf624 --- /dev/null +++ b/addons/interaction/XEH_PREP.hpp @@ -0,0 +1,3 @@ +PREP(initInteraction); +PREP(interactionAction); +PREP(openInteraction); \ No newline at end of file diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/interaction/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/interaction/XEH_postInit_client.sqf b/addons/interaction/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/interaction/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/interaction/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/interaction/XEH_preInit_server.sqf b/addons/interaction/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/interaction/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/interaction/XEH_preStart.sqf b/addons/interaction/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/interaction/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/interaction/config.cpp b/addons/interaction/config.cpp new file mode 100644 index 0000000..d9ae219 --- /dev/null +++ b/addons/interaction/config.cpp @@ -0,0 +1,19 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "ui\RscCommon.hpp" +#include "ui\RscInteraction.hpp" \ No newline at end of file diff --git a/addons/interaction/functions/fnc_initInteraction.sqf b/addons/interaction/functions/fnc_initInteraction.sqf new file mode 100644 index 0000000..9cf2bed --- /dev/null +++ b/addons/interaction/functions/fnc_initInteraction.sqf @@ -0,0 +1,111 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_interaction_fnc_initInteraction + * Author: Creedcoder, J.Schmidt + * Edit: 07.23.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Initialize player interaction. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] spawn forge_client_interaction_fnc_initInteraction; + * + * Public: Yes + */ + +FORGE_Team_Coord = "TEAM_COORD" call BFUNC(getParamValue); +FORGE_VA_Enable = "VA_ENABLE" call BFUNC(getParamValue); + +FORGE_InteractionButtons = [1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608]; + +FORGE_InteractionItems = [ + [ + ["isPlayer cursorObject", "(player distance cursorObject) <= 5"], + ["Give Cash", "[cursorObject] spawn forge_client_money_fnc_giveCash"] + ], + [ + ["isPlayer cursorObject", "(player distance cursorObject) <= 5"], + ["Add Contact", "[cursorObject] call forge_client_phone_fnc_addContact"] + ], + [ + ["!(isNil { + cursorObject getVariable 'isBank' + })", "(player distance cursorObject) <= 5"], + ["Access ATM", "[cursorObject] spawn forge_client_bank_fnc_openBank"] + ], + [ + ["!(isNil { + cursorObject getVariable 'isCPOF' + })", "(player distance cursorObject) <= 5 && (getPlayerUID player) in companyGenerals"], + ["Access CPOF", "[cursorObject] spawn forge_client_admin_fnc_openAdmin"] + ], + [ + ["!(isNil { + cursorObject getVariable 'isCash' + })", "(player distance cursorObject) <= 5"], + ["Take Cash", "[cursorObject] spawn forge_client_money_fnc_takeCash"] + ], + [ + ["!(isNil { + cursorObject getVariable 'isLocker' + })", "(player distance cursorObject) <= 5"], + ["Open Locker", "[cursorObject] spawn forge_client_locker_fnc_openLocker"] + ], + [ + ["!(isNil { + cursorObject getVariable 'isStore' + })", "(player distance cursorObject) <= 5"], + ["Access the Store", "[cursorObject] spawn forge_client_store_fnc_openStore"] + ] +]; + +if (FORGE_Team_Coord == 1) then { + FORGE_InteractionItems append [ + [ + ["!(isNil { + cursorObject getVariable 'isGarage' + })", "(player distance cursorObject) <= 5 && (getPlayerUID player) in companyGenerals"], + ["Open Company Garage", "[cursorObject] spawn forge_client_garage_fnc_openGarage"] + ] + ]; +} else { + FORGE_InteractionItems append [ + [ + ["!(isNil { + cursorObject getVariable 'isGarage' + })", "(player distance cursorObject) <= 5"], + ["Open Garage", "[cursorObject] spawn forge_client_garage_fnc_openGarage"] + ] + ]; +}; + +if (FORGE_VA_Enable == 1) then { + FORGE_InteractionItems append [ + [ + ["!(isNil { + cursorObject getVariable 'isLocker' + })", "(player distance cursorObject) <= 5"], + ["Virtual Armory", "[] spawn forge_client_arsenal_fnc_openArmory"] + ], + [ + ["!(isNil { + cursorObject getVariable 'isGarage' + })", "(player distance cursorObject) <= 5"], + ["Virtual Garage", "[cursorObject] spawn forge_client_arsenal_fnc_openGarage"] + ] + ]; +}; \ No newline at end of file diff --git a/addons/interaction/functions/fnc_interactionAction.sqf b/addons/interaction/functions/fnc_interactionAction.sqf new file mode 100644 index 0000000..0bed88c --- /dev/null +++ b/addons/interaction/functions/fnc_interactionAction.sqf @@ -0,0 +1,34 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_interaction_fnc_interactionAction + * Author: Creedcoder, J.Schmidt + * Edit: 07.23.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Initialize player interaction. + * + * Arguments: + * 0: Index of current action array + * + * Return Value: + * N/A + * + * Examples: + * [0] call forge_client_interaction_fnc_interactionAction; + * + * Public: Yes + */ + +params ["_index"]; + +closeDialog 0; + +call compile (FORGE_CurrentActionArray select _index); \ No newline at end of file diff --git a/addons/interaction/functions/fnc_openInteraction.sqf b/addons/interaction/functions/fnc_openInteraction.sqf new file mode 100644 index 0000000..bbf8087 --- /dev/null +++ b/addons/interaction/functions/fnc_openInteraction.sqf @@ -0,0 +1,65 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_interaction_fnc_openInteraction + * Author: Creedcoder, J.Schmidt + * Edit: 07.23.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Open player interaction. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [] call forge_client_interaction_fnc_openInteraction; + * + * Public: Yes + */ + +if (!isNull findDisplay 1014) exitWith {}; + +createDialog "RscInteraction"; + +{ + ctrlShow [_x, false]; +} forEach FORGE_InteractionButtons; + +private _index1 = 0; +FORGE_CurrentActionArray = []; + +{ + private _cArray = _x select 0; + private _cTrue = true; + + for "_i" from 0 to ((count _cArray) - 1) step 1 do { + _c = call compile (_cArray select _i); + if (!_c) then { + _cTrue = false; + }; + }; + + if (_cTrue) then { + if (_index1 < 9) then { + private _idc = 1600 + _index1; + _index1 = _index1 + 1; + private _text = (_x select 1) select 0; + private _action = (_x select 1) select 1; + + ctrlShow [_idc, true]; + ctrlSetText [_idc, _text]; + + FORGE_CurrentActionArray pushBack _action; + }; + }; +} forEach FORGE_InteractionItems; \ No newline at end of file diff --git a/addons/interaction/script_component.hpp b/addons/interaction/script_component.hpp new file mode 100644 index 0000000..e655b06 --- /dev/null +++ b/addons/interaction/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT interaction +#define COMPONENT_BEAUTIFIED Interaction +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_INTERACTION + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_INTERACTION + #define DEBUG_SETTINGS DEBUG_SETTINGS_INTERACTION +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/interaction/ui/RscCommon.hpp b/addons/interaction/ui/RscCommon.hpp new file mode 100644 index 0000000..9170d02 --- /dev/null +++ b/addons/interaction/ui/RscCommon.hpp @@ -0,0 +1,268 @@ +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// Default grid +// #define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) +// #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) +// #define GUI_GRID_W (GUI_GRID_WAbs / 40) +// #define GUI_GRID_H (GUI_GRID_HAbs / 25) +// #define GUI_GRID_X (safezoneX) +// #define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) + +// Default text sizes +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +class ScrollBar; +class RscObject; +class RscText; +class RscTextSmall; +class RscTitle; +class RscProgress; +class RscProgressNotFreeze; +class RscPicture; +class RscLadderPicture; +class RscPictureKeepAspect; +class RscHTML; +class RscButton; +class RscShortcutButton; +class RscButtonSmall; +class RscEdit; +class RscCombo; +class RscListBox; +class RscListNBox; +class RscXListBox; +class RscTree; +class RscSlider; +class RscSliderH; +class RscXSliderH; +class RscActiveText; +class RscStructuredText; +class RscControlsGroup; +class RscToolbox; +class RscMapControl; +class RscCheckBox; +class RscFrame; +class ctrlDefault; +class ctrlControlsGroup; +class ctrlDefaultText; +class ctrlDefaultButton; +class RscBackgroundStripeTop; +class RscBackgroundStripeBottom; +class RscIGText; +class RscIGProgress; +class RscListBoxKeys; +class RscControlsGroupNoScrollbars; +class RscControlsGroupNoHScrollbars; +class RscControlsGroupNoVScrollbars; +class RscLine; +class RscActivePicture; +class RscButtonTextOnly; +class RscShortcutButtonMain; +class RscButtonEditor; +class RscIGUIShortcutButton; +class RscGearShortcutButton; +class RscButtonMenu; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenuSteam; +class RscLoadingText; +class RscIGUIListBox; +class RscIGUIListNBox; +class RscBackground; +class RscBackgroundGUI; +class RscBackgroundGUILeft; +class RscBackgroundGUIRight; +class RscBackgroundGUIBottom; +class RscBackgroundGUITop; +class RscBackgroundGUIDark; +class RscBackgroundLogo; +class RscMapControlEmpty; +class RscVignette; +class CA_Mainback; +class CA_Back; +class CA_Title_Back; +class CA_Black_Back; +class CA_Title; +class CA_Logo; +class CA_Logo_Small; +class CA_RscButton; +class CA_RscButton_dialog; +class CA_Ok; +class CA_Ok_image; +class CA_Ok_image2; +class CA_Ok_text; +class ctrlCheckbox; +class ctrlCheckboxBaseline; +class ctrlStatic; +class ctrlControlsGroupNoScrollbars; +class ctrlStructuredText; +class RscTextMulti; +class RscTreeSearch; +class RscVideo; +class RscVideoKeepAspect; +class RscActivePictureKeepAspect; +class RscEditMulti; +class RscMapSignalBackground; +class RscMapSignalPicture; +class RscMapSignalText; +class RscColorPicker; +class RscInterlacingScreen; +class RscFeedback; +class RscTrafficLight; +class RscButtonSearch; +class RscIGUIText; +class RscOpticsText; +class RscOpticsValue; +class RscIGUIValue; +class RscButtonMenuMain; +class RscButtonTestCentered; +class RscDisplaySingleMission_ChallengeOverviewGroup; +class RscDisplayDebriefing_RscTextMultiline; +class RscDisplayDebriefing_ListGroup; +class RscButtonArsenal; +class RscTextNoShadow; +class RscButtonNoColor; +class RscToolboxButton; +class ctrlStaticPicture; +class ctrlStaticPictureKeepAspect; +class ctrlStaticPictureTile; +class ctrlStaticFrame; +class ctrlStaticLine; +class ctrlStaticMulti; +class ctrlStaticBackground; +class ctrlStaticOverlay; +class ctrlStaticTitle; +class ctrlStaticFooter; +class ctrlStaticBackgroundDisable; +class ctrlStaticBackgroundDisableTiles; +class ctrlButton; +class ctrlButtonPicture; +class ctrlButtonPictureKeepAspect; +class ctrlButtonOK; +class ctrlButtonCancel; +class ctrlButtonClose; +class ctrlButtonToolbar; +class ctrlButtonSearch; +class ctrlButtonExpandAll; +class ctrlButtonCollapseAll; +class ctrlButtonFilter; +class ctrlEdit; +class ctrlEditMulti; +class ctrlSliderV; +class ctrlSliderH; +class ctrlCombo; +class ctrlComboToolbar; +class ctrlListbox; +class ctrlToolbox; +class ctrlToolboxPicture; +class ctrlToolboxPictureKeepAspect; +class ctrlCheckboxes; +class ctrlCheckboxesCheckbox; +class ctrlProgress; +class ctrlHTML; +class ctrlActiveText; +class ctrlActivePicture; +class ctrlActivePictureKeepAspect; +class ctrlTree; +class ctrlControlsGroupNoHScrollbars; +class ctrlControlsGroupNoVScrollbars; +class ctrlShortcutButton; +class ctrlShortcutButtonOK; +class ctrlShortcutButtonCancel; +class ctrlShortcutButtonSteam; +class ctrlXListbox; +class ctrlXSliderV; +class ctrlXSliderH; +class ctrlMenu; +class ctrlMenuStrip; +class ctrlMap; +class ctrlMapEmpty; +class ctrlMapMain; +class ctrlListNBox; +class ctrlCheckboxToolbar; \ No newline at end of file diff --git a/addons/interaction/ui/RscInteraction.hpp b/addons/interaction/ui/RscInteraction.hpp new file mode 100644 index 0000000..c69c37f --- /dev/null +++ b/addons/interaction/ui/RscInteraction.hpp @@ -0,0 +1,95 @@ +class RscInteraction { + idd = 1014; + class controls { + class RscInteractionFrame_1800: RscText { + idc = 1800; + x = "0.419792 * safezoneW + safezoneX"; + y = "0.247099 * safezoneH + safezoneY"; + w = "0.1375 * safezoneW"; + h = "0.46182 * safezoneH"; + colorBackground[] = {0,0,0,0}; + }; + class RscInteractionText_1000: RscText { + idc = 1000; + text = "Player Interaction"; + style = "0x10+0x200"; + lineSpacing = 1; + x = "0.43125 * safezoneW + safezoneX"; + y = "0.258094 * safezoneH + safezoneY"; + w = "0.114583 * safezoneW"; + h = "0.0425 * safezoneH"; + }; + class RscInteractionButton_1600: RscButton { + idc = 1600; + x = "0.43125 * safezoneW + safezoneX"; + y = "0.302077 * safezoneH + safezoneY"; + w = "0.114583 * safezoneW"; + h = "0.0329871 * safezoneH"; + onButtonClick = "[0] call forge_client_interaction_fnc_interactionAction"; + }; + class RscInteractionButton_1601: RscButton { + idc = 1601; + x = "0.43125 * safezoneW + safezoneX"; + y = "0.34606 * safezoneH + safezoneY"; + w = "0.114583 * safezoneW"; + h = "0.0329871 * safezoneH"; + onButtonClick = "[1] call forge_client_interaction_fnc_interactionAction"; + }; + class RscInteractionButton_1602: RscButton { + idc = 1602; + x = "0.43125 * safezoneW + safezoneX"; + y = "0.390043 * safezoneH + safezoneY"; + w = "0.114583 * safezoneW"; + h = "0.0329871 * safezoneH"; + onButtonClick = "[2] call forge_client_interaction_fnc_interactionAction"; + }; + class RscInteractionButton_1603: RscButton { + idc = 1603; + x = "0.43125 * safezoneW + safezoneX"; + y = "0.434026 * safezoneH + safezoneY"; + w = "0.114583 * safezoneW"; + h = "0.0329871 * safezoneH"; + onButtonClick = "[3] call forge_client_interaction_fnc_interactionAction"; + }; + class RscInteractionButton_1604: RscButton { + idc = 1604; + x = "0.43125 * safezoneW + safezoneX"; + y = "0.478009 * safezoneH + safezoneY"; + w = "0.114583 * safezoneW"; + h = "0.0329871 * safezoneH"; + onButtonClick = "[4] call forge_client_interaction_fnc_interactionAction"; + }; + class RscInteractionButton_1605: RscButton { + idc = 1605; + x = "0.43125 * safezoneW + safezoneX"; + y = "0.521991 * safezoneH + safezoneY"; + w = "0.114583 * safezoneW"; + h = "0.0329871 * safezoneH"; + onButtonClick = "[5] call forge_client_interaction_fnc_interactionAction"; + }; + class RscInteractionButton_1606: RscButton { + idc = 1606; + x = "0.43125 * safezoneW + safezoneX"; + y = "0.565974 * safezoneH + safezoneY"; + w = "0.114583 * safezoneW"; + h = "0.0329871 * safezoneH"; + onButtonClick = "[6] call forge_client_interaction_fnc_interactionAction"; + }; + class RscInteractionButton_1607: RscButton { + idc = 1607; + x = "0.43125 * safezoneW + safezoneX"; + y = "0.609957 * safezoneH + safezoneY"; + w = "0.114583 * safezoneW"; + h = "0.0329871 * safezoneH"; + onButtonClick = "[7] call forge_client_interaction_fnc_interactionAction"; + }; + class RscInteractionButton_1608: RscButton { + idc = 1608; + x = "0.43125 * safezoneW + safezoneX"; + y = "0.65394 * safezoneH + safezoneY"; + w = "0.114583 * safezoneW"; + h = "0.0329871 * safezoneH"; + onButtonClick = "[8] call forge_client_interaction_fnc_interactionAction"; + }; + }; +}; \ No newline at end of file diff --git a/addons/locker/$PBOPREFIX$ b/addons/locker/$PBOPREFIX$ new file mode 100644 index 0000000..f6b26f7 --- /dev/null +++ b/addons/locker/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\locker \ No newline at end of file diff --git a/addons/locker/CfgEventHandlers.hpp b/addons/locker/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/locker/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/locker/README.md b/addons/locker/README.md new file mode 100644 index 0000000..f14845e --- /dev/null +++ b/addons/locker/README.md @@ -0,0 +1,4 @@ +forge_locker +========== + +A player locker addon that provides personal storage functionality. Players can store and retrieve their items securely using individual lockers. This addon handles the storage and management of player inventories in a safe and organized way. \ No newline at end of file diff --git a/addons/locker/XEH_PREP.hpp b/addons/locker/XEH_PREP.hpp new file mode 100644 index 0000000..25dea1c --- /dev/null +++ b/addons/locker/XEH_PREP.hpp @@ -0,0 +1,6 @@ +PREP(equipGear); +PREP(fetchLocker); +PREP(fetchPlayer); +PREP(initLocker); +PREP(openLocker); +PREP(storeGear); \ No newline at end of file diff --git a/addons/locker/XEH_postInit.sqf b/addons/locker/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/locker/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/locker/XEH_postInit_client.sqf b/addons/locker/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/locker/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/locker/XEH_preInit.sqf b/addons/locker/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/locker/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/locker/XEH_preInit_server.sqf b/addons/locker/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/locker/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/locker/XEH_preStart.sqf b/addons/locker/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/locker/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/locker/config.cpp b/addons/locker/config.cpp new file mode 100644 index 0000000..a3076b8 --- /dev/null +++ b/addons/locker/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ui\BaseControls.hpp" +#include "ui\RscLockerDialog.hpp" \ No newline at end of file diff --git a/addons/locker/functions/fnc_equipGear.sqf b/addons/locker/functions/fnc_equipGear.sqf new file mode 100644 index 0000000..55af4d4 --- /dev/null +++ b/addons/locker/functions/fnc_equipGear.sqf @@ -0,0 +1,203 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_LOCKERDIALOG; +private _playerItems = _display displayCtrl IDC_PLAYEREQUIPMENTLIST; +private _lockerItems = _display displayCtrl IDC_LOCKEREQUIPMENTLIST; +private _selectedItem = lbCurSel _lockerItems; +private _selectedItemData = _lockerItems lbData _selectedItem; + +private _data = call compile _selectedItemData; +// private _locker = player getVariable ["FORGE_Locker", []]; +private _locker = GETVAR(player,FORGE_Locker,[]); + +if ((isNil { _data })) exitWith { ctrlEnable [IDC_EQUIPBUTTON, true]; }; + +private _itemType = _data select 0; +private _item = _data select 1; +private _clear = true; + +switch (_itemType) do { + case "backpack": { + if (isNull (unitBackpack player)) then { + player addBackpack _item; + playSound "FD_Finish_F"; + } else { + _clear = false; + // hintSilent "You already have a backpack equipped!"; + ["You already have a backpack equiped!", "warning", 3, "right"] call EFUNC(misc,notify); + playSound "FD_CP_Not_Clear_F"; + }; + }; + case "facewear": { + if (isNull (goggles player)) then { + player addGoggles _item; + playSound "FD_Finish_F"; + } else { + _clear = false; + // hintSilent "You already have facewear equipped!"; + ["You already have facewear equiped!", "warning", 3, "right"] call EFUNC(misc,notify); + playSound "FD_CP_Not_Clear_F"; + }; + }; + case "headgear": { + if (isNull (headgear player)) then { + player addHeadgear _item; + playSound "FD_Finish_F"; + } else { + _clear = false; + // hintSilent "You already have headgear equipped!"; + ["You already have headgear equiped!", "warning", 3, "right"] call EFUNC(misc,notify); + playSound "FD_CP_Not_Clear_F"; + }; + }; + case "hmd": { + if (isNull (hmd player)) then { + player linkItem _item; + playSound "FD_Finish_F"; + } else { + _clear = false; + // hintSilent "You already have a HMD equipped!"; + ["You already have a HMD equiped!", "warning", 3, "right"] call EFUNC(misc,notify); + playSound "FD_CP_Not_Clear_F"; + }; + }; + case "item": { + if (player canAdd _item) then { + player addItem _item; + playSound "FD_Finish_F"; + } else { + _clear = false; + // hintSilent "You don't have enough space left!"; + ["You don't have enough space left!", "warning", 3, "right"] call EFUNC(misc,notify); + playSound "FD_CP_Not_Clear_F"; + }; + }; + case "magazine": { + if (player canAdd (_item select 0)) then { + player addMagazine [(_item select 0), (_item select 1)]; + playSound "FD_Finish_F"; + } else { + _clear = false; + // hintSilent "You don't have enough space left!"; + ["You don't have enough space left!", "warning", 3, "right"] call EFUNC(misc,notify); + playSound "FD_CP_Not_Clear_F"; + }; + }; + case "uniform": { + if (isNull (uniform player)) then { + player forceAddUniform _item; + playSound "FD_Finish_F"; + } else { + _clear = false; + // hintSilent "You already have a uniform equipped!"; + ["You already have a uniform equiped!", "warning", 3, "right"] call EFUNC(misc,notify); + playSound "FD_CP_Not_Clear_F"; + }; + }; + case "vest": { + if (isNull (vest player)) then { + player addVest _item; + playSound "FD_Finish_F"; + } else { + _clear = false; + // hintSilent "You already have a vest equipped!"; + ["You already have a vest equiped!", "warning", 3, "right"] call EFUNC(misc,notify); + playSound "FD_CP_Not_Clear_F"; + }; + }; + // case "weapon": { + // if (!(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 131072) && + // {!(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 1) || primaryWeapon player == ""} && + // {!(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 2) || handgunWeapon player == ""} && + // {!(getNumber (configFile >> "CfgWeapons" >> _item >> "type") == 4) || secondaryWeapon player == ""}) then { + + // private _compatibleMags = getArray (configFile >> "CfgWeapons" >> _item >> "magazines"); + // private _baseType = (_compatibleMags select 0) select [0, (_compatibleMags select 0) find "_Tracer"]; + + // if (_baseType == "") then { _baseType = _compatibleMags select 0 }; + + // private _magIndices = []; + // { + // if ((_x select 0) == "magazine") then { + // private _magClass = (_x select 1) select 0; + + // if ((_magClass in _compatibleMags || + // {("ACE_" in _magClass) && {_baseType in _magClass}}) && + // {player canAdd _magClass}) then { + // player addMagazine [_magClass, (_x select 1) select 1]; + // _magIndices pushBack _forEachIndex; + // }; + // }; + // } forEach _locker; + + // reverse _magIndices; + // { + // _locker deleteAt _x; + // } forEach _magIndices; + + // player addWeapon _item; + // playSound "FD_Finish_F"; + // } else { + // _clear = false; + // // hintSilent "You don't have enough space left!"; + // ["You don't have enough space left!", "warning", 3, "right"] call EFUNC(misc,notify); + // playSound "FD_CP_Not_Clear_F"; + // }; + // }; + case "weapon": { + private _weaponType = getNumber (configFile >> "CfgWeapons" >> _item >> "type"); + private _hasSpace = switch (_weaponType) do { + case 1: {primaryWeapon player == ""}; // Primary + case 2: {handgunWeapon player == ""}; // Handgun + case 4: {secondaryWeapon player == ""}; // Launcher + case 131072: {false}; // Binoculars + default {true}; + }; + + if (_hasSpace) then { + private _compatibleMags = getArray (configFile >> "CfgWeapons" >> _item >> "magazines"); + private _baseType = (_compatibleMags select 0) select [0, (_compatibleMags select 0) find "_Tracer"]; + if (_baseType == "") then {_baseType = _compatibleMags select 0}; + + private _magIndices = []; + { + if ((_x select 0) == "magazine") then { + private _magClass = (_x select 1) select 0; + if ((_magClass in _compatibleMags || {("ACE_" in _magClass) && {_baseType in _magClass}}) && + {player canAdd _magClass}) then { + player addMagazine [_magClass, (_x select 1) select 1]; + _magIndices pushBack _forEachIndex; + }; + }; + } forEach _locker; + + reverse _magIndices; + {_locker deleteAt _x} forEach _magIndices; + + player addWeapon _item; + playSound "FD_Finish_F"; + } else { + _clear = false; + ["You don't have enough space left!", "warning", 3, "right"] call EFUNC(misc,notify); + playSound "FD_CP_Not_Clear_F"; + }; + }; +}; + +if (_clear) then { + lbClear _lockerItems; + lbClear _playerItems; + _lockerItems lbSetCurSel -1; + _playerItems lbSetCurSel -1; + + private _index = _locker findIf { _x isEqualTo _data }; + + _locker deleteAt _index; + // player setVariable ["FORGE_Locker", _locker, true]; + SETPVAR(player,FORGE_Locker,_locker); + + [] call FUNC(fetchLocker); + [] call FUNC(fetchPlayer); + + ctrlEnable [IDC_EQUIPBUTTON, true]; +}; \ No newline at end of file diff --git a/addons/locker/functions/fnc_fetchLocker.sqf b/addons/locker/functions/fnc_fetchLocker.sqf new file mode 100644 index 0000000..34104c1 --- /dev/null +++ b/addons/locker/functions/fnc_fetchLocker.sqf @@ -0,0 +1,86 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_LOCKERDIALOG; +private _itemList = _display displayCtrl IDC_LOCKEREQUIPMENTLIST; +// private _locker = player getVariable ["FORGE_Locker", []]; +private _locker = GETVAR(player,FORGE_Locker,[]); + +{ + _x params ["_itemType", "_item"]; + private _index = -1; + + switch (_itemType) do { + case "backpack": { + private _displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgVehicles" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "facewear": { + private _displayName = getText (configFile >> "CfgGlasses" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgGlasses" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "headgear": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "hmd": { + private _display = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "item": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "magazine": { + private _displayName = format["%1 (%2/%3)", getText (configFile >> "CfgMagazines" >> (_item select 0) >> "displayName"), (_item select 1), (_item select 2)]; + private _picture = getText (configFile >> "CfgMagazines" >> (_item select 0) >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "uniform": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "vest": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "weapon": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + }; +} forEach _locker; \ No newline at end of file diff --git a/addons/locker/functions/fnc_fetchPlayer.sqf b/addons/locker/functions/fnc_fetchPlayer.sqf new file mode 100644 index 0000000..65b3ad8 --- /dev/null +++ b/addons/locker/functions/fnc_fetchPlayer.sqf @@ -0,0 +1,112 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_LOCKERDIALOG; +private _itemList = _display displayCtrl IDC_PLAYEREQUIPMENTLIST; +private _data = []; + +_data pushBack ["backpack", backpack player]; +_data pushBack ["facewear", goggles player]; +_data pushBack ["headgear", headgear player]; +_data pushBack ["hmd", hmd player]; +_data pushBack ["uniform", uniform player]; +_data pushBack ["vest", vest player]; +_data pushBack ["weapon", primaryWeapon player]; +_data pushBack ["weapon", secondaryWeapon player]; +_data pushBack ["weapon", handgunWeapon player]; + +{ + _data pushBack ["item", _x]; +} forEach (assignedItems player + items player); + +{ + private _magClass = _x select 0; + private _ammoCount = _x select 1; + private _magLocation = _x select 4; + private _ammoFull = getNumber (configFile >> "CfgMagazines" >> _magClass >> "count"); + + if (_magLocation in ["Uniform", "Vest", "Backpack"]) then { + _data pushBack ["magazine", [_magClass, _ammoCount, _ammoFull, _magLocation]]; + }; +} forEach (magazinesAmmoFull player); + +_data = _data select { !(_x in [["backpack", ""], ["facewear", ""], ["headgear", ""], ["hmd", ""], ["item", ""], ["magazine", ""], ["uniform", ""], ["vest", ""], ["weapon", ""]]) }; + +{ + _x params ["_itemType", "_item"]; + private _index = -1; + + switch (_itemType) do { + case "backpack": { + private _displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgVehicles" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "facewear": { + private _displayName = getText (configFile >> "CfgGlasses" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgGlasses" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "headgear": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "hmd": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "item": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "magazine": { + private _displayName = format ["%1 (%2/%3) [%4]", getText (configFile >> "CfgMagazines" >> (_item select 0) >> "displayName"), (_item select 1), (_item select 2), (_item select 3)]; + private _picture = getText (configFile >> "CfgMagazines" >> (_item select 0) >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "uniform": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "vest": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + case "weapon": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _itemList lbAdd _displayName; + _itemList lbSetData [_index, str [_itemType, _item]]; + _itemList lbSetPicture [_index, _picture]; + }; + }; +} forEach _data; \ No newline at end of file diff --git a/addons/locker/functions/fnc_initLocker.sqf b/addons/locker/functions/fnc_initLocker.sqf new file mode 100644 index 0000000..8fdf48c --- /dev/null +++ b/addons/locker/functions/fnc_initLocker.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" + +{ + private _configName = configName(_x); + private _className = (missionConfigFile >> "CfgLockers" >> "lockers" >> _configName >> "className") call BFUNC(getCfgData); + private _pos = (missionConfigFile >> "CfgLockers" >> "lockers" >> _configName >> "pos") call BFUNC(getCfgData); + private _dir = (missionConfigFile >> "CfgLockers" >> "lockers" >> _configName >> "dir") call BFUNC(getCfgData); + private _type = (missionConfigFile >> "CfgLockers" >> "lockers" >> _configName >> "type") call BFUNC(getCfgData); + + if (_type == "object") then { + private _locker = createSimpleObject [_className, [0, 0, 0]]; + + _locker setPosATL _pos; + _locker setDir _dir; + _locker allowDamage false; + _locker setVariable ["isLocker", true, true]; + } else { + private _group = createGroup civilian; + private _locker = _group createUnit [_className, [0, 0, 0], [], 0, "NONE"]; + + _locker disableAI "MOVE"; + _locker setPosATL _pos; + _locker setDir _dir; + _locker allowDamage false; + _locker setVariable ["isLocker", true, true]; + _locker setVariable ["BIS_enableRandomization", false]; + }; + + diag_log text format ["[FORGE Locker] ClassName: '%1' Pos: '%2' Dir: '%3' Type: '%4'", _className, _pos, _dir, _type]; + +} forEach ("true" configClasses (missionConfigFile >> "CfgLockers" >> "lockers")); \ No newline at end of file diff --git a/addons/locker/functions/fnc_openLocker.sqf b/addons/locker/functions/fnc_openLocker.sqf new file mode 100644 index 0000000..b320370 --- /dev/null +++ b/addons/locker/functions/fnc_openLocker.sqf @@ -0,0 +1,9 @@ +#include "..\script_component.hpp" + +disableSerialization; +createDialog "RscLockerDialog"; + +ctrlSetText [IDC_DIALOGNAME, format ["%1's Locker", (name player)]]; + +[] call FUNC(fetchLocker); +[] call FUNC(fetchPlayer); \ No newline at end of file diff --git a/addons/locker/functions/fnc_storeGear.sqf b/addons/locker/functions/fnc_storeGear.sqf new file mode 100644 index 0000000..fdcef14 --- /dev/null +++ b/addons/locker/functions/fnc_storeGear.sqf @@ -0,0 +1,240 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_LOCKERDIALOG; +private _playerItems = _display displayCtrl IDC_PLAYEREQUIPMENTLIST; +private _lockerItems = _display displayCtrl IDC_LOCKEREQUIPMENTLIST; +private _selectedItem = lbCurSel _playerItems; +private _selectedItemData = _playerItems lbData _selectedItem; + +private _data = call compile _selectedItemData; +// private _locker = player getVariable ["FORGE_Locker", []]; +private _locker = GETVAR(player,FORGE_Locker,[]); + +if ((isNil { _data })) exitWith { ctrlEnable [IDC_STOREBUTTON, true]; }; + +private _itemType = _data select 0; +private _item = _data select 1; +private _clear = true; + +switch (_itemType) do { + case "backpack": { + { + for "_i" from 1 to (_x select 1) do { + _locker pushBack ["item", (_x select 0)]; + }; + } count ((getItemCargo backpackContainer player) call EFUNC(misc,cargoToPairs)); + + { + for "_i" from 1 to (_x select 1) do { + _locker pushBack ["weapon", (_x select 0)]; + }; + } count ((getWeaponCargo backpackContainer player) call EFUNC(misc,cargoToPairs)); + + { + _locker pushBack ["magazine", [(_x select 0), (_x select 1), getNumber (configFile >> "CfgMagazines" >> (_x select 0) >> "count")]]; + } count (magazinesAmmoCargo backpackContainer player); + + _locker pushBack [_itemType, _item]; + // player setVariable ["FORGE_Locker", _locker, true]; + SETPVAR(player,FORGE_Locker,_locker); + + removeBackpack player; + playSound "FD_Finish_F"; + }; + case "facewear": { + _locker pushBack [_itemType, _item]; + // player setVariable ["FORGE_Locker", _locker, true]; + SETPVAR(player,FORGE_Locker,_locker); + + removeGoggles player; + playSound "FD_Finish_F"; + }; + case "headgear": { + _locker pushBack [_itemType, _item]; + // player setVariable ["FORGE_Locker", _locker, true]; + SETPVAR(player,FORGE_Locker,_locker); + + removeHeadgear player; + playSound "FD_Finish_F"; + }; + case "hmd": { + _locker pushBack [_itemType, _item]; + // player setVariable ["FORGE_Locker", _locker, true]; + SETPVAR(player,FORGE_Locker,_locker); + + player unassignItem _item; + player removeItem _item; + playSound "FD_Finish_F"; + }; + case "item": { + _locker pushBack [_itemType, _item]; + // player setVariable ["FORGE_Locker", _locker, true]; + SETPVAR(player,FORGE_Locker,_locker); + + if (_item == (currentMuzzle player)) then { + player action ["SWITCHWEAPON", player, player, -1]; + player unassignItem _item; + player removeWeapon _item; + } else { + player unassignItem _item; + player removeItem _item; + }; + playSound "FD_Finish_F"; + }; + case "magazine": { + _locker pushBack [_itemType, _item]; + // player setVariable ["FORGE_Locker", _locker, true]; + SETPVAR(player,FORGE_Locker,_locker); + + private _temp = magazinesAmmoFull player; + + switch (_item select 3) do { + case "Backpack": { + { + if ((_x select 4) == "Backpack" && (_x select 0) == (_item select 0)) then { + player removeItemFromBackpack (_item select 0); + }; + } count _temp; + + _temp deleteAt (_temp findIf { + (_x select 0) == (_item select 0) && (_x select 1) == (_item select 1) && (_x select 4) == (_item select 3) + }); + + { + if ((_x select 4) == "Backpack" && (_x select 0) == (_item select 0)) then { + (backpackContainer player) addMagazineAmmoCargo [(_x select 0), 1, (_x select 1)]; + }; + } count _temp; + }; + case "Uniform": { + { + if ((_x select 4) == "Uniform" && (_x select 0) == (_item select 0)) then { + player removeItemFromUniform (_item select 0); + }; + } count _temp; + + _temp deleteAt (_temp findIf { + (_x select 0) == (_item select 0) && (_x select 1) == (_item select 1) && (_x select 4) == (_item select 3) + }); + + { + if ((_x select 4) == "Uniform" && (_x select 0) == (_item select 0)) then { + (uniformContainer player) addMagazineAmmoCargo [(_x select 0), 1, (_x select 1)]; + }; + } count _temp; + }; + case "Vest": { + { + if ((_x select 4) == "Vest" && (_x select 0) == (_item select 0)) then { + player removeItemFromVest (_item select 0); + }; + } count _temp; + + _temp deleteAt (_temp findIf { + (_x select 0) == (_item select 0) && (_x select 1) == (_item select 1) && (_x select 4) == (_item select 3) + }); + + { + if ((_x select 4) == "Vest" && (_x select 0) == (_item select 0)) then { + (vestContainer player) addMagazineAmmoCargo [(_x select 0), 1, (_x select 1)]; + }; + } count _temp; + }; + }; + playSound "FD_Finish_F"; + }; + case "uniform": { + { + for "_i" from 1 to (_x select 1) do { + _locker pushBack ["item", (_x select 0)]; + }; + } count ((getItemCargo uniformContainer player) call EFUNC(misc,cargoToPairs)); + + { + for "_i" from 1 to (_x select 1) do { + _locker pushBack ["weapon", (_x select 0)]; + }; + } count ((getWeaponCargo uniformContainer player) call EFUNC(misc,cargoToPairs)); + + { + _locker pushBack ["magazine", [(_x select 0), (_x select 1), getNumber (configFile >> "CfgMagazines" >> (_x select 0) >> "count")]]; + } count (magazinesAmmoCargo uniformContainer player); + + _locker pushBack [_itemType, _item]; + // player setVariable ["FORGE_Locker", _locker, true]; + SETPVAR(player,FORGE_Locker,_locker); + + removeUniform player; + playSound "FD_Finish_F"; + }; + case "vest": { + { + for "_i" from 1 to (_x select 1) do { + _locker pushBack ["item", (_x select 0)]; + }; + } count ((getItemCargo vestContainer player) call EFUNC(misc,cargoToPairs)); + + { + for "_i" from 1 to (_x select 1) do { + _locker pushBack ["weapon", (_x select 0)]; + }; + } count ((getWeaponCargo vestContainer player) call EFUNC(misc,cargoToPairs)); + + { + _locker pushBack ["magazine", [(_x select 0), (_x select 1), getNumber (configFile >> "CfgMagazines" >> (_x select 0) >> "count")]]; + true; + } count (magazinesAmmoCargo vestContainer player); + + _locker pushBack [_itemType, _item]; + // player setVariable ["FORGE_Locker", _locker, true]; + SETPVAR(player,FORGE_Locker,_locker); + + removeVest player; + playSound "FD_Finish_F"; + }; + case "weapon": { + _locker pushBack [_itemType, _item]; + // player setVariable ["FORGE_Locker", _locker, true]; + SETPVAR(player,FORGE_Locker,_locker); + + private _temp = weaponsItems player; + + { + if ((_x select 0) == _item) then { + private _att1 = _x select 1; + private _att2 = _x select 2; + private _att3 = _x select 3; + private _mag = _x select 4; + private _mag2 = _x select 5; + private _att4 = _x select 6; + + { + if (_x isNotEqualTo "") then { + _locker pushBack ["item", _x]; + }; + } forEach [_att1, _att2, _att3, _att4]; + + { + if (_x isNotEqualTo []) then { + _locker pushBack ["magazine", [(_x select 0), (_x select 1), getNumber (configFile >> "CfgMagazines" >> (_x select 0) >> "count")]]; + }; + } forEach [_mag, _mag2]; + }; + } count _temp; + + player removeWeapon _item; + playSound "FD_Finish_F"; + }; +}; + +if (_clear) then { + lbClear _playerItems; + lbClear _lockerItems; + _playerItems lbSetCurSel -1; + _lockerItems lbSetCurSel -1; + + [] call FUNC(fetchLocker); + [] call FUNC(fetchPlayer); + + ctrlEnable [IDC_STOREBUTTON, true]; +}; \ No newline at end of file diff --git a/addons/locker/script_component.hpp b/addons/locker/script_component.hpp new file mode 100644 index 0000000..fd9fb04 --- /dev/null +++ b/addons/locker/script_component.hpp @@ -0,0 +1,24 @@ +#define COMPONENT locker +#define COMPONENT_BEAUTIFIED Locker +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_LOCKER + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_LOCKER + #define DEBUG_SETTINGS DEBUG_SETTINGS_LOCKER +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" + +#define IDD_LOCKERDIALOG 82000 +#define IDC_DIALOGNAME 82001 +#define IDC_PLAYEREQUIPMENTLIST 82002 +#define IDC_LOCKEREQUIPMENTLIST 82003 +#define IDC_STOREBUTTON 82004 +#define IDC_EQUIPBUTTON 82005 +#define IDC_CLOSEBUTTON 82006 \ No newline at end of file diff --git a/addons/locker/stringtable.xml b/addons/locker/stringtable.xml new file mode 100644 index 0000000..facaae3 --- /dev/null +++ b/addons/locker/stringtable.xml @@ -0,0 +1,17 @@ + + + + + Close + + + Equip + + + Locker + + + Store + + + diff --git a/addons/locker/ui/BaseControls.hpp b/addons/locker/ui/BaseControls.hpp new file mode 100644 index 0000000..5fce5a8 --- /dev/null +++ b/addons/locker/ui/BaseControls.hpp @@ -0,0 +1,265 @@ +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// Default text sizes +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +// Pixel grid +#define pixelScale 0.50 +#define GRID_W (pixelW * pixelGrid * pixelScale) +#define GRID_H (pixelH * pixelGrid * pixelScale) + +class ScrollBar; +class RscObject; +class RscText; +class RscTextSmall; +class RscTitle; +class RscProgress; +class RscProgressNotFreeze; +class RscPicture; +class RscLadderPicture; +class RscPictureKeepAspect; +class RscHTML; +class RscButton; +class RscShortcutButton; +class RscButtonSmall; +class RscEdit; +class RscCombo; +class RscListBox; +class RscListNBox; +class RscXListBox; +class RscTree; +class RscSlider; +class RscSliderH; +class RscXSliderH; +class RscActiveText; +class RscStructuredText; +class RscControlsGroup; +class RscToolbox; +class RscMapControl; +class RscCheckBox; +class RscFrame; +class ctrlDefault; +class ctrlControlsGroup; +class ctrlDefaultText; +class ctrlDefaultButton; +class RscBackgroundStripeTop; +class RscBackgroundStripeBottom; +class RscIGText; +class RscIGProgress; +class RscListBoxKeys; +class RscControlsGroupNoScrollbars; +class RscControlsGroupNoHScrollbars; +class RscControlsGroupNoVScrollbars; +class RscLine; +class RscActivePicture; +class RscButtonTextOnly; +class RscShortcutButtonMain; +class RscButtonEditor; +class RscIGUIShortcutButton; +class RscGearShortcutButton; +class RscButtonMenu; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenuSteam; +class RscLoadingText; +class RscIGUIListBox; +class RscIGUIListNBox; +class RscBackground; +class RscBackgroundGUI; +class RscBackgroundGUILeft; +class RscBackgroundGUIRight; +class RscBackgroundGUIBottom; +class RscBackgroundGUITop; +class RscBackgroundGUIDark; +class RscBackgroundLogo; +class RscMapControlEmpty; +class RscVignette; +class CA_Mainback; +class CA_Back; +class CA_Title_Back; +class CA_Black_Back; +class CA_Title; +class CA_Logo; +class CA_Logo_Small; +class CA_RscButton; +class CA_RscButton_dialog; +class CA_Ok; +class CA_Ok_image; +class CA_Ok_image2; +class CA_Ok_text; +class ctrlCheckbox; +class ctrlCheckboxBaseline; +class ctrlStatic; +class ctrlControlsGroupNoScrollbars; +class ctrlStructuredText; +class RscTextMulti; +class RscTreeSearch; +class RscVideo; +class RscVideoKeepAspect; +class RscActivePictureKeepAspect; +class RscEditMulti; +class RscMapSignalBackground; +class RscMapSignalPicture; +class RscMapSignalText; +class RscColorPicker; +class RscInterlacingScreen; +class RscFeedback; +class RscTrafficLight; +class RscButtonSearch; +class RscIGUIText; +class RscOpticsText; +class RscOpticsValue; +class RscIGUIValue; +class RscButtonMenuMain; +class RscButtonTestCentered; +class RscDisplaySingleMission_ChallengeOverviewGroup; +class RscDisplayDebriefing_RscTextMultiline; +class RscDisplayDebriefing_ListGroup; +class RscButtonArsenal; +class RscTextNoShadow; +class RscButtonNoColor; +class RscToolboxButton; +class ctrlStaticPicture; +class ctrlStaticPictureKeepAspect; +class ctrlStaticPictureTile; +class ctrlStaticFrame; +class ctrlStaticLine; +class ctrlStaticMulti; +class ctrlStaticBackground; +class ctrlStaticOverlay; +class ctrlStaticTitle; +class ctrlStaticFooter; +class ctrlStaticBackgroundDisable; +class ctrlStaticBackgroundDisableTiles; +class ctrlButton; +class ctrlButtonPicture; +class ctrlButtonPictureKeepAspect; +class ctrlButtonOK; +class ctrlButtonCancel; +class ctrlButtonClose; +class ctrlButtonToolbar; +class ctrlButtonSearch; +class ctrlButtonExpandAll; +class ctrlButtonCollapseAll; +class ctrlButtonFilter; +class ctrlEdit; +class ctrlEditMulti; +class ctrlSliderV; +class ctrlSliderH; +class ctrlCombo; +class ctrlComboToolbar; +class ctrlListbox; +class ctrlToolbox; +class ctrlToolboxPicture; +class ctrlToolboxPictureKeepAspect; +class ctrlCheckboxes; +class ctrlCheckboxesCheckbox; +class ctrlProgress; +class ctrlHTML; +class ctrlActiveText; +class ctrlActivePicture; +class ctrlActivePictureKeepAspect; +class ctrlTree; +class ctrlControlsGroupNoHScrollbars; +class ctrlControlsGroupNoVScrollbars; +class ctrlShortcutButton; +class ctrlShortcutButtonOK; +class ctrlShortcutButtonCancel; +class ctrlShortcutButtonSteam; +class ctrlXListbox; +class ctrlXSliderV; +class ctrlXSliderH; +class ctrlMenu; +class ctrlMenuStrip; +class ctrlMap; +class ctrlMapEmpty; +class ctrlMapMain; +class ctrlListNBox; +class ctrlCheckboxToolbar; \ No newline at end of file diff --git a/addons/locker/ui/RscLockerDialog.hpp b/addons/locker/ui/RscLockerDialog.hpp new file mode 100644 index 0000000..fc99b55 --- /dev/null +++ b/addons/locker/ui/RscLockerDialog.hpp @@ -0,0 +1,73 @@ +class RscLockerDialog { + idd = IDD_LOCKERDIALOG; + movingEnable = 1; + enableSimulation = 1; + + class controlsBackground { + class MainBackground: RscText { + idc = -1; + x = "0.25 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.5 * safezoneW"; + h = "0.725 * safezoneH"; + colorBackground[] = {0, 0, 0, 0.7}; + }; + class DialogTitle: RscText { + idc = IDC_DIALOGNAME; + text = CSTRING(Name); + x = "0.25 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.5 * safezoneW"; + h = "0.0325 * safezoneH"; + colorBackground[] = {0.1, 0.1, 0.1, 1}; + }; + }; + + class controls { + class PlayerEquipmentList: RscListBox { + idc = IDC_PLAYEREQUIPMENTLIST; + x = "0.26 * safezoneW + safezoneX"; + y = "0.17 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.615 * safezoneH"; + }; + + class LockerItemsList: RscListBox { + idc = IDC_LOCKEREQUIPMENTLIST; + x = "0.51 * safezoneW + safezoneX"; + y = "0.17 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.615 * safezoneH"; + }; + + class StoreButton: RscButton { + idc = IDC_STOREBUTTON; + text = CSTRING(Store); + x = "0.26 * safezoneW + safezoneX"; + y = "0.80625 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "_this call forge_client_locker_fnc_storeGear"; + }; + + class EquipButton: RscButton { + idc = IDC_EQUIPBUTTON; + text = CSTRING(Equip); + x = "0.51 * safezoneW + safezoneX"; + y = "0.80625 * safezoneH + safezoneY"; + w = "0.23 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "_this call forge_client_locker_fnc_equipGear"; + }; + + class CloseButton: RscButton { + idc = IDC_CLOSEBUTTON; + text = "X"; + x = "0.7225 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.0275 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "closeDialog 0"; + }; + }; +}; diff --git a/addons/main/$PBOPREFIX$ b/addons/main/$PBOPREFIX$ new file mode 100644 index 0000000..2d44c84 --- /dev/null +++ b/addons/main/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\main \ No newline at end of file diff --git a/addons/main/CfgEditorCategories.hpp b/addons/main/CfgEditorCategories.hpp new file mode 100644 index 0000000..37edd3c --- /dev/null +++ b/addons/main/CfgEditorCategories.hpp @@ -0,0 +1,5 @@ +class CfgEditorCategories { + class GVAR(category) { + displayName = "IDS"; + }; +}; \ No newline at end of file diff --git a/addons/main/CfgEditorSubcategories.hpp b/addons/main/CfgEditorSubcategories.hpp new file mode 100644 index 0000000..fd3e6e9 --- /dev/null +++ b/addons/main/CfgEditorSubcategories.hpp @@ -0,0 +1,5 @@ +class CfgEditorSubcategories { + class GVAR(subcategory) { + displayName = "IDS Audio"; + }; +}; \ No newline at end of file diff --git a/addons/main/CfgMPGameTypes.hpp b/addons/main/CfgMPGameTypes.hpp new file mode 100644 index 0000000..12da5b6 --- /dev/null +++ b/addons/main/CfgMPGameTypes.hpp @@ -0,0 +1,24 @@ +class CfgMPGameTypes { + class COOP; + class FORGE_CNT: COOP { + id = 433; + name = "Contract"; + picture = ""; + shortcut = "CNT"; + description = "FORGE Contract"; + }; + class FORGE_DA: COOP { + id = 433; + name = "Direct Action"; + picture = ""; + shortcut = "DA"; + description = "FORGE Direct Action"; + }; + class FORGE_OP: COOP { + id = 433; + name = "Operation"; + picture = ""; + shortcut = "OP"; + description = "FORGE Operation"; + }; +}; \ No newline at end of file diff --git a/addons/main/CfgMods.hpp b/addons/main/CfgMods.hpp new file mode 100644 index 0000000..01054b7 --- /dev/null +++ b/addons/main/CfgMods.hpp @@ -0,0 +1,14 @@ +class CfgMods { + class PREFIX { + dir = "@forge_client"; + name = "FORGE Client"; + author = "IDSolutions"; + picture = "A3\Ui_f\data\Logos\arma3_expansion_alpha_ca"; + hideName = "false"; + hidePicture = "false"; + action = "https://innovativedevsolutions.org"; + actionName = "Website"; + description = "Innovative Dev Solutions"; + dlcColor[] = {0.45, 0.47, 0.41, 1}; + }; +}; \ No newline at end of file diff --git a/addons/main/CfgNotifications.hpp b/addons/main/CfgNotifications.hpp new file mode 100644 index 0000000..56dbeaa --- /dev/null +++ b/addons/main/CfgNotifications.hpp @@ -0,0 +1,160 @@ +class CfgNotifications { + class Default { + title = ""; + iconPicture = ""; + iconText = ""; + description = ""; + color[] = {1,1,1,1}; + duration = 5; + priority = 0; + difficulty[] = {}; + }; + + class TaskAssigned { + title = "Task Accepted"; + iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa"; + description = "%1"; + color[] = {1,1,1,1}; + priority = 0; + }; + + class TaskFailed { + title = "Breach of Task"; + iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_ca.paa"; + description = "%1"; + color[] = {1,0,0,1}; + priority = 0; + }; + + class TaskDone { + title = "Task Fulfilled"; + iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIconDone_ca.paa"; + description = "%1"; + color[] = {0,1,0,1}; + priority = 0; + }; + + class InformationRed { + title = "Information"; + iconPicture = "\A3\ui_f\data\map\markers\handdrawn\warning_ca.paa"; + description = "%1"; + color[] = {0.69,0.13,0.13,1}; + priority = 1; + }; + + + class InformationGreen { + title = "Information"; + iconPicture = "\A3\ui_f\data\map\markers\handdrawn\warning_ca.paa"; + description = "%1"; + color[] = {0.13,0.54,0.13,1}; + priority = 1; + }; + + class ScoreAdded { + title = "RP Earned"; + iconText = "+%2"; + description = "%1"; + color[] = {1,0,1,1}; + priority = 2; + }; + + class IncomingQRF { + title = "ENEMY QRF"; + iconPicture = "\A3\ui_f\data\Map\VehicleIcons\iconTruck_ca.paa"; + iconText = ""; + description = "An enemy QRF was spotted near your location"; + color[] = {1, 1, 1, 1}; + duration = 5; + priority = 3; + difficulty[] = {}; + }; + + class Warning { + title = "WARNING"; + iconPicture = "\A3\ui_f\data\Map\Markers\Military\warning_CA.paa"; + iconText = ""; + description = "%1"; + color[] = {1, 0, 0, 1}; + duration = 7; + priority = 5; + difficulty[] = {}; + }; + + class JipTeleport { + title = "JIP"; + iconPicture = "\A3\ui_f\data\GUI\Cfg\Hints\Timing_ca.paa"; + iconText = ""; + description = "Join In Progress: Use self-interaction to TP back to your squad"; + color[] = {1, 1, 1, 1}; + duration = 5; + priority = 4; + difficulty[] = {}; + }; + + class IntelAdded { + title = "INTEL FOUND"; + iconPicture = "\A3\ui_f\data\GUI\RscCommon\RscButtonSearch\search_start_ca.paa"; + iconText = ""; + description = "%1"; + color[] = {1, 1, 1, 1}; + duration = 7; + priority = 3; + difficulty[] = {}; + }; + + class RespawnCalled { + title = "RESPAWN"; + iconPicture = "\A3\modules_f\data\iconSector_ca.paa"; + iconText = ""; + description = "The CO has called for reinforcements. Respawning in 5 seconds..."; + color[] = {0, 0.8, 0, 1}; + duration = 5; + priority = 5; + difficulty[] = {}; + }; + + class Info { + title = "INFO"; + iconPicture = "\A3\ui_f\data\GUI\Cfg\CommunicationMenu\instructor_ca.paa"; + iconText = ""; + description = "%1"; + color[] = {1, 1, 1, 1}; + duration = 5; + priority = 4; + difficulty[] = {}; + }; + + class AOLimitWarning { + title = "AO LIMIT"; + iconPicture = "\a3\ui_f\data\GUI\Cfg\Debriefing\endDeath_ca.paa"; + iconText = ""; + description = "Where are you going? Return to the AO now!"; + color[] = {1, 1, 1, 1}; + duration = 5; + priority = 4; + difficulty[] = {}; + }; + + class SetupTimerEnded { + title = "SETUP TIMER"; + iconPicture = "\a3\ui_f\data\IGUI\Cfg\Actions\settimer_ca.paa"; + iconText = ""; + description = "Setup phase is over. The mission is a go."; + color[] = {1, 1, 1, 1}; + duration = 5; + priority = 4; + difficulty[] = {}; + }; + + class TimeLimitNotification { + title = "MISSION TIME LIMIT"; + iconPicture = "\a3\ui_f\data\IGUI\Cfg\Actions\settimer_ca.paa"; + iconText = ""; + description = "%1 minutes remaining."; + color[] = {1, 1, 1, 1}; + duration = 5; + priority = 5; + difficulty[] = {}; + }; +}; \ No newline at end of file diff --git a/addons/main/README.md b/addons/main/README.md new file mode 100644 index 0000000..4f4bf49 --- /dev/null +++ b/addons/main/README.md @@ -0,0 +1,4 @@ +forge_main +======== + +Backbone of other components, defining most of the commonly used macros. \ No newline at end of file diff --git a/addons/main/config.cpp b/addons/main/config.cpp new file mode 100644 index 0000000..06528f9 --- /dev/null +++ b/addons/main/config.cpp @@ -0,0 +1,24 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"cba_main", "ace_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + clientSaveLoopTime = 900; + holsterKey = 35; + interactionKey = 15; + phoneKey = 25; + }; +}; + +#include "CfgEditorCategories.hpp" +#include "CfgEditorSubcategories.hpp" +#include "CfgMods.hpp" +#include "CfgMPGameTypes.hpp" +#include "CfgNotifications.hpp" \ No newline at end of file diff --git a/addons/main/script_component.hpp b/addons/main/script_component.hpp new file mode 100644 index 0000000..4b60e99 --- /dev/null +++ b/addons/main/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT main +#define COMPONENT_BEAUTIFIED Main +#include "script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_MAIN + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MAIN + #define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN +#endif + +#include "script_macros.hpp" \ No newline at end of file diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp new file mode 100644 index 0000000..299bf5e --- /dev/null +++ b/addons/main/script_macros.hpp @@ -0,0 +1,28 @@ +#include "\z\ace\addons\main\script_macros.hpp" + +#include "\a3\ui_f\hpp\defineDIKCodes.inc" +#include "\a3\ui_f\hpp\defineCommonGrids.inc" + +#define AFUNC(var1,var2) TRIPLES(DOUBLES(ace,var1),fnc,var2) +#define BFUNC(var1) TRIPLES(BIS,fnc,var1) +#define CFUNC(var1) TRIPLES(CBA,fnc,var1) +#define TFUNC(var1) TRIPLES(TFAR,fnc,var1) + +#define PATHTOR_SYS(var1,var2,var3) MAINPREFIX\var1\SUBPREFIX\var2\var3 +#define PATHTOR(var1) PATHTOR_SYS(PREFIX,COMPONENT,var1) +#define PATHTOER(var1,var2) PATHTOR_SYS(PREFIX,var1,var2) +#define QPATHTOR(var1) QUOTE(PATHTOR(var1)) +#define QPATHTOER(var1,var2) QUOTE(PATHTOER(var1,var2)) + +#define CLASS(var1) DOUBLES(PREFIX,var1) +#define QCLASS(var1) QUOTE(DOUBLES(PREFIX,var1)) + +#ifdef DISABLE_COMPILE_CACHE + #undef PREP + #define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,fncName).sqf) + #define PREPOS(progName,fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QPATHTOF(programs\progName\DOUBLES(fnc,fncName).sqf) +#else + #undef PREP + #define PREP(fncName) [QPATHTOF(functions\DOUBLES(fnc,fncName).sqf), QFUNC(fncName)] call CBA_fnc_compileFunction + #define PREPOS(progName,fncName) [QPATHTOF(programs\progName\DOUBLES(fnc,fncName).sqf), QFUNC(fncName)] call CBA_fnc_compileFunction +#endif \ No newline at end of file diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp new file mode 100644 index 0000000..15468aa --- /dev/null +++ b/addons/main/script_mod.hpp @@ -0,0 +1,15 @@ +#define MAINPREFIX z +#define PREFIX forge_client + +#include "script_version.hpp" + +#define VERSION MAJOR.MINOR +#define VERSION_AR MAJOR,MINOR,PATCH,BUILD + +#define REQUIRED_VERSION 2.12 + +#ifdef COMPONENT_BEAUTIFIED + #define COMPONENT_NAME QUOTE(IDS Client - COMPONENT_BEAUTIFIED) +#else + #define COMPONENT_NAME QUOTE(IDS Client - COMPONENT) +#endif \ No newline at end of file diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp new file mode 100644 index 0000000..3e6aaab --- /dev/null +++ b/addons/main/script_version.hpp @@ -0,0 +1,4 @@ +#define MAJOR 1 +#define MINOR 0 +#define PATCH 0 +#define BUILD 0 diff --git a/addons/medical/$PBOPREFIX$ b/addons/medical/$PBOPREFIX$ new file mode 100644 index 0000000..2e506de --- /dev/null +++ b/addons/medical/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\medical \ No newline at end of file diff --git a/addons/medical/CfgEventHandlers.hpp b/addons/medical/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/medical/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp new file mode 100644 index 0000000..68a14f1 --- /dev/null +++ b/addons/medical/CfgVehicles.hpp @@ -0,0 +1,12 @@ +class CfgVehicles { + class Land_Bodybag_01_black_F; + class CLASS(bodyBag): Land_Bodybag_01_black_F { + maximumLoad = 2000; + transportMaxWeapons = 500; + transportMaxMagazines = 2000; + transportMaxItems = 1000; + ace_dragging_canCarry = 1; + ace_dragging_carryPosition[] = {0, 0.5, 1.2}; + ace_dragging_carryDirection = 90; + }; +}; \ No newline at end of file diff --git a/addons/medical/XEH_PREP.hpp b/addons/medical/XEH_PREP.hpp new file mode 100644 index 0000000..e1d15f5 --- /dev/null +++ b/addons/medical/XEH_PREP.hpp @@ -0,0 +1,7 @@ +PREP(deductMedicalCost); +PREP(heartBeat); +PREP(initMedical); +PREP(moveInventory); +PREP(onKilled); +PREP(onRespawn); +PREP(saveDroppedWeapons); \ No newline at end of file diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/medical/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/medical/XEH_postInit_client.sqf b/addons/medical/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/medical/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf new file mode 100644 index 0000000..41ea8e0 --- /dev/null +++ b/addons/medical/XEH_preInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; + +GVAR(occupancyTriggers) = []; +GVAR(droppedWeapons) = []; \ No newline at end of file diff --git a/addons/medical/XEH_preInit_server.sqf b/addons/medical/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/medical/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/medical/XEH_preStart.sqf b/addons/medical/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/medical/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp new file mode 100644 index 0000000..9995a73 --- /dev/null +++ b/addons/medical/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" \ No newline at end of file diff --git a/addons/medical/functions/fnc_deductMedicalCost.sqf b/addons/medical/functions/fnc_deductMedicalCost.sqf new file mode 100644 index 0000000..3fcc5eb --- /dev/null +++ b/addons/medical/functions/fnc_deductMedicalCost.sqf @@ -0,0 +1,12 @@ +#include "..\script_component.hpp" + +params ["_unit", "_totalCost"]; + +private _preferredAccount = GETVAR(_unit,FORGE_Bank,0); +private _selectedAccount = ["FORGE_Cash", "FORGE_Bank"] select (_preferredAccount >= _totalCost); +private _accountBalance = _unit getVariable _selectedAccount; +private _newBalance = _accountBalance - _totalCost; + +_unit setVariable [_selectedAccount, _newBalance, true]; + +[format ["Medical Services: %1 credited for treatment and recovery.", _totalCost], "blue-grey", 5] call EFUNC(misc,notify); \ No newline at end of file diff --git a/addons/medical/functions/fnc_heartBeat.sqf b/addons/medical/functions/fnc_heartBeat.sqf new file mode 100644 index 0000000..cad5f68 --- /dev/null +++ b/addons/medical/functions/fnc_heartBeat.sqf @@ -0,0 +1,13 @@ +#include "..\script_component.hpp" + +params ["_unit", "_totalCost"]; + +while { (GETVAR(_unit,FORGE_Cash,0)) < _totalCost or (GETVAR(_unit,FORGE_Bank,0)) < _totalCost } do { + if ((GETVAR(_unit,FORGE_Cash,0)) >= _totalCost or (GETVAR(_unit,FORGE_Bank,0)) >= _totalCost) exitWith { + [_unit, ""] remoteExec ["switchMove"]; + [_unit, _totalCost] call FUNC(deductMedicalCost); + ["Terminate"] call BFUNC(EGSpectator); + }; + + uiSleep 1; +}; \ No newline at end of file diff --git a/addons/medical/functions/fnc_initMedical.sqf b/addons/medical/functions/fnc_initMedical.sqf new file mode 100644 index 0000000..06515a1 --- /dev/null +++ b/addons/medical/functions/fnc_initMedical.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" + +private _worldCenter = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"); +private _stretcherTypes = ["Land_Stretcher_01_F", "Land_Stretcher_01_olive_F", "Land_Stretcher_01_sand_F"]; +private _stretchers = nearestObjects [_worldCenter, _stretcherTypes, 500000]; + +{ + private _stretcher = _x; + private _triggerPos = getPos _stretcher; + private _trigger = createTrigger ["EmptyDetector", _triggerPos]; + + _trigger setVariable ["isOccupied", false, true]; + _trigger setTriggerArea [5, 5, 0, true, 5]; + _trigger setTriggerActivation ["ANYPLAYER", "PRESENT", true]; + _trigger setTriggerStatements [ + "{ (_x isKindOf 'CAManBase') && _x distance thisTrigger < 0.5 } count thisList > 0", + "thisTrigger setVariable ['isOccupied', true, true];", + "thisTrigger setVariable ['isOccupied', false, true];" + ]; + + GVAR(occupancyTriggers) pushBack _trigger; +} forEach _stretchers; + +if (count GVAR(occupancyTriggers) == 0) then { + diag_log text format ["[FORGE Medical] Warning: No Stretchers found in the world for medical system initialization."]; +}; \ No newline at end of file diff --git a/addons/medical/functions/fnc_moveInventory.sqf b/addons/medical/functions/fnc_moveInventory.sqf new file mode 100644 index 0000000..d25a886 --- /dev/null +++ b/addons/medical/functions/fnc_moveInventory.sqf @@ -0,0 +1,65 @@ +#include "..\script_component.hpp" + +params ["_unit", "_bodyBag"]; + +private _items = []; +private _weapons = []; +private _backpack = backpack _unit; +private _nearHolders = _bodyBag nearObjects ["WeaponHolderSimulated", 3]; + +_items pushBack (headgear _unit); +_items pushBack (uniform _unit); +_items append (uniformItems _unit); +_items pushBack (vest _unit); +_items append (vestItems _unit); +_items append (backpackItems _unit); +_weapons pushBack (primaryWeapon _unit); +_items append (primaryWeaponItems _unit); +_items append (primaryWeaponMagazine _unit); +_weapons pushBack (secondaryWeapon _unit); +_items append (secondaryWeaponItems _unit); +_items append (secondaryWeaponMagazine _unit); +_weapons pushBack (handgunWeapon _unit); +_items append (handgunItems _unit); +_items append (handgunMagazine _unit); +_weapons append (_unit getVariable [QGVAR(droppedWeapons), []]); +_items append (_unit getVariable [QGVAR(droppedItems), []]); +_items append (assignedItems _unit); +_items pushBack (_unit call CFUNC(binocularMagazine)); + +if !((goggles _unit ) in (_unit getVariable [QGVAR(droppedItems), []])) then { + _items pushBack (goggles _unit); +}; + +_items = _items select {_x != ""}; +_weapons = _weapons select {_x != ""}; + +{ _bodyBag addItemCargoGlobal [_x, 1] } forEach _items; + +{ + private _weaponNonPresent = [_x] call CFUNC(getNonPresetClass); + + if (_weaponNonPresent == "") then { + _weaponNonPresent = _x; + }; + + _bodyBag addWeaponCargoGlobal [_weaponNonPresent, 1]; +} forEach _weapons; + +if (_backpack != "") then { + private _backpackNonPresent = [_backpack, "CfgVehicles"] call CFUNC(getNonPresetClass); + + if (_backpackNonPresent == "") then { + _backpackNonPresent = _backpack; + }; + + _bodyBag addBackpackCargoGlobal [_backpackNonPresent, 1]; +}; + +{ + private _holderWeapons = ((getWeaponCargo _x) select 0) select { _x in _weapons }; + + if !(_holderWeapons isEqualTo []) then { + deleteVehicle _x; + }; +} forEach _nearHolders; \ No newline at end of file diff --git a/addons/medical/functions/fnc_onKilled.sqf b/addons/medical/functions/fnc_onKilled.sqf new file mode 100644 index 0000000..28c3e48 --- /dev/null +++ b/addons/medical/functions/fnc_onKilled.sqf @@ -0,0 +1,11 @@ +#include "..\script_component.hpp" + +params ["_unit", "_killer", "_instigator", "_useEffects"]; + +if (!isPlayer _unit) exitWith {}; + +private _unitPos = getPosATL _unit; +private _bodyBag = createVehicle [QCLASS(bodyBag), _unitPos, [], 0, "NONE"]; + +[_unit] call FUNC(saveDroppedWeapons); +[_unit, _bodyBag] call FUNC(moveInventory); \ No newline at end of file diff --git a/addons/medical/functions/fnc_onRespawn.sqf b/addons/medical/functions/fnc_onRespawn.sqf new file mode 100644 index 0000000..9ce6189 --- /dev/null +++ b/addons/medical/functions/fnc_onRespawn.sqf @@ -0,0 +1,35 @@ +#include "..\script_component.hpp" + +params ["_unit", "_corpse"]; + +private _newBank = 0; +private _newCash = 0; +private _bank = GETVAR(_unit,FORGE_Bank,0); +private _cash = GETVAR(_unit,FORGE_Cash,0); +private _funds = companyFunds; +private _deductible = "INS_DEDUCT" call BFUNC(getParamValue); +private _medicalCost = "MED_COST" call BFUNC(getParamValue); +private _totalCost = (_medicalCost - _deductible); +private _loadout = [[], [], [], ["U_BG_Guerrilla_6_1", []], [], [], "", "", [], ["", "", "", "", "", ""]]; +private _stretcher = (GVAR(occupancyTriggers) select { !(GETVAR(_x,isOccupied,false)) }) param [0, objNull]; +private _stretcherPos = (getPosATL _stretcher) vectorAdd [0.05, -0.125, 0.45]; +private _stretcherDir = getDir _stretcher; + +deleteVehicle _corpse; + +if (_cash >= _totalCost or _bank >= _totalCost) exitWith { + [_unit, _totalCost] call FUNC(deductMedicalCost); + _unit setUnitLoadout _loadout; +}; + +["Medical Alert: Funds unavailable for treatment. Respawn temporarily suspended.", "warning", 5] call EFUNC(misc,notify); + +_unit setUnitLoadout _loadout; +_unit setPosATL _stretcherPos; +_unit setDir _stretcherDir; + +[_unit, "Acts_LyingWounded_loop"] remoteExec ["switchMove"]; + +["Initialize", [_unit, [], false, true, true, true, true, true, false, false]] call BFUNC(EGSpectator); + +[_unit, _totalCost] spawn FUNC(heartBeat); \ No newline at end of file diff --git a/addons/medical/functions/fnc_saveDroppedWeapons.sqf b/addons/medical/functions/fnc_saveDroppedWeapons.sqf new file mode 100644 index 0000000..d175e18 --- /dev/null +++ b/addons/medical/functions/fnc_saveDroppedWeapons.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" + +params ["_unit"]; + +private _droppedWeapons = []; +private _droppedItems = []; + +_droppedWeapons pushBack (primaryWeapon _unit); +_droppedItems append (primaryWeaponItems _unit); +_droppedItems append (primaryWeaponMagazine _unit); +_droppedWeapons pushBack (secondaryWeapon _unit); +_droppedItems append (secondaryWeaponItems _unit); +_droppedItems append (secondaryWeaponMagazine _unit); + +if (isPlayer _unit) then { + _droppedItems pushBack (goggles _unit); +}; + +if (currentWeapon _unit == handgunWeapon _unit) then { + _droppedWeapons pushBack (handgunWeapon _unit); + _droppedItems append (handgunItems _unit); + _droppedItems append (handgunMagazine _unit); +}; + +_unit setVariable [QGVAR(droppedWeapons), _droppedWeapons, true]; +_unit setVariable [QGVAR(droppedItems), _droppedItems, true]; \ No newline at end of file diff --git a/addons/medical/script_component.hpp b/addons/medical/script_component.hpp new file mode 100644 index 0000000..216bee5 --- /dev/null +++ b/addons/medical/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT medical +#define COMPONENT_BEAUTIFIED Medical +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_MEDICAL + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MEDICAL + #define DEBUG_SETTINGS DEBUG_SETTINGS_MEDICAL +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/misc/$PBOPREFIX$ b/addons/misc/$PBOPREFIX$ new file mode 100644 index 0000000..e0a1610 --- /dev/null +++ b/addons/misc/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\misc \ No newline at end of file diff --git a/addons/misc/CfgEventHandlers.hpp b/addons/misc/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/misc/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/misc/XEH_PREP.hpp b/addons/misc/XEH_PREP.hpp new file mode 100644 index 0000000..6f4b01b --- /dev/null +++ b/addons/misc/XEH_PREP.hpp @@ -0,0 +1,6 @@ +PREP(cargoToPairs); +PREP(formatNumber); +PREP(isAssignableBinocular); +PREP(isWeaponType); +PREP(notify); +PREP(test); \ No newline at end of file diff --git a/addons/misc/XEH_postInit.sqf b/addons/misc/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/misc/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/misc/XEH_postInit_client.sqf b/addons/misc/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/misc/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/misc/XEH_preInit.sqf b/addons/misc/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/misc/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/misc/XEH_preInit_server.sqf b/addons/misc/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/misc/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/misc/XEH_preStart.sqf b/addons/misc/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/misc/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/misc/config.cpp b/addons/misc/config.cpp new file mode 100644 index 0000000..338b901 --- /dev/null +++ b/addons/misc/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/misc/functions/fnc_cargoToPairs.sqf b/addons/misc/functions/fnc_cargoToPairs.sqf new file mode 100644 index 0000000..58981d9 --- /dev/null +++ b/addons/misc/functions/fnc_cargoToPairs.sqf @@ -0,0 +1,12 @@ +#include "..\script_component.hpp" + +private _array = []; + +if (count _this > 1) then { + { + _array pushBack [_x, (_this select 1) select _forEachIndex]; + true + } count (_this select 0); +}; + +_array \ No newline at end of file diff --git a/addons/misc/functions/fnc_formatNumber.sqf b/addons/misc/functions/fnc_formatNumber.sqf new file mode 100644 index 0000000..db3191b --- /dev/null +++ b/addons/misc/functions/fnc_formatNumber.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" + +#define PX_DC_SEP "." +#define PX_TH_SEP "," +#define PX_DC_PL 2 + +private _count = 0; +private _arr = (_this toFixed PX_DC_PL) splitString "."; +private _str = PX_DC_SEP+(_arr select 1); + +_arr = toArray(_arr select 0); +reverse _arr; + +{ + if (_count == 3) then { + _count = 0; + _str = PX_TH_SEP + _str; + }; + + _str = toString[_x] + _str; + _count = _count + 1; + + true +} count _arr \ No newline at end of file diff --git a/addons/misc/functions/fnc_isAssignableBinocular.sqf b/addons/misc/functions/fnc_isAssignableBinocular.sqf new file mode 100644 index 0000000..a99dae8 --- /dev/null +++ b/addons/misc/functions/fnc_isAssignableBinocular.sqf @@ -0,0 +1,16 @@ +#include "..\script_component.hpp" + +private _player = _this select 0; +private _item = _this select 1; +private _isAssignable = true; + +if ([_item, 4096] call FUNC(isWeaponType) && { getNumber (configFile >> "CfgWeapons" >> _item >> "ItemInfo" >> "type") != 616 }) then { + { + if ([_x, 4096] call FUNC(isWeaponType) && { getNumber (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "type") != 616 }) exitWith { _isAssignable = false; }; + true + } count (assignedItems _player); +} else { + _isAssignable = false; +}; + +_isAssignable \ No newline at end of file diff --git a/addons/misc/functions/fnc_isWeaponType.sqf b/addons/misc/functions/fnc_isWeaponType.sqf new file mode 100644 index 0000000..968f82f --- /dev/null +++ b/addons/misc/functions/fnc_isWeaponType.sqf @@ -0,0 +1,35 @@ +#include "..\script_component.hpp" + +private _weapon = _this select 0; +private _type = _this select 1; +private _typeBits = []; +private _weaponTypeBits = []; +private _result = false; + +if (_type < 1 || _weaponType < 1) exitWith { false }; + +private _typeHolder = _type; +private _weaponType = getNumber (configFile >> "CfgWeapons" >> _weapon >> "type"); + +while { _typeHolder > 0 } do { + _typeBits pushBack (_typeHolder % 2); + _typeHolder = floor (_typeHolder / 2); +}; + +_typeHolder = _weaponType; + +while { _typeHolder > 0 } do { + _weaponTypeBits pushBack (_typeHolder % 2); + _typeHolder = floor (_typeHolder / 2); +}; + +if (count _typeBits > count _weaponTypeBits) exitWith { false }; + +_result = true; + +{ + if (_x == 1 && { weaponTypeBits select _forEachIndex == 0 }) exitWith { _result = false; }; + true +} count (_typeBits); + +_result \ No newline at end of file diff --git a/addons/misc/functions/fnc_notify.sqf b/addons/misc/functions/fnc_notify.sqf new file mode 100644 index 0000000..fda2192 --- /dev/null +++ b/addons/misc/functions/fnc_notify.sqf @@ -0,0 +1,221 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_misc_fnc_notify + * Author: Creedcoder, J.Schmidt + * Edit: 07.15.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Creates a notification. + * + * Arguments: + * 0: STRING - The text to display + * 1: STRING - The type or color of the notification + * 2: SCALAR - The speed of the notification + * 3: STRING - The display side of the notification + * + * Return Value: + * void + * + * Example: + * ["Hello World!", "default", 3, "right"] call forge_client_misc_fnc_notify; + * + * Public: Yes + */ + +params [["_text", "", [""]], ["_type", "default", [objNull, "", [], {}]], ["_speed", 10, [0]], ["_displaySide", "right", [""]]]; + +if (isDedicated || !hasInterface) exitWith {}; +if (isNil "open_notifications") then { open_notifications = []; }; + +disableSerialization; + +private _display = findDisplay 46; +private _alpha = 1; +private _colorName = ""; +private _color = []; + +if (typeName _type == "ARRAY" || typeName _type == "OBJECT") then { + _color = _type; +} else { + switch (_type) do { + case "error": { + _colorName = "red"; + }; + case "warning": { + _colorName = "amber"; + }; + case "success": { + _colorName = "green"; + }; + case "info": { + _colorName = "blue"; + }; + default { + _colorName = _type; + }; + }; + // https://material.io/guidelines/style/color.html + switch (_colorName) do { + case "red": { + _color = [0.957, 0.263, 0.212, _alpha]; + }; + case "pink": { + _color = [0.914, 0.118, 0.388, _alpha]; + }; + case "purple": { + _color = [0.612, 0.153, 0.69, _alpha]; + }; + case "deep-purple": { + _color = [0.404, 0.227, 0.718, _alpha]; + }; + case "indigo": { + _color = [0.247, 0.318, 0.71, _alpha]; + }; + case "blue": { + _color = [0.129, 0.588, 0.953, _alpha]; + }; + case "light-blue": { + _color = [0.012, 0.663, 0.957, _alpha]; + }; + case "cyan": { + _color = [0, 0.737, 0.831, _alpha]; + }; + case "teal": { + _color = [0, 0.588, 0.533, _alpha]; + }; + case "green": { + _color = [0.298, 0.686, 0.314, _alpha]; + }; + case "light-green": { + _color = [0.545, 0.765, 0.29, _alpha]; + }; + case "lime": { + _color = [0.804, 0.863, 0.224, _alpha]; + }; + case "yellow": { + _color = [1, 0.922, 0.231, _alpha]; + }; + case "amber": { + _color = [1, 0.757, 0.027, _alpha]; + }; + case "orange": { + _color = [1, 0.596, 0, _alpha]; + }; + case "deep-orange": { + _color = [1, 0.341, 0.133, _alpha]; + }; + case "brown": { + _color = [0.475, 0.333, 0.282, _alpha]; + }; + case "grey": { + _color = [0.62, 0.62, 0.62, _alpha]; + }; + case "blue-grey": { + _color = [0.376, 0.49, 0.545, _alpha]; + }; + default { + _color = [(profileNamespace getVariable ['GUI_BCG_RGB_R', 0.3843]), (profileNamespace getVariable ['GUI_BCG_RGB_G', 0.7019]), (profileNamespace getVariable ['GUI_BCG_RGB_B', 0.8862]), _alpha]; + }; + }; +}; + +if (_text isEqualType "") then { + _text = parseText _text; +}; +playSound "HintExpand"; + +private _margin = 0.01; +private _width = 300 * pixelW; +private _borderWidth = 5 * pixelW; +private _textWidth = _width - _borderWidth; +private _height = 0.01; +private _posX = 0; +private _posY = 0; + +if (_displaySide == "left") then { + _posX = _margin + safeZoneX; +} else { + _posX = safeZoneW + safeZoneX - _margin - _width; +}; + +private _BorderCtrl = _display ctrlCreate ["RscText", -1]; +_BorderCtrl ctrlSetPosition [_posX, _posY, _borderWidth, _height]; +_BorderCtrl ctrlSetBackgroundColor _color; +_BorderCtrl ctrlSetFade 1; +_BorderCtrl ctrlCommit 0; + +_BorderCtrl ctrlSetFade 0; +_BorderCtrl ctrlCommit 0.4; + +private _TextCtrl = _display ctrlCreate ["RscStructuredText", -1]; +_TextCtrl ctrlSetStructuredText _text; +_TextCtrl ctrlSetPosition [(_posX + _borderWidth), _posY, _textWidth, _height]; +_TextCtrl ctrlCommit 0; + +_adjustedHeight = (ctrlTextHeight _TextCtrl); + +_TextCtrl ctrlSetPosition [(_posX + _borderWidth), _posY, _textWidth, _adjustedHeight]; +_TextCtrl ctrlCommit 0; + +_BorderCtrl ctrlSetPosition [_posX, _posY, _borderWidth, _adjustedHeight]; +_BorderCtrl ctrlCommit 0; + +_TextCtrl ctrlSetBackgroundColor [0.129, 0.129, 0.129, _alpha]; +_TextCtrl ctrlSetFade 1; +_TextCtrl ctrlCommit 0; + +_TextCtrl ctrlSetFade 0; +_TextCtrl ctrlCommit 0.4; + +[_TextCtrl, _BorderCtrl, _speed] spawn { + disableSerialization; + uiSleep (_this select 2); + + private _TextCtrl = _this select 0; + private _BorderCtrl = _this select 1; + + _TextCtrl ctrlSetFade 1; + _TextCtrl ctrlCommit 0.3; + _BorderCtrl ctrlSetFade 1; + _BorderCtrl ctrlCommit 0.3; + + uiSleep 0.3; + ctrlDelete _BorderCtrl; + ctrlDelete _TextCtrl; +}; + +_offsetY = 0; +if (count open_notifications > 0) then { + private _activeNotifications = 0; + { + private _ctrlBorder = _x select 0; + private _ctrlText = _x select 1; + + if (!isNull _ctrlBorder && !isNull _ctrlText) then { + _ctrlBorder ctrlSetPosition [_posX, (_posY + _offsetY)]; + _ctrlText ctrlSetPosition [(_posX + _borderWidth), (_posY + _offsetY)]; + _ctrlBorder ctrlCommit 0.25; + _ctrlText ctrlCommit 0.25; + _offsetY = _offsetY + _margin + ((ctrlPosition _ctrlText) select 3); + + if (_activeNotifications > 3) then { + _ctrlText ctrlSetFade 1; + _ctrlText ctrlCommit 0.2; + _ctrlBorder ctrlSetFade 1; + _ctrlBorder ctrlCommit 0.2; + }; + }; + _activeNotifications = _activeNotifications + 1; + true + } count (open_notifications); +}; + +open_notifications = ([[_BorderCtrl, _TextCtrl]] + open_notifications) select { !isNull (_x select 0) && !isNull (_x select 1) }; \ No newline at end of file diff --git a/addons/misc/functions/fnc_test.sqf b/addons/misc/functions/fnc_test.sqf new file mode 100644 index 0000000..09c7cb6 --- /dev/null +++ b/addons/misc/functions/fnc_test.sqf @@ -0,0 +1,34 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_misc_fnc_test + * Author: Creedcoder, J.Schmidt + * Edit: 07.15.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Test function. + * + * Arguments: + * 0: Value + * + * Return Value: + * Value + * + * Examples: + * ["Hello World!"] spawn forge_client_misc_fnc_test (Server or Singleplayer Only) + * ["Hello World!"] remoteExec ["forge_client_misc_fnc_test", 2, false] (Multiplayer Only) + * + * Public: Yes + */ + +_res = _this; +forge_client_db_test = _res; + +hint format ["%1", _res]; \ No newline at end of file diff --git a/addons/misc/script_component.hpp b/addons/misc/script_component.hpp new file mode 100644 index 0000000..35a88e9 --- /dev/null +++ b/addons/misc/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT misc +#define COMPONENT_BEAUTIFIED MISC +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_MISC + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MISC + #define DEBUG_SETTINGS DEBUG_SETTINGS_MISC +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/money/$PBOPREFIX$ b/addons/money/$PBOPREFIX$ new file mode 100644 index 0000000..2ac2c79 --- /dev/null +++ b/addons/money/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\money \ No newline at end of file diff --git a/addons/money/CfgEventHandlers.hpp b/addons/money/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/money/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/money/XEH_PREP.hpp b/addons/money/XEH_PREP.hpp new file mode 100644 index 0000000..a72005a --- /dev/null +++ b/addons/money/XEH_PREP.hpp @@ -0,0 +1,3 @@ +PREP(giveCash); +PREP(giveCashSubmit); +PREP(takeCash); \ No newline at end of file diff --git a/addons/money/XEH_postInit.sqf b/addons/money/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/money/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/money/XEH_postInit_client.sqf b/addons/money/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/money/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/money/XEH_preInit.sqf b/addons/money/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/money/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/money/XEH_preInit_server.sqf b/addons/money/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/money/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/money/XEH_preStart.sqf b/addons/money/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/money/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/money/config.cpp b/addons/money/config.cpp new file mode 100644 index 0000000..2c7c2f0 --- /dev/null +++ b/addons/money/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ui\RscCommon.hpp" +#include "ui\RscGiveCash.hpp" \ No newline at end of file diff --git a/addons/money/functions/fnc_giveCash.sqf b/addons/money/functions/fnc_giveCash.sqf new file mode 100644 index 0000000..f76574f --- /dev/null +++ b/addons/money/functions/fnc_giveCash.sqf @@ -0,0 +1,33 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_money_fnc_giveCash + * Author: Creedcoder, J.Schmidt + * Edit: 07.23.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Send money to player. + * + * Arguments: + * 0: Target to send money + * + * Return Value: + * N/A + * + * Examples: + * [cursorObject] spawn forge_client_money_fnc_giveCash; + * + * Public: Yes + */ + +FORGE_cashGiveTarget = _this select 0; + +disableSerialization; +createDialog "RscGiveCash"; \ No newline at end of file diff --git a/addons/money/functions/fnc_giveCashSubmit.sqf b/addons/money/functions/fnc_giveCashSubmit.sqf new file mode 100644 index 0000000..578d2c9 --- /dev/null +++ b/addons/money/functions/fnc_giveCashSubmit.sqf @@ -0,0 +1,50 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_money_fnc_giveCashSubmit + * Author: Creedcoder, J.Schmidt + * Edit: 07.23.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Handle cash to be given. + * + * Arguments: + * 0: Target to add money + * 1: Player to remove money + * + * Return Value: + * N/A + * + * Examples: + * [cursorObject, player] spawn forge_client_money_fnc_giveCashSubmit; + * + * Public: Yes + */ + +params ["_target", "_player"]; + +private _amount = parseNumber (ctrlText 1401); +private _playerCash = GETVAR(player,FORGE_Cash,0); +private _targetCash = GETVAR(_target,FORGE_Cash,0); + +if (_amount > 0) then { + if (_amount > _playerCash) exitWith { ["Insufficient cash available.", "warning", 3] call EFUNC(misc,notify) }; + + private _newCash = _targetCash + _amount; + private _formattedAmount = (_amount) call EFUNC(misc,formatNumber); + SETPVAR(_target,FORGE_Cash,_newCash); + + ["deduct", "Cash", _amount] remoteExecCall ["forge_server_money_fnc_handleMoney", 2]; + [format ["You have received $%2 cash from %1", _player, _formattedAmount], "blue-grey", 3] remoteExecCall [QEFUNC(misc,notify), _target]; +} else { + [format ["Enter a valid amount greater than zero."], "warning", 3] call EFUNC(misc,notify); +}; + +closeDialog 0; \ No newline at end of file diff --git a/addons/money/functions/fnc_takeCash.sqf b/addons/money/functions/fnc_takeCash.sqf new file mode 100644 index 0000000..eb52eec --- /dev/null +++ b/addons/money/functions/fnc_takeCash.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_money_fnc_takeCash + * Author: Creedcoder, J.Schmidt + * Edit: 07.23.2024 + * Copyright © 2024 Creedcoder, J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Handle cash picked up. + * + * Arguments: + * 0: Target + * + * Return Value: + * N/A + * + * Examples: + * [cursorObject] spawn forge_client_money_fnc_takeCash; + * + * Public: Yes + */ + +params ["_ct"]; + +private _amount = GETVAR(_ct,FORGE_Cash,0); + +["advance", "Cash", _amount] call forge_server_money_fnc_handleMoney; + +SETPVAR(_ct,FORGE_Cash,nil); +deleteVehicle _ct; \ No newline at end of file diff --git a/addons/money/script_component.hpp b/addons/money/script_component.hpp new file mode 100644 index 0000000..f1b62c7 --- /dev/null +++ b/addons/money/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT money +#define COMPONENT_BEAUTIFIED Money +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_MONEY + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MONEY + #define DEBUG_SETTINGS DEBUG_SETTINGS_MONEY +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/money/ui/RscCommon.hpp b/addons/money/ui/RscCommon.hpp new file mode 100644 index 0000000..9170d02 --- /dev/null +++ b/addons/money/ui/RscCommon.hpp @@ -0,0 +1,268 @@ +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// Default grid +// #define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) +// #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) +// #define GUI_GRID_W (GUI_GRID_WAbs / 40) +// #define GUI_GRID_H (GUI_GRID_HAbs / 25) +// #define GUI_GRID_X (safezoneX) +// #define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) + +// Default text sizes +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +class ScrollBar; +class RscObject; +class RscText; +class RscTextSmall; +class RscTitle; +class RscProgress; +class RscProgressNotFreeze; +class RscPicture; +class RscLadderPicture; +class RscPictureKeepAspect; +class RscHTML; +class RscButton; +class RscShortcutButton; +class RscButtonSmall; +class RscEdit; +class RscCombo; +class RscListBox; +class RscListNBox; +class RscXListBox; +class RscTree; +class RscSlider; +class RscSliderH; +class RscXSliderH; +class RscActiveText; +class RscStructuredText; +class RscControlsGroup; +class RscToolbox; +class RscMapControl; +class RscCheckBox; +class RscFrame; +class ctrlDefault; +class ctrlControlsGroup; +class ctrlDefaultText; +class ctrlDefaultButton; +class RscBackgroundStripeTop; +class RscBackgroundStripeBottom; +class RscIGText; +class RscIGProgress; +class RscListBoxKeys; +class RscControlsGroupNoScrollbars; +class RscControlsGroupNoHScrollbars; +class RscControlsGroupNoVScrollbars; +class RscLine; +class RscActivePicture; +class RscButtonTextOnly; +class RscShortcutButtonMain; +class RscButtonEditor; +class RscIGUIShortcutButton; +class RscGearShortcutButton; +class RscButtonMenu; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenuSteam; +class RscLoadingText; +class RscIGUIListBox; +class RscIGUIListNBox; +class RscBackground; +class RscBackgroundGUI; +class RscBackgroundGUILeft; +class RscBackgroundGUIRight; +class RscBackgroundGUIBottom; +class RscBackgroundGUITop; +class RscBackgroundGUIDark; +class RscBackgroundLogo; +class RscMapControlEmpty; +class RscVignette; +class CA_Mainback; +class CA_Back; +class CA_Title_Back; +class CA_Black_Back; +class CA_Title; +class CA_Logo; +class CA_Logo_Small; +class CA_RscButton; +class CA_RscButton_dialog; +class CA_Ok; +class CA_Ok_image; +class CA_Ok_image2; +class CA_Ok_text; +class ctrlCheckbox; +class ctrlCheckboxBaseline; +class ctrlStatic; +class ctrlControlsGroupNoScrollbars; +class ctrlStructuredText; +class RscTextMulti; +class RscTreeSearch; +class RscVideo; +class RscVideoKeepAspect; +class RscActivePictureKeepAspect; +class RscEditMulti; +class RscMapSignalBackground; +class RscMapSignalPicture; +class RscMapSignalText; +class RscColorPicker; +class RscInterlacingScreen; +class RscFeedback; +class RscTrafficLight; +class RscButtonSearch; +class RscIGUIText; +class RscOpticsText; +class RscOpticsValue; +class RscIGUIValue; +class RscButtonMenuMain; +class RscButtonTestCentered; +class RscDisplaySingleMission_ChallengeOverviewGroup; +class RscDisplayDebriefing_RscTextMultiline; +class RscDisplayDebriefing_ListGroup; +class RscButtonArsenal; +class RscTextNoShadow; +class RscButtonNoColor; +class RscToolboxButton; +class ctrlStaticPicture; +class ctrlStaticPictureKeepAspect; +class ctrlStaticPictureTile; +class ctrlStaticFrame; +class ctrlStaticLine; +class ctrlStaticMulti; +class ctrlStaticBackground; +class ctrlStaticOverlay; +class ctrlStaticTitle; +class ctrlStaticFooter; +class ctrlStaticBackgroundDisable; +class ctrlStaticBackgroundDisableTiles; +class ctrlButton; +class ctrlButtonPicture; +class ctrlButtonPictureKeepAspect; +class ctrlButtonOK; +class ctrlButtonCancel; +class ctrlButtonClose; +class ctrlButtonToolbar; +class ctrlButtonSearch; +class ctrlButtonExpandAll; +class ctrlButtonCollapseAll; +class ctrlButtonFilter; +class ctrlEdit; +class ctrlEditMulti; +class ctrlSliderV; +class ctrlSliderH; +class ctrlCombo; +class ctrlComboToolbar; +class ctrlListbox; +class ctrlToolbox; +class ctrlToolboxPicture; +class ctrlToolboxPictureKeepAspect; +class ctrlCheckboxes; +class ctrlCheckboxesCheckbox; +class ctrlProgress; +class ctrlHTML; +class ctrlActiveText; +class ctrlActivePicture; +class ctrlActivePictureKeepAspect; +class ctrlTree; +class ctrlControlsGroupNoHScrollbars; +class ctrlControlsGroupNoVScrollbars; +class ctrlShortcutButton; +class ctrlShortcutButtonOK; +class ctrlShortcutButtonCancel; +class ctrlShortcutButtonSteam; +class ctrlXListbox; +class ctrlXSliderV; +class ctrlXSliderH; +class ctrlMenu; +class ctrlMenuStrip; +class ctrlMap; +class ctrlMapEmpty; +class ctrlMapMain; +class ctrlListNBox; +class ctrlCheckboxToolbar; \ No newline at end of file diff --git a/addons/money/ui/RscGiveCash.hpp b/addons/money/ui/RscGiveCash.hpp new file mode 100644 index 0000000..e3832a6 --- /dev/null +++ b/addons/money/ui/RscGiveCash.hpp @@ -0,0 +1,37 @@ +class RscGiveCash { + idd = 1010; + class controls { + class RscGiveCashFrame_1800: RscText { + idc = 1800; + x = "0.40375 * safezoneW + safezoneX"; + y = "0.335064 * safezoneH + safezoneY"; + w = "0.1925 * safezoneW"; + h = "0.30788 * safezoneH"; + colorBackground[] = {0,0,0,0.8}; + }; + class RscGiveCashText_1000: RscText { + idc = 1000; + text = "Amount"; + x = "0.4175 * safezoneW + safezoneX"; + y = "0.34606 * safezoneH + safezoneY"; + w = "0.09625 * safezoneW"; + h = "0.0329871 * safezoneH"; + }; + class RscGiveCashButton_1600: RscButton { + idc = 1600; + text = "Give Cash"; + x = "0.534375 * safezoneW + safezoneX"; + y = "0.57697 * safezoneH + safezoneY"; + w = "0.055 * safezoneW"; + h = "0.0549786 * safezoneH"; + onButtonClick = "[FORGE_cashGiveTarget, player] call forge_client_money_fnc_giveCashSubmit;"; + }; + class RscGiveCashEdit_1401: RscEdit { + idc = 1401; + x = "0.4175 * safezoneW + safezoneX"; + y = "0.390043 * safezoneH + safezoneY"; + w = "0.165 * safezoneW"; + h = "0.0329871 * safezoneH"; + }; + }; +}; \ No newline at end of file diff --git a/addons/phone/$PBOPREFIX$ b/addons/phone/$PBOPREFIX$ new file mode 100644 index 0000000..cf2b8f4 --- /dev/null +++ b/addons/phone/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\phone \ No newline at end of file diff --git a/addons/phone/CfgEventHandlers.hpp b/addons/phone/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/phone/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/phone/CfgSounds.hpp b/addons/phone/CfgSounds.hpp new file mode 100644 index 0000000..59cb802 --- /dev/null +++ b/addons/phone/CfgSounds.hpp @@ -0,0 +1,13 @@ +class CfgSounds { + sounds[] = {}; + class FORGE_newMsg { + name = "newMsg"; + sound[] = {QUOTE(PATHTOF(sounds\newMsg.ogg)), 2, 1}; + titles[] = {}; + }; + class FORGE_msgSent { + name = "msgSent"; + sound[] = {QUOTE(PATHTOF(sounds\woop.ogg)), 3, 1}; + titles[] = {}; + }; +}; \ No newline at end of file diff --git a/addons/phone/XEH_PREP.hpp b/addons/phone/XEH_PREP.hpp new file mode 100644 index 0000000..ee6b35e --- /dev/null +++ b/addons/phone/XEH_PREP.hpp @@ -0,0 +1,27 @@ +PREP(addContact); +PREP(addEmail); +PREP(addMsg); +PREP(addOfflineEmail); +PREP(addOfflineMsg); +PREP(dateToHhMm); +PREP(delEmail); +PREP(delMsg); +PREP(initAction); +PREP(initAddAction); +PREP(initPhone); +PREP(initVar); +PREP(newEmail); +PREP(newMsg); +PREP(openPhone); +PREP(sendEmail); +PREP(sendMsg); +PREP(showContact); +PREP(showDialpad); +PREP(showEmail); +PREP(showMessage); +PREP(showMessageInput); +PREP(showSafari); +PREP(viewContacts); +PREP(viewEmail); +PREP(viewMessages); +PREP(viewSettings); \ No newline at end of file diff --git a/addons/phone/XEH_postInit.sqf b/addons/phone/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/phone/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/phone/XEH_postInit_client.sqf b/addons/phone/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/phone/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/phone/XEH_preInit.sqf b/addons/phone/XEH_preInit.sqf new file mode 100644 index 0000000..9428dbc --- /dev/null +++ b/addons/phone/XEH_preInit.sqf @@ -0,0 +1,12 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +GVAR(addressbook) = GETVAR(profileNamespace,FORGE_AddressBook,[]); +GVAR(messages) = []; +GVAR(email) = []; + +ADDON = true; \ No newline at end of file diff --git a/addons/phone/XEH_preInit_server.sqf b/addons/phone/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/phone/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/phone/XEH_preStart.sqf b/addons/phone/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/phone/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/phone/config.cpp b/addons/phone/config.cpp new file mode 100644 index 0000000..009ec8d --- /dev/null +++ b/addons/phone/config.cpp @@ -0,0 +1,19 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgSounds.hpp" +#include "ui\RscCommon.hpp" +#include "ui\RscPhone.hpp" \ No newline at end of file diff --git a/addons/phone/functions/fnc_addContact.sqf b/addons/phone/functions/fnc_addContact.sqf new file mode 100644 index 0000000..f3e2ec9 --- /dev/null +++ b/addons/phone/functions/fnc_addContact.sqf @@ -0,0 +1,14 @@ +#include "..\script_component.hpp" + +params ["_contact"]; + +private _defaultPhoneNumber = "unknown"; +private _defaultEmail = "unknown@spearnet.mil"; + +private _name = name _contact; +private _phoneNumber = GETVAR(_contact,FORGE_Phone_Number,_defaultPhoneNumber); +private _email = GETVAR(_contact,FORGE_Email,_defaultEmail); + +GVAR(addressbook) pushBackUnique [_name, _phoneNumber, _email]; + +SETVAR(profileNamespace,FORGE_AddressBook,GVAR(addressbook)); \ No newline at end of file diff --git a/addons/phone/functions/fnc_addEmail.sqf b/addons/phone/functions/fnc_addEmail.sqf new file mode 100644 index 0000000..524c518 --- /dev/null +++ b/addons/phone/functions/fnc_addEmail.sqf @@ -0,0 +1,8 @@ +#include "..\script_component.hpp" + +if (_this isEqualTo [""]) exitWith {}; + +private _tmp = call compile format ["%1", _this]; +if ((typeName _tmp) isEqualTo "SCALAR") exitWith {}; + +GVAR(email) = _this; \ No newline at end of file diff --git a/addons/phone/functions/fnc_addMsg.sqf b/addons/phone/functions/fnc_addMsg.sqf new file mode 100644 index 0000000..6443714 --- /dev/null +++ b/addons/phone/functions/fnc_addMsg.sqf @@ -0,0 +1,8 @@ +#include "..\script_component.hpp" + +if (_this isEqualTo [""]) exitWith {}; + +private _tmp = call compile format ["%1", _this]; +if ((typeName _tmp) isEqualTo "SCALAR") exitWith {}; + +GVAR(messages) = _this; \ No newline at end of file diff --git a/addons/phone/functions/fnc_addOfflineEmail.sqf b/addons/phone/functions/fnc_addOfflineEmail.sqf new file mode 100644 index 0000000..9e9cd97 --- /dev/null +++ b/addons/phone/functions/fnc_addOfflineEmail.sqf @@ -0,0 +1,10 @@ +#include "..\script_component.hpp" + +if (_this isEqualTo [""]) exitWith {}; + +private _tmp = call compile format ["%1", _this]; +if ((typeName _tmp) isEqualTo "SCALAR") exitWith {}; + +GVAR(email) = _this; + +["You got an email while away.", "cyan", 3] call EFUNC(misc,notify); \ No newline at end of file diff --git a/addons/phone/functions/fnc_addOfflineMsg.sqf b/addons/phone/functions/fnc_addOfflineMsg.sqf new file mode 100644 index 0000000..42e4399 --- /dev/null +++ b/addons/phone/functions/fnc_addOfflineMsg.sqf @@ -0,0 +1,10 @@ +#include "..\script_component.hpp" + +if (_this isEqualTo [""]) exitWith {}; + +private _tmp = call compile format ["%1", _this]; +if ((typeName _tmp) isEqualTo "SCALAR") exitWith {}; + +GVAR(messages) = _this; + +["You got a message while away.", "green", 3] call EFUNC(misc,notify); \ No newline at end of file diff --git a/addons/phone/functions/fnc_dateToHhMm.sqf b/addons/phone/functions/fnc_dateToHhMm.sqf new file mode 100644 index 0000000..9d107f7 --- /dev/null +++ b/addons/phone/functions/fnc_dateToHhMm.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" + +private ["_h", "_m"]; + +_h = _this select 0; +_m = _this select 1; + +_HHMM = []; + +if (_h < 10) then { + _HHMM = [format ["0%1", _h]]; +} else { + _HHMM = [format ["%1", _h]]; +}; + +if (_m < 10) then { + _HHMM = _HHMM + [format ["0%1", _m]]; +} else { + _HHMM = _HHMM + [format ["%1", _m]]; +}; + +_HHMM; \ No newline at end of file diff --git a/addons/phone/functions/fnc_delEmail.sqf b/addons/phone/functions/fnc_delEmail.sqf new file mode 100644 index 0000000..040cc00 --- /dev/null +++ b/addons/phone/functions/fnc_delEmail.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" + +private _myDialog = findDisplay 202300; +private _ctrl01 = _myDialog displayCtrl 202302; + +_myDialog displayRemoveEventHandler ["KeyDown", FORGE_DeleteMsg]; + +if (lbCurSel _ctrl01 == -1) exitWith {}; + +private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; +private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; +private _viewMessagesBtns = [202201, 2023001, 2023002, 2023003, 202302, 202305, 202306, 202307, 202308]; + +{ ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBgBtns; +{ ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBtns; +{ ctrlShow [_x, false] } forEach _viewMessagesBtns; +ctrlShow [202319, false]; +ctrlEnable [202319, false]; + +// [player getVariable ["FORGE_Email", "unknown@spearnet.mil"], lbCurSel _ctrl01] remoteExec ["db_fnc_listrem", 2, false]; +// ["listrem", player getVariable ["FORGE_Email", "unknown@spearnet.mil"], "", lbCurSel _ctrl01, [], "", false] spawn dragonfly_db_fnc_addTask; +["listrem", player getVariable ["FORGE_Email", "unknown@spearnet.mil"], "", lbCurSel _ctrl01, [], "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; + +uiSleep 1; + +// [player getVariable ["FORGE_Email", "unknown@spearnet.mil"], player, "forge_client_phone_fnc_addEmail", true] remoteExec ["db_fnc_listload", 2, false]; +// ["listrng", player getVariable ["FORGE_Email", "unknown@spearnet.mil"], "", -1, [], "forge_client_phone_fnc_addEmail", true] spawn dragonfly_db_fnc_addTask; +["listrng", player getVariable ["FORGE_Email", "unknown@spearnet.mil"], "", -1, [], "forge_client_phone_fnc_addEmail", true, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_delMsg.sqf b/addons/phone/functions/fnc_delMsg.sqf new file mode 100644 index 0000000..317ea7d --- /dev/null +++ b/addons/phone/functions/fnc_delMsg.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" + +private _myDialog = findDisplay 202300; +private _ctrl01 = _myDialog displayCtrl 202302; + +_myDialog displayRemoveEventHandler ["KeyDown", FORGE_DeleteMsg]; + +if (lbCurSel _ctrl01 == -1) exitWith {}; + +private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; +private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; +private _viewMessagesBtns = [202201, 2023001, 2023002, 2023003, 202302, 202305, 202306, 202307, 202308]; + +{ ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBgBtns; +{ ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBtns; +{ ctrlShow [_x, false] } forEach _viewMessagesBtns; +ctrlShow [202319, false]; +ctrlEnable [202319, false]; + +// [player getVariable ["FORGE_Phone_Number", "unknown"], lbCurSel _ctrl01] remoteExec ["db_fnc_listrem", 2, false]; +// ["listrem", player getVariable ["FORGE_Phone_Number", "unknown"], "", lbCurSel _ctrl01, [], "", false] spawn dragonfly_db_fnc_addTask; +["listrem", player getVariable ["FORGE_Phone_Number", "unknown"], "", lbCurSel _ctrl01, [], "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; + +uiSleep 1; + +// [player getVariable ["FORGE_Phone_Number", "unknown"], player, "forge_client_phone_fnc_addMsg", true] remoteExec ["db_fnc_listload", 2, false]; +// ["listrng", player getVariable ["FORGE_Phone_Number", "unknown"], "", -1, [], "forge_client_phone_fnc_addMsg", true] spawn dragonfly_db_fnc_addTask; +["listrng", player getVariable ["FORGE_Phone_Number", "unknown"], "", -1, [], "forge_client_phone_fnc_addMsg", true, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_initAction.sqf b/addons/phone/functions/fnc_initAction.sqf new file mode 100644 index 0000000..3e82ba5 --- /dev/null +++ b/addons/phone/functions/fnc_initAction.sqf @@ -0,0 +1,3 @@ +#include "..\script_component.hpp" + +[] spawn FUNC(openPhone); \ No newline at end of file diff --git a/addons/phone/functions/fnc_initAddAction.sqf b/addons/phone/functions/fnc_initAddAction.sqf new file mode 100644 index 0000000..6a50893 --- /dev/null +++ b/addons/phone/functions/fnc_initAddAction.sqf @@ -0,0 +1,4 @@ +#include "..\script_component.hpp" + +waitUntil { "FORGE_Phone" in items player }; +FORGE_addAction = player addAction ["Mobile Phone", FUNC(initAction), [], -99, false, false, "", ""]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_initPhone.sqf b/addons/phone/functions/fnc_initPhone.sqf new file mode 100644 index 0000000..8882870 --- /dev/null +++ b/addons/phone/functions/fnc_initPhone.sqf @@ -0,0 +1,8 @@ +#include "..\script_component.hpp" + +waitUntil { !isNull player && player == player }; +waitUntil { !isNil "BIS_fnc_init" }; +waitUntil { !(isNull (findDisplay 46)) }; +waitUntil { "FORGE_Phone" in items player }; + +FORGE_addAction = player addAction ["Mobile Phone", FUNC(initAction), [], -99, false, false, "", ""]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_initVar.sqf b/addons/phone/functions/fnc_initVar.sqf new file mode 100644 index 0000000..2ae7dd6 --- /dev/null +++ b/addons/phone/functions/fnc_initVar.sqf @@ -0,0 +1,5 @@ +#include "..\script_component.hpp" + +FORGE_AddressBook = GETVAR(profileNamespace,FORGE_AddressBook,[]); +FORGE_Phone_MSG = []; +FORGE_Email = []; \ No newline at end of file diff --git a/addons/phone/functions/fnc_newEmail.sqf b/addons/phone/functions/fnc_newEmail.sqf new file mode 100644 index 0000000..af2659c --- /dev/null +++ b/addons/phone/functions/fnc_newEmail.sqf @@ -0,0 +1,18 @@ +#include "..\script_component.hpp" + +_email = (_this select 0); +{ + if (_email == (_x select 1)) then { + _email = (_x select 0); + }; +} forEach GVAR(addressbook); + +[format ["You got a new email from %1.", _email], "cyan", 3] call EFUNC(misc,notify); + +playSound "FORGE_newMsg"; + +uiSleep 1; + +// [player getVariable ["FORGE_Email", "unknown@spearnet.mil"], player, "forge_client_phone_fnc_addEmail", true] remoteExec ["db_fnc_listload", 2, false]; +// ["listrng", player getVariable ["FORGE_Email", "unknown@spearnet.mil"], "", -1, [], "forge_client_phone_fnc_addEmail", true] spawn dragonfly_db_fnc_addTask; +["listrng", player getVariable ["FORGE_Email", "unknown@spearnet.mil"], "", -1, [], "forge_client_phone_fnc_addEmail", true, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_newMsg.sqf b/addons/phone/functions/fnc_newMsg.sqf new file mode 100644 index 0000000..c9e928f --- /dev/null +++ b/addons/phone/functions/fnc_newMsg.sqf @@ -0,0 +1,18 @@ +#include "..\script_component.hpp" + +_number = (_this select 0); +{ + if (_number == (_x select 1)) then { + _number = (_x select 0); + }; +} forEach GVAR(addressbook); + +[format ["You got a new message from %1.", _number], "green", 3] call EFUNC(misc,notify); + +playSound "FORGE_newMsg"; + +uiSleep 1; + +// [player getVariable ["FORGE_Phone_Number", "unknown"], player, "forge_client_phone_fnc_addMsg", true] remoteExec ["db_fnc_listload", 2, false]; +// ["listrng", player getVariable ["FORGE_Phone_Number", "unknown"], "", -1, [], "forge_client_phone_fnc_addMsg", true] spawn dragonfly_db_fnc_addTask; +["listrng", player getVariable ["FORGE_Phone_Number", "unknown"], "", -1, [], "forge_client_phone_fnc_addMsg", true, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_openPhone.sqf b/addons/phone/functions/fnc_openPhone.sqf new file mode 100644 index 0000000..49c9679 --- /dev/null +++ b/addons/phone/functions/fnc_openPhone.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" + +private _defaultTheme = ["bg_dark01", "\@forge\userconfig\backgrounds\bgdark_01.paa"]; +private _theme = GETVAR(profileNamespace,FORGE_PhoneTheme,_defaultTheme); +private _themeBackground = _theme select 1; + +private _dayTime = [(date select 3), (date select 4)] call FUNC(dateToHhMm); +private _dialog = createDialog "RscPhone"; + +private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; +private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + +private _dialpadBgBtns = [202210, 202211, 202212, 202213, 202214, 202215, 202216, 202217, 202218, 202219, 202220, 202221]; +private _dialpadBtns = [202401, 202402, 202403, 202404, 202405, 202406, 202407, 202408, 202409, 202410, 202411, 202412, 202413]; + +private _displayCtrls = [202201, 202210, 202211, 202212, 202213, 202214, 202215, 202216, 202217, 202218, 202219, 202220, 202221, 202222, 202223, 202224, 202302, 202303, 202304, 202305, 202306, 202307, 202308, 202309, 202319, 2023001, 2023002, 2023003, 2023004, 2023005, 2023006, 202401, 202402, 202403, 202404, 202405, 202406, 202407, 202408, 202409, 202410, 202411, 202412, 202413, 202414, 202415, 202416]; + +disableSerialization; + +ctrlSetText [202200, _themeBackground]; + +{ + ctrlShow [_x, false]; +} forEach _displayCtrls; + +ctrlSetText [202301, (_dayTime select 0) + ":" + (_dayTime select 1)]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_sendEmail.sqf b/addons/phone/functions/fnc_sendEmail.sqf new file mode 100644 index 0000000..470a733 --- /dev/null +++ b/addons/phone/functions/fnc_sendEmail.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" + +params ["_email", "_msg"]; + +private _defaultEmail = "unknown@spearnet.mil"; +private _pEmail = GETVAR(player,FORGE_Email,_defaultEmail); + +{ + private _tmpEmail = GETVAR(_x,FORGE_Email,_defaultEmail); + + if (_tmpEmail isEqualTo _email) then { + [_pEmail] remoteExec ["forge_client_phone_fnc_newEmail", _x, false]; + }; +} forEach playableUnits; + +// ["listadd", _email, "", -1, [_pEmail, _msg]], "forge_server_phone_fnc_addEmail", false] spawn dragonfly_db_fnc_addTask; +["listadd", _email, "", -1, [_pEmail, _msg], "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_sendMsg.sqf b/addons/phone/functions/fnc_sendMsg.sqf new file mode 100644 index 0000000..4b33be5 --- /dev/null +++ b/addons/phone/functions/fnc_sendMsg.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" + +params ["_number", "_msg"]; + +private _defaultPhoneNumber = "unknown"; +private _pNumber = GETVAR(player,FORGE_Phone_Number,_defaultPhoneNumber); + +{ + private _tmpNumber = GETVAR(_x,FORGE_Phone_Number,_defaultPhoneNumber); + + if (_tmpNumber isEqualTo _number) then { + [_pNumber] remoteExec ["forge_client_phone_fnc_newMsg", _x, false]; + }; +} forEach playableUnits; + +// ["listadd", _number, "", -1, [_pNumber, _msg], "", false] spawn dragonfly_db_fnc_addTask; +["listadd", _number, "", -1, [_pNumber, _msg], "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_showContact.sqf b/addons/phone/functions/fnc_showContact.sqf new file mode 100644 index 0000000..b7d9093 --- /dev/null +++ b/addons/phone/functions/fnc_showContact.sqf @@ -0,0 +1,91 @@ +#include "..\script_component.hpp" + +private _cntcBtns = [202223, 202224, 202414, 202415]; +private _metaCtrls = [2023001, 2023002, 2023003, 2023004, 2023005, 2023006]; + +{ + ctrlShow [_x, true]; + ctrlEnable [_x, true]; +} forEach _cntcBtns; + +{ + ctrlShow [_x, true]; + ctrlEnable [_x, true]; +} forEach _metaCtrls; + +private _ctrl01 = (findDisplay 202300) displayCtrl 202319; +_ctrl01 ctrlRemoveAllEventHandlers "ButtonClick"; +_ctrl01 ctrlAddEventHandler ["ButtonClick", { + _this spawn FUNC(viewContacts); + + ctrlShow [202223, false]; + ctrlShow [202224, false]; + ctrlShow [2023001, false]; + ctrlShow [2023002, false]; + ctrlShow [2023003, false]; + ctrlShow [2023004, false]; + ctrlShow [2023005, false]; + ctrlShow [2023006, false]; + ctrlShow [202414, false]; + ctrlShow [202415, false]; +}]; + +private _ctrl02 = (findDisplay 202300) displayCtrl 202414; +_ctrl02 ctrlRemoveAllEventHandlers "ButtonClick"; +// _ctrl02 ctrlAddEventHandler ["ButtonClick", { +// private _reciever = ctrlText 2023004; +// [_reciever] spawn FUNC(showDialpad); + +// ctrlShow [202223, false]; +// ctrlShow [202224, false]; +// ctrlShow [2023001, false]; +// ctrlShow [2023002, false]; +// ctrlShow [2023003, false]; +// ctrlShow [2023004, false]; +// ctrlShow [2023005, false]; +// ctrlShow [2023006, false]; +// ctrlShow [202307, false]; +// ctrlShow [202308, false]; +// ctrlShow [202414, false]; +// ctrlShow [202415, false]; +// }]; + +private _ctrl03 = (findDisplay 202300) displayCtrl 202415; +_ctrl03 ctrlRemoveAllEventHandlers "ButtonClick"; +_ctrl03 ctrlAddEventHandler ["ButtonClick", { + private _reciever = ctrlText 2023004; + [_reciever] spawn FUNC(showMessageInput); + + ctrlShow [202223, false]; + ctrlShow [202224, false]; + ctrlShow [2023001, false]; + ctrlShow [2023002, false]; + ctrlShow [2023003, false]; + ctrlShow [2023004, false]; + ctrlShow [2023005, false]; + ctrlShow [2023006, false]; + ctrlShow [202414, false]; + ctrlShow [202415, false]; +}]; + +disableSerialization; + +private _control = _this select 0; +private _index = _this select 1; + +private _contact = _control lbText _index; +private _details = _control lbData _index; +private _data = call compile format ["%1", _details]; + +private _phoneNumber = _data select 0; +private _email = _data select 1; + +ctrlSetText [202307, "Contacts"]; +ctrlSetText [202308, "Contact details"]; + +ctrlSetText [2023001, "NAME"]; +ctrlSetText [2023002, _contact]; +ctrlSetText [2023003, "PHONE NUMBER"]; +ctrlSetText [2023004, _phoneNumber]; +ctrlSetText [2023005, "EMAIL"]; +ctrlSetText [2023006, _email]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_showDialpad.sqf b/addons/phone/functions/fnc_showDialpad.sqf new file mode 100644 index 0000000..ce4afbb --- /dev/null +++ b/addons/phone/functions/fnc_showDialpad.sqf @@ -0,0 +1,56 @@ +#include "..\script_component.hpp" + +private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; +private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; +private _dialpadBgBtns = [202210, 202211, 202212, 202213, 202214, 202215, 202216, 202217, 202218, 202219, 202220, 202221, 202222]; +private _dialpadBtns = [202401, 202402, 202403, 202404, 202405, 202406, 202407, 202408, 202409, 202410, 202411, 202412, 202413]; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBgBtns; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBtns; + +{ + ctrlShow [_x, true]; + ctrlEnable [_x, true]; +} forEach _dialpadBgBtns; + +{ + ctrlShow [_x, true]; + ctrlEnable [_x, true]; +} forEach _dialpadBtns; + +ctrlShow [202201, true]; +ctrlShow [202309, true]; +ctrlShow [202319, true]; +ctrlEnable [202319, true]; + +ctrlSetText [202309, ""]; + +private _reciever = _this select 0; +ctrlSetText [202309, _reciever]; + +private _ctrl01 = (findDisplay 202300) displayCtrl 202319; + +_ctrl01 ctrlRemoveAllEventHandlers "ButtonClick"; + +_ctrl01 ctrlAddEventHandler ["ButtonClick", { + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; + private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + private _dialpadBgBtns = [202210, 202211, 202212, 202213, 202214, 202215, 202216, 202217, 202218, 202219, 202220, 202221, 202222]; + private _dialpadBtns = [202401, 202402, 202403, 202404, 202405, 202406, 202407, 202408, 202409, 202410, 202411, 202412, 202413]; + + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBgBtns; + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBtns; + { ctrlShow [_x, false]; ctrlEnable [_x, false]; } forEach _dialpadBgBtns; + { ctrlShow [_x, false]; ctrlEnable [_x, false]; } forEach _dialpadBtns; + ctrlShow [202201, false]; + ctrlShow [202309, false]; + ctrlShow [202319, false]; + ctrlEnable [202319, false]; +}]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_showEmail.sqf b/addons/phone/functions/fnc_showEmail.sqf new file mode 100644 index 0000000..4bab8ba --- /dev/null +++ b/addons/phone/functions/fnc_showEmail.sqf @@ -0,0 +1,55 @@ +#include "..\script_component.hpp" + +private _metaCtrls = [2023001, 2023002, 2023003]; + +{ + ctrlShow [_x, true]; + ctrlEnable [_x, true]; +} forEach _metaCtrls; + +private _ctrl01 = (findDisplay 202300) displayCtrl 202319; +_ctrl01 ctrlRemoveAllEventHandlers "ButtonClick"; +_ctrl01 ctrlAddEventHandler ["ButtonClick", { + _this spawn FUNC(viewEmail); + + ctrlShow [2023001, false]; + ctrlShow [2023002, false]; + ctrlShow [2023003, false]; + ctrlShow [202305, false]; + ctrlShow [202306, false]; +}]; + +ctrlShow [202305, true]; +ctrlShow [202306, true]; + +disableSerialization; + +private _control = _this select 0; +private _index = _this select 1; + +private _from = _control lbText _index; +private _email = _control lbData _index; +private _data = call compile format["%1", _email]; + +private _subject = _data select 0; +private _body = _data select 1; + +ctrlSetText [202307, "Emails"]; +ctrlSetText [202308, "Read your email"]; + +ctrlSetText [2023001, "FROM"]; +ctrlSetText [2023002, _from]; +ctrlSetText [2023003, "EMAIL"]; +ctrlSetText [202306, _body]; + +private _ctrl01 = (findDisplay 202300) displayCtrl 202306; + +private _ctrl01Pos = ctrlPosition _ctrl01; +private _oldH = _ctrl01Pos select 3; +private _newH = ctrlTextHeight _ctrl01; +private _x = _ctrl01Pos select 0; +private _y = _ctrl01Pos select 1; +private _z = _ctrl01Pos select 2; + +_ctrl01 ctrlSetPosition [_x, _y, _z, _newH]; +_ctrl01 ctrlCommit 0; \ No newline at end of file diff --git a/addons/phone/functions/fnc_showMessage.sqf b/addons/phone/functions/fnc_showMessage.sqf new file mode 100644 index 0000000..97168cf --- /dev/null +++ b/addons/phone/functions/fnc_showMessage.sqf @@ -0,0 +1,51 @@ +#include "..\script_component.hpp" + +private _metaCtrls = [2023001, 2023002, 2023003]; + +{ + ctrlShow [_x, true]; + ctrlEnable [_x, true]; +} forEach _metaCtrls; + +private _ctrl01 = (findDisplay 202300) displayCtrl 202319; +_ctrl01 ctrlRemoveAllEventHandlers "ButtonClick"; +_ctrl01 ctrlAddEventHandler ["ButtonClick", { + _this spawn FUNC(viewMessages); + + ctrlShow [2023001, false]; + ctrlShow [2023002, false]; + ctrlShow [2023003, false]; + ctrlShow [202305, false]; + ctrlShow [202306, false]; +}]; + +ctrlShow [202305, true]; +ctrlShow [202306, true]; + +disableSerialization; + +private _control = _this select 0; +private _index = _this select 1; + +private _sender = _control lbText _index; +private _message = _control lbData _index; + +ctrlSetText [202307, "Messages"]; +ctrlSetText [202308, "Read your message"]; + +ctrlSetText [2023001, "FROM"]; +ctrlSetText [2023002, _sender]; +ctrlSetText [2023003, "MESSAGE"]; +ctrlSetText [202306, _message]; + +private _ctrl01 = (findDisplay 202300) displayCtrl 202306; + +private _ctrl01Pos = ctrlPosition _ctrl01; +private _oldH = _ctrl01Pos select 3; +private _newH = ctrlTextHeight _ctrl01; +private _x = _ctrl01Pos select 0; +private _y = _ctrl01Pos select 1; +private _z = _ctrl01Pos select 2; + +_ctrl01 ctrlSetPosition [_x, _y, _z, _newH]; +_ctrl01 ctrlCommit 0; \ No newline at end of file diff --git a/addons/phone/functions/fnc_showMessageInput.sqf b/addons/phone/functions/fnc_showMessageInput.sqf new file mode 100644 index 0000000..38bdfc2 --- /dev/null +++ b/addons/phone/functions/fnc_showMessageInput.sqf @@ -0,0 +1,52 @@ +#include "..\script_component.hpp" + +private _metaCtrls = [2023001, 2023002, 2023003]; + +{ + ctrlShow [_x, true]; + ctrlEnable [_x, true]; +} forEach _metaCtrls; + +private _ctrl01 = (findDisplay 202300) displayCtrl 202319; +_ctrl01 ctrlRemoveAllEventHandlers "ButtonClick"; +_ctrl01 ctrlAddEventHandler ["ButtonClick", { + _this spawn FUNC(viewContacts); + + ctrlShow [2023001, false]; + ctrlShow [2023002, false]; + ctrlShow [2023003, false]; + ctrlShow [202304, false]; + ctrlShow [202416, false]; + ctrlEnable [202416, false]; +}]; + +private _ctrl02 = (findDisplay 202300) displayCtrl 202416; +_ctrl02 ctrlRemoveAllEventHandlers "ButtonClick"; +_ctrl02 ctrlAddEventHandler ["ButtonClick", { + private _reciever = ctrlText 2023002; + private _msg = ctrlText 202304; + [_reciever, _msg] spawn FUNC(sendMsg); + + playSound "FORGE_msgSent"; + + ctrlShow [2023001, false]; + ctrlShow [2023002, false]; + ctrlShow [2023003, false]; + ctrlShow [202304, false]; + ctrlShow [202416, false]; + ctrlEnable [202416, false]; +}]; + +ctrlShow [202304, true]; +ctrlShow [202416, true]; +ctrlEnable [202416, true]; + +ctrlSetText [202307, "Messages"]; +ctrlSetText [202308, "Send your message"]; + +private _reciever = _this select 0; + +ctrlSetText [2023001, "TO"]; +ctrlSetText [2023002, _reciever]; +ctrlSetText [2023003, "MESSAGE"]; +ctrlSetText [202304, ""]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_showSafari.sqf b/addons/phone/functions/fnc_showSafari.sqf new file mode 100644 index 0000000..0ca1b6b --- /dev/null +++ b/addons/phone/functions/fnc_showSafari.sqf @@ -0,0 +1,40 @@ +#include "..\script_component.hpp" + +private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; +private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBgBtns; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBtns; + +ctrlShow [202201, true]; +ctrlShow [202307, true]; +ctrlShow [202308, true]; +ctrlShow [202319, true]; +ctrlEnable [202319, true]; + +private _ctrl01 = (findDisplay 202300) displayCtrl 202319; + +_ctrl01 ctrlRemoveAllEventHandlers "ButtonClick"; + +_ctrl01 ctrlAddEventHandler ["ButtonClick", { + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; + private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBgBtns; + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBtns; + ctrlShow [202201, false]; + ctrlShow [202307, false]; + ctrlShow [202308, false]; + ctrlShow [202319, false]; + ctrlEnable [202319, false]; +}]; + +ctrlSetText [202307, "Safari"]; +ctrlSetText [202308, "Internet browser"]; \ No newline at end of file diff --git a/addons/phone/functions/fnc_viewContacts.sqf b/addons/phone/functions/fnc_viewContacts.sqf new file mode 100644 index 0000000..55dbdd8 --- /dev/null +++ b/addons/phone/functions/fnc_viewContacts.sqf @@ -0,0 +1,61 @@ +#include "..\script_component.hpp" + +private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; +private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBgBtns; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBtns; + +ctrlShow [202201, true]; +ctrlShow [202302, true]; +ctrlShow [202307, true]; +ctrlShow [202308, true]; +ctrlShow [202319, true]; +ctrlEnable [202319, true]; + +private _ctrl01 = (findDisplay 202300) displayCtrl 202302; +private _ctrl02 = (findDisplay 202300) displayCtrl 202319; + +_ctrl01 ctrlRemoveAllEventHandlers "LBDblClick"; +_ctrl02 ctrlRemoveAllEventHandlers "ButtonClick"; + +_ctrl01 ctrlAddEventHandler ["LBDblClick", { + _this spawn forge_client_phone_fnc_showContact; + ctrlShow [202302, false]; +}]; +_ctrl02 ctrlAddEventHandler ["ButtonClick", { + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; + private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBgBtns; + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBtns; + ctrlShow [202201, false]; + ctrlShow [202302, false]; + ctrlShow [202307, false]; + ctrlShow [202308, false]; + ctrlShow [202319, false]; + ctrlEnable [202319, false]; +}]; + +ctrlSetText [202307, "Contacts"]; +ctrlSetText [202308, "View your contacts"]; + +lbClear _ctrl01; + +private _contacts = GVAR(addressbook); + +{ + private _contact = _x select 0; + private _phoneNumber = _x select 1; + private _email = _x select 2; + private _cntcListIndex = _ctrl01 lbAdd _contact; + _ctrl01 lbSetData [_cntcListIndex, format ["%1", [_phoneNumber, _email]]]; + _ctrl01 lbSetPicture [_cntcListIndex, "\z\forge_client\addons\phone\ui\data\avatar.paa"]; +} forEach _contacts; \ No newline at end of file diff --git a/addons/phone/functions/fnc_viewEmail.sqf b/addons/phone/functions/fnc_viewEmail.sqf new file mode 100644 index 0000000..edd70c6 --- /dev/null +++ b/addons/phone/functions/fnc_viewEmail.sqf @@ -0,0 +1,85 @@ +#include "..\script_component.hpp" + +private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; +private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBgBtns; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBtns; + +ctrlShow [202201, true]; +ctrlShow [202302, true]; +ctrlShow [202307, true]; +ctrlShow [202308, true]; +ctrlShow [202319, true]; +ctrlEnable [202319, true]; + +private _myDialog = findDisplay 202300; +private _ctrl01 = _myDialog displayCtrl 202302; +private _ctrl02 = _myDialog displayCtrl 202319; + +_ctrl01 ctrlRemoveAllEventHandlers "LBDblClick"; +_ctrl02 ctrlRemoveAllEventHandlers "ButtonClick"; + +_ctrl01 ctrlAddEventHandler ["LBDblClick", { + _this spawn FUNC(showEmail); + ctrlShow [202302, false]; +}]; + +FORGE_DeleteEmailTrigger = true; +FORGE_DeleteEmail = _myDialog displayAddEventHandler ["KeyDown", { + if ((_this select 1) == 14 && FORGE_DeleteEmailTrigger) then { + FORGE_DeleteEmailTrigger = false; + private _ctrl01 = (findDisplay 202300) displayCtrl 202302; + private _selectedIndex = lbCurSel _ctrl01; + if (_selectedIndex >= 0) then { + private _selectedText = _ctrl01 lbText _selectedIndex; + [format ["Deleted email from: %1", _selectedText], "blue-grey", 3] call EFUNC(misc,notify); + [] spawn FUNC(delEmail); + }; + }; +}]; + +_ctrl02 ctrlAddEventHandler ["ButtonClick", { + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; + private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + private _viewEmailsBtns = [202201, 2023001, 2023002, 2023003, 202302, 202305, 202306, 202307, 202308]; + + FORGE_DeleteEmailTrigger = false; + + private _myDialog = findDisplay 202300; + _myDialog displayRemoveEventHandler ["KeyDown", FORGE_DeleteEmail]; + + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBgBtns; + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBtns; + { ctrlShow [_x, false] } forEach _viewEmailsBtns; + ctrlShow [202319, false]; + ctrlEnable [202319, false]; +}]; + +ctrlSetText [202307, "Emails"]; +ctrlSetText [202308, "View your emails"]; + +lbClear _ctrl01; + +private _emails = GVAR(email); + +{ + private _from = _x select 0; + { + if (_from == (_x select 1)) then { + _from = _x select 0; + }; + } forEach GVAR(addressbook); + private _subject = _x select 1; + private _body = _x select 2; + private _emailListIndex = _ctrl01 lbAdd _from; + _ctrl01 lbSetData [_emailListIndex, format ["%1", [_subject, _body]]]; + _ctrl01 lbSetPicture [_emailListIndex, "\z\forge_client\addons\phone\ui\data\avatar.paa"]; +} forEach _emails; \ No newline at end of file diff --git a/addons/phone/functions/fnc_viewMessages.sqf b/addons/phone/functions/fnc_viewMessages.sqf new file mode 100644 index 0000000..92a9141 --- /dev/null +++ b/addons/phone/functions/fnc_viewMessages.sqf @@ -0,0 +1,84 @@ +#include "..\script_component.hpp" + +private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; +private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBgBtns; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBtns; + +ctrlShow [202201, true]; +ctrlShow [202302, true]; +ctrlShow [202307, true]; +ctrlShow [202308, true]; +ctrlShow [202319, true]; +ctrlEnable [202319, true]; + +private _myDialog = findDisplay 202300; +private _ctrl01 = _myDialog displayCtrl 202302; +private _ctrl02 = _myDialog displayCtrl 202319; + +_ctrl01 ctrlRemoveAllEventHandlers "LBDblClick"; +_ctrl02 ctrlRemoveAllEventHandlers "ButtonClick"; + +_ctrl01 ctrlAddEventHandler ["LBDblClick", { + _this spawn forge_client_phone_fnc_showMessage; + ctrlShow [202302, false]; +}]; + +FORGE_DeleteMsgTrigger = true; +FORGE_DeleteMsg = _myDialog displayAddEventHandler ["KeyDown", { + if ((_this select 1) == 14 && FORGE_DeleteMsgTrigger) then { + FORGE_DeleteMsgTrigger = false; + private _ctrl01 = (findDisplay 202300) displayCtrl 202302; + private _selectedIndex = lbCurSel _ctrl01; + if (_selectedIndex >= 0) then { + private _selectedText = _ctrl01 lbText _selectedIndex; + [format ["Deleted text message from: %1", _selectedText], "blue-grey", 3] call EFUNC(misc,notify); + [] spawn forge_client_phone_fnc_delMsg; + }; + }; +}]; + +_ctrl02 ctrlAddEventHandler ["ButtonClick", { + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; + private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + private _viewMessagesBtns = [202201, 2023001, 2023002, 2023003, 202302, 202305, 202306, 202307, 202308]; + + FORGE_DeleteMsgTrigger = false; + + private _myDialog = findDisplay 202300; + _myDialog displayRemoveEventHandler ["KeyDown", FORGE_DeleteMsg]; + + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBgBtns; + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBtns; + { ctrlShow [_x, false] } forEach _viewMessagesBtns; + ctrlShow [202319, false]; + ctrlEnable [202319, false]; +}]; + +ctrlSetText [202307, "Messages"]; +ctrlSetText [202308, "View your messages"]; + +lbClear _ctrl01; + +private _messages = GVAR(messages); + +{ + private _sender = _x select 0; + { + if (_sender == (_x select 1)) then { + _sender = _x select 0; + }; + } forEach GVAR(addressbook); + private _message = _x select 1; + private _msgListIndex = _ctrl01 lbAdd _sender; + _ctrl01 lbSetData [_msgListIndex, format ["%1", _message]]; + _ctrl01 lbSetPicture [_msgListIndex, "\z\forge_client\addons\phone\ui\data\avatar.paa"]; +} forEach _messages; \ No newline at end of file diff --git a/addons/phone/functions/fnc_viewSettings.sqf b/addons/phone/functions/fnc_viewSettings.sqf new file mode 100644 index 0000000..ec86ff4 --- /dev/null +++ b/addons/phone/functions/fnc_viewSettings.sqf @@ -0,0 +1,73 @@ +#include "..\script_component.hpp" + +private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; +private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBgBtns; + +{ + ctrlShow [_x, false]; + ctrlEnable [_x, false]; +} forEach _homeScreenBtns; + +ctrlShow [202201, true]; +ctrlShow [202303, true]; +ctrlShow [202307, true]; +ctrlShow [202308, true]; +ctrlShow [202319, true]; +ctrlEnable [202319, true]; + +private _ctrl01 = (findDisplay 202300) displayCtrl 202303; +private _ctrl02 = (findDisplay 202300) displayCtrl 202319; + +_ctrl02 ctrlRemoveAllEventHandlers "ButtonClick"; + +_ctrl02 ctrlAddEventHandler ["ButtonClick", { + private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209]; + private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318]; + + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBgBtns; + { ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBtns; + ctrlShow [202201, false]; + ctrlShow [202303, false]; + ctrlShow [202307, false]; + ctrlShow [202308, false]; + ctrlShow [202319, false]; + ctrlEnable [202319, false]; +}]; + +lbClear _ctrl01; + +private _mC = "FORGE_CfgPhones"; +private _themes = "true" configClasses (missionConfigFile >> "FORGE_CfgPhones" >> "themes"); +private _notifications = "true" configClasses (missionConfigFile >> "FORGE_CfgPhones" >> "notifications"); +private _ringtones = "true" configClasses (missionConfigFile >> "FORGE_CfgPhones" >> "ringtones"); + +{ + private _configName = configName(_x); + private _themeName = (missionConfigFile >> _mC >> "themes" >> _configName >> "themeName") call BIS_fnc_getCfgData; + private _themeBackground = (missionConfigFile >> _mC >> "themes" >> _configName >> "themeBackground") call BIS_fnc_getCfgData; + + private _theme = _ctrl01 lbAdd format ["Theme %1 - %2", (_forEachIndex + 1), _themeName]; + _ctrl01 lbSetData [_theme, format ["%1", [_configName, _themeBackground]]]; +} forEach _themes; + +lbSetCurSel [202303, 0]; + +_ctrl01 ctrlAddEventHandler ["LBSelChanged", { + params ["_control"]; + + private _data = _control lbData (lbCurSel _control); + private _dataArray = call compile _data; + private _themeName = _dataArray select 0; + private _themeBackground = _dataArray select 1; + + ctrlSetText [202200, _themeBackground]; + profileNamespace setVariable ["FORGE_PhoneTheme", [_themeName, _themeBackground]]; +}]; + +ctrlSetText [202307, "Settings"]; +ctrlSetText [202308, "Modify your phone"]; \ No newline at end of file diff --git a/addons/phone/script_component.hpp b/addons/phone/script_component.hpp new file mode 100644 index 0000000..b9d3188 --- /dev/null +++ b/addons/phone/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT phone +#define COMPONENT_BEAUTIFIED Phone +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_PHONE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_PHONE + #define DEBUG_SETTINGS DEBUG_SETTINGS_PHONE +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/phone/sounds/newMsg.ogg b/addons/phone/sounds/newMsg.ogg new file mode 100644 index 0000000..64b6205 Binary files /dev/null and b/addons/phone/sounds/newMsg.ogg differ diff --git a/addons/phone/sounds/woop.ogg b/addons/phone/sounds/woop.ogg new file mode 100644 index 0000000..f1abf85 Binary files /dev/null and b/addons/phone/sounds/woop.ogg differ diff --git a/addons/phone/ui/RscCommon.hpp b/addons/phone/ui/RscCommon.hpp new file mode 100644 index 0000000..c35540c --- /dev/null +++ b/addons/phone/ui/RscCommon.hpp @@ -0,0 +1,293 @@ +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// Default grid +// #define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) +// #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) +// #define GUI_GRID_W (GUI_GRID_WAbs / 40) +// #define GUI_GRID_H (GUI_GRID_HAbs / 25) +// #define GUI_GRID_X (safezoneX) +// #define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) + +#define GUI_GRID_CENTERLEFT_X GUI_GRID_X +#define GUI_GRID_CENTERLEFT_Y GUI_GRID_CENTER_Y +#define GUI_GRID_CENTERLEFT_W GUI_GRID_W +#define GUI_GRID_CENTERLEFT_H GUI_GRID_H + +#define GUI_GRID_TOPRIGHT_X (safeZoneX + safeZoneW - GUI_GRID_WAbs) +#define GUI_GRID_TOPRIGHT_Y (safeZoneX) +#define GUI_GRID_TOPRIGHT_W GUI_GRID_W +#define GUI_GRID_TOPRIGHT_H GUI_GRID_H + +#define GUI_GRID_CENTERRIGHT_X GUI_GRID_TOPRIGHT_X +#define GUI_GRID_CENTERRIGHT_Y GUI_GRID_CENTER_Y +#define GUI_GRID_CENTERRIGHT_W GUI_GRID_W +#define GUI_GRID_CENTERRIGHT_H GUI_GRID_H + +#define GUI_GRID_BOTTOMRIGHT_X GUI_GRID_TOPRIGHT_X +#define GUI_GRID_BOTTOMRIGHT_Y GUI_GRID_Y +#define GUI_GRID_BOTTOMRIGHT_W GUI_GRID_W +#define GUI_GRID_BOTTOMRIGHT_H GUI_GRID_H + +// Default text sizes +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +// Pixel grid +#define pixelScale 0.50 +#define GRID_W (pixelW * pixelGrid * pixelScale) +#define GRID_H (pixelH * pixelGrid * pixelScale) + +class ScrollBar; +class RscObject; +class RscText; +class RscTextSmall; +class RscTitle; +class RscProgress; +class RscProgressNotFreeze; +class RscPicture; +class RscLadderPicture; +class RscPictureKeepAspect; +class RscHTML; +class RscButton; +class RscShortcutButton; +class RscButtonSmall; +class RscEdit; +class RscCombo; +class RscListBox; +class RscListNBox; +class RscXListBox; +class RscTree; +class RscSlider; +class RscSliderH; +class RscXSliderH; +class RscActiveText; +class RscStructuredText; +class RscControlsGroup; +class RscToolbox; +class RscMapControl; +class RscCheckBox; +class RscFrame; +class ctrlDefault; +class ctrlControlsGroup; +class ctrlDefaultText; +class ctrlDefaultButton; +class RscBackgroundStripeTop; +class RscBackgroundStripeBottom; +class RscIGText; +class RscIGProgress; +class RscListBoxKeys; +class RscControlsGroupNoScrollbars; +class RscControlsGroupNoHScrollbars; +class RscControlsGroupNoVScrollbars; +class RscLine; +class RscActivePicture; +class RscButtonTextOnly; +class RscShortcutButtonMain; +class RscButtonEditor; +class RscIGUIShortcutButton; +class RscGearShortcutButton; +class RscButtonMenu; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenuSteam; +class RscLoadingText; +class RscIGUIListBox; +class RscIGUIListNBox; +class RscBackground; +class RscBackgroundGUI; +class RscBackgroundGUILeft; +class RscBackgroundGUIRight; +class RscBackgroundGUIBottom; +class RscBackgroundGUITop; +class RscBackgroundGUIDark; +class RscBackgroundLogo; +class RscMapControlEmpty; +class RscVignette; +class CA_Mainback; +class CA_Back; +class CA_Title_Back; +class CA_Black_Back; +class CA_Title; +class CA_Logo; +class CA_Logo_Small; +class CA_RscButton; +class CA_RscButton_dialog; +class CA_Ok; +class CA_Ok_image; +class CA_Ok_image2; +class CA_Ok_text; +class ctrlCheckbox; +class ctrlCheckboxBaseline; +class ctrlStatic; +class ctrlControlsGroupNoScrollbars; +class ctrlStructuredText; +class RscTextMulti; +class RscTreeSearch; +class RscVideo; +class RscVideoKeepAspect; +class RscActivePictureKeepAspect; +class RscEditMulti; +class RscMapSignalBackground; +class RscMapSignalPicture; +class RscMapSignalText; +class RscColorPicker; +class RscInterlacingScreen; +class RscFeedback; +class RscTrafficLight; +class RscButtonSearch; +class RscIGUIText; +class RscOpticsText; +class RscOpticsValue; +class RscIGUIValue; +class RscButtonMenuMain; +class RscButtonTestCentered; +class RscDisplaySingleMission_ChallengeOverviewGroup; +class RscDisplayDebriefing_RscTextMultiline; +class RscDisplayDebriefing_ListGroup; +class RscButtonArsenal; +class RscTextNoShadow; +class RscButtonNoColor; +class RscToolboxButton; +class ctrlStaticPicture; +class ctrlStaticPictureKeepAspect; +class ctrlStaticPictureTile; +class ctrlStaticFrame; +class ctrlStaticLine; +class ctrlStaticMulti; +class ctrlStaticBackground; +class ctrlStaticOverlay; +class ctrlStaticTitle; +class ctrlStaticFooter; +class ctrlStaticBackgroundDisable; +class ctrlStaticBackgroundDisableTiles; +class ctrlButton; +class ctrlButtonPicture; +class ctrlButtonPictureKeepAspect; +class ctrlButtonOK; +class ctrlButtonCancel; +class ctrlButtonClose; +class ctrlButtonToolbar; +class ctrlButtonSearch; +class ctrlButtonExpandAll; +class ctrlButtonCollapseAll; +class ctrlButtonFilter; +class ctrlEdit; +class ctrlEditMulti; +class ctrlSliderV; +class ctrlSliderH; +class ctrlCombo; +class ctrlComboToolbar; +class ctrlListbox; +class ctrlToolbox; +class ctrlToolboxPicture; +class ctrlToolboxPictureKeepAspect; +class ctrlCheckboxes; +class ctrlCheckboxesCheckbox; +class ctrlProgress; +class ctrlHTML; +class ctrlActiveText; +class ctrlActivePicture; +class ctrlActivePictureKeepAspect; +class ctrlTree; +class ctrlControlsGroupNoHScrollbars; +class ctrlControlsGroupNoVScrollbars; +class ctrlShortcutButton; +class ctrlShortcutButtonOK; +class ctrlShortcutButtonCancel; +class ctrlShortcutButtonSteam; +class ctrlXListbox; +class ctrlXSliderV; +class ctrlXSliderH; +class ctrlMenu; +class ctrlMenuStrip; +class ctrlMap; +class ctrlMapEmpty; +class ctrlMapMain; +class ctrlListNBox; +class ctrlCheckboxToolbar; \ No newline at end of file diff --git a/addons/phone/ui/RscPhone.hpp b/addons/phone/ui/RscPhone.hpp new file mode 100644 index 0000000..dbe8a62 --- /dev/null +++ b/addons/phone/ui/RscPhone.hpp @@ -0,0 +1,984 @@ +class RscPhone { + idd = 202300; + + class ControlsBackground { + // Main Ctrls + class FORGE_RscPhoneBackground : RscPictureKeepAspect { + idc = 202200; + x = "safeZoneX + safeZoneW - 1"; + y = "safeZoneY + safeZoneH - 1"; + w = "1"; + h = "1"; + text = QUOTE(PATHTOF(ui\data\bgdark_01.paa)); + }; + class FORGE_RscPhoneFrame : RscPictureKeepAspect { + idc = -1; + x = "safeZoneX + safeZoneW - 1"; + y = "safeZoneY + safeZoneH - 1"; + w = "1"; + h = "1"; + text = QUOTE(PATHTOF(ui\data\mobile_frame_ca.paa)); + }; + class FORGE_RscPhoneStatic : RscText { + idc = 202201; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.775"; + w = "0.303125"; + h = "0.575"; + text = ""; + colorBackground[] = {1,1,1,1}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + font = "EtelkaMonospacePro"; + }; + + // Homescreen Btns + class FORGE_RscPhoneSMSa : RscPictureKeepAspect { + idc = 202202; + x = "safeZoneX + safeZoneW - 0.683125 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\sms.paa)); + }; + class FORGE_RscPhoneCalla : RscPictureKeepAspect { + idc = 202203; + x = "safeZoneX + safeZoneW - 0.87975 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\phone.paa)); + }; + class FORGE_RscPhoneSafari : RscPictureKeepAspect { + idc = 202204; + x = "safeZoneX + safeZoneW - 0.780875 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\safari.paa)); + }; + class FORGE_RscPhoneMail : RscPictureKeepAspect { + idc = 202205; + x = "safeZoneX + safeZoneW - 0.58425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\mail.paa)); + }; + class FORGE_RscPhoneContacts : RscPictureKeepAspect { + idc = 202206; + x = "safeZoneX + safeZoneW - 0.87975 * 3/4"; + y = "safeZoneY + safeZoneH - 0.77"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\contacts.paa)); + }; + class FORGE_RscPhoneCamera : RscPictureKeepAspect { + idc = 202207; + x = "safeZoneX + safeZoneW - 0.780875 * 3/4"; + y = "safeZoneY + safeZoneH - 0.77"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\camera.paa)); + }; + class FORGE_RscPhonePhotos : RscPictureKeepAspect { + idc = 202208; + x = "safeZoneX + safeZoneW - 0.683125 * 3/4"; + y = "safeZoneY + safeZoneH - 0.77"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\photos.paa)); + }; + class FORGE_RscPhoneSettings : RscPictureKeepAspect { + idc = 202209; + x = "safeZoneX + safeZoneW - 0.58425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.77"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\settings.paa)); + }; + + // Dialpad Btns + class FORGE_RscPhoneNo1 : RscPictureKeepAspect { + idc = 202210; + x = "safeZoneX + safeZoneW - 0.83425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.72"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\no1.paa)); + }; + class FORGE_RscPhoneNo2 : RscPictureKeepAspect { + idc = 202211; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.72"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\no2.paa)); + }; + class FORGE_RscPhoneNo3 : RscPictureKeepAspect { + idc = 202212; + x = "safeZoneX + safeZoneW - 0.63425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.72"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\no3.paa)); + }; + class FORGE_RscPhoneNo4 : RscPictureKeepAspect { + idc = 202213; + x = "safeZoneX + safeZoneW - 0.83425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.62"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\no4.paa)); + }; + class FORGE_RscPhoneNo5 : RscPictureKeepAspect { + idc = 202214; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.62"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\no5.paa)); + }; + class FORGE_RscPhoneNo6 : RscPictureKeepAspect { + idc = 202215; + x = "safeZoneX + safeZoneW - 0.63425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.62"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\no6.paa)); + }; + class FORGE_RscPhoneNo7 : RscPictureKeepAspect { + idc = 202216; + x = "safeZoneX + safeZoneW - 0.83425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.52"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\no7.paa)); + }; + class FORGE_RscPhoneNo8 : RscPictureKeepAspect { + idc = 202217; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.52"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\no8.paa)); + }; + class FORGE_RscPhoneNo9 : RscPictureKeepAspect { + idc = 202218; + x = "safeZoneX + safeZoneW - 0.63425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.52"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\no9.paa)); + }; + class FORGE_RscPhoneStar : RscPictureKeepAspect { + idc = 202219; + x = "safeZoneX + safeZoneW - 0.83425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.42"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\star.paa)); + }; + class FORGE_RscPhoneNo0 : RscPictureKeepAspect { + idc = 202220; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.42"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\no0.paa)); + }; + class FORGE_RscPhonePound : RscPictureKeepAspect { + idc = 202221; + x = "safeZoneX + safeZoneW - 0.63425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.42"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\pound.paa)); + }; + class FORGE_RscPhoneCallb : RscPictureKeepAspect { + idc = 202222; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\phone.paa)); + }; + + // Contact Btns + class FORGE_RscPhoneCallc : RscPictureKeepAspect { + idc = 202223; + x = "safeZoneX + safeZoneW - 0.83425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\phone.paa)); + }; + class FORGE_RscPhoneSMSb : RscPictureKeepAspect { + idc = 202224; + x = "safeZoneX + safeZoneW - 0.63425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = QUOTE(PATHTOF(ui\data\sms.paa)); + }; + }; + + class Controls { + // Main Ctrls + class FORGE_RscPhoneClock : RscText { + idc = 202301; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.803125"; + w = "0.1"; + h = "0.025"; + text = ""; + style = 2; + colorBackground[] = {0,0,0,1}; + colorText[] = {1,1,1,1}; + sizeEx = "0.012 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneListBox : RscListBox { + idc = 202302; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.675"; + w = "0.303125"; + h = "0.4775"; + text = ""; + colorBackground[] = {0,0,0,0.03125}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + sizeEx = "0.017 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneCombo : RscCombo { + idc = 202303; + x = "safeZoneX + safeZoneW - 0.63"; + y = "safeZoneY + safeZoneH - 0.675"; + w = "0.25"; + h = "0.035"; + sizeEx = "0.017 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneEdita : RscEdit { + idc = 202304; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.595"; + w = "0.303125"; + h = "0.3125"; + text = ""; + colorBackground[] = {0,0,0,0.03125}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + style = "0x10+0x200"; + shadow = "0"; + sizeEx = "0.017 / (getResolution select 5)"; + lineSpacing = 1; + tooltip = "Type a message here."; + font = "EtelkaMonospacePro"; + }; + class FORGE_ControlsGroup : RscControlsGroup { + idc = 202305; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.595"; + w = "0.303125"; + h = "0.3975"; + type = 15; + style = "0x10"; + shadow = "0"; + class controls { + class FORGE_RscPhoneText : RscText { + idc = 202306; + x = "0"; + y = "0"; + w = "0.2975"; + h = "1"; + text = ""; + colorBackground[] = {0,0,0,0.03125}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + style = "0x10+0x200"; + shadow = "0"; + lineSpacing = 1; + sizeEx = "0.017 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneEmail : RscHTML { + idc = 202506; + x = "0"; + y = "0"; + w = "0.2975"; + h = "1"; + type = CT_HTML; + filename = ""; + colorBackground[] = {0,0,0,0.03125}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + style = "0x10+0x200"; + shadow = "0"; + lineSpacing = 1; + sizeEx = "0.017 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + }; + }; + class FORGE_RscPhoneTitle : RscText { + idc = 202307; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.975"; + w = "0.303125"; + h = "0.4775"; + text = ""; + shadow = "0"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + sizeEx = "0.02 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneSubTitle : RscText { + idc = 202308; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.895"; + w = "0.303125"; + h = "0.3775"; + text = ""; + shadow = "0"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + sizeEx = "0.014 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneEditb : RscEdit { + idc = 202309; + x = "safeZoneX + safeZoneW - 0.625"; + y = "safeZoneY + safeZoneH - 0.7625"; + w = "0.25"; + h = "0.035"; + text = ""; + colorBackground[] = {0,0,0,0.03125}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + style = "0x02+0x10+0x200"; + shadow = "0"; + sizeEx = "0.02 / (getResolution select 5)"; + lineSpacing = 1; + tooltip = "Input a number here."; + font = "EtelkaMonospacePro"; + }; + + // Meta Ctrls + class FORGE_RscPhoneMetaTitle : RscText { + idc = 2023001; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.81"; + w = "0.303125"; + h = "0.2775"; + text = ""; + shadow = "0"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0.5,0.5,0.5,1}; + sizeEx = "0.014 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneMetaText : RscText { + idc = 2023002; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.78"; + w = "0.303125"; + h = "0.2775"; + text = ""; + shadow = "0"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + sizeEx = "0.017 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneMetaSubTitle : RscText { + idc = 2023003; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.74875"; + w = "0.303125"; + h = "0.2775"; + text = ""; + shadow = "0"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0.5,0.5,0.5,1}; + sizeEx = "0.014 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneMetaSubText : RscText { + idc = 2023004; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.71875"; + w = "0.303125"; + h = "0.2775"; + text = ""; + shadow = "0"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + sizeEx = "0.017 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneMetaTerTitle : RscText { + idc = 2023005; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.6875"; + w = "0.303125"; + h = "0.2775"; + text = ""; + shadow = "0"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0.5,0.5,0.5,1}; + sizeEx = "0.014 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + class FORGE_RscPhoneMetaTerText : RscText { + idc = 2023006; + x = "safeZoneX + safeZoneW - 0.65"; + y = "safeZoneY + safeZoneH - 0.6575"; + w = "0.303125"; + h = "0.2775"; + text = ""; + shadow = "0"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0,0,0,1}; + sizeEx = "0.017 / (getResolution select 5)"; + font = "EtelkaMonospacePro"; + }; + + // Homescreen Btns + class FORGE_RscPhoneCallBtnA : RscButton { + idc = 202310; + x = "safeZoneX + safeZoneW - 0.87975 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202203, '\z\forge_client\addons\phone\ui\data\phone_sel.paa'];"; + onMouseExit = "ctrlSetText [202203, '\z\forge_client\addons\phone\ui\data\phone.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Phone"; + // onButtonClick = "_this spawn forge_client_phone_fnc_showDialpad;"; + }; + class FORGE_RscPhoneSafariBtn : RscButton { + idc = 202311; + x = "safeZoneX + safeZoneW - 0.780875 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202204, '\z\forge_client\addons\phone\ui\data\safari_sel.paa'];"; + onMouseExit = "ctrlSetText [202204, '\z\forge_client\addons\phone\ui\data\safari.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Safari"; + onButtonClick = "_this spawn forge_client_phone_fnc_showSafari;"; + }; + class FORGE_RscPhoneSMSBtnA : RscButton { + idc = 202312; + x = "safeZoneX + safeZoneW - 0.683125 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202202, '\z\forge_client\addons\phone\ui\data\sms_sel.paa'];"; + onMouseExit = "ctrlSetText [202202, '\z\forge_client\addons\phone\ui\data\sms.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Messages"; + onButtonClick = "_this spawn forge_client_phone_fnc_viewMessages;"; + }; + class FORGE_RscPhoneEmailBtn : RscButton { + idc = 202313; + x = "safeZoneX + safeZoneW - 0.58425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202205, '\z\forge_client\addons\phone\ui\data\mail_sel.paa'];"; + onMouseExit = "ctrlSetText [202205, '\z\forge_client\addons\phone\ui\data\mail.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Mail"; + onButtonClick = "_this spawn forge_client_phone_fnc_viewEmail;"; + }; + class FORGE_RscPhoneContactsBtn : RscButton { + idc = 202314; + x = "safeZoneX + safeZoneW - 0.87975 * 3/4"; + y = "safeZoneY + safeZoneH - 0.77"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202206, '\z\forge_client\addons\phone\ui\data\contacts_sel.paa'];"; + onMouseExit = "ctrlSetText [202206, '\z\forge_client\addons\phone\ui\data\contacts.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Contacts"; + onButtonClick = "_this spawn forge_client_phone_fnc_viewContacts;"; + }; + class FORGE_RscPhoneCameraBtn : RscButton { + idc = 202315; + x = "safeZoneX + safeZoneW - 0.780875 * 3/4"; + y = "safeZoneY + safeZoneH - 0.77"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202207, '\z\forge_client\addons\phone\ui\data\camera_sel.paa'];"; + onMouseExit = "ctrlSetText [202207, '\z\forge_client\addons\phone\ui\data\camera.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Camera"; + }; + class FORGE_RscPhonePhotosBtn : RscButton { + idc = 202316; + x = "safeZoneX + safeZoneW - 0.683125 * 3/4"; + y = "safeZoneY + safeZoneH - 0.77"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202208, '\z\forge_client\addons\phone\ui\data\photos_sel.paa'];"; + onMouseExit = "ctrlSetText [202208, '\z\forge_client\addons\phone\ui\data\photos.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Photos"; + }; + class FORGE_RscPhoneSettingsBtn : RscButton { + idc = 202317; + x = "safeZoneX + safeZoneW - 0.58425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.77"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202209, '\z\forge_client\addons\phone\ui\data\settings_sel.paa'];"; + onMouseExit = "ctrlSetText [202209, '\z\forge_client\addons\phone\ui\data\settings.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Settings"; + onButtonClick = "_this spawn forge_client_phone_fnc_viewSettings;"; + }; + + // Close Btn + class FORGE_RscPhoneCloseBtn : RscButton { + idc = 202318; + x = "safeZoneX + safeZoneW - 0.73 * 3/4"; + y = "safeZoneY + safeZoneH - 0.18125"; + w = "0.1"; + h = "0.1"; + text = "Close"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Close"; + onButtonClick = "closeDialog 202300"; + }; + + // Back Btn + class FORGE_RscPhoneBackBtn : RscButton { + idc = 202319; + x = "safeZoneX + safeZoneW - 0.73 * 3/4"; + y = "safeZoneY + safeZoneH - 0.18125"; + w = "0.1"; + h = "0.1"; + text = ""; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Back"; + }; + + // Dialpad Btns + class FORGE_RscPhoneN01Btn : RscButton { + idc = 202401; + x = "safeZoneX + safeZoneW - 0.83425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.72"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202210, '\z\forge_client\addons\phone\ui\data\no1_sel.paa'];"; + onMouseExit = "ctrlSetText [202210, '\z\forge_client\addons\phone\ui\data\no1.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneNo2Btn : RscButton { + idc = 202402; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.72"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202211, '\z\forge_client\addons\phone\ui\data\no2_sel.paa'];"; + onMouseExit = "ctrlSetText [202211, '\z\forge_client\addons\phone\ui\data\no2.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneNo3Btn : RscButton { + idc = 202403; + x = "safeZoneX + safeZoneW - 0.63425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.72"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202212, '\z\forge_client\addons\phone\ui\data\no3_sel.paa'];"; + onMouseExit = "ctrlSetText [202212, '\z\forge_client\addons\phone\ui\data\no3.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneNo4Btn : RscButton { + idc = 202404; + x = "safeZoneX + safeZoneW - 0.83425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.62"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202213, '\z\forge_client\addons\phone\ui\data\no4_sel.paa'];"; + onMouseExit = "ctrlSetText [202213, '\z\forge_client\addons\phone\ui\data\no4.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneNo5Btn : RscButton { + idc = 202405; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.62"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202214, '\z\forge_client\addons\phone\ui\data\no5_sel.paa'];"; + onMouseExit = "ctrlSetText [202214, '\z\forge_client\addons\phone\ui\data\no5.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneNo6Btn : RscButton { + idc = 202406; + x = "safeZoneX + safeZoneW - 0.63425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.62"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202215, '\z\forge_client\addons\phone\ui\data\no6_sel.paa'];"; + onMouseExit = "ctrlSetText [202215, '\z\forge_client\addons\phone\ui\data\no6.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneNo7Btn : RscButton { + idc = 202407; + x = "safeZoneX + safeZoneW - 0.83425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.52"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202216, '\z\forge_client\addons\phone\ui\data\no7_sel.paa'];"; + onMouseExit = "ctrlSetText [202216, '\z\forge_client\addons\phone\ui\data\no7.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneNo8Btn : RscButton { + idc = 202408; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.52"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202217, '\z\forge_client\addons\phone\ui\data\no8_sel.paa'];"; + onMouseExit = "ctrlSetText [202217, '\z\forge_client\addons\phone\ui\data\no8.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneNo9Btn : RscButton { + idc = 202409; + x = "safeZoneX + safeZoneW - 0.63425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.52"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202218, '\z\forge_client\addons\phone\ui\data\no9_sel.paa'];"; + onMouseExit = "ctrlSetText [202218, '\z\forge_client\addons\phone\ui\data\no9.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneStarBtn : RscButton { + idc = 202410; + x = "safeZoneX + safeZoneW - 0.83425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.42"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202219, '\z\forge_client\addons\phone\ui\data\star_sel.paa'];"; + onMouseExit = "ctrlSetText [202219, '\z\forge_client\addons\phone\ui\data\star.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneNo0Btn : RscButton { + idc = 202411; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.42"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202220, '\z\forge_client\addons\phone\ui\data\no0_sel.paa'];"; + onMouseExit = "ctrlSetText [202220, '\z\forge_client\addons\phone\ui\data\no0.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhonePoundBtn : RscButton { + idc = 202412; + x = "safeZoneX + safeZoneW - 0.63425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.42"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202221, '\z\forge_client\addons\phone\ui\data\pound_sel.paa'];"; + onMouseExit = "ctrlSetText [202221, '\z\forge_client\addons\phone\ui\data\pound.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + class FORGE_RscPhoneCallBtnB : RscButton { + idc = 202413; + x = "safeZoneX + safeZoneW - 0.73425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202222, '\z\forge_client\addons\phone\ui\data\phone_sel.paa'];"; + onMouseExit = "ctrlSetText [202222, '\z\forge_client\addons\phone\ui\data\phone.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = ""; + }; + + // Contact Btns + class FORGE_RscPhoneCallBtnC : RscButton { + idc = 202414; + x = "safeZoneX + safeZoneW - 0.83425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202223, '\z\forge_client\addons\phone\ui\data\phone_sel.paa'];"; + onMouseExit = "ctrlSetText [202223, '\z\forge_client\addons\phone\ui\data\phone.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Call contact"; + }; + class FORGE_RscPhoneSMSBtnB : RscButton { + idc = 202415; + x = "safeZoneX + safeZoneW - 0.63425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.32"; + w = "0.1"; + h = "0.1"; + text = ""; + onMouseEnter = "ctrlSetText [202224, '\z\forge_client\addons\phone\ui\data\sms_sel.paa'];"; + onMouseExit = "ctrlSetText [202224, '\z\forge_client\addons\phone\ui\data\sms.paa'];"; + colorBackground[] = {0,0,0,0}; + colorBackgroundActive[] = {0,0,0,0}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {0,0,0,0}; + tooltip = "Text contact"; + }; + class FORGE_RscPhoneSendBtn : RscButton { + idc = 202416; + x = "safeZoneX + safeZoneW - 0.58425 * 3/4"; + y = "safeZoneY + safeZoneH - 0.3525 * 3/4"; + w = "0.075"; + h = "0.05"; + text = "Send"; + colorBackground[] = {0.13,0.8,0.24,1}; + colorBackgroundActive[] = {0.16,0.94,0.29,1}; + colorBackgroundDisabled[] = {0,0,0,0}; + colorBorder[] = {0,0,0,0}; + colorDisabled[] = {0,0,0,0}; + colorFocused[] = {0,0,0,0}; + colorShadow[] = {0,0,0,0}; + colorText[] = {1,1,1,1}; + tooltip = "Send Message"; + }; + }; +}; \ No newline at end of file diff --git a/addons/phone/ui/data/avatar.paa b/addons/phone/ui/data/avatar.paa new file mode 100644 index 0000000..4b32939 Binary files /dev/null and b/addons/phone/ui/data/avatar.paa differ diff --git a/addons/phone/ui/data/bgdark_01.paa b/addons/phone/ui/data/bgdark_01.paa new file mode 100644 index 0000000..8f3e539 Binary files /dev/null and b/addons/phone/ui/data/bgdark_01.paa differ diff --git a/addons/phone/ui/data/bgdark_02.paa b/addons/phone/ui/data/bgdark_02.paa new file mode 100644 index 0000000..64f8458 Binary files /dev/null and b/addons/phone/ui/data/bgdark_02.paa differ diff --git a/addons/phone/ui/data/bglight_01.paa b/addons/phone/ui/data/bglight_01.paa new file mode 100644 index 0000000..b68f009 Binary files /dev/null and b/addons/phone/ui/data/bglight_01.paa differ diff --git a/addons/phone/ui/data/bglight_02.paa b/addons/phone/ui/data/bglight_02.paa new file mode 100644 index 0000000..5430637 Binary files /dev/null and b/addons/phone/ui/data/bglight_02.paa differ diff --git a/addons/phone/ui/data/camera.paa b/addons/phone/ui/data/camera.paa new file mode 100644 index 0000000..65ad720 Binary files /dev/null and b/addons/phone/ui/data/camera.paa differ diff --git a/addons/phone/ui/data/camera_sel.paa b/addons/phone/ui/data/camera_sel.paa new file mode 100644 index 0000000..bdae6eb Binary files /dev/null and b/addons/phone/ui/data/camera_sel.paa differ diff --git a/addons/phone/ui/data/contacts.paa b/addons/phone/ui/data/contacts.paa new file mode 100644 index 0000000..5f89e17 Binary files /dev/null and b/addons/phone/ui/data/contacts.paa differ diff --git a/addons/phone/ui/data/contacts_sel.paa b/addons/phone/ui/data/contacts_sel.paa new file mode 100644 index 0000000..7741f44 Binary files /dev/null and b/addons/phone/ui/data/contacts_sel.paa differ diff --git a/addons/phone/ui/data/credits.paa b/addons/phone/ui/data/credits.paa new file mode 100644 index 0000000..0549d70 Binary files /dev/null and b/addons/phone/ui/data/credits.paa differ diff --git a/addons/phone/ui/data/mail.paa b/addons/phone/ui/data/mail.paa new file mode 100644 index 0000000..9ccdf4d Binary files /dev/null and b/addons/phone/ui/data/mail.paa differ diff --git a/addons/phone/ui/data/mail_sel.paa b/addons/phone/ui/data/mail_sel.paa new file mode 100644 index 0000000..d2ce20e Binary files /dev/null and b/addons/phone/ui/data/mail_sel.paa differ diff --git a/addons/phone/ui/data/mobile_frame.paa b/addons/phone/ui/data/mobile_frame.paa new file mode 100644 index 0000000..4631f36 Binary files /dev/null and b/addons/phone/ui/data/mobile_frame.paa differ diff --git a/addons/phone/ui/data/mobile_frame_ca.paa b/addons/phone/ui/data/mobile_frame_ca.paa new file mode 100644 index 0000000..dc8e2c7 Binary files /dev/null and b/addons/phone/ui/data/mobile_frame_ca.paa differ diff --git a/addons/phone/ui/data/no0.paa b/addons/phone/ui/data/no0.paa new file mode 100644 index 0000000..2774fe8 Binary files /dev/null and b/addons/phone/ui/data/no0.paa differ diff --git a/addons/phone/ui/data/no0_sel.paa b/addons/phone/ui/data/no0_sel.paa new file mode 100644 index 0000000..f3969ee Binary files /dev/null and b/addons/phone/ui/data/no0_sel.paa differ diff --git a/addons/phone/ui/data/no1.paa b/addons/phone/ui/data/no1.paa new file mode 100644 index 0000000..d05f009 Binary files /dev/null and b/addons/phone/ui/data/no1.paa differ diff --git a/addons/phone/ui/data/no1_sel.paa b/addons/phone/ui/data/no1_sel.paa new file mode 100644 index 0000000..d777da3 Binary files /dev/null and b/addons/phone/ui/data/no1_sel.paa differ diff --git a/addons/phone/ui/data/no2.paa b/addons/phone/ui/data/no2.paa new file mode 100644 index 0000000..0b7a6d6 Binary files /dev/null and b/addons/phone/ui/data/no2.paa differ diff --git a/addons/phone/ui/data/no2_sel.paa b/addons/phone/ui/data/no2_sel.paa new file mode 100644 index 0000000..85da981 Binary files /dev/null and b/addons/phone/ui/data/no2_sel.paa differ diff --git a/addons/phone/ui/data/no3.paa b/addons/phone/ui/data/no3.paa new file mode 100644 index 0000000..155472d Binary files /dev/null and b/addons/phone/ui/data/no3.paa differ diff --git a/addons/phone/ui/data/no3_sel.paa b/addons/phone/ui/data/no3_sel.paa new file mode 100644 index 0000000..d6c2f54 Binary files /dev/null and b/addons/phone/ui/data/no3_sel.paa differ diff --git a/addons/phone/ui/data/no4.paa b/addons/phone/ui/data/no4.paa new file mode 100644 index 0000000..f1f49a3 Binary files /dev/null and b/addons/phone/ui/data/no4.paa differ diff --git a/addons/phone/ui/data/no4_sel.paa b/addons/phone/ui/data/no4_sel.paa new file mode 100644 index 0000000..fe7ad1f Binary files /dev/null and b/addons/phone/ui/data/no4_sel.paa differ diff --git a/addons/phone/ui/data/no5.paa b/addons/phone/ui/data/no5.paa new file mode 100644 index 0000000..632099f Binary files /dev/null and b/addons/phone/ui/data/no5.paa differ diff --git a/addons/phone/ui/data/no5_sel.paa b/addons/phone/ui/data/no5_sel.paa new file mode 100644 index 0000000..e863afa Binary files /dev/null and b/addons/phone/ui/data/no5_sel.paa differ diff --git a/addons/phone/ui/data/no6.paa b/addons/phone/ui/data/no6.paa new file mode 100644 index 0000000..fed7c95 Binary files /dev/null and b/addons/phone/ui/data/no6.paa differ diff --git a/addons/phone/ui/data/no6_sel.paa b/addons/phone/ui/data/no6_sel.paa new file mode 100644 index 0000000..c0e56a4 Binary files /dev/null and b/addons/phone/ui/data/no6_sel.paa differ diff --git a/addons/phone/ui/data/no7.paa b/addons/phone/ui/data/no7.paa new file mode 100644 index 0000000..d4cbf1c Binary files /dev/null and b/addons/phone/ui/data/no7.paa differ diff --git a/addons/phone/ui/data/no7_sel.paa b/addons/phone/ui/data/no7_sel.paa new file mode 100644 index 0000000..2004bbb Binary files /dev/null and b/addons/phone/ui/data/no7_sel.paa differ diff --git a/addons/phone/ui/data/no8.paa b/addons/phone/ui/data/no8.paa new file mode 100644 index 0000000..090246f Binary files /dev/null and b/addons/phone/ui/data/no8.paa differ diff --git a/addons/phone/ui/data/no8_sel.paa b/addons/phone/ui/data/no8_sel.paa new file mode 100644 index 0000000..522df7c Binary files /dev/null and b/addons/phone/ui/data/no8_sel.paa differ diff --git a/addons/phone/ui/data/no9.paa b/addons/phone/ui/data/no9.paa new file mode 100644 index 0000000..cf5e418 Binary files /dev/null and b/addons/phone/ui/data/no9.paa differ diff --git a/addons/phone/ui/data/no9_sel.paa b/addons/phone/ui/data/no9_sel.paa new file mode 100644 index 0000000..0e993f6 Binary files /dev/null and b/addons/phone/ui/data/no9_sel.paa differ diff --git a/addons/phone/ui/data/phone.paa b/addons/phone/ui/data/phone.paa new file mode 100644 index 0000000..8a742da Binary files /dev/null and b/addons/phone/ui/data/phone.paa differ diff --git a/addons/phone/ui/data/phone_sel.paa b/addons/phone/ui/data/phone_sel.paa new file mode 100644 index 0000000..3277a82 Binary files /dev/null and b/addons/phone/ui/data/phone_sel.paa differ diff --git a/addons/phone/ui/data/photos.paa b/addons/phone/ui/data/photos.paa new file mode 100644 index 0000000..e3832f4 Binary files /dev/null and b/addons/phone/ui/data/photos.paa differ diff --git a/addons/phone/ui/data/photos_sel.paa b/addons/phone/ui/data/photos_sel.paa new file mode 100644 index 0000000..c5e1d40 Binary files /dev/null and b/addons/phone/ui/data/photos_sel.paa differ diff --git a/addons/phone/ui/data/pound.paa b/addons/phone/ui/data/pound.paa new file mode 100644 index 0000000..d257115 Binary files /dev/null and b/addons/phone/ui/data/pound.paa differ diff --git a/addons/phone/ui/data/pound_sel.paa b/addons/phone/ui/data/pound_sel.paa new file mode 100644 index 0000000..b1b808b Binary files /dev/null and b/addons/phone/ui/data/pound_sel.paa differ diff --git a/addons/phone/ui/data/safari.paa b/addons/phone/ui/data/safari.paa new file mode 100644 index 0000000..1750662 Binary files /dev/null and b/addons/phone/ui/data/safari.paa differ diff --git a/addons/phone/ui/data/safari_sel.paa b/addons/phone/ui/data/safari_sel.paa new file mode 100644 index 0000000..d243ad7 Binary files /dev/null and b/addons/phone/ui/data/safari_sel.paa differ diff --git a/addons/phone/ui/data/settings.paa b/addons/phone/ui/data/settings.paa new file mode 100644 index 0000000..a33d872 Binary files /dev/null and b/addons/phone/ui/data/settings.paa differ diff --git a/addons/phone/ui/data/settings_sel.paa b/addons/phone/ui/data/settings_sel.paa new file mode 100644 index 0000000..2c57d1a Binary files /dev/null and b/addons/phone/ui/data/settings_sel.paa differ diff --git a/addons/phone/ui/data/sms.paa b/addons/phone/ui/data/sms.paa new file mode 100644 index 0000000..b85b053 Binary files /dev/null and b/addons/phone/ui/data/sms.paa differ diff --git a/addons/phone/ui/data/sms_sel.paa b/addons/phone/ui/data/sms_sel.paa new file mode 100644 index 0000000..60a98e0 Binary files /dev/null and b/addons/phone/ui/data/sms_sel.paa differ diff --git a/addons/phone/ui/data/star.paa b/addons/phone/ui/data/star.paa new file mode 100644 index 0000000..2b9b506 Binary files /dev/null and b/addons/phone/ui/data/star.paa differ diff --git a/addons/phone/ui/data/star_sel.paa b/addons/phone/ui/data/star_sel.paa new file mode 100644 index 0000000..7cdf850 Binary files /dev/null and b/addons/phone/ui/data/star_sel.paa differ diff --git a/addons/phone/ui/data/store.paa b/addons/phone/ui/data/store.paa new file mode 100644 index 0000000..6856d7b Binary files /dev/null and b/addons/phone/ui/data/store.paa differ diff --git a/addons/phone/ui/data/store_sel.paa b/addons/phone/ui/data/store_sel.paa new file mode 100644 index 0000000..7be7c8b Binary files /dev/null and b/addons/phone/ui/data/store_sel.paa differ diff --git a/addons/player/$PBOPREFIX$ b/addons/player/$PBOPREFIX$ new file mode 100644 index 0000000..07603c5 --- /dev/null +++ b/addons/player/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\player \ No newline at end of file diff --git a/addons/player/CfgEventHandlers.hpp b/addons/player/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/player/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/player/XEH_PREP.hpp b/addons/player/XEH_PREP.hpp new file mode 100644 index 0000000..2155760 --- /dev/null +++ b/addons/player/XEH_PREP.hpp @@ -0,0 +1 @@ +PREP(firstLogin); \ No newline at end of file diff --git a/addons/player/XEH_postInit.sqf b/addons/player/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/player/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/player/XEH_postInit_client.sqf b/addons/player/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/player/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/player/XEH_preInit.sqf b/addons/player/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/player/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/player/XEH_preInit_server.sqf b/addons/player/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/player/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/player/XEH_preStart.sqf b/addons/player/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/player/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/player/config.cpp b/addons/player/config.cpp new file mode 100644 index 0000000..338b901 --- /dev/null +++ b/addons/player/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/player/functions/fnc_firstLogin.sqf b/addons/player/functions/fnc_firstLogin.sqf new file mode 100644 index 0000000..7b38321 --- /dev/null +++ b/addons/player/functions/fnc_firstLogin.sqf @@ -0,0 +1,114 @@ +#include "..\script_component.hpp" + +/* + * Function: forge_client_player_fnc_firstLogin + * Author: J.Schmidt + * Edit: 07.23.2024 + * Copyright © 2024 J.Schmidt, All rights reserved + * + * Do not edit without permission! + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License. + * To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, + * PO Box 1866, Mountain View, CA 94042 + * + * [Description] + * Setup new player. + * + * Arguments: + * N/A + * + * Return Value: + * N/A + * + * Examples: + * [player] spawn forge_client_player_fnc_firstLogin; + * + * Public: Yes + */ + +private _player = _this select 0; +private _uid = getPlayerUID _player; + +private _defaultPhoneNumber = "unknown"; +private _defaultEmail = "unknown@spearnet.mil"; +private _defaultPaygrade = "E1"; + +_player setUnitLoadout [[],[],["hgun_P07_F","","","",["16Rnd_9x21_Mag",17],[],""],["U_BG_Guerrilla_6_1",[["FORGE_Phone",1]]],["V_Rangemaster_belt",[["16Rnd_9x21_Mag",5,17]]],[],"","",[],["","","","","",""]]; +_player action ["SwitchWeapon", _player, _player, -1]; +_player addRating 500; + +SETPVAR(_player,FORGE_Bank,2000); +SETPVAR(_player,FORGE_Holster_Weapon,true); +SETPVAR(_player,PayGrade,_defaultPaygrade); + +private _number = "0160" + (_uid select [count (toArray _uid) - 6, 6]); +private _email = _number + "@spearnet.mil"; + +SETPVAR(_player,FORGE_Phone_Number,_number); +SETPVAR(_player,FORGE_Email,_email); + +private _name = name _player; +private _phoneNumber = GETVAR(_player,FORGE_Phone_Number,_defaultPhoneNumber); +private _phoneEmail = GETVAR(_player,FORGE_Email,_defaultEmail); + +EGVAR(phone,addressbook) pushBackUnique [_name, _phoneNumber, _phoneEmail]; +SETVAR(profileNamespace,FORGE_AddressBook,EGVAR(phone,addressbook)); + +private _messages = [ + "Welcome to your first day on the job. You have been issued a Pistol, 6 x 9mm Ammo, a Pistol Belt, and a small amount of RP and credit from OPSG. These are the only free things you will get for this identity, so save them, and use them wisely. You are responsible for all purchases going forward.", + "Cash in your RP at any laptop by Access the Bank, Sign In, and then Submit Time. Do this before leaving the game session!" +]; + +private _welcomeEmail = format ["Welcome to your first day on the job. You have been issued a phone with a new number of %1 and an email address of %2", _number, _email]; + +["Field Cmdr", _welcomeEmail] spawn EFUNC(phone,newEmail); +// ["listadd", _phoneEmail, "", -1, ["Field Cmdr ", "Job Orientation", _welcomeEmail], "forge_server_phone_fnc_addEmail", false] spawn dragonfly_db_fnc_addTask; +// ["listadd", _phoneEmail, "", -1, ["Field Cmdr ", "Job Orientation", _welcomeEmail], "forge_server_phone_fnc_addEmail", false, netId _player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; +[_phoneEmail, ["Field Cmdr ", "Job Orientation", _welcomeEmail]] remoteExec ["forge_server_phone_fnc_addEmail", 2, false]; + +uiSleep 1; + +{ + ["Field Cmdr", _x] spawn EFUNC(phone,newMsg); + // ["listadd", _phoneNumber, "", -1, ["Field Cmdr", _x], "", false] spawn dragonfly_db_fnc_addTask; + // ["listadd", _phoneNumber, "", -1, ["Field Cmdr", _x], "", false, netId _player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; + [_phoneNumber, ["Field Cmdr", _x]] remoteExec ["forge_server_phone_fnc_addMsg", 2, false]; +} forEach _messages; + +private _armory_unlocks = [["FORGE_Phone", 0], ["FORGE_Tablet", 0], ["ItemCompass", 0], ["ItemGPS", 0], ["ItemMap", 0], ["ItemRadio", 0], ["ItemWatch", 0], ["U_BG_Guerrilla_6_1", 0], ["V_Rangemaster_belt", 0], ["hgun_P07_F", 1], ["16Rnd_9x21_Mag", 2]]; +private _garage_unlocks = [["B_Quadbike_01_F", 0]]; + +{ + private _classname = _x select 0; + private _typeOf = _x select 1; + [_classname, _typeOf] call EFUNC(arsenal,addArmoryItem); + uiSleep 0.2; +} forEach _armory_unlocks; + +uiSleep 1; + +{ + private _classname = _x select 0; + private _typeOf = _x select 1; + [_classname, _typeOf] call EFUNC(arsenal,addGarageVehicle); + uiSleep 0.2; +} forEach _garage_unlocks; + +uiSleep 1; +["armory"] call EFUNC(arsenal,saveUnlocks); + +uiSleep 1; +["garage"] call EFUNC(arsenal,saveUnlocks); + +uiSleep 1; +[] call EFUNC(init,playerDBSave); +SETVAR(_player,value_loadDone,true); + +uiSleep 1; +// ["listrng", _phoneEmail, "", -1, [], "forge_client_phone_fnc_addEmail", true, netId _player] spawn dragonfly_db_fnc_addTask; +["listrng", _phoneEmail, "", -1, [], "forge_client_phone_fnc_addEmail", true, netId _player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; + +uiSleep 1; +// ["listrng", _phoneNumber, "", -1, [], "forge_client_phone_fnc_addMsg", true, netId _player] spawn dragonfly_db_fnc_addTask; +["listrng", _phoneNumber, "", -1, [], "forge_client_phone_fnc_addMsg", true, netId _player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; \ No newline at end of file diff --git a/addons/player/script_component.hpp b/addons/player/script_component.hpp new file mode 100644 index 0000000..e111b7a --- /dev/null +++ b/addons/player/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT player +#define COMPONENT_BEAUTIFIED Player +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_PLAYER + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_PLAYER + #define DEBUG_SETTINGS DEBUG_SETTINGS_PLAYER +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/service/$PBOPREFIX$ b/addons/service/$PBOPREFIX$ new file mode 100644 index 0000000..2d5f324 --- /dev/null +++ b/addons/service/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\service \ No newline at end of file diff --git a/addons/service/CfgEventHandlers.hpp b/addons/service/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/service/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/service/XEH_PREP.hpp b/addons/service/XEH_PREP.hpp new file mode 100644 index 0000000..f0c52f2 --- /dev/null +++ b/addons/service/XEH_PREP.hpp @@ -0,0 +1,6 @@ +PREP(fuel); +PREP(init); +PREP(rearm); +PREP(refuel); +PREP(repair); +PREP(vehicle); \ No newline at end of file diff --git a/addons/service/XEH_postInit.sqf b/addons/service/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/service/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/service/XEH_postInit_client.sqf b/addons/service/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/service/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/service/XEH_preInit.sqf b/addons/service/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/service/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/service/XEH_preInit_server.sqf b/addons/service/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/service/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/service/XEH_preStart.sqf b/addons/service/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/service/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/service/config.cpp b/addons/service/config.cpp new file mode 100644 index 0000000..338b901 --- /dev/null +++ b/addons/service/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/service/functions/fnc_fuel.sqf b/addons/service/functions/fnc_fuel.sqf new file mode 100644 index 0000000..2ce4213 --- /dev/null +++ b/addons/service/functions/fnc_fuel.sqf @@ -0,0 +1,34 @@ +#include "..\script_component.hpp" + +params ["_veh"]; + +private _fuelNeeded = 1 - (fuel _veh); +private _fuelCost = "FUEL_COST" call BFUNC(getParamValue); +private _estimatedCost = _fuelNeeded * _fuelCost; + +private _fuelAdded = 0; +private _refuelRate = 0.01; +private _refuelInterval = 0.1; + +if (companyFunds < _estimatedCost) exitWith { + ["Insufficient company funds for refueling.", "warning", 3] call EFUNC(misc,notify); +}; + +["Refueling Vehicle...", "grey", 3] call EFUNC(misc,notify); + +while { fuel _veh < 0.99 && companyFunds >= (_fuelAdded * _fuelCost) } do { + _veh setFuel ((fuel _veh) + _refuelRate); + _fuelAdded = _fuelAdded + _refuelRate; + uiSleep _refuelInterval; +}; + +private _totalCost = _fuelAdded * _fuelCost; +private _formattedTotalCost = (_totalCost) call EFUNC(misc,formatNumber); +private _formattedFuelAdded = (_fuelAdded) toFixed 2; + +["deduct", _totalCost] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + +[format ["VEHICLE REFUELED: +
Fuel Added: %1 +
Total Cost: $%2 +
Billed to SOF PMC Group.", _formattedFuelAdded, _formattedTotalCost], "blue-grey", 5] call EFUNC(misc,notify); \ No newline at end of file diff --git a/addons/service/functions/fnc_init.sqf b/addons/service/functions/fnc_init.sqf new file mode 100644 index 0000000..c1bc6c7 --- /dev/null +++ b/addons/service/functions/fnc_init.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" + +private _worldCenter = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"); +private _fuelPumpTypes = ["Land_fs_feed_F", "Land_FuelStation_Feed_F", "Land_FuelStation_01_pump_malevil_F", "Land_FuelStation_01_pump_F", "Land_FuelStation_03_pump_F", "Land_A_FuelStation_Feed", "Land_Benzina_schnell", "Land_Fuelstation_army", "Land_Ind_FuelStation_Feed_EP1", "Land_Fuelstation"]; +private _fuelPumps = nearestTerrainObjects [_worldCenter, _fuelPumpTypes, 500000]; + +{ + private _fuelPump = _x; + private _triggerPos = getPos _fuelPump; + private _trigger = createTrigger ["EmptyDetector", _triggerPos]; + + _trigger setTriggerArea [5, 5, 0, false]; + _trigger setTriggerActivation ["ANYPLAYER", "PRESENT", true]; + _trigger setTriggerStatements [ + "{ _x isKindOf 'LandVehicle' && !isEngineOn _x } count thisList > 0", + "[thisList select 0] spawn forge_client_service_fnc_refuel;", + "" + ]; +} forEach _fuelPumps; \ No newline at end of file diff --git a/addons/service/functions/fnc_rearm.sqf b/addons/service/functions/fnc_rearm.sqf new file mode 100644 index 0000000..c969b82 --- /dev/null +++ b/addons/service/functions/fnc_rearm.sqf @@ -0,0 +1,64 @@ +#include "..\script_component.hpp" + +params ["_veh", "_vehType"]; + +private _fnc_removeMagazines = { + params ["_vehicle", "_magazines"]; + private _removedMags = []; + { + if !(_x in _removedMags) then { + _vehicle removeMagazines _x; + _removedMags pushBack _x; + }; + } forEach _magazines; + _removedMags +}; + +private _fnc_addMagazines = { + params ["_vehicle", "_magazines"]; + private _rearmCost = 0; + { + _vehicle vehicleChat format ["Reloading %1", _x]; + _vehicle addMagazine _x; + _rearmCost = _rearmCost + 100; + uiSleep 1; + } forEach _magazines; + _rearmCost +}; + +private _fnc_processTurrets = { + params ["_vehicle", "_config"]; + private _rearmCost = 0; + private _turretCount = count (_config >> "Turrets"); + for "_i" from 0 to (_turretCount - 1) do { + private _turretConfig = (_config >> "Turrets") select _i; + private _vehMags = getArray (_turretConfig >> "magazines"); + [_vehicle, _vehMags] call _fnc_removeMagazines; + _rearmCost = _rearmCost + ([_vehicle, _vehMags] call _fnc_addMagazines); + + if (count (_turretConfig >> "Turrets") > 0) then { + _rearmCost = _rearmCost + ([_vehicle, _turretConfig] call _fnc_processTurrets); + }; + }; + _rearmCost +}; + +private _vehMags = getArray (configFile >> "CfgVehicles" >> _vehType >> "magazines"); +private _rearmCost = 0; + +[_veh, _vehMags] call _fnc_removeMagazines; +_rearmCost = _rearmCost + ([_veh, _vehMags] call _fnc_addMagazines); + +private _turretConfig = configFile >> "CfgVehicles" >> _vehType >> "Turrets"; +_rearmCost = _rearmCost + ([_veh, _turretConfig] call _fnc_processTurrets); + +if (companyFunds < _rearmCost) exitWith { + ["Insufficient company funds for rearming.", "warning", 3] call EFUNC(misc,notify); +}; + +_veh vehicleChat "Rearming..."; + +_veh setVehicleAmmo 1; +_veh vehicleChat format ["%1 Rearmed.", _vehType]; + +_rearmCost \ No newline at end of file diff --git a/addons/service/functions/fnc_refuel.sqf b/addons/service/functions/fnc_refuel.sqf new file mode 100644 index 0000000..3684c20 --- /dev/null +++ b/addons/service/functions/fnc_refuel.sqf @@ -0,0 +1,44 @@ +#include "..\script_component.hpp" + +params ["_veh", "_vehType"]; + +private _fnc_calculateFuelCost = { + params ["_currentFuel", "_fuelPrice"]; + private _fuelNeeded = 1 - _currentFuel; + private _cost = _fuelNeeded * _fuelPrice; + [_fuelNeeded, _cost] +}; + +private _fnc_refuelVehicle = { + params ["_vehicle", "_fuelNeeded", "_fuelPrice"]; + private _fuelAdded = 0; + private _refuelRate = 0.01; + private _refuelInterval = 0.1; + + while { fuel _vehicle < 0.99 && _fuelAdded < _fuelNeeded } do { + _vehicle setFuel ((fuel _vehicle) + _refuelRate); + _fuelAdded = _fuelAdded + _refuelRate; + uiSleep _refuelInterval; + }; + + _fuelAdded +}; + +private _currentFuel = fuel _veh; +private _fuelPrice = "FUEL_COST" call BFUNC(getParamValue); +private _fuelDetails = [_currentFuel, _fuelPrice] call _fnc_calculateFuelCost; + +_fuelDetails params ["_fuelNeeded", "_estimatedCost"]; + +if (companyFunds < _estimatedCost) exitWith { + ["Insufficient company funds for refueling.", "warning", 3] call EFUNC(misc,notify); +}; + +_veh vehicleChat "Refueling..."; + +private _fuelAdded = [_veh, _fuelNeeded, _fuelPrice] call _fnc_refuelVehicle; +private _fuelCost = _fuelAdded * _fuelPrice; + +_veh vehicleChat format ["%1 Refueled.", _vehType]; + +_fuelCost \ No newline at end of file diff --git a/addons/service/functions/fnc_repair.sqf b/addons/service/functions/fnc_repair.sqf new file mode 100644 index 0000000..ca1a332 --- /dev/null +++ b/addons/service/functions/fnc_repair.sqf @@ -0,0 +1,43 @@ +#include "..\script_component.hpp" + +params ["_veh", "_vehType"]; + +private _fnc_calculateRepairCost = { + params ["_damage", "_repairPrice"]; + private _laborHours = _damage * 10; + private _laborCost = _laborHours * _repairPrice; + private _partsCost = _damage * 1000; + [_laborHours, _laborCost, _partsCost, _laborCost + _partsCost] +}; + +private _currentDamage = damage _veh; +private _repairPrice = "REPAIR_COST" call BFUNC(getParamValue); +private _repairDetails = [_currentDamage, _repairPrice] call _fnc_calculateRepairCost; + +_repairDetails params ["_laborHours", "_laborCost", "_partsCost", "_repairCost"]; + +private _formattedLaborHours = _laborHours toFixed 1; +private _formattedLaborCost = (_laborCost) call EFUNC(misc,formatNumber); +private _formattedPartsCost = (_partsCost) call EFUNC(misc,formatNumber); +private _formattedTotalCost = (_repairCost) call EFUNC(misc,formatNumber); + +[format ["SERVICE DEPARTMENT: +
The repair will take %1 Labor Hours to complete. +
Labor Cost: $%2 +
Parts Cost: $%3 +
Total Cost: $%4", + _formattedLaborHours, _formattedLaborCost, _formattedPartsCost, _formattedTotalCost], "blue-grey", 3] call EFUNC(misc,notify); + +uiSleep 5; + +if (companyFunds < _repairCost) exitWith { + ["Insufficient company funds for repairing.", "warning", 3] call EFUNC(misc,notify); +}; + +_veh vehicleChat "Repairing..."; +uiSleep _laborHours; + +_veh setDamage 0; +_veh vehicleChat format ["%1 Repaired.", _vehType]; + +_repairCost \ No newline at end of file diff --git a/addons/service/functions/fnc_vehicle.sqf b/addons/service/functions/fnc_vehicle.sqf new file mode 100644 index 0000000..a1ef7cf --- /dev/null +++ b/addons/service/functions/fnc_vehicle.sqf @@ -0,0 +1,52 @@ +#include "..\script_component.hpp" + +/* + * Usage: + * _trg = createTrigger ["EmptyDetector", getPos player]; + * _trg setTriggerArea [5, 5, 0, false]; + * _trg setTriggerActivation ["ANYPLAYER", "PRESENT", true]; + * _trg setTriggerStatements [ + * "call { {_x iskindof 'LAND' && speed _x < 1} count thisList > 0; };", + * "call { _handle = [(thisList select 0), 'LAND'] spawn forge_client_service_fnc_vehicle; };", + * "" + * ]; + */ + +params ["_veh", "_vehKind"]; + +private _veh = _this select 0; +private _vehType = getText (configFile >> "CfgVehicles" >> typeOf _veh >> "DisplayName"); + +private _rearmCost = 0; +private _refuelCost = 0; +private _repairCost = 0; +private _totalCost = 0; + +if ((_veh isKindOf _vehKind) && (driver _veh == player)) exitWith { + + _veh vehicleChat format ["Servicing %1... Please Stand By...", _vehType]; + + uiSleep 3; + + _rearmCost = [_veh, _vehType] call FUNC(rearm); + _refuelCost = [_veh, _vehType] call FUNC(refuel); + _repairCost = [_veh, _vehType] call FUNC(repair); + _totalCost = (_rearmCost + _repairCost + _refuelCost); + + private _formattedRearmCost = (_rearmCost) call EFUNC(misc,formatNumber); + private _formattedRefuelCost = (_refuelCost) call EFUNC(misc,formatNumber); + private _formattedRepairCost = (_RepairCost) call EFUNC(misc,formatNumber); + private _formattedTotalCost = (_totalCost) call EFUNC(misc,formatNumber); + + ["deduct", _totalCost] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; + + [format ["SERVICE COST: +
Rearmament: $%1 +
Repairs: $%2 +
Refueling: $%3 +
Total: $%4 +
Billed to SOF PMC Group.", + _formattedRearmCost, _formattedRepairCost, _formattedRefuelCost, _formattedTotalCost], "blue-grey", 8] call EFUNC(misc,notify); + + _veh vehicleChat format ["Service Completed for %1", _vehType]; +}; \ No newline at end of file diff --git a/addons/service/script_component.hpp b/addons/service/script_component.hpp new file mode 100644 index 0000000..aebc1b2 --- /dev/null +++ b/addons/service/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT service +#define COMPONENT_BEAUTIFIED Service +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_SERVICE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_SERVICE + #define DEBUG_SETTINGS DEBUG_SETTINGS_SERVICE +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/store/$PBOPREFIX$ b/addons/store/$PBOPREFIX$ new file mode 100644 index 0000000..588f9b7 --- /dev/null +++ b/addons/store/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\store \ No newline at end of file diff --git a/addons/store/CfgEventHandlers.hpp b/addons/store/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/store/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/store/XEH_PREP.hpp b/addons/store/XEH_PREP.hpp new file mode 100644 index 0000000..bb692d1 --- /dev/null +++ b/addons/store/XEH_PREP.hpp @@ -0,0 +1,8 @@ +PREP(buyItem); +PREP(buyVehicle); +PREP(changeFilter); +PREP(changePayment); +PREP(handlePurchase); +PREP(initStore); +PREP(openStore); +PREP(selectProduct); \ No newline at end of file diff --git a/addons/store/XEH_postInit.sqf b/addons/store/XEH_postInit.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/store/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/store/XEH_postInit_client.sqf b/addons/store/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/store/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/store/XEH_preInit.sqf b/addons/store/XEH_preInit.sqf new file mode 100644 index 0000000..d7d59fe --- /dev/null +++ b/addons/store/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; \ No newline at end of file diff --git a/addons/store/XEH_preInit_server.sqf b/addons/store/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/store/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/store/XEH_preStart.sqf b/addons/store/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/store/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/store/config.cpp b/addons/store/config.cpp new file mode 100644 index 0000000..16bedb2 --- /dev/null +++ b/addons/store/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ui\BaseControls.hpp" +#include "ui\RscStoreDialog.hpp" \ No newline at end of file diff --git a/addons/store/functions/fnc_buyItem.sqf b/addons/store/functions/fnc_buyItem.sqf new file mode 100644 index 0000000..e388c4a --- /dev/null +++ b/addons/store/functions/fnc_buyItem.sqf @@ -0,0 +1,35 @@ +#include "..\script_component.hpp" + +params ["_item", "_price", "_configType", "_itemType"]; + +private _displayName = ""; +// private _locker = player getVariable ["FORGE_Locker", []]; +private _locker = GETVAR(player,FORGE_Locker,[]); + +if !([_price] call FUNC(handlePurchase)) exitWith {}; + +switch (_configType) do { + case "item": { + _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + _locker pushBack [_itemType, _item]; + }; + case "weapon": { + _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + _locker pushBack [_itemType, _item]; + }; + case "magazine": { + _displayName = getText (configFile >> "CfgMagazines" >> _item >> "displayName"); + _locker pushBack [_itemType, [_item, getNumber (configFile >> "CfgMagazines" >> _item >> "count"), getNumber (configFile >> "CfgMagazines" >> _item >> "count")]]; + }; + case "backpack": { + _displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName"); + _locker pushBack [_itemType, _item]; + }; +}; + +// player setVariable ["FORGE_Locker", _locker, true]; +SETPVAR(player,FORGE_Locker,_locker); + +[_item, _itemType] call EFUNC(armory,addItemArmory); + +[format ["You have purchased %1 for $%2.", _displayName, _price], "info", 3, "right"] call EFUNC(misc,notify); \ No newline at end of file diff --git a/addons/store/functions/fnc_buyVehicle.sqf b/addons/store/functions/fnc_buyVehicle.sqf new file mode 100644 index 0000000..7514873 --- /dev/null +++ b/addons/store/functions/fnc_buyVehicle.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" + +params ["_item", "_price", "_itemType"]; + +private _displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName"); +// private _garage = player getVariable ["FORGE_Garage", []]; +private _garage = GETVAR(player,FORGE_Garage,[]); +private _itemData = [[], 1, 0]; + +if !([_price] call FUNC(handlePurchase)) exitWith {}; + +_garage pushBack [true, _item, _itemData]; + +// player setVariable ["FORGE_Garage", _garage, true]; +SETPVAR(player,FORGE_Garage,_garage); + +[_item, _itemType] call EFUNC(armory,addVehArmory); + +[format ["You have purchased %1 for $%2.", _displayName, _price], "info", 3, "right"] call EFUNC(misc,notify); \ No newline at end of file diff --git a/addons/store/functions/fnc_changeFilter.sqf b/addons/store/functions/fnc_changeFilter.sqf new file mode 100644 index 0000000..4e26f69 --- /dev/null +++ b/addons/store/functions/fnc_changeFilter.sqf @@ -0,0 +1,71 @@ +#include "..\script_component.hpp" + +params ["_control", "_selectedIndex"]; + +private _display = ctrlParent _control; +private _productList = _display displayCtrl IDC_PRODUCTLIST; +lbClear _productList; + +private _selectedCategory = _control lbData _selectedIndex; +private _data = GVAR(currentStore); +private _items = _data select 1; + +[format ["You have selected %1 as your filter.", _selectedCategory], "info", 6, "right"] call EFUNC(misc,notify); + +{ + _x params ["_item", "_price", "_category", "_configType", "_itemType"]; + private _index = -1; + + if (_category == _selectedCategory) then { + switch (_configType) do { + case "item": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _productList lbAdd _displayName; + _productList lbSetData [_index, str [_item, _price, _category, _configType, _itemType]]; + _productList lbSetPicture [_index, _picture]; + }; + case "weapon": { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _productList lbAdd _displayName; + _productList lbSetData [_index, str [_item, _price, _category, _configType, _itemType]]; + _productList lbSetPicture [_index, _picture]; + }; + case "magazine": { + private _displayName = getText (configFile >> "CfgMagazines" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgMagazines" >> _item >> "picture"); + + _index = _productList lbAdd _displayName; + _productList lbSetData [_index, str [_item, _price, _category, _configType, _itemType]]; + _productList lbSetPicture [_index, _picture]; + }; + case "backpack": { + private _displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgVehicles" >> _item >> "picture"); + + _index = _productList lbAdd _displayName; + _productList lbSetData [_index, str [_item, _price, _category, _configType, _itemType]]; + _productList lbSetPicture [_index, _picture]; + }; + case "vehicle": { + private _displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgVehicles" >> _item >> "picture"); + + _index = _productList lbAdd _displayName; + _productList lbSetData [_index, str [_item, _price, _category, _configType, _itemType]]; + _productList lbSetPicture [_index, _picture]; + }; + default { + private _displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName"); + private _picture = getText (configFile >> "CfgWeapons" >> _item >> "picture"); + + _index = _productList lbAdd _displayName; + _productList lbSetData [_index, str [_item, _price, _category, _configType, _itemType]]; + _productList lbSetPicture [_index, _picture]; + }; + }; + }; +} forEach _items; \ No newline at end of file diff --git a/addons/store/functions/fnc_changePayment.sqf b/addons/store/functions/fnc_changePayment.sqf new file mode 100644 index 0000000..05a7e27 --- /dev/null +++ b/addons/store/functions/fnc_changePayment.sqf @@ -0,0 +1,11 @@ +#include "..\script_component.hpp" + +params ["_control", "_selectedIndex"]; + +private _display = ctrlParent _control; +private _selectedPayment = _control lbData _selectedIndex; +private _selectedPaymentTitle = _control lbText _selectedIndex; + +[format ["You have selected %1 as your payment method.", _selectedPaymentTitle], "info", 3, "right"] call EFUNC(misc,notify); + +GVAR(activePayment) = _selectedPayment; \ No newline at end of file diff --git a/addons/store/functions/fnc_handlePurchase.sqf b/addons/store/functions/fnc_handlePurchase.sqf new file mode 100644 index 0000000..a9103c7 --- /dev/null +++ b/addons/store/functions/fnc_handlePurchase.sqf @@ -0,0 +1,40 @@ +#include "..\script_component.hpp" + +params ["_price"]; + +private _paymentData = GVAR(activePayment); +private _payment = call compile _paymentData; + +scopeName "main"; + +if (count _payment > 3) then { + private _authorizedUIDs = _payment select 3; + + if !(getPlayerUID player in _authorizedUIDs) then { + ["You are not authorized to use this payment method!", "warning", 3, "right"] call EFUNC(misc,notify); + false breakOut "main"; + }; +}; + +private _varType = _payment select 2; +private _balance = switch (_varType) do { + case "player": { player getVariable [_payment select 1, 0] }; + case "mission": { missionNamespace getVariable [_payment select 1, 0] }; + default { 0 }; +}; + +if (_balance < _price) exitWith { + ["You do not have enough funds!", "warning", 3, "right"] call EFUNC(misc,notify); + false +}; + +switch (_varType) do { + case "player": { + player setVariable [_payment select 1, (_balance - _price), true]; + }; + case "mission": { + missionNamespace setVariable [_payment select 1, (_balance - _price), true]; + }; +}; + +true \ No newline at end of file diff --git a/addons/store/functions/fnc_initStore.sqf b/addons/store/functions/fnc_initStore.sqf new file mode 100644 index 0000000..ab8a844 --- /dev/null +++ b/addons/store/functions/fnc_initStore.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" + +{ + private _configName = configName(_x); + private _className = (missionConfigFile >> "CfgStores" >> "stores" >> _configName >> "className") call BFUNC(getCfgData); + private _pos = (missionConfigFile >> "CfgStores" >> "stores" >> _configName >> "pos") call BFUNC(getCfgData); + private _dir = (missionConfigFile >> "CfgStores" >> "stores" >> _configName >> "dir") call BFUNC(getCfgData); + private _type = (missionConfigFile >> "CfgStores" >> "stores" >> _configName >> "type") call BFUNC(getCfgData); + private _name = (missionConfigFile >> "CfgStores" >> "stores" >> _configName >> "name") call BFUNC(getCfgData); + private _categories = (missionConfigFile >> "CfgStores" >> "stores" >> _configName >> "categories") call BFUNC(getCfgData); + private _paymentMethods = (missionConfigFile >> "CfgStores" >> "stores" >> _configName >> "paymentMethods") call BFUNC(getCfgData); + private _products = (missionConfigFile >> "CfgStores" >> "stores" >> _configName >> "products") call BFUNC(getCfgData); + + if (_type == "object") then { + private _store = createSimpleObject [_className, [0, 0, 0]]; + + _store setPosATL _pos; + _store setDir _dir; + _store allowDamage false; + _store setVariable ["storeData", [_categories, _products, _name, _paymentMethods], true]; + _store setVariable ["isStore", true, true]; + } else { + private _group = createGroup civilian; + private _store = _group createUnit [_className, [0, 0, 0], [], 0, "NONE"]; + + _store disableAI "MOVE"; + _store setPosATL _pos; + _store setDir _dir; + _store allowDamage false; + _store setVariable ["storeData", [_categories, _products, _name, _paymentMethods], true]; + _store setVariable ["isStore", true, true]; + _store setVariable ["BIS_enableRandomization", false]; + }; + + diag_log text format ["[FORGE Store] ClassName: '%1' Pos: '%2' Dir: '%3' Type: '%4' Name: '%5'", _className, _pos, _dir, _type, _name]; + +} forEach ("true" configClasses (missionConfigFile >> "CfgStores" >> "stores")); \ No newline at end of file diff --git a/addons/store/functions/fnc_openStore.sqf b/addons/store/functions/fnc_openStore.sqf new file mode 100644 index 0000000..aaa49f3 --- /dev/null +++ b/addons/store/functions/fnc_openStore.sqf @@ -0,0 +1,35 @@ +#include "..\script_component.hpp" + +params [["_store", objNull, [objNull]]]; + +if (isNull _store) exitWith {}; + +disableSerialization; +createDialog "RscStoreDialog"; + +private _display = findDisplay IDD_STOREDIALOG; +private _categoryList = _display displayCtrl IDC_CATEGORYLIST; +private _paymentList = _display displayCtrl IDC_PAYMENTLIST; +private _storeName = _display displayCtrl IDC_DIALOGNAME; +private _data = _store getVariable "storeData"; +private _categories = _data select 0; +private _products = _data select 1; +private _name = _data select 2; +private _paymentMethods = _data select 3; + +GVAR(currentStore) = _data; + +_storeName ctrlSetText _name; + +{ + private _index = _categoryList lbAdd _x; + _categoryList lbSetData [_index, _x]; +} forEach _categories; +_categoryList lbSetCurSel 0; + +{ + private _payment = _x select 0; + private _index = _paymentList lbAdd _payment; + _paymentList lbSetData [_index, format ["%1", _x]]; +} forEach _paymentMethods; +_paymentList lbSetCurSel 0; \ No newline at end of file diff --git a/addons/store/functions/fnc_selectProduct.sqf b/addons/store/functions/fnc_selectProduct.sqf new file mode 100644 index 0000000..4168bb3 --- /dev/null +++ b/addons/store/functions/fnc_selectProduct.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" + +private _display = findDisplay IDD_STOREDIALOG; +private _productList = _display displayCtrl IDC_PRODUCTLIST; +private _productIndex = lbCurSel _productList; +private _productData = lbData [IDC_PRODUCTLIST, _productIndex]; + +private _product = call compile _productData; +private _item = _product select 0; +private _price = _product select 1; +private _configType = _product select 3; +private _itemType = _product select 4; + +switch (_configType) do { + case "item"; + case "weapon"; + case "magazine"; + case "backpack": { + [_item, _price, _configType, _itemType] call FUNC(buyItem); + }; + case "vehicle": { + [_item, _price, _itemType] call FUNC(buyVehicle); + }; +}; \ No newline at end of file diff --git a/addons/store/script_component.hpp b/addons/store/script_component.hpp new file mode 100644 index 0000000..e1aed22 --- /dev/null +++ b/addons/store/script_component.hpp @@ -0,0 +1,24 @@ +#define COMPONENT store +#define COMPONENT_BEAUTIFIED Store +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_STORE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_STORE + #define DEBUG_SETTINGS DEBUG_SETTINGS_STORE +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" + +#define IDD_STOREDIALOG 82200 +#define IDC_DIALOGNAME 82201 +#define IDC_CATEGORYLIST 82202 +#define IDC_PAYMENTLIST 82203 +#define IDC_PRODUCTLIST 82204 +#define IDC_BUYBUTTON 82205 +#define IDC_CLOSEBUTTON 82206 \ No newline at end of file diff --git a/addons/store/stringtable.xml b/addons/store/stringtable.xml new file mode 100644 index 0000000..3f5d96d --- /dev/null +++ b/addons/store/stringtable.xml @@ -0,0 +1,20 @@ + + + + + Buy + + + FILTER BY CATEGORY + + + Close + + + Store + + + SELECT PAYMENT + + + diff --git a/addons/store/ui/BaseControls.hpp b/addons/store/ui/BaseControls.hpp new file mode 100644 index 0000000..5fce5a8 --- /dev/null +++ b/addons/store/ui/BaseControls.hpp @@ -0,0 +1,265 @@ +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// Default text sizes +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +// Pixel grid +#define pixelScale 0.50 +#define GRID_W (pixelW * pixelGrid * pixelScale) +#define GRID_H (pixelH * pixelGrid * pixelScale) + +class ScrollBar; +class RscObject; +class RscText; +class RscTextSmall; +class RscTitle; +class RscProgress; +class RscProgressNotFreeze; +class RscPicture; +class RscLadderPicture; +class RscPictureKeepAspect; +class RscHTML; +class RscButton; +class RscShortcutButton; +class RscButtonSmall; +class RscEdit; +class RscCombo; +class RscListBox; +class RscListNBox; +class RscXListBox; +class RscTree; +class RscSlider; +class RscSliderH; +class RscXSliderH; +class RscActiveText; +class RscStructuredText; +class RscControlsGroup; +class RscToolbox; +class RscMapControl; +class RscCheckBox; +class RscFrame; +class ctrlDefault; +class ctrlControlsGroup; +class ctrlDefaultText; +class ctrlDefaultButton; +class RscBackgroundStripeTop; +class RscBackgroundStripeBottom; +class RscIGText; +class RscIGProgress; +class RscListBoxKeys; +class RscControlsGroupNoScrollbars; +class RscControlsGroupNoHScrollbars; +class RscControlsGroupNoVScrollbars; +class RscLine; +class RscActivePicture; +class RscButtonTextOnly; +class RscShortcutButtonMain; +class RscButtonEditor; +class RscIGUIShortcutButton; +class RscGearShortcutButton; +class RscButtonMenu; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenuSteam; +class RscLoadingText; +class RscIGUIListBox; +class RscIGUIListNBox; +class RscBackground; +class RscBackgroundGUI; +class RscBackgroundGUILeft; +class RscBackgroundGUIRight; +class RscBackgroundGUIBottom; +class RscBackgroundGUITop; +class RscBackgroundGUIDark; +class RscBackgroundLogo; +class RscMapControlEmpty; +class RscVignette; +class CA_Mainback; +class CA_Back; +class CA_Title_Back; +class CA_Black_Back; +class CA_Title; +class CA_Logo; +class CA_Logo_Small; +class CA_RscButton; +class CA_RscButton_dialog; +class CA_Ok; +class CA_Ok_image; +class CA_Ok_image2; +class CA_Ok_text; +class ctrlCheckbox; +class ctrlCheckboxBaseline; +class ctrlStatic; +class ctrlControlsGroupNoScrollbars; +class ctrlStructuredText; +class RscTextMulti; +class RscTreeSearch; +class RscVideo; +class RscVideoKeepAspect; +class RscActivePictureKeepAspect; +class RscEditMulti; +class RscMapSignalBackground; +class RscMapSignalPicture; +class RscMapSignalText; +class RscColorPicker; +class RscInterlacingScreen; +class RscFeedback; +class RscTrafficLight; +class RscButtonSearch; +class RscIGUIText; +class RscOpticsText; +class RscOpticsValue; +class RscIGUIValue; +class RscButtonMenuMain; +class RscButtonTestCentered; +class RscDisplaySingleMission_ChallengeOverviewGroup; +class RscDisplayDebriefing_RscTextMultiline; +class RscDisplayDebriefing_ListGroup; +class RscButtonArsenal; +class RscTextNoShadow; +class RscButtonNoColor; +class RscToolboxButton; +class ctrlStaticPicture; +class ctrlStaticPictureKeepAspect; +class ctrlStaticPictureTile; +class ctrlStaticFrame; +class ctrlStaticLine; +class ctrlStaticMulti; +class ctrlStaticBackground; +class ctrlStaticOverlay; +class ctrlStaticTitle; +class ctrlStaticFooter; +class ctrlStaticBackgroundDisable; +class ctrlStaticBackgroundDisableTiles; +class ctrlButton; +class ctrlButtonPicture; +class ctrlButtonPictureKeepAspect; +class ctrlButtonOK; +class ctrlButtonCancel; +class ctrlButtonClose; +class ctrlButtonToolbar; +class ctrlButtonSearch; +class ctrlButtonExpandAll; +class ctrlButtonCollapseAll; +class ctrlButtonFilter; +class ctrlEdit; +class ctrlEditMulti; +class ctrlSliderV; +class ctrlSliderH; +class ctrlCombo; +class ctrlComboToolbar; +class ctrlListbox; +class ctrlToolbox; +class ctrlToolboxPicture; +class ctrlToolboxPictureKeepAspect; +class ctrlCheckboxes; +class ctrlCheckboxesCheckbox; +class ctrlProgress; +class ctrlHTML; +class ctrlActiveText; +class ctrlActivePicture; +class ctrlActivePictureKeepAspect; +class ctrlTree; +class ctrlControlsGroupNoHScrollbars; +class ctrlControlsGroupNoVScrollbars; +class ctrlShortcutButton; +class ctrlShortcutButtonOK; +class ctrlShortcutButtonCancel; +class ctrlShortcutButtonSteam; +class ctrlXListbox; +class ctrlXSliderV; +class ctrlXSliderH; +class ctrlMenu; +class ctrlMenuStrip; +class ctrlMap; +class ctrlMapEmpty; +class ctrlMapMain; +class ctrlListNBox; +class ctrlCheckboxToolbar; \ No newline at end of file diff --git a/addons/store/ui/RscStoreDialog.hpp b/addons/store/ui/RscStoreDialog.hpp new file mode 100644 index 0000000..44617eb --- /dev/null +++ b/addons/store/ui/RscStoreDialog.hpp @@ -0,0 +1,75 @@ +class RscStoreDialog { + idd = IDD_STOREDIALOG; + movingEnable = 1; + enableSimulation = 1; + + class controlsBackground { + class MainBackground: RscText { + idc = -1; + x = "0.25 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.5 * safezoneW"; + h = "0.725 * safezoneH"; + colorBackground[] = {0, 0, 0, 0.7}; + }; + class DialogTitle: RscText { + idc = IDC_DIALOGNAME; + text = CSTRING(Name); + x = "0.25 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.5 * safezoneW"; + h = "0.0325 * safezoneH"; + colorBackground[] = {0.1, 0.1, 0.1, 1}; + }; + }; + + class controls { + class CategoryList: RscCombo { + idc = IDC_CATEGORYLIST; + text = CSTRING(Category); + x = "0.6125 * safezoneW + safezoneX"; + y = "0.2425 * safezoneH + safezoneY"; + w = "0.1125 * safezoneW"; + h = "0.0275 * safezoneH"; + onLBSelChanged = "_this call forge_client_store_fnc_changeFilter"; + }; + + class PaymentList: RscCombo { + idc = IDC_PAYMENTLIST; + text = CSTRING(Payment); + x = "0.6125 * safezoneW + safezoneX"; + y = "0.2825 * safezoneH + safezoneY"; + w = "0.1125 * safezoneW"; + h = "0.0275 * safezoneH"; + onLBSelChanged = "_this call forge_client_store_fnc_changePayment"; + }; + + class ItemsList: RscListBox { + idc = IDC_PRODUCTLIST; + x = "0.2775 * safezoneW + safezoneX"; + y = "0.2425 * safezoneH + safezoneY"; + w = "0.3225 * safezoneW"; + h = "0.5575 * safezoneH"; + }; + + class BuyButton: RscButton { + idc = IDC_BUYBUTTON; + text = CSTRING(Buy); + x = "0.6125 * safezoneW + safezoneX"; + y = "0.36 * safezoneH + safezoneY"; + w = "0.1125 * safezoneW"; + h = "0.0275 * safezoneH"; + onButtonClick = "_this call forge_client_store_fnc_selectProduct"; + }; + + class CloseButton: RscButton { + idc = IDC_CLOSEBUTTON; + text = "X"; + x = "0.7225 * safezoneW + safezoneX"; + y = "0.125 * safezoneH + safezoneY"; + w = "0.0275 * safezoneW"; + h = "0.0325 * safezoneH"; + onButtonClick = "closeDialog 0"; + }; + }; +}; \ No newline at end of file diff --git a/addons/task/$PBOPREFIX$ b/addons/task/$PBOPREFIX$ new file mode 100644 index 0000000..e895677 --- /dev/null +++ b/addons/task/$PBOPREFIX$ @@ -0,0 +1 @@ +z\forge_client\addons\task \ No newline at end of file diff --git a/addons/task/CfgEventHandlers.hpp b/addons/task/CfgEventHandlers.hpp new file mode 100644 index 0000000..78b189a --- /dev/null +++ b/addons/task/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client)); + }; +}; \ No newline at end of file diff --git a/addons/task/XEH_PREP.hpp b/addons/task/XEH_PREP.hpp new file mode 100644 index 0000000..99be237 --- /dev/null +++ b/addons/task/XEH_PREP.hpp @@ -0,0 +1,12 @@ +PREP(attack); +PREP(defuse); +PREP(destroy); +PREP(handler); +PREP(heartBeat); +PREP(hostage); +PREP(hvt); +PREP(makeHostage); +PREP(makeHVT); +PREP(makeIED); +PREP(makeObject); +PREP(makeTarget); \ No newline at end of file diff --git a/addons/task/XEH_postInit.sqf b/addons/task/XEH_postInit.sqf new file mode 100644 index 0000000..3777879 --- /dev/null +++ b/addons/task/XEH_postInit.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +["ace_explosives_defuse", { + GVAR(defusedCount) = GVAR(defusedCount) + 1; +}] call CFUNC(addEventHandler); \ No newline at end of file diff --git a/addons/task/XEH_postInit_client.sqf b/addons/task/XEH_postInit_client.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/task/XEH_postInit_client.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/task/XEH_preInit.sqf b/addons/task/XEH_preInit.sqf new file mode 100644 index 0000000..a58b5bf --- /dev/null +++ b/addons/task/XEH_preInit.sqf @@ -0,0 +1,15 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +GVAR(allHostages) = []; +GVAR(allHVTs) = []; +GVAR(allIEDs) = []; +GVAR(allEntities) = []; +GVAR(allShooters) = []; +GVAR(allTargets) = []; + +ADDON = true; \ No newline at end of file diff --git a/addons/task/XEH_preInit_server.sqf b/addons/task/XEH_preInit_server.sqf new file mode 100644 index 0000000..84f2529 --- /dev/null +++ b/addons/task/XEH_preInit_server.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" \ No newline at end of file diff --git a/addons/task/XEH_preStart.sqf b/addons/task/XEH_preStart.sqf new file mode 100644 index 0000000..7dca066 --- /dev/null +++ b/addons/task/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" \ No newline at end of file diff --git a/addons/task/config.cpp b/addons/task/config.cpp new file mode 100644 index 0000000..338b901 --- /dev/null +++ b/addons/task/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"forge_client_main"}; + authors[] = {"J. Schmidt", "Creedcoder"}; + author = "IDSolutions"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/task/functions/fnc_attack.sqf b/addons/task/functions/fnc_attack.sqf new file mode 100644 index 0000000..c265cad --- /dev/null +++ b/addons/task/functions/fnc_attack.sqf @@ -0,0 +1,110 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers an attack task. + * + * Arguments: + * 0: ID of the task + * 1: Amount of targets escaped to fail the task + * 2: Amount of targets eliminated to complete the task + * 3: Should the mission end (MissionSuccess) if the task is successful (default: false) + * 4: Should the mission end (MissionFailed) if the task is failed (default: false) + * 5: Amount of funds the company recieves if the task is successful (default: 0) + * 6: Amount of rating the company and player lose if the task is failed (default: 0) + * 7: Amount of rating the company and player recieve if the task is successful (default: 0) + * 8: Amount of time before target(s) escape (default: nil) + * + * Return Value: + * None + * + * Example: + * ["task_name", 1, 2, 1500000, -75, 375, false, false] spawn forge_client_task_fnc_attack; + * ["task_name", 1, 2, 1500000, -75, 375, false, false, 45] spawn forge_client_task_fnc_attack; + * + * Public: Yes + */ + +// Mission Parameters from Contract via Mission Handler +params [["_taskID", ""], ["_limitFail", -1], ["_limitSuccess", -1], ["_companyFunds", 0], ["_ratingFail", 0], ["_ratingSuccess", 0], ["_endSuccess", false], ["_endFail", false], "_time"]; + +private _result = 0; + +private _targets = GVAR(allTargets) select { (_x getVariable ["assignedTask", ""]) == _taskID }; + +// Mission Initialization. +if (!isNil "_time") then { + // Mission Watchdog checks for example Timeout, killed Targets + private _startTime = floor(time); + waitUntil { + sleep 1; // Use sleep on server side! + + // Timeout check + private _currTime = floor(time); + if (_currTime - _startTime >= _time) then { _result = 1; }; + + // Check if targets are killed + private _targetsAlive = ({ !alive _x } count _targets); + + // Trigger Conditions + (_result == 1) OR (_targetsAlive >= _limitSuccess) + }; +} else { + // Mission Watchdog checks for example Killed targets + waitUntil { + sleep 1; // Use sleep on server side! + + // Check if targets are killed + private _targetsAlive = ({ !alive _x } count _targets); + + // Trigger Conditions + (_targetsAlive >= _limitSuccess) + }; +}; + +if (_result == 1) then { + // Mission Failed + // Clean-up Targets + + { deleteVehicle _x } forEach _targets; + + // Do stuff after the Mission is failed + // Like trigger next mission step via Mission Handler, punishment or so on + + [_taskID, "FAILED"] call BFUNC(taskSetState); + + if (_endFail) then { + ["MissionFail", false] remoteExecCall ["BIS_fnc_endMission", playerSide]; + }; + + ["deduct", _ratingFail] remoteExecCall ["forge_server_rating_fnc_handleRating", 2]; + + sleep 1; + + { [_x, _ratingFail] remoteExec ["addRating", -2] } forEach allPlayers; +} else { + // Mission Complete + // Clean-up Targets + + { deleteVehicle _x } forEach _targets; + + // Do stuff after the Mission is completed + // Like trigger next mission step via Mission Handler, rewards or so on + + [_taskID, "SUCCEEDED"] call BFUNC(taskSetState); + + if (_endSuccess) then { + ["MissionSuccess", true] remoteExecCall ["BIS_fnc_endMission", playerSide]; + }; + + ["advance", _ratingSuccess] remoteExecCall ["forge_server_rating_fnc_handleRating", 2]; + + sleep 1; + + { [_x, _ratingSuccess] remoteExec ["addRating", -2] } forEach allPlayers; + + ["advance", _companyFunds] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; +}; + +// Reset Mission Spot +// Like delete Markers or other stuff for example Logging \ No newline at end of file diff --git a/addons/task/functions/fnc_defuse.sqf b/addons/task/functions/fnc_defuse.sqf new file mode 100644 index 0000000..9102653 --- /dev/null +++ b/addons/task/functions/fnc_defuse.sqf @@ -0,0 +1,100 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers a defuse task. + * + * Arguments: + * 0: ID of the task + * 1: Amount of entities destroyed to fail the task + * 2: Amount of ieds defused to complete the task + * 3: Should the mission end (MissionSuccess) if the task is successful (default: false) + * 4: Should the mission end (MissionFailed) if the task is failed (default: false) + * 5: Amount of funds the company recieves if the task is successful (default: 0) + * 6: Amount of rating the company and player lose if the task is failed (default: 0) + * 7: Amount of rating the company and player recieve if the task is successful (default: 0) + * + * Return Value: + * None + * + * Example: + * ["task_name", 2, 3, 375000, -75, 300, false, false] spawn forge_client_task_fnc_defuse; + * + * Public: Yes + */ + +// Mission Parameters from Contract via Mission Handler +params [["_taskID", ""], ["_limitFail", -1], ["_limitSuccess", -1], ["_companyFunds", 0], ["_ratingFail", 0], ["_ratingSuccess", 0], ["_endSuccess", false], ["_endFail", false]]; + +private _result = 0; + +// Get the IED(s) assigned to taskID +private _ieds = GVAR(allIEDs) select { (_x getVariable ["assignedTask", ""]) == _taskID }; + +// Get the entitie(s) assigned to taskID +private _entities = GVAR(allEntities) select { (_x getVariable ["assignedTask", ""]) == _taskID }; + +// Mission Initialization. +// Mission Watchdog checks for example Defused IEDs, Destroyed entities +waitUntil { + sleep 1; // Use sleep on server side! + + // Check if entities are killed + private _entitiesAlive = ({ !alive _x } count _entities); + if (_entitiesAlive >= _limitFail) then { _result = 1; }; + + // Trigger Conditions + (_result == 1) OR ((GVAR(defusedCount) >= _limitSuccess) && (_entitiesAlive < _limitFail)) +}; + +// Mission Watchdog checks for example Defused IEDs, destroyed entities +if (_result == 1) then { + // Mission Failed + // Clean-up IEDs and entities + + { deleteVehicle _x } forEach _ieds; + { deleteVehicle _x } forEach _entities; + + // Do stuff after the Mission is failed + // Like trigger next mission step via Mission Handler, punishment or so on + + [_taskID, "FAILED"] call BFUNC(taskSetState); + + if (_endFail) then { + ["MissionFail", false] remoteExecCall ["BIS_fnc_endMission", playerSide]; + }; + + ["deduct", _ratingFail] remoteExecCall ["forge_server_rating_fnc_handleRating", 2]; + + sleep 1; + + { [_x, _ratingFail] remoteExec ["addRating", -2] } forEach allPlayers; +} else { + // Mission Complete + // Clean-up IEDs and entities + + { deleteVehicle _x } forEach _ieds; + { deleteVehicle _x } forEach _entities; + + // Do stuff after the Mission is completed + // Like trigger next mission step via Mission Handler, rewards or so on + + [_taskID, "SUCCEEDED"] call BFUNC(taskSetState); + + if (_endSuccess) then { + ["MissionSuccess", true] remoteExecCall ["BIS_fnc_endMission", playerSide]; + }; + + ["advance", _ratingSuccess] remoteExecCall ["forge_server_rating_fnc_handleRating", 2]; + + sleep 1; + + { [_x, _ratingSuccess] remoteExec ["addRating", -2] } forEach allPlayers; + + ["advance", _companyFunds] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; +}; + +// Reset Mission Spot +// Like delete Markers or other stuff for example Logging + +GVAR(defusedCount) = 0; \ No newline at end of file diff --git a/addons/task/functions/fnc_destroy.sqf b/addons/task/functions/fnc_destroy.sqf new file mode 100644 index 0000000..3c6674f --- /dev/null +++ b/addons/task/functions/fnc_destroy.sqf @@ -0,0 +1,111 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers an destroy task. + * + * Arguments: + * 0: ID of the task + * 1: Amount of targets escaped to fail the task + * 2: Amount of targets eliminated to complete the task + * 3: Should the mission end (MissionSuccess) if the task is successful (default: false) + * 4: Should the mission end (MissionFailed) if the task is failed (default: false) + * 5: Amount of funds the company recieves if the task is successful (default: 0) + * 6: Amount of rating the company and player lose if the task is failed (default: 0) + * 7: Amount of rating the company and player recieve if the task is successful (default: 0) + * 8: Amount of time before target(s) escape (default: nil) + * + * Return Value: + * None + * + * Example: + * ["task_name", 1, 2, 250000, -75, 300, false, false] spawn forge_client_task_fnc_destroy; + * ["task_name", 1, 2, 250000, -75, 300, false, false, 45] spawn forge_client_task_fnc_destroy; + * + * Public: Yes + */ + +// Mission Parameters from Contract via Mission Handler +params [["_taskID", ""], ["_limitFail", -1], ["_limitSuccess", -1], ["_companyFunds", 0], ["_ratingFail", 0], ["_ratingSuccess", 0], ["_endSuccess", false], ["_endFail", false], "_time"]; + +private _result = 0; + +// Get the targets assigned to taskID +private _targets = GVAR(allTargets) select { (_x getVariable ["assignedTask", ""]) == _taskID }; + +// Mission Initialization. +if (!isNil "_time") then { + // Mission Watchdog checks for example Timeout, Destroyed Targets + private _startTime = floor(time); + waitUntil { + sleep 1; // Use sleep on server side! + + // Timeout check + private _currTime = floor(time); + if (_currTime - _startTime >= _time) then { _result = 1; }; + + // Check if targets are killed + private _targetsAlive = ({ !alive _x } count _targets); + + // Trigger Conditions + (_result == 1) OR (_targetsAlive >= _limitSuccess) + }; +} else { + // Mission Watchdog checks for example killed Targets + waitUntil { + sleep 1; // Use sleep on server side! + + // Check if targets are killed + private _targetsAlive = ({ !alive _x } count _targets); + + // Trigger Conditions + (_targetsAlive >= _limitSuccess) + }; +}; + +if (_result == 1) then { + // Mission Failed + // Clean-up Targets + + { deleteVehicle _x } forEach _targets; + + // Do stuff after the Mission is failed + // Like trigger next mission step via Mission Handler, punishment or so on + + [_taskID, "FAILED"] call BFUNC(taskSetState); + + if (_endFail) then { + ["MissionFail", false] remoteExecCall ["BIS_fnc_endMission", playerSide]; + }; + + ["deduct", _ratingFail] remoteExecCall ["forge_server_rating_fnc_handleRating", 2]; + + sleep 1; + + { [_x, _ratingFail] remoteExec ["addRating", -2] } forEach allPlayers; +} else { + // Mission Complete + // Clean-up Targets + + { deleteVehicle _x } forEach _targets; + + // Do stuff after the Mission is completed + // Like trigger next mission step via Mission Handler, rewards or so on + + [_taskID, "SUCCEEDED"] call BFUNC(taskSetState); + + if (_endSuccess) then { + ["MissionSuccess", true] remoteExecCall ["BIS_fnc_endMission", playerSide]; + }; + + ["advance", _ratingSuccess] remoteExecCall ["forge_server_rating_fnc_handleRating", 2]; + + sleep 1; + + { [_x, _ratingSuccess] remoteExec ["addRating", -2] } forEach allPlayers; + + ["advance", _companyFunds] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; +}; + +// Reset Mission Spot +// Like delete Markers or other stuff for example Logging \ No newline at end of file diff --git a/addons/task/functions/fnc_handler.sqf b/addons/task/functions/fnc_handler.sqf new file mode 100644 index 0000000..57ebbb8 --- /dev/null +++ b/addons/task/functions/fnc_handler.sqf @@ -0,0 +1,70 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Server side task handler/spawner. + * + * Arguments: + * 0: Type of task + * 1: Params for task + * 2: Minimum rating for task (default: nil) + * + * Return Value: + * None + * + * Example: + * ["task_type", [_reward, _punish, _time, etc.....], minRating] remoteExec ["forge_client_task_fnc_handler", 2, false]; + * + * Public: Yes + */ + +params [["_taskType", "", [""]], ["_cntParams", [], [[]]], ["_minRating", 0, [0]]]; + +private _thread = 0; + +// Trigger before the task starts or what ever you need +// For example block accepting new tasks, lock shops, player save and so on + +GVAR(acceptTask) = false; + +if (isNil "companyRating") then { companyRating = 0; }; +if (isNil "_minRating") then { _minRating = 0; }; + +private _companyRating = companyRating; +if (_companyRating < _minRating) exitWith { + hint format ["The company rating of %1 does not meet or exceed the minimum required rating of %2.", _companyRating, _minRating]; +}; + +// Start the task +switch (_taskType) do { + case "attack": { + private _thread = _cntParams spawn FUNC(attack); + waitUntil { sleep 2; scriptDone _thread }; + }; + case "defuse": { + private _thread = _cntParams spawn FUNC(defuse); + waitUntil { sleep 2; scriptDone _thread }; + }; + case "destroy": { + private _thread = _cntParams spawn FUNC(destroy); + waitUntil { sleep 2; scriptDone _thread }; + }; + case "hostage": { + private _thread = _cntParams spawn FUNC(hostage); + waitUntil { sleep 2; scriptDone _thread }; + }; + case "hvt": { + private _thread = _cntParams spawn FUNC(hvt); + waitUntil { sleep 2; scriptDone _thread }; + }; + default { + diag_log format ["Unknown Contract Type: %1", _taskType]; + }; +}; + +diag_log "Mision Handler Done"; + +// Do Stuff what you need to be done after the task +// For example allow accepting new tasks, open shops and so on + +GVAR(acceptTask) = true; \ No newline at end of file diff --git a/addons/task/functions/fnc_heartBeat.sqf b/addons/task/functions/fnc_heartBeat.sqf new file mode 100644 index 0000000..26316a2 --- /dev/null +++ b/addons/task/functions/fnc_heartBeat.sqf @@ -0,0 +1,64 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers Entity and starts heartbeat. + * + * Arguments: + * 0: The entity + * 1: Type of the entity + * 2: The countdown timer + * + * Return Value: + * None + * + * Example: + * [_entity, "entity_type", 30] spawn FUNC(heartBeat); + * + * Public: Yes + */ + +params [["_entity", nil, [objNull, 0, [], sideUnknown, grpNull, ""]], ["_typeOf", "", [""]], ["_time", 0, [0]]]; + +switch (_typeOf) do { + case "hostage": { + _entity setCaptive true; + _entity enableAIFeature ["MOVE", false]; + _entity playMove "acts_executionvictim_loop"; + + waitUntil { + sleep 1; + private _nearPlayers = allPlayers inAreaArray [ASLToAGL getPosASL _entity, 2, 2, 0, false, 2]; + count _nearPlayers > 0 + }; + + private _nearPlayer = _nearPlayers select 0; + + [_entity] joinSilent (group _nearPlayer); + + _entity setCaptive false; + _entity enableAIFeature ["MOVE", true]; + _entity playMove "acts_executionvictim_unbow"; + }; + case "hvt": { + waitUntil { + sleep 1; + private _nearPlayers = allPlayers inAreaArray [ASLToAGL getPosASL _entity, 2, 2, 0, false, 2]; + count _nearPlayers > 0 + }; + + _entity setCaptive true; + doStop _entity; + }; + case "ied": { + _time = _time -1; + sleep 1; + + if (!alive _entity) exitWith {}; + + if (_time > 10) then { _entity say3D "FORGE_timerBeep" }; + if (_time <= 10 && _time > 5) then { _entity say3D "FORGE_timerBeepShort" }; + if (_time <= 5) then { _entity say3D "FORGE_timerEnd" }; + if (_time <= 0) exitWith { _entity setDamage 1 }; + }; +}; \ No newline at end of file diff --git a/addons/task/functions/fnc_hostage.sqf b/addons/task/functions/fnc_hostage.sqf new file mode 100644 index 0000000..d2c0f67 --- /dev/null +++ b/addons/task/functions/fnc_hostage.sqf @@ -0,0 +1,173 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers an hostage task. + * + * Arguments: + * 0: ID of the task + * 1: Amount of hostages KIA to fail the task + * 2: Amount of hostages rescued to complete the task + * 3: Marker name for the extraction zone + * 4: Subcategory of task (default: [false, true]) + * 5: Should the mission end (MissionSuccess) if the task is successful (default: false) + * 6: Should the mission end (MissionFailed) if the task is failed (default: false) + * 7: Amount of funds the company recieves if the task is successful (default: 0) + * 8: Amount of rating the company and player lose if the task is failed (default: 0) + * 9: Amount of rating the company and player recieve if the task is successful (default: 0) + * 10: Amount of time before hostage(s) die (default: nil) + * 11: Marker name for the cbrn zone (default: nil) + * + * Return Value: + * None + * + * Example: + * ["task_name", 1, 2, "marker_name", 1500000, -75, 500, [false, true], false, false] spawn forge_client_task_fnc_hostage; + * ["task_name", 1, 2, "marker_name", 1500000, -75, 500, [false, true], false, false, 45] spawn forge_client_task_fnc_hostage; + * ["task_name", 1, 2, "marker_name", 1500000, -75, 500, [true, false], false, false, 45, "marker_name"] spawn forge_client_task_fnc_hostage; + * + * Public: Yes + */ + +// Mission Parameters from Contract via Mission Handler +params [["_taskID", ""], ["_limitFail", -1], ["_limitSuccess", -1], ["_extZone", ""], ["_companyFunds", 0], ["_ratingFail", 0], ["_ratingSuccess", 0], ["_type", [["_cbrn", false], ["_hostage", true]]], ["_endSuccess", false], ["_endFail", false], "_time", ["_cbrnZone", ""]]; + +private _cbrn = (_this select 8) select 0; +private _hostage = (_this select 8) select 1; +private _nearPlayers = []; +private _result = 0; + +// Get the hostages +private _hostages = GVAR(allHostages) select { (_x getVariable ["assignedTask", ""]) == _taskID }; + +// Get the shooters +private _shooters = GVAR(allShooters) select { (_x getVariable ["assignedTask", ""]) == _taskID }; + +// Mission Initialization. +if (!isNil "_time") then { + // Mission Watchdog checks for example Timeout, killed Hostages, killed Shooters + private _startTime = floor(time); + waitUntil { + sleep 1; // Use sleep on server side! + + // Check if hostages are killed + private _hostagesAlive = ({ !alive _x } count _hostages); + if (_hostagesAlive >= _limitFail) then { _result = 1; }; + + // Check if hostages are in extraction zone + private _hostagesInZone = ({ _x inArea _extZone } count _hostages); + + // Check if hostages are captive + private _hostagesCaptive = ({ !captive _x } count _hostages); + + // Check if shooters are killed + private _shootersAlive = ({ alive _x } count _shooters); + + // Timeout check + private _currTime = floor(time); + if ((_hostagesCaptive < _limitSuccess) && (_currTime - _startTime >= _time)) then { _result = 1; }; + + // Trigger Conditions + (_result == 1) OR (_hostagesInZone >= _limitSuccess) OR ((!isNil "_shooters") && (_shootersAlive <= 0)) + }; +} else { + // Mission Watchdog checks for example killed Hostages, killed Shooters + waitUntil { + sleep 1; // Use sleep on server side! + + // Check if hostages are killed + private _hostagesAlive = ({ !alive _x } count _hostages); + if (_hostagesAlive >= _limitFail) then { _result = 1; }; + + // Check if hostages are in extraction zone + private _hostagesInZone = ({ _x inArea _extZone } count _hostages); + + // Check if shooters are killed + private _shootersAlive = ({ alive _x } count _shooters); + + // Trigger Conditions + (_result == 1) OR (_hostagesInZone >= _limitSuccess) OR ((!isNil "_shooters") && (_shootersAlive <= 0)) + }; +}; + +if (_result == 1) then { + // Mission Failed + + // Do stuff after the Mission is failed + // Like trigger next mission step via Mission Handler, punishment or so on + + // Check if task is typeOf CBRN + if (_cbrn) then { + "SmokeShellYellow" createVehicle getMarkerPos _cbrnZone; + + sleep 5; + + { + if (captive _x) then { + _x setDamage 0.9; + _x playMove "acts_executionvictim_kill_end"; + + sleep 2.75; + + _x setDamage 1; + } + } forEach _hostages; + }; + + // Check if task is typeOf Hostage(s) + if (_hostage) then { + { + _x enableAIFeature ["MOVE", true]; + _x playMove ""; + } forEach _shooters; + + sleep 1; + + { _x setCaptive false; } forEach _hostages; + + sleep 5; + }; + + // Clean-up Hostages and Shooters + + { deleteVehicle _x } forEach _hostages; + { deleteVehicle _x } forEach _shooters; + + [_taskID, "FAILED"] call BFUNC(taskSetState); + + if (_endFail) then { + ["MissionFail", false] remoteExecCall ["BIS_fnc_endMission", playerSide]; + }; + + ["deduct", _ratingFail] remoteExecCall ["forge_server_rating_fnc_handleRating", 2]; + + sleep 1; + + { [_x, _ratingFail] remoteExec ["addRating", -2] } forEach allPlayers; +} else { + // Mission Complete + // Clean-up Hostages and Shooters + + { deleteVehicle _x } forEach _hostages; + { deleteVehicle _x } forEach _shooters; + + // Do stuff after the Mission is completed + // Like trigger next mission step via Mission Handler, rewards or so on + + [_taskID, "SUCCEEDED"] call BFUNC(taskSetState); + + if (_endSuccess) then { + ["MissionSuccess", true] remoteExecCall ["BIS_fnc_endMission", playerSide]; + }; + + ["advance", _ratingSuccess] remoteExecCall ["forge_server_rating_fnc_handleRating", 2]; + + sleep 1; + + { [_x, _ratingSuccess] remoteExec ["addRating", -2] } forEach allPlayers; + + ["advance", _companyFunds] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; +}; + +// Reset Mission Spot +// Like delete Markers or other stuff for example Logging \ No newline at end of file diff --git a/addons/task/functions/fnc_hvt.sqf b/addons/task/functions/fnc_hvt.sqf new file mode 100644 index 0000000..1b9964f --- /dev/null +++ b/addons/task/functions/fnc_hvt.sqf @@ -0,0 +1,129 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers an hvt task. + * + * Arguments: + * 0: ID of the task + * 1: Amount of HVTs KIA to fail the task + * 2: Amount of HVTs Captured or KIA to complete the task + * 3: Marker name for the extraction zone + * 4: Subcategory of task (default: [true, false]) + * 5: Should the mission end (MissionSuccess) if the task is successful (default: false) + * 6: Should the mission end (MissionFailed) if the task is failed (default: false) + * 7: Amount of funds the company recieves if the task is successful (default: 0) + * 8: Amount of rating the company and player lose if the task is failed (default: 0) + * 9: Amount of rating the company and player recieve if the task is successful (default: 0) + * 10: Amount of time before hvt(s) die (default: nil) + * + * Return Value: + * None + * + * Example: + * ["task_name", 1, 1, "marker_name", 500000, -75, 300, [true, false], false, false] spawn forge_client_task_fnc_hvt; + * ["task_name", -1, 1, "", 500000, -75, 300, [false, true], false, false] spawn forge_client_task_fnc_hvt; + * ["task_name", 1, 1, "marker_name", 500000, -75, 300, [true, false], false, false, 45] spawn forge_client_task_fnc_hvt; + * ["task_name", -1, 1, "", 500000, -75, 300, [false, true], false, false, 45] spawn forge_client_task_fnc_hvt; + * + * Public: Yes + */ + +// Mission Parameters from Contract via Mission Handler +params [["_taskID", ""], ["_limitFail", -1], ["_limitSuccess", -1], ["_extZone", ""], ["_companyFunds", 0], ["_ratingFail", 0], ["_ratingSuccess", 0], ["_type", [["_capture", true], ["_eliminate", false]]], ["_endSuccess", false], ["_endFail", false], "_time"]; + +private _capture = (_this select 7) select 0; +private _eliminate = (_this select 7) select 1; +private _nearPlayers = []; +private _result = 0; +private _hvts = GVAR(allHVTs) select { (_x getVariable ["assignedTask", ""]) == _taskID }; + +// Mission Initialization. +if (!isNil "_time") then { + // Mission Watchdog checks for example Timeout, Captured/Killed HVTs + private _startTime = floor(time); + waitUntil { + sleep 1; // Use sleep on server side! + + // Check if hvts are killed + private _hvtsAlive = ({ !alive _x } count _hvts); + if (_capture && (_hvtsAlive >= _limitFail)) then { _result = 1; }; + + // Check if hvts are in extraction zone + private _hvtsInZone = ({ _x inArea _extZone } count _hvts); + + // Check if hvts are captive + private _hvtsCaptive = ({ captive _x } count _hvts); + + // Timeout check + private _currTime = floor(time); + if ((_hvtsCaptive < _limitSuccess) && (_currTime - _startTime >= _time)) then { _result = 1; }; + + // Trigger Conditions + (_result == 1) OR (_hvtsInZone >= _limitSuccess) OR (_hvtsAlive >= _limitSuccess) + }; +} else { + // Mission Watchdog checks for example Captured/Killed HVTs + waitUntil { + sleep 1; // Use sleep on server side! + + // Check if hvts are killed + private _hvtsAlive = ({ !alive _x } count _hvts); + if (_capture && (_hvtsAlive >= _limitFail)) then { _result = 1; }; + + // Check if hvts are in extraction zone + private _hvtsInZone = ({ _x inArea _extZone } count _hvts); + + // Check if hvts are captive + private _hvtsCaptive = ({ captive _x } count _hvts); + + // Trigger Conditions + (_result == 1) OR (_hvtsInZone >= _limitSuccess) OR (_hvtsAlive >= _limitSuccess) + }; +}; + +if (_result == 1) then { + // Mission Failed + // Clean-up HVTs + { deleteVehicle _x } forEach _hvts; + + // Do stuff after the Mission is failed + // Like trigger next mission step via Mission Handler, punishment or so on + + [_taskID, "FAILED"] call BFUNC(taskSetState); + + if (_endFail) then { + ["MissionFail", false] remoteExecCall ["BIS_fnc_endMission", playerSide]; + }; + + ["deduct", _ratingFail] remoteExecCall ["forge_server_rating_fnc_handleRating", 2]; + + sleep 1; + + { [_x, _ratingFail] remoteExec ["addRating", -2] } forEach allPlayers; +} else { + // Mission Complete + // Clean-up HVTs + + { deleteVehicle _x } forEach _hvts; + + // Do stuff after the Mission is completed + // Like trigger next mission step via Mission Handler, rewards or so on + + [_taskID, "SUCCEEDED"] call BFUNC(taskSetState); + + if (_endSuccess) then { + ["MissionSuccess", true] remoteExecCall ["BIS_fnc_endMission", playerSide]; + }; + + ["advance", _ratingSuccess] remoteExecCall ["forge_server_rating_fnc_handleRating", 2]; + + sleep 1; + + { [_x, _ratingSuccess] remoteExec ["addRating", -2] } forEach allPlayers; + + ["advance", _companyFunds] remoteExecCall ["forge_server_money_fnc_handleFunds", 2]; +}; + +// Reset Mission Spot +// Like delete Markers or other stuff for example Logging \ No newline at end of file diff --git a/addons/task/functions/fnc_makeHVT.sqf b/addons/task/functions/fnc_makeHVT.sqf new file mode 100644 index 0000000..cbc1043 --- /dev/null +++ b/addons/task/functions/fnc_makeHVT.sqf @@ -0,0 +1,43 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers an AI unit as a hvt. + * + * Arguments: + * 0: The AI unit + * 1: ID of the task + * + * Return Value: + * None + * + * Example: + * [this, "task_name"] spawn forge_client_task_fnc_makeHVT; + * + * Public: Yes + */ + +params [["_entity", nil, [objNull, 0, [], sideUnknown, grpNull, ""]], ["_taskID", "", [""]]]; + +// Check stuff +// if (isNull _entity) exitWith {[COMPONENT_NAME, "ERROR", "Unit is not found", true] call forge_server_main_fnc_log}; +// if (_taskID == "") exitWith {[COMPONENT_NAME, "ERROR", "Task ID is empty", true] call forge_server_main_fnc_log}; + +// Register hvt +SETVAR(_entity,assignedTask,_taskID); + +// Add unit to hvt array +private _index = GVAR(allHVTs) pushBackUnique _entity; + +if (alive _entity) then { + [_entity, "hvt"] spawn FUNC(heartBeat); +}; + +// Log +// [COMPONENT_NAME, "DEBUG", format [ +// "Unit (%1) is registered as a hvt. HVT array: %2", _entity, str GVAR(allHVTs) +// ]] call forge_server_main_fnc_log; + +// if (_index == -1) then { +// [COMPONENT_NAME, "WARNING", format ["Unit (%1) is already a hvt", _entity], true] call forge_server_main_fnc_log; +// }; \ No newline at end of file diff --git a/addons/task/functions/fnc_makeHostage.sqf b/addons/task/functions/fnc_makeHostage.sqf new file mode 100644 index 0000000..ff48108 --- /dev/null +++ b/addons/task/functions/fnc_makeHostage.sqf @@ -0,0 +1,46 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers an AI unit as a hostage/POW. + * + * Arguments: + * 0: The AI unit + * 1: ID of the task + * + * Return Value: + * None + * + * Example: + * [this, "task_name"] spawn forge_client_task_fnc_makeHostage; + * + * Public: Yes + */ + +params [["_entity", nil, [objNull, 0, [], sideUnknown, grpNull, ""]], ["_taskID", "", [""]]]; + +private _nearPlayers = []; + +// Check stuff +// if (isNull _entity) exitWith {[COMPONENT_NAME, "ERROR", "Unit is not found", true] call forge_server_main_fnc_log}; +// if (_taskID == "") exitWith {[COMPONENT_NAME, "ERROR", "Task ID is empty", true] call forge_server_main_fnc_log}; + +// Register hostage +SETVAR(_entity,assignedTask,_taskID); + +// Add unit to hostage array +private _index = GVAR(allHostages) pushBackUnique _entity; + +// Log +// [COMPONENT_NAME, "DEBUG", format [ +// "Unit (%1) is registered as a hostage. Hostage array: %2", _entity, str GVAR(allHostages) +// ]] call forge_server_main_fnc_log; + +// if (_index == -1) then { +// [COMPONENT_NAME, "WARNING", format ["Unit (%1) is already a hostage", _entity], true] call forge_server_main_fnc_log; +// }; + +// Animation Loop +if (alive _entity) then { + [_entity, "hostage"] spawn FUNC(heartBeat); +}; \ No newline at end of file diff --git a/addons/task/functions/fnc_makeIED.sqf b/addons/task/functions/fnc_makeIED.sqf new file mode 100644 index 0000000..39a39aa --- /dev/null +++ b/addons/task/functions/fnc_makeIED.sqf @@ -0,0 +1,49 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers an IED and starts countdown timer. + * + * Arguments: + * 0: The object + * 1: ID of the task + * 2: The Countdown Timer + * + * Return Value: + * None + * + * Example: + * [this, "task_name", 30] spawn forge_client_task_fnc_makeIED; + * + * Public: Yes + */ + +params [["_entity", nil, [objNull, 0, [], sideUnknown, grpNull, ""]], ["_taskID", "", [""]], ["_time", 0, [0]]]; + +// Check if IED is defined +// if (isNull _entity) exitWith { +// [COMPONENT_NAME, "ERROR", "IED is not found", true] call forge_server_main_fnc_log +// }; + +// Check if taskID is defined +// if (_taskID == "") exitWith { +// [COMPONENT_NAME, "ERROR", "Task ID is empty", true] call forge_server_main_fnc_log +// }; + +// Assigns IED to taskID +SETVAR(_entity,assignedTask,_taskID); + +// Add IED to IED array +private _index = GVAR(allIEDs) pushBackUnique _entity; + +// Log +// [COMPONENT_NAME, "DEBUG", format ["Object (%1) is registered as an IED. IED array: %2", _entity, str GVAR(allIEDs)]] call forge_server_main_fnc_log; + +// if (_index == -1) then { +// [COMPONENT_NAME, "WARNING", format ["Object (%1) is already an IED", _entity], true] call forge_server_main_fnc_log; +// }; + +// Countdown timer +while { (_time > 0) && alive _entity } do { + [_entity, "ied", _time] spawn FUNC(heartBeat); +}; \ No newline at end of file diff --git a/addons/task/functions/fnc_makeObject.sqf b/addons/task/functions/fnc_makeObject.sqf new file mode 100644 index 0000000..e186b69 --- /dev/null +++ b/addons/task/functions/fnc_makeObject.sqf @@ -0,0 +1,43 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers an item as an object. + * + * Arguments: + * 0: The object + * 1: ID of the task + * + * Return Value: + * None + * + * Example: + * [this, "task_name"] spawn forge_client_task_fnc_makeObject; + * + * Public: Yes + */ + +params [["_entity", nil, [objNull, 0, [], sideUnknown, grpNull, ""]], ["_taskID", "", [""]]]; + +// Check if item is defined +// if (isNull _entity) exitWith { +// [COMPONENT_NAME, "ERROR", "Item is not found", true] call forge_server_main_fnc_log +// }; + +// Check if taskID is defined +// if (_taskID == "") exitWith { +// [COMPONENT_NAME, "ERROR", "Task ID is empty", true] call forge_server_main_fnc_log +// }; + +// Assign object to taskID +SETVAR(_entity,assignedTask,_taskID); + +// Add object to object array +private _index = GVAR(allEntities) pushBackUnique _entity; + +// Log +// [COMPONENT_NAME, "DEBUG", format ["Item (%1) is registered as an object. Object array: %2", _entity, str GVAR(allEntities)]] call forge_server_main_fnc_log; + +// if (_index == -1) then { +// [COMPONENT_NAME, "WARNING", format ["Item (%1) is already an object", _entity], true] call forge_server_main_fnc_log; +// }; \ No newline at end of file diff --git a/addons/task/functions/fnc_makeTarget.sqf b/addons/task/functions/fnc_makeTarget.sqf new file mode 100644 index 0000000..54fd5f8 --- /dev/null +++ b/addons/task/functions/fnc_makeTarget.sqf @@ -0,0 +1,39 @@ +#include "..\script_component.hpp" + +/* + * Author: Creedcoder, J. Schmidt + * Registers an AI unit as a target. + * + * Arguments: + * 0: The AI unit + * 1: ID of the task + * + * Return Value: + * None + * + * Example: + * [this, "task_name"] spawn forge_client_task_fnc_makeTarget; + * + * Public: Yes + */ + +params [["_entity", nil, [objNull, 0, [], sideUnknown, grpNull, ""]], ["_taskID", "", [""]]]; + +// Check if unit is defined +// if (isNull _entity) exitWith {[COMPONENT_NAME, "ERROR", "Unit is not found", true] call forge_server_main_fnc_log}; + +// Check if taskID is defined +// if (_taskID == "") exitWith {[COMPONENT_NAME, "ERROR", "Task ID is empty", true] call forge_server_main_fnc_log}; + +// Assign unit to taskID +SETVAR(_entity,assignedTask,_taskID); + +// Add unit to target array +private _index = GVAR(allTargets) pushBackUnique _entity; + +// Log +// [COMPONENT_NAME, "DEBUG", format ["Unit (%1) is registered as a target. Target array: %2", _entity, str GVAR(allTargets)]] call forge_server_main_fnc_log; + +// if (_index == -1) then { +// [COMPONENT_NAME, "WARNING", format ["Unit (%1) is already a target", _entity], true] call forge_server_main_fnc_log; +// }; \ No newline at end of file diff --git a/addons/task/script_component.hpp b/addons/task/script_component.hpp new file mode 100644 index 0000000..fd82767 --- /dev/null +++ b/addons/task/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT task +#define COMPONENT_BEAUTIFIED Task +#include "\z\forge_client\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_TASK + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_TASK + #define DEBUG_SETTINGS DEBUG_SETTINGS_TASK +#endif + +#include "\z\forge_client\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/icon_128_ca.paa b/icon_128_ca.paa new file mode 100644 index 0000000..3853600 Binary files /dev/null and b/icon_128_ca.paa differ diff --git a/icon_128_highlight_ca.paa b/icon_128_highlight_ca.paa new file mode 100644 index 0000000..70c69cf Binary files /dev/null and b/icon_128_highlight_ca.paa differ diff --git a/icon_64_ca.paa b/icon_64_ca.paa new file mode 100644 index 0000000..493c58d Binary files /dev/null and b/icon_64_ca.paa differ diff --git a/include/a3/data_f/$PBOPREFIX$ b/include/a3/data_f/$PBOPREFIX$ new file mode 100644 index 0000000..7476149 --- /dev/null +++ b/include/a3/data_f/$PBOPREFIX$ @@ -0,0 +1 @@ +a3\data_f \ No newline at end of file diff --git a/include/a3/data_f/default.rvmat b/include/a3/data_f/default.rvmat new file mode 100644 index 0000000..776b71f --- /dev/null +++ b/include/a3/data_f/default.rvmat @@ -0,0 +1,12 @@ +ambient[]={1,1,1,1}; +diffuse[]={1,1,1,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0,0,0,0}; +specularPower=0; +PixelShaderID="Normal"; +VertexShaderID="Basic"; +class StageTI +{ + texture="a3\data_f\default_vehicle_ti_ca.paa"; +}; diff --git a/include/a3/data_f/default_vehicle_ti_ca.paa b/include/a3/data_f/default_vehicle_ti_ca.paa new file mode 100644 index 0000000..53ca8a6 Binary files /dev/null and b/include/a3/data_f/default_vehicle_ti_ca.paa differ diff --git a/include/a3/data_f/penetration/cloth.rvmat b/include/a3/data_f/penetration/cloth.rvmat new file mode 100644 index 0000000..c83e3e7 --- /dev/null +++ b/include/a3/data_f/penetration/cloth.rvmat @@ -0,0 +1,3 @@ +surfaceInfo="A3\data_f\Penetration\cloth.bisurf"; +diffuse[]={0.75,0.80000001,0.30000001,1}; +ambient[]={0.75,0.80000001,0.30000001,1}; diff --git a/include/a3/data_f/penetration/default.rvmat b/include/a3/data_f/penetration/default.rvmat new file mode 100644 index 0000000..1ac19d7 --- /dev/null +++ b/include/a3/data_f/penetration/default.rvmat @@ -0,0 +1,9 @@ +surfaceInfo="A3\data_f\Penetration\default.bisurf"; +ambient[]={0.48699999,0.32800001,0.249,1}; +diffuse[]={0.48699999,0.32800001,0.249,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0,0,0,1}; +specularPower=1; +PixelShaderID="Normal"; +VertexShaderID="Basic"; diff --git a/include/a3/data_f/penetration/metal.rvmat b/include/a3/data_f/penetration/metal.rvmat new file mode 100644 index 0000000..261639d --- /dev/null +++ b/include/a3/data_f/penetration/metal.rvmat @@ -0,0 +1,9 @@ +surfaceInfo="A3\data_f\Penetration\metal.bisurf"; +ambient[]={0.69999999,0.80000001,0.77999997,1}; +diffuse[]={0.69999999,0.80000001,0.77999997,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0,0,0,1}; +specularPower=1; +PixelShaderID="Normal"; +VertexShaderID="Basic"; diff --git a/include/a3/data_f/penetration/metal_plate.rvmat b/include/a3/data_f/penetration/metal_plate.rvmat new file mode 100644 index 0000000..3b19c02 --- /dev/null +++ b/include/a3/data_f/penetration/metal_plate.rvmat @@ -0,0 +1,9 @@ +surfaceInfo="A3\data_f\Penetration\metal_plate.bisurf"; +ambient[]={0.69999999,0.80000001,0.77999997,1}; +diffuse[]={0.69999999,0.80000001,0.77999997,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0,0,0,1}; +specularPower=1; +PixelShaderID="Normal"; +VertexShaderID="Basic"; diff --git a/include/a3/data_f/penetration/metal_plate_thin.rvmat b/include/a3/data_f/penetration/metal_plate_thin.rvmat new file mode 100644 index 0000000..8d479ba --- /dev/null +++ b/include/a3/data_f/penetration/metal_plate_thin.rvmat @@ -0,0 +1,9 @@ +surfaceInfo="A3\data_f\Penetration\metal_plate_thin.bisurf"; +ambient[]={0.69999999,0.80000001,0.77999997,1}; +diffuse[]={0.69999999,0.80000001,0.77999997,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0,0,0,1}; +specularPower=1; +PixelShaderID="Normal"; +VertexShaderID="Basic"; diff --git a/include/a3/data_f/penetration/plastic.rvmat b/include/a3/data_f/penetration/plastic.rvmat new file mode 100644 index 0000000..223c012 --- /dev/null +++ b/include/a3/data_f/penetration/plastic.rvmat @@ -0,0 +1,3 @@ +surfaceInfo="A3\data_f\Penetration\plastic.bisurf"; +diffuse[]={0.89999998,0.80000001,0.60000002,1}; +ambient[]={0.89999998,0.80000001,0.60000002,1}; diff --git a/include/a3/data_f/penetration/tyre.rvmat b/include/a3/data_f/penetration/tyre.rvmat new file mode 100644 index 0000000..711d3fa --- /dev/null +++ b/include/a3/data_f/penetration/tyre.rvmat @@ -0,0 +1,3 @@ +surfaceInfo="A3\data_f\Penetration\tyre.bisurf"; +diffuse[]={0.1,0.1,0.1,1}; +ambient[]={0.1,0.1,0.1,1}; diff --git a/include/a3/data_f/penetration/wood.rvmat b/include/a3/data_f/penetration/wood.rvmat new file mode 100644 index 0000000..466b9eb --- /dev/null +++ b/include/a3/data_f/penetration/wood.rvmat @@ -0,0 +1,9 @@ +surfaceInfo="A3\data_f\Penetration\wood.bisurf"; +ambient[]={0.5,0.25,0,1}; +diffuse[]={0.5,0.25,0,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0,0,0,1}; +specularPower=1; +PixelShaderID="Normal"; +VertexShaderID="Basic"; diff --git a/include/a3/editor_f/$PBOPREFIX$ b/include/a3/editor_f/$PBOPREFIX$ new file mode 100644 index 0000000..41706ef --- /dev/null +++ b/include/a3/editor_f/$PBOPREFIX$ @@ -0,0 +1 @@ +a3\editor_f \ No newline at end of file diff --git a/include/a3/editor_f/data/scripts/dikCodes.h b/include/a3/editor_f/data/scripts/dikCodes.h new file mode 100644 index 0000000..b1734fa --- /dev/null +++ b/include/a3/editor_f/data/scripts/dikCodes.h @@ -0,0 +1,181 @@ +#ifndef DIK_ESCAPE + +/**************************************************************************** + * + * DirectInput keyboard scan codes + * + ****************************************************************************/ + +#define DIK_ESCAPE 0x01 +#define DIK_1 0x02 +#define DIK_2 0x03 +#define DIK_3 0x04 +#define DIK_4 0x05 +#define DIK_5 0x06 +#define DIK_6 0x07 +#define DIK_7 0x08 +#define DIK_8 0x09 +#define DIK_9 0x0A +#define DIK_0 0x0B +#define DIK_MINUS 0x0C /* - on main keyboard */ +#define DIK_EQUALS 0x0D +#define DIK_BACK 0x0E /* backspace */ +#define DIK_TAB 0x0F +#define DIK_Q 0x10 +#define DIK_W 0x11 +#define DIK_E 0x12 +#define DIK_R 0x13 +#define DIK_T 0x14 +#define DIK_Y 0x15 +#define DIK_U 0x16 +#define DIK_I 0x17 +#define DIK_O 0x18 +#define DIK_P 0x19 +#define DIK_LBRACKET 0x1A +#define DIK_RBRACKET 0x1B +#define DIK_RETURN 0x1C /* Enter on main keyboard */ +#define DIK_LCONTROL 0x1D +#define DIK_A 0x1E +#define DIK_S 0x1F +#define DIK_D 0x20 +#define DIK_F 0x21 +#define DIK_G 0x22 +#define DIK_H 0x23 +#define DIK_J 0x24 +#define DIK_K 0x25 +#define DIK_L 0x26 +#define DIK_SEMICOLON 0x27 +#define DIK_APOSTROPHE 0x28 +#define DIK_GRAVE 0x29 /* accent grave */ +#define DIK_LSHIFT 0x2A +#define DIK_BACKSLASH 0x2B +#define DIK_Z 0x2C +#define DIK_X 0x2D +#define DIK_C 0x2E +#define DIK_V 0x2F +#define DIK_B 0x30 +#define DIK_N 0x31 +#define DIK_M 0x32 +#define DIK_COMMA 0x33 +#define DIK_PERIOD 0x34 /* . on main keyboard */ +#define DIK_SLASH 0x35 /* / on main keyboard */ +#define DIK_RSHIFT 0x36 +#define DIK_MULTIPLY 0x37 /* * on numeric keypad */ +#define DIK_LMENU 0x38 /* left Alt */ +#define DIK_SPACE 0x39 +#define DIK_CAPITAL 0x3A +#define DIK_F1 0x3B +#define DIK_F2 0x3C +#define DIK_F3 0x3D +#define DIK_F4 0x3E +#define DIK_F5 0x3F +#define DIK_F6 0x40 +#define DIK_F7 0x41 +#define DIK_F8 0x42 +#define DIK_F9 0x43 +#define DIK_F10 0x44 +#define DIK_NUMLOCK 0x45 +#define DIK_SCROLL 0x46 /* Scroll Lock */ +#define DIK_NUMPAD7 0x47 +#define DIK_NUMPAD8 0x48 +#define DIK_NUMPAD9 0x49 +#define DIK_SUBTRACT 0x4A /* - on numeric keypad */ +#define DIK_NUMPAD4 0x4B +#define DIK_NUMPAD5 0x4C +#define DIK_NUMPAD6 0x4D +#define DIK_ADD 0x4E /* + on numeric keypad */ +#define DIK_NUMPAD1 0x4F +#define DIK_NUMPAD2 0x50 +#define DIK_NUMPAD3 0x51 +#define DIK_NUMPAD0 0x52 +#define DIK_DECIMAL 0x53 /* . on numeric keypad */ +#define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */ +#define DIK_F11 0x57 +#define DIK_F12 0x58 + +#define DIK_F13 0x64 /* (NEC PC98) */ +#define DIK_F14 0x65 /* (NEC PC98) */ +#define DIK_F15 0x66 /* (NEC PC98) */ + +#define DIK_KANA 0x70 /* (Japanese keyboard) */ +#define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */ +#define DIK_CONVERT 0x79 /* (Japanese keyboard) */ +#define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */ +#define DIK_YEN 0x7D /* (Japanese keyboard) */ +#define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */ +#define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */ +#define DIK_PREVTRACK 0x90 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */ +#define DIK_AT 0x91 /* (NEC PC98) */ +#define DIK_COLON 0x92 /* (NEC PC98) */ +#define DIK_UNDERLINE 0x93 /* (NEC PC98) */ +#define DIK_KANJI 0x94 /* (Japanese keyboard) */ +#define DIK_STOP 0x95 /* (NEC PC98) */ +#define DIK_AX 0x96 /* (Japan AX) */ +#define DIK_UNLABELED 0x97 /* (J3100) */ +#define DIK_NEXTTRACK 0x99 /* Next Track */ +#define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */ +#define DIK_RCONTROL 0x9D +#define DIK_MUTE 0xA0 /* Mute */ +#define DIK_CALCULATOR 0xA1 /* Calculator */ +#define DIK_PLAYPAUSE 0xA2 /* Play / Pause */ +#define DIK_MEDIASTOP 0xA4 /* Media Stop */ +#define DIK_VOLUMEDOWN 0xAE /* Volume - */ +#define DIK_VOLUMEUP 0xB0 /* Volume + */ +#define DIK_WEBHOME 0xB2 /* Web home */ +#define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */ +#define DIK_DIVIDE 0xB5 /* / on numeric keypad */ +#define DIK_SYSRQ 0xB7 +#define DIK_RMENU 0xB8 /* right Alt */ +#define DIK_PAUSE 0xC5 /* Pause */ +#define DIK_HOME 0xC7 /* Home on arrow keypad */ +#define DIK_UP 0xC8 /* UpArrow on arrow keypad */ +#define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */ +#define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */ +#define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */ +#define DIK_END 0xCF /* End on arrow keypad */ +#define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */ +#define DIK_NEXT 0xD1 /* PgDn on arrow keypad */ +#define DIK_INSERT 0xD2 /* Insert on arrow keypad */ +#define DIK_DELETE 0xD3 /* Delete on arrow keypad */ +#define DIK_LWIN 0xDB /* Left Windows key */ +#define DIK_RWIN 0xDC /* Right Windows key */ +#define DIK_APPS 0xDD /* AppMenu key */ +#define DIK_POWER 0xDE /* System Power */ +#define DIK_SLEEP 0xDF /* System Sleep */ +#define DIK_WAKE 0xE3 /* System Wake */ +#define DIK_WEBSEARCH 0xE5 /* Web Search */ +#define DIK_WEBFAVORITES 0xE6 /* Web Favorites */ +#define DIK_WEBREFRESH 0xE7 /* Web Refresh */ +#define DIK_WEBSTOP 0xE8 /* Web Stop */ +#define DIK_WEBFORWARD 0xE9 /* Web Forward */ +#define DIK_WEBBACK 0xEA /* Web Back */ +#define DIK_MYCOMPUTER 0xEB /* My Computer */ +#define DIK_MAIL 0xEC /* Mail */ +#define DIK_MEDIASELECT 0xED /* Media Select */ + +/* + * Alternate names for keys, to facilitate transition from DOS. + */ +#define DIK_BACKSPACE DIK_BACK /* backspace */ +#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */ +#define DIK_LALT DIK_LMENU /* left Alt */ +#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */ +#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */ +#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */ +#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */ +#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */ +#define DIK_RALT DIK_RMENU /* right Alt */ +#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */ +#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */ +#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */ +#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */ +#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */ +#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */ + +/* + * Alternate names for keys originally not used on US keyboards. + */ +#define DIK_CIRCUMFLEX DIK_PREVTRACK /* Japanese keyboard */ + +#endif /* DIK_ESCAPE */ + diff --git a/include/a3/ui_f/$PBOPREFIX$ b/include/a3/ui_f/$PBOPREFIX$ new file mode 100644 index 0000000..bcaad3e --- /dev/null +++ b/include/a3/ui_f/$PBOPREFIX$ @@ -0,0 +1 @@ +a3\ui_f \ No newline at end of file diff --git a/include/a3/ui_f/hpp/defineCommonColors.inc b/include/a3/ui_f/hpp/defineCommonColors.inc new file mode 100644 index 0000000..5370c07 --- /dev/null +++ b/include/a3/ui_f/hpp/defineCommonColors.inc @@ -0,0 +1,316 @@ +/////////////////////////////////////////////////////////////////////////// +/// GUI +/////////////////////////////////////////////////////////////////////////// + +//--- Background color with defaults (not multipliable) +#define GUI_BCG_RGB_R "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])" +#define GUI_BCG_RGB_G "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])" +#define GUI_BCG_RGB_B "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])" +#define GUI_BCG_ALPHA "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])" + +#define GUI_BCG_RGB GUI_BCG_RGB_R, GUI_BCG_RGB_G, GUI_BCG_RGB_B +#define GUI_BCG_COLOR {GUI_BCG_RGB,GUI_BCG_ALPHA} +#define GUI_BCG_COLOR_SELECTED {GUI_BCG_RGB,0.5} + +//--- TitleBar text color +#define GUI_TITLETEXT_RGB_R "(profilenamespace getvariable ['GUI_TITLETEXT_RGB_R',1.0])" +#define GUI_TITLETEXT_RGB_G "(profilenamespace getvariable ['GUI_TITLETEXT_RGB_G',1.0])" +#define GUI_TITLETEXT_RGB_B "(profilenamespace getvariable ['GUI_TITLETEXT_RGB_B',1.0])" +#define GUI_TITLETEXT_ALPHA "(profilenamespace getvariable ['GUI_TITLETEXT_RGB_A',0.6])" +#define GUI_TITLETEXT_COLOR {GUI_TITLETEXT_RGB_R, GUI_TITLETEXT_RGB_G, GUI_TITLETEXT_RGB_B, GUI_TITLETEXT_ALPHA} + +//--- Background for wGUI displays +#define GUI_BCG_MENU_RGB 0, 0, 0 +#define GUI_BCG_MENU {GUI_BCG_MENU_RGB, 0.7} + +//--- Background for editor +#define GUI_BCG_EDITOR_RGB 0.1, 0.1, 0.1 +#define GUI_BCG_EDITOR {GUI_BCG_EDITOR_RGB, 1} + +//--- Medium background (obsolete; Dwarden's displays) +#define GUI_BCG_MEDIUM_RGB GUI_BCG_RGB +#define GUI_BCG_MEDIUM_ALPHA GUI_BCG_ALPHA +#define GUI_BCG_MEDIUM_COLOR {GUI_BCG_MEDIUM_RGB,GUI_BCG_MEDIUM_ALPHA} + +//--- Dark background (HUD) +#define GUI_BCG_DARK_RGB GUI_BCG_RGB +#define GUI_BCG_DARK_ALPHA 0.85 +#define GUI_BCG_DARK_COLOR {GUI_BCG_DARK_RGB,GUI_BCG_DARK_ALPHA} +#define GUI_BCG_DARK_TRANSPARENT {GUI_BCG_DARK_RGB,GUI_BCG_DARK_ALPHA / 2} + +//--- Active color (inversed to selected color) +#define GUI_BCG_ACTIVE_RGB 1, 1, 1 + +//--- Warning color (exit buttons) +#define GUI_BCG_ERROR_RGB 0.7, 0, 0 + +//--- Text color +#define GUI_TEXT_RGB 1, 1, 1 +#define GUI_TEXT_ALPHA 1.0 +#define GUI_TEXT_COLOR {GUI_TEXT_RGB,GUI_TEXT_ALPHA} +#define GUI_TEXT_SHADOW {0,0,0,0.5} +#define GUI_TEXT_HTML_COLOR "#ffffff" +#define GUI_TEXT_HTML_SHADOW "#80000000" + +//--- List: text colors and background highlight +#define GUI_LIST_TEXT_COLOR {GUI_TEXT_RGB,0.8} +#define GUI_LIST_TEXT_COLOR_SELECTED {GUI_TEXT_RGB,1.0} +#define GUI_LIST_BCG_SELECTED {0,0,0,0.2} + +//--- Tooltip colours +#define GUI_TOOLTIP_TEXT_COLOR {1, 1, 1, 1} +#define GUI_TOOLTIP_BOX_COLOR {1, 1, 1, 1} +#define GUI_TOOLTIP_SHADE_COLOR {0, 0, 0, 0.65} + + +/////////////////////////////////////////////////////////////////////////// +/// iGUI +/////////////////////////////////////////////////////////////////////////// +//--- IGUI Background color +#define IGUI_BCG_RGB_R "(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])" +#define IGUI_BCG_RGB_G "(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])" +#define IGUI_BCG_RGB_B "(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])" +#define IGUI_BCG_RGB_A "(profilenamespace getvariable ['IGUI_BCG_RGB_A',0.8])" +#define IGUI_BCG_RGB IGUI_BCG_RGB_R, IGUI_BCG_RGB_G, IGUI_BCG_RGB_B +#define IGUI_BCG_COLOR {IGUI_BCG_RGB,IGUI_BCG_RGB_A} + +//--- IGUI Text color +#define IGUI_TEXT_RGB_R "(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])" +#define IGUI_TEXT_RGB_G "(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])" +#define IGUI_TEXT_RGB_B "(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])" +#define IGUI_TEXT_RGB_A "(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])" +#define IGUI_TEXT_RGB IGUI_TEXT_RGB_R, IGUI_TEXT_RGB_G, IGUI_TEXT_RGB_B +#define IGUI_TEXT_COLOR {IGUI_TEXT_RGB,IGUI_TEXT_RGB_A} + +//--- IGUI Warning color +#define IGUI_WARNING_RGB_R "(profilenamespace getvariable ['IGUI_WARNING_RGB_R',0.8])" +#define IGUI_WARNING_RGB_G "(profilenamespace getvariable ['IGUI_WARNING_RGB_G',0.5])" +#define IGUI_WARNING_RGB_B "(profilenamespace getvariable ['IGUI_WARNING_RGB_B',0.0])" +#define IGUI_WARNING_RGB_A "(profilenamespace getvariable ['IGUI_WARNING_RGB_A',0.8])" +#define IGUI_WARNING_RGB IGUI_WARNING_RGB_R, IGUI_WARNING_RGB_G, IGUI_WARNING_RGB_B +#define IGUI_WARNING_COLOR {IGUI_WARNING_RGB,IGUI_WARNING_RGB_A} + +//--- IGUI Error color +#define IGUI_ERROR_RGB_R "(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])" +#define IGUI_ERROR_RGB_G "(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])" +#define IGUI_ERROR_RGB_B "(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])" +#define IGUI_ERROR_RGB_A "(profilenamespace getvariable ['IGUI_ERROR_RGB_A',1.0])" +#define IGUI_ERROR_RGB IGUI_ERROR_RGB_R, IGUI_ERROR_RGB_G, IGUI_ERROR_RGB_B +#define IGUI_ERROR_COLOR {IGUI_ERROR_RGB,IGUI_ERROR_RGB_A} + +//--- IGUI Tactical ping color +#define IGUI_TACTPING_RGB_R "(profilenamespace getvariable ['IGUI_TACTPING_RGB_R',1.0])" +#define IGUI_TACTPING_RGB_G "(profilenamespace getvariable ['IGUI_TACTPING_RGB_G',0.8])" +#define IGUI_TACTPING_RGB_B "(profilenamespace getvariable ['IGUI_TACTPING_RGB_B',0.2])" +#define IGUI_TACTPING_RGB_A "(profilenamespace getvariable ['IGUI_TACTPING_RGB_A',1.0])" +#define IGUI_TACTPING_RGB IGUI_TACTPING_RGB_R, IGUI_TACTPING_RGB_G, IGUI_TACTPING_RGB_B +#define IGUI_TACTPING_COLOR {IGUI_TACTPING_RGB,IGUI_TACTPING_RGB_A} + +//--- HUD Text color (obsolete defines; ToDo: Replace with IGUI_TEXT_COLOR and IGUI_BCG_COLOR) +#define CA_UI_HUD IGUI_TEXT_COLOR + + + +/////////////////////////////////////////////////////////////////////////// +/// Sides +/////////////////////////////////////////////////////////////////////////// + +//--- BLUFOR +#define Map_BLUFOR_R "(profilenamespace getvariable ['Map_BLUFOR_R',0])" +#define Map_BLUFOR_G "(profilenamespace getvariable ['Map_BLUFOR_G',1])" +#define Map_BLUFOR_B "(profilenamespace getvariable ['Map_BLUFOR_B',1])" +#define Map_BLUFOR_A "(profilenamespace getvariable ['Map_BLUFOR_A',0.8])" +#define Map_BLUFOR_RGB Map_BLUFOR_R, Map_BLUFOR_G, Map_BLUFOR_B +#define Map_BLUFOR_RGBA {Map_BLUFOR_RGB,Map_BLUFOR_A} + +//--- OPFOR +#define Map_OPFOR_R "(profilenamespace getvariable ['Map_OPFOR_R',0])" +#define Map_OPFOR_G "(profilenamespace getvariable ['Map_OPFOR_G',1])" +#define Map_OPFOR_B "(profilenamespace getvariable ['Map_OPFOR_B',1])" +#define Map_OPFOR_A "(profilenamespace getvariable ['Map_OPFOR_A',0.8])" +#define Map_OPFOR_RGB Map_OPFOR_R, Map_OPFOR_G, Map_OPFOR_B +#define Map_OPFOR_RGBA {Map_OPFOR_RGB,Map_OPFOR_A} + +//--- Independent +#define Map_Independent_R "(profilenamespace getvariable ['Map_Independent_R',0])" +#define Map_Independent_G "(profilenamespace getvariable ['Map_Independent_G',1])" +#define Map_Independent_B "(profilenamespace getvariable ['Map_Independent_B',1])" +#define Map_Independent_A "(profilenamespace getvariable ['Map_Independent_A',0.8])" +#define Map_Independent_RGB Map_Independent_R, Map_Independent_G, Map_Independent_B +#define Map_Independent_RGBA {Map_Independent_RGB,Map_Independent_A} + +//--- Civilian +#define Map_Civilian_R "(profilenamespace getvariable ['Map_Civilian_R',0])" +#define Map_Civilian_G "(profilenamespace getvariable ['Map_Civilian_G',1])" +#define Map_Civilian_B "(profilenamespace getvariable ['Map_Civilian_B',1])" +#define Map_Civilian_A "(profilenamespace getvariable ['Map_Civilian_A',0.8])" +#define Map_Civilian_RGB Map_Civilian_R, Map_Civilian_G, Map_Civilian_B +#define Map_Civilian_RGBA {Map_Civilian_RGB,Map_Civilian_A} + +//--- Unknown +#define Map_Unknown_R "(profilenamespace getvariable ['Map_Unknown_R',0])" +#define Map_Unknown_G "(profilenamespace getvariable ['Map_Unknown_G',1])" +#define Map_Unknown_B "(profilenamespace getvariable ['Map_Unknown_B',1])" +#define Map_Unknown_A "(profilenamespace getvariable ['Map_Unknown_A',0.8])" +#define Map_Unknown_RGB Map_Unknown_R, Map_Unknown_G, Map_Unknown_B +#define Map_Unknown_RGBA {Map_Unknown_RGB,Map_Unknown_A} + + + +/////////////////////////////////////////////////////////////////////////// +/// Misc +/////////////////////////////////////////////////////////////////////////// +//overwritten by Warka +#define CA_UI_ACTION {0.9,0.9,0.9,0.4} +#define CA_UI_ACTION_AVAILABLE IGUI_TEXT_COLOR +#define CA_UI_ACTION_ACTIVE {0.24,0.87,0,0.8} +#define CA_IGUI_Green {0.709,0.972,0.384,1} +#define CA_IGUI_GreenDark {0.259,0.463,0.149, 1} //MUF-added from A3 //{0.659,0.863,0.549,0.6} +#define CA_IGUI_Background IGUI_BCG_COLOR + +#define Color_Orange {GUI_BCG_RGB, 1} +#define Color_DarkOrange {GUI_BCG_MEDIUM_RGB, 0.7} + +#define CA_colordark {0, 0, 0, 1} +#define CA_UI_element_background Color_White +#define CA_UI_background {0.6, 0.6, 0.6, 0.4} +#define CA_UI_title_background {0.1961,0.1451,0.0941,1.0} +#define CA_UI_green {0.709,0.972,0.384,1} +#define CA_UI_red {0.58, 0.1147, 0.1108, 1} + +#define CA_UI_grey {0.4,0.4,0.4,1} +#define CA_UI_transparent {1,1,1,0} + +#define CA_IGUI_Red {0.706,0.0745,0.0196,1} +#define CA_IGUI_Orange {0.863,0.584,0.0,1} +#define CA_IGUI_YellowGreen {0.8275,0.8196,0.1961,1.0} +#define CA_IGUI_Blue {0.196,0.592,0.706, 1} +#define CA_IGUI_Grey {0.606,0.606,0.606,1} + +#define Color_White {0.95, 0.95, 0.95, 1} +//#define Color_Black {0.023529, 0, 0.0313725, 1} +#define Color_Black {0, 0, 0, 1} +#define Color_Gray {1, 1, 1, 0.5} +#define Color_Empty {0, 0, 0, 0} + +#define Color_Back {0.1, 0.1, 0.1, 0.4} +#define Color_BackList {0.2, 0.2, 0.2, 0.2} + +#define ProcTextWhite "#(argb,8,8,3)color(1,1,1,1)" +#define ProcTextBlack "#(argb,8,8,3)color(0,0,0,1)" +#define ProcTextGray "#(argb,8,8,3)color(0.3,0.3,0.3,1)" +#define ProcTextRed "#(argb,8,8,3)color(1,0,0,1)" +#define ProcTextGreen "#(argb,8,8,3)color(0,1,0,1)" +#define ProcTextBlue "#(argb,8,8,3)color(0,0,1,1)" +#define ProcTextOrange "#(argb,8,8,3)color(1,0.5,0,1)" +#define ProcTextTransparent "#(argb,8,8,3)color(0,0,0,0)" +#define ProcTextHUD "#(argb,8,8,3)color(0.600,0.8392,0.4706,1.0)" +#define ProcTextPurple "#(argb,8,8,3)color(0.75,0,0.75,1)" + + +/////////////////////////////////////////////////////////////////////////// +/// Task colors: 3D task marker +/////////////////////////////////////////////////////////////////////////// +#define COLOR_TASK_ICON_UNASSIGNED_RGB 1,1,1 +#define COLOR_TASK_ICON_UNASSIGNED_A 0.5 +#define COLOR_TASK_ICON_UNASSIGNED_RGBA COLOR_TASK_ICON_UNASSIGNED_RGB,COLOR_TASK_ICON_UNASSIGNED_A +#define COLOR_TASK_ICON_ASSIGNED_RGB 1,0.72,0.3 +#define COLOR_TASK_ICON_ASSIGNED_A 0.5 +#define COLOR_TASK_ICON_ASSIGNED_RGBA COLOR_TASK_ICON_ASSIGNED_RGB,COLOR_TASK_ICON_ASSIGNED_A +#define COLOR_TASK_ICON_CUSTOM_RGB 0.3,0.72,1 +#define COLOR_TASK_ICON_CUSTOM_A 0.5 +#define COLOR_TASK_ICON_CUSTOM_RGBA COLOR_TASK_ICON_CUSTOM_RGB,COLOR_TASK_ICON_CUSTOM_A + +#define COLOR_TASK_BACKGROUND_UNASSIGNED_RGB 1,1,1 +#define COLOR_TASK_BACKGROUND_UNASSIGNED_A 1 +#define COLOR_TASK_BACKGROUND_UNASSIGNED_RGBA COLOR_TASK_BACKGROUND_UNASSIGNED_RGB,COLOR_TASK_BACKGROUND_UNASSIGNED_A +#define COLOR_TASK_BACKGROUND_ASSIGNED_RGB 1,0.72,0.3 +#define COLOR_TASK_BACKGROUND_ASSIGNED_A 1 +#define COLOR_TASK_BACKGROUND_ASSIGNED_RGBA COLOR_TASK_BACKGROUND_ASSIGNED_RGB,COLOR_TASK_BACKGROUND_ASSIGNED_A +#define COLOR_TASK_BACKGROUND_CUSTOM_RGB 0.3,0.72,1 +#define COLOR_TASK_BACKGROUND_CUSTOM_A 1 +#define COLOR_TASK_BACKGROUND_CUSTOM_RGBA COLOR_TASK_BACKGROUND_CUSTOM_RGB,COLOR_TASK_BACKGROUND_CUSTOM_A + + +#define COLOR_TASK_TEXT_UNASSIGNED_RGB 0.91,0.91,0.91 +#define COLOR_TASK_TEXT_UNASSIGNED_A 0.55 +#define COLOR_TASK_TEXT_UNASSIGNED_RGBA COLOR_TASK_TEXT_UNASSIGNED_RGB,COLOR_TASK_TEXT_UNASSIGNED_A +#define COLOR_TASK_TEXT_ASSIGNED_RGB 0.91,0.65,0.27 +#define COLOR_TASK_TEXT_ASSIGNED_A 0.55 +#define COLOR_TASK_TEXT_ASSIGNED_RGBA COLOR_TASK_TEXT_ASSIGNED_RGB,COLOR_TASK_TEXT_ASSIGNED_A +#define COLOR_TASK_TEXT_CUSTOM_RGB 0.27,0.65,0.91 +#define COLOR_TASK_TEXT_CUSTOM_A 0.55 +#define COLOR_TASK_TEXT_CUSTOM_RGBA COLOR_TASK_TEXT_CUSTOM_RGB,COLOR_TASK_TEXT_CUSTOM_A + + +/////////////////////////////////////////////////////////////////////////// +/// Task colors: generic +/////////////////////////////////////////////////////////////////////////// +#define COLOR_TASK_UNASSIGNED_RGB COLOR_TASK_BACKGROUND_UNASSIGNED_RGB +#define COLOR_TASK_UNASSIGNED_RGBA COLOR_TASK_UNASSIGNED_RGB,1 + +#define COLOR_TASK_ASSIGNED_RGB COLOR_TASK_BACKGROUND_ASSIGNED_RGB +#define COLOR_TASK_ASSIGNED_RGBA COLOR_TASK_ASSIGNED_RGB,1 + +#define COLOR_TASK_CUSTOM_RGB COLOR_TASK_BACKGROUND_CUSTOM_RGB +#define COLOR_TASK_CUSTOM_RGBA COLOR_TASK_CUSTOM_RGB,1 + +//navigation elements +#define IGUI_CURSOR_COLOR {COLOR_TASK_TEXT_UNASSIGNED_RGBA} + +/////////////////////////////////////////////////////////////////////////// +/// Custom info / Sensors (duplicated in \A3\cfgSensors.hpp !!!) +/////////////////////////////////////////////////////////////////////////// + +#define COLOR_SENSORS_RADAR_RGB 0.0,1.0,1.0 +#define COLOR_SENSORS_RADAR_A 1.0 +#define COLOR_SENSORS_RADAR_RGBA {COLOR_SENSORS_RADAR_RGB,COLOR_SENSORS_RADAR_A} + +#define COLOR_SENSORS_IR_RGB 1.0,0.0,0.0 +#define COLOR_SENSORS_IR_A 1.0 +#define COLOR_SENSORS_IR_RGBA {COLOR_SENSORS_IR_RGB,COLOR_SENSORS_IR_A} + +#define COLOR_SENSORS_RWR_RGB 0.5, 1, 0.5 +#define COLOR_SENSORS_RWR_A 0.5 +#define COLOR_SENSORS_RWR_RGBA {COLOR_SENSORS_RWR_RGB,COLOR_SENSORS_RWR_A} + +#define COLOR_SENSORS_NV_RGB 1,1,1 +#define COLOR_SENSORS_NV_A 0 +#define COLOR_SENSORS_NV_RGBA {COLOR_SENSORS_NV_RGB,COLOR_SENSORS_NV_A} + +#define COLOR_SENSORS_LAS_RGB 1,1,1 +#define COLOR_SENSORS_LAS_A 0 +#define COLOR_SENSORS_LAS_RGBA {COLOR_SENSORS_LAS_RGB,COLOR_SENSORS_LAS_A} + +#define COLOR_SENSORS_VIS_RGB 1.0,1.0,0.5 +#define COLOR_SENSORS_VIS_A 0.8 +#define COLOR_SENSORS_VIS_RGBA {COLOR_SENSORS_VIS_RGB,COLOR_SENSORS_VIS_A} + +#define COLOR_SENSORS_MAN_RGB 1.0, 0.5, 1.0 +#define COLOR_SENSORS_MAN_A 1.0 +#define COLOR_SENSORS_MAN_RGBA {COLOR_SENSORS_MAN_RGB,COLOR_SENSORS_MAN_A} + + +#define COLOR_SENSORS_ENEMY_RGB 1.0, 0.0, 0.0 +#define COLOR_SENSORS_ENEMY_A 1.0 +#define COLOR_SENSORS_ENEMY_RGBA {COLOR_SENSORS_ENEMY_RGB,COLOR_SENSORS_ENEMY_A} + +#define COLOR_SENSORS_FRIENDLY_RGB 0.0, 1.0, 0.0 +#define COLOR_SENSORS_FRIENDLY_A 1.0 +#define COLOR_SENSORS_FRIENDLY_RGBA {COLOR_SENSORS_FRIENDLY_RGB,COLOR_SENSORS_FRIENDLY_A} + +#define COLOR_SENSORS_GROUP_RGB 0.7, 1.0, 0.4 +#define COLOR_SENSORS_GROUP_A 1.0 +#define COLOR_SENSORS_GROUP_RGBA {COLOR_SENSORS_GROUP_RGB,COLOR_SENSORS_GROUP_A} + +#define COLOR_SENSORS_WARNING_RGB 1.0, 1.0, 0.0 +#define COLOR_SENSORS_WARNING_A 1.0 +#define COLOR_SENSORS_WARNING_RGBA {COLOR_SENSORS_WARNING_RGB,COLOR_SENSORS_WARNING_A} + +#define COLOR_SENSORS_THREAT_RGB 1.0, 0.5, 0.0 +#define COLOR_SENSORS_THREAT_A 1.0 +#define COLOR_SENSORS_THREAT_RGBA {COLOR_SENSORS_THREAT_RGB,COLOR_SENSORS_THREAT_A} + +#define COLOR_SENSORS_DEFAULT_RGB 1.0, 1.0, 1.0 +#define COLOR_SENSORS_DEFAULT_A 1.0 +#define COLOR_SENSORS_DEFAULT_RGBA {COLOR_SENSORS_DEFAULT_RGB,COLOR_SENSORS_DEFAULT_A} \ No newline at end of file diff --git a/include/a3/ui_f/hpp/defineCommonGrids.inc b/include/a3/ui_f/hpp/defineCommonGrids.inc new file mode 100644 index 0000000..9574a69 --- /dev/null +++ b/include/a3/ui_f/hpp/defineCommonGrids.inc @@ -0,0 +1,464 @@ +/////////////////////////////////////////////////////////////////////////// +/// GUI +/////////////////////////////////////////////////////////////////////////// + +//--- Hack to avoid too large display upon first startup (fixed in engine) +//#define GUI_GRID_OLD_WAbs ((safezoneW / ((floor (safezoneW / safezoneH)) max 1)) min 1.2) + +//--- New grid for new A3 displays +#define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) +#define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) +#define GUI_GRID_W (GUI_GRID_WAbs / 40) +#define GUI_GRID_H (GUI_GRID_HAbs / 25) +#define GUI_GRID_X (safezoneX) +#define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) + +//--- MUF - Test grid used in MP +#define GUI_GRID_MP_WAbs GUI_GRID_WAbs +#define GUI_GRID_MP_HAbs GUI_GRID_HAbs +#define GUI_GRID_MP_W GUI_GRID_W +#define GUI_GRID_MP_H GUI_GRID_H +#define GUI_GRID_MP_X (SafezoneX) +#define GUI_GRID_MP_Y (safezoneY) + +//--- Screen Center +#define GUI_GRID_CENTER_WAbs GUI_GRID_WAbs +#define GUI_GRID_CENTER_HAbs GUI_GRID_HAbs +#define GUI_GRID_CENTER_W GUI_GRID_W +#define GUI_GRID_CENTER_H GUI_GRID_H +#define GUI_GRID_CENTER_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2) +#define GUI_GRID_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_CENTER_HAbs)/2) + +//--- Bottom center position (used by Revive UI) +#define GUI_GRID_CENTER_BOTTOM_WAbs GUI_GRID_WAbs +#define GUI_GRID_CENTER_BOTTOM_HAbs GUI_GRID_HAbs +#define GUI_GRID_CENTER_BOTTOM_W GUI_GRID_W +#define GUI_GRID_CENTER_BOTTOM_H GUI_GRID_H +#define GUI_GRID_CENTER_BOTTOM_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2) +#define GUI_GRID_CENTER_BOTTOM_Y (safezoneY + safezoneH - GUI_GRID_CENTER_HAbs) + +//--- Screen Top Center +#define GUI_GRID_TOPCENTER_WAbs GUI_GRID_WAbs +#define GUI_GRID_TOPCENTER_HAbs GUI_GRID_HAbs +#define GUI_GRID_TOPCENTER_W GUI_GRID_W +#define GUI_GRID_TOPCENTER_H GUI_GRID_H +#define GUI_GRID_TOPCENTER_X GUI_GRID_CENTER_X +#define GUI_GRID_TOPCENTER_Y safezoneY + +//--- Screen Bottom Center +#define GUI_GRID_BOTTOMCENTER_WAbs GUI_GRID_WAbs +#define GUI_GRID_BOTTOMCENTER_HAbs GUI_GRID_HAbs +#define GUI_GRID_BOTTOMCENTER_W GUI_GRID_W +#define GUI_GRID_BOTTOMCENTER_H GUI_GRID_H +#define GUI_GRID_BOTTOMCENTER_X GUI_GRID_CENTER_X +#define GUI_GRID_BOTTOMCENTER_Y GUI_GRID_Y + +//--- 2D Editor - TEST A3 +#define GUI_GRID_EDITOR_WAbs GUI_GRID_CENTER_WAbs +#define GUI_GRID_EDITOR_HAbs GUI_GRID_CENTER_HAbs +#define GUI_GRID_EDITOR_W GUI_GRID_CENTER_W +#define GUI_GRID_EDITOR_H GUI_GRID_CENTER_H +#define GUI_GRID_EDITOR_X (safezoneX) +#define GUI_GRID_EDITOR_Y (safezoneY) + +//--- Diary +#define GUI_GRID_DIARY_WAbs GUI_GRID_WAbs +#define GUI_GRID_DIARY_HAbs GUI_GRID_HAbs +#define GUI_GRID_DIARY_W GUI_GRID_W +#define GUI_GRID_DIARY_H GUI_GRID_H +#define GUI_GRID_DIARY_X (safezoneX) +#define GUI_GRID_DIARY_Y (safezoneY) + +//--- Top left +#define GUI_GRID_TOPLEFT_WAbs GUI_GRID_WAbs +#define GUI_GRID_TOPLEFT_HAbs GUI_GRID_HAbs +#define GUI_GRID_TOPLEFT_W GUI_GRID_W +#define GUI_GRID_TOPLEFT_H GUI_GRID_H +#define GUI_GRID_TOPLEFT_X (safezoneX) +#define GUI_GRID_TOPLEFT_Y (safezoneY) + + +/////////////////////////////////////////////////////////////////////////// +/// iGUI +/////////////////////////////////////////////////////////////////////////// + +//--- IGUI Vehicle +#define IGUI_GRID_VEHICLE_WAbs (10 * GUI_GRID_W) +#define IGUI_GRID_VEHICLE_HAbs (4.5 * GUI_GRID_H) +#define IGUI_GRID_VEHICLE_XDef (safezoneX + 0.5 * GUI_GRID_W) +#define IGUI_GRID_VEHICLE_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_VEHICLE_X (profilenamespace getvariable ["IGUI_GRID_VEHICLE_X",IGUI_GRID_VEHICLE_XDef]) +#define IGUI_GRID_VEHICLE_Y (profilenamespace getvariable ["IGUI_GRID_VEHICLE_Y",IGUI_GRID_VEHICLE_YDef]) +#define IGUI_GRID_VEHICLE_W GUI_GRID_W +#define IGUI_GRID_VEHICLE_H GUI_GRID_H + +//--- IGUI Radar +#define IGUI_GRID_RADAR_WAbs (5.6 * GUI_GRID_W) +#define IGUI_GRID_RADAR_HAbs (5.6 * GUI_GRID_H) +#define IGUI_GRID_RADAR_XDef (safezoneX + safezoneW / 2 - 2.8 * GUI_GRID_W) +#define IGUI_GRID_RADAR_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_RADAR_X (profilenamespace getvariable ["IGUI_GRID_RADAR_X",IGUI_GRID_RADAR_XDef]) +#define IGUI_GRID_RADAR_Y (profilenamespace getvariable ["IGUI_GRID_RADAR_Y",IGUI_GRID_RADAR_YDef]) +#define IGUI_GRID_RADAR_W GUI_GRID_W +#define IGUI_GRID_RADAR_H GUI_GRID_H + +//--- IGUI Weapon +#define IGUI_GRID_WEAPON_WAbs (10 * GUI_GRID_W) +#define IGUI_GRID_WEAPON_HAbs (4.5 * GUI_GRID_H) +#define IGUI_GRID_WEAPON_XDef ((safezoneX + safezoneW) - IGUI_GRID_WEAPON_WAbs - 4.3 * GUI_GRID_W) +#define IGUI_GRID_WEAPON_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_WEAPON_X (profilenamespace getvariable ["IGUI_GRID_WEAPON_X",IGUI_GRID_WEAPON_XDef]) +#define IGUI_GRID_WEAPON_Y (profilenamespace getvariable ["IGUI_GRID_WEAPON_Y",IGUI_GRID_WEAPON_YDef]) +#define IGUI_GRID_WEAPON_W GUI_GRID_W +#define IGUI_GRID_WEAPON_H GUI_GRID_H + +//--- IGUI Stance indicator +#define IGUI_GRID_STANCE_WAbs (3.7 * GUI_GRID_W) +#define IGUI_GRID_STANCE_HAbs (3.7 * GUI_GRID_H) +#define IGUI_GRID_STANCE_XDef ((safezoneX + safezoneW) - IGUI_GRID_STANCE_WAbs - 0.5 * GUI_GRID_W) +#define IGUI_GRID_STANCE_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_STANCE_X (profilenamespace getvariable ["IGUI_GRID_STANCE_X",IGUI_GRID_STANCE_XDef]) +#define IGUI_GRID_STANCE_Y (profilenamespace getvariable ["IGUI_GRID_STANCE_Y",IGUI_GRID_STANCE_YDef]) +#define IGUI_GRID_STANCE_W GUI_GRID_W +#define IGUI_GRID_STANCE_H GUI_GRID_H + +//--- IGUI Stamina Bar +#define IGUI_GRID_STAMINA_WAbs (10 * GUI_GRID_W) +#define IGUI_GRID_STAMINA_HAbs (1 * GUI_GRID_H) +#define IGUI_GRID_STAMINA_XDef IGUI_GRID_WEAPON_XDef +#define IGUI_GRID_STAMINA_YDef (safezoneY + 4.05 * GUI_GRID_H) +#define IGUI_GRID_STAMINA_X (profilenamespace getvariable ["IGUI_GRID_STAMINA_X",IGUI_GRID_STAMINA_XDef]) +#define IGUI_GRID_STAMINA_Y (profilenamespace getvariable ["IGUI_GRID_STAMINA_Y",IGUI_GRID_STAMINA_YDef]) +#define IGUI_GRID_STAMINA_W GUI_GRID_W +#define IGUI_GRID_STAMINA_H GUI_GRID_H + +//--- IGUI Notification +#define IGUI_GRID_NOTIFICATION_WAbs (12 * GUI_GRID_W) +#define IGUI_GRID_NOTIFICATION_HAbs (6 * GUI_GRID_H) +#define IGUI_GRID_NOTIFICATION_XDef (0.5 - 6 * GUI_GRID_W) +#define IGUI_GRID_NOTIFICATION_YDef (safezoneY + 6.5 * GUI_GRID_H) +#define IGUI_GRID_NOTIFICATION_X (profilenamespace getvariable ["IGUI_GRID_NOTIFICATION_X",IGUI_GRID_NOTIFICATION_XDef]) +#define IGUI_GRID_NOTIFICATION_Y (profilenamespace getvariable ["IGUI_GRID_NOTIFICATION_Y",IGUI_GRID_NOTIFICATION_YDef]) +#define IGUI_GRID_NOTIFICATION_W GUI_GRID_W +#define IGUI_GRID_NOTIFICATION_H GUI_GRID_H + +//--- IGUI Action / Command Menu +#define IGUI_GRID_MENU_WAbs (4.5 * GUI_GRID_W) +#define IGUI_GRID_MENU_HAbs (13.5 * IGUI_TEXT_SIZE_MEDIUM) +#define IGUI_GRID_MENU_XDef (1.5 * GUI_GRID_W + safezoneX) +#define IGUI_GRID_MENU_YDef (5 * GUI_GRID_H + safezoneY) +#define IGUI_GRID_MENU_X (profilenamespace getvariable ["IGUI_GRID_MENU_X",IGUI_GRID_MENU_XDef]) +#define IGUI_GRID_MENU_Y (profilenamespace getvariable ["IGUI_GRID_MENU_Y",IGUI_GRID_MENU_YDef]) +#define IGUI_GRID_MENU_W GUI_GRID_W +#define IGUI_GRID_MENU_H GUI_GRID_H + +//--- IGUI Communication menu icons +#define IGUI_GRID_COMM_WAbs (1.5 * GUI_GRID_W) +#define IGUI_GRID_COMM_HAbs (15 * GUI_GRID_H) +#define IGUI_GRID_COMM_XDef (0 * GUI_GRID_W + safezoneX) +#define IGUI_GRID_COMM_YDef (5 * GUI_GRID_H + safezoneY) +#define IGUI_GRID_COMM_X (profilenamespace getvariable ["IGUI_GRID_COMM_X",IGUI_GRID_COMM_XDef]) +#define IGUI_GRID_COMM_Y (profilenamespace getvariable ["IGUI_GRID_COMM_Y",IGUI_GRID_COMM_YDef]) +#define IGUI_GRID_COMM_W GUI_GRID_W +#define IGUI_GRID_COMM_H GUI_GRID_H + +//--- IGUI Hint +#define IGUI_GRID_HINT_WAbs (12 * GUI_GRID_W) +#define IGUI_GRID_HINT_HAbs (8 * GUI_GRID_H) +#define IGUI_GRID_HINT_XDef ((safezoneX + safezoneW) - IGUI_GRID_HINT_WAbs - 1 * GUI_GRID_W) +#define IGUI_GRID_HINT_YDef (safezoneY + 6 * GUI_GRID_H) +#define IGUI_GRID_HINT_X (profilenamespace getvariable ["IGUI_GRID_HINT_X",IGUI_GRID_HINT_XDef]) +#define IGUI_GRID_HINT_Y (profilenamespace getvariable ["IGUI_GRID_HINT_Y",IGUI_GRID_HINT_YDef]) +#define IGUI_GRID_HINT_W GUI_GRID_W +#define IGUI_GRID_HINT_H GUI_GRID_H + +//--- IGUI GPS +#define IGUI_GRID_GPS_XDef (safezoneX + safezoneW - 11 * GUI_GRID_W) +#define IGUI_GRID_GPS_YDef (safezoneY + safezoneH - 20.5 * GUI_GRID_H) +#define IGUI_GRID_GPS_WDef (10 * GUI_GRID_W) +#define IGUI_GRID_GPS_HDef (10 * GUI_GRID_H) +#define IGUI_GRID_GPS_X (profilenamespace getvariable ['IGUI_GRID_GPS_X',IGUI_GRID_GPS_XDef]) +#define IGUI_GRID_GPS_Y (profilenamespace getvariable ['IGUI_GRID_GPS_Y',IGUI_GRID_GPS_YDef]) +#define IGUI_GRID_GPS_WAbs (profilenamespace getvariable ['IGUI_GRID_GPS_W',IGUI_GRID_GPS_WDef]) +#define IGUI_GRID_GPS_HAbs (profilenamespace getvariable ['IGUI_GRID_GPS_H',IGUI_GRID_GPS_HDef]) + +//--- IGUI AV Camera +#define IGUI_GRID_AVCAMERA_XDef (safezoneX + safezoneW - 11.6 * GUI_GRID_W) +#define IGUI_GRID_AVCAMERA_YDef (safezoneY + safezoneH - 17.2 * GUI_GRID_H) +#define IGUI_GRID_AVCAMERA_WDef (10.6 * GUI_GRID_W) +#define IGUI_GRID_AVCAMERA_HDef (6.7 * GUI_GRID_H) +#define IGUI_GRID_AVCAMERA_X (profilenamespace getvariable ['IGUI_GRID_AVCAMERA_X',IGUI_GRID_AVCAMERA_XDef]) +#define IGUI_GRID_AVCAMERA_Y (profilenamespace getvariable ['IGUI_GRID_AVCAMERA_Y',IGUI_GRID_AVCAMERA_YDef]) +#define IGUI_GRID_AVCAMERA_WAbs (profilenamespace getvariable ['IGUI_GRID_AVCAMERA_W',IGUI_GRID_AVCAMERA_WDef]) +#define IGUI_GRID_AVCAMERA_HAbs (profilenamespace getvariable ['IGUI_GRID_AVCAMERA_H',IGUI_GRID_AVCAMERA_HDef]) + +//--- IGUI IGUI Chat Log +#define IGUI_GRID_CHAT_XDef (safezoneX + 1 * GUI_GRID_W) +#define IGUI_GRID_CHAT_YDef (safezoneY + safezoneH - 10.5 * GUI_GRID_H) +#define IGUI_GRID_CHAT_WDef (20 * GUI_GRID_W) +#define IGUI_GRID_CHAT_HDef (5 * GUI_GRID_H) +#define IGUI_GRID_CHAT_X (profilenamespace getvariable ["IGUI_GRID_CHAT_X",IGUI_GRID_CHAT_XDef]) +#define IGUI_GRID_CHAT_Y (profilenamespace getvariable ["IGUI_GRID_CHAT_Y",IGUI_GRID_CHAT_YDef]) +#define IGUI_GRID_CHAT_WAbs (profilenamespace getvariable ["IGUI_GRID_CHAT_W",IGUI_GRID_CHAT_WDef]) +#define IGUI_GRID_CHAT_HAbs (profilenamespace getvariable ["IGUI_GRID_CHAT_H",IGUI_GRID_CHAT_HDef]) + +//--- IGUI Command Bar +#define IGUI_GRID_BAR_WAbs (36 * GUI_GRID_W) +#define IGUI_GRID_BAR_HAbs (4 * GUI_GRID_H) +#define IGUI_GRID_BAR_XDef (safezoneX + 1 * GUI_GRID_W) +#define IGUI_GRID_BAR_YDef (safezoneY + safezoneH - 4.5 * GUI_GRID_H) +#define IGUI_GRID_BAR_X (profilenamespace getvariable ["IGUI_GRID_BAR_X",IGUI_GRID_BAR_XDef]) +#define IGUI_GRID_BAR_Y (profilenamespace getvariable ["IGUI_GRID_BAR_Y",IGUI_GRID_BAR_YDef]) +#define IGUI_GRID_BAR_W GUI_GRID_W +#define IGUI_GRID_BAR_H GUI_GRID_H + +//--- IGUI MP Progress +#define IGUI_GRID_MP_WAbs (2.5 * GUI_GRID_W) +#define IGUI_GRID_MP_HAbs (15 * GUI_GRID_H) +#define IGUI_GRID_MP_XDef (safezoneX + safezoneW - 2 * GUI_GRID_W) +#define IGUI_GRID_MP_YDef (5 * GUI_GRID_H + safezoneY) +#define IGUI_GRID_MP_X (profilenamespace getvariable ["IGUI_GRID_MP_X",IGUI_GRID_MP_XDef]) +#define IGUI_GRID_MP_Y (profilenamespace getvariable ["IGUI_GRID_MP_Y",IGUI_GRID_MP_YDef]) +#define IGUI_GRID_MP_W GUI_GRID_W +#define IGUI_GRID_MP_H GUI_GRID_H + +//--- IGUI Custom Mission Display +#define IGUI_GRID_MISSION_WAbs (20 * GUI_GRID_W) +#define IGUI_GRID_MISSION_HAbs (5 * GUI_GRID_H) +#define IGUI_GRID_MISSION_XDef (safezoneX + safezoneW - 21 * GUI_GRID_W) +#define IGUI_GRID_MISSION_YDef (safezoneY + safezoneH - 10.5 * GUI_GRID_H) +#define IGUI_GRID_MISSION_X (profilenamespace getvariable ["IGUI_GRID_MISSION_X",IGUI_GRID_MISSION_XDef]) +#define IGUI_GRID_MISSION_Y (profilenamespace getvariable ["IGUI_GRID_MISSION_Y",IGUI_GRID_MISSION_YDef]) +#define IGUI_GRID_MISSION_W GUI_GRID_W +#define IGUI_GRID_MISSION_H GUI_GRID_H + +//--- IGUI Custom Info +#define IGUI_GRID_CUSTOMINFO_WDef (10 * GUI_GRID_W) +#define IGUI_GRID_CUSTOMINFO_HDef (10 * GUI_GRID_H) +#define IGUI_GRID_CUSTOMINFOLEFT_XDef (safezoneX + 0.5 * GUI_GRID_W) +#define IGUI_GRID_CUSTOMINFOLEFT_YDef (safezoneY + safezoneH - 21 * GUI_GRID_H) +#define IGUI_GRID_CUSTOMINFORIGHT_XDef ((safezoneX + safezoneW) - (IGUI_GRID_CUSTOMINFO_WDef + 0.5 * GUI_GRID_W)) +#define IGUI_GRID_CUSTOMINFORIGHT_YDef (safezoneY + safezoneH - 21 * GUI_GRID_H) + +#define IGUI_GRID_CUSTOMINFOLEFT_X (profilenamespace getvariable ["IGUI_GRID_CUSTOMINFOLEFT_X",IGUI_GRID_CUSTOMINFOLEFT_XDef]) +#define IGUI_GRID_CUSTOMINFOLEFT_Y (profilenamespace getvariable ["IGUI_GRID_CUSTOMINFOLEFT_Y",IGUI_GRID_CUSTOMINFOLEFT_YDef]) +#define IGUI_GRID_CUSTOMINFORIGHT_X (profilenamespace getvariable ["IGUI_GRID_CUSTOMINFORIGHT_X",IGUI_GRID_CUSTOMINFORIGHT_XDef]) +#define IGUI_GRID_CUSTOMINFORIGHT_Y (profilenamespace getvariable ["IGUI_GRID_CUSTOMINFORIGHT_Y",IGUI_GRID_CUSTOMINFORIGHT_YDef]) +#define IGUI_GRID_CUSTOMINFO_WAbs (profilenamespace getvariable ["IGUI_GRID_CUSTOMINFORIGHT_W",IGUI_GRID_CUSTOMINFO_WDef]) +#define IGUI_GRID_CUSTOMINFO_HAbs (profilenamespace getvariable ["IGUI_GRID_CUSTOMINFORIGHT_H",IGUI_GRID_CUSTOMINFO_HDef]) +#define IGUI_GRID_CUSTOMINFO_INNER_WAbs IGUI_GRID_CUSTOMINFO_WAbs - 0.25 * GUI_GRID_W +#define IGUI_GRID_CUSTOMINFO_INNER_HAbs IGUI_GRID_CUSTOMINFO_HAbs - 1.25 * GUI_GRID_H + + +/////////////////////////////////////////////////////////////////////////// +/// Old +/////////////////////////////////////////////////////////////////////////// + +//--- Old grid, that is used for old A3 and TKOH displays +#define GUI_GRID_OLD_WAbs ((safezoneW / safezoneH) min 1.2) +#define GUI_GRID_OLD_HAbs (GUI_GRID_OLD_WAbs / 1.2) +#define GUI_GRID_OLD_W (GUI_GRID_OLD_WAbs / 32) +#define GUI_GRID_OLD_H (GUI_GRID_OLD_HAbs / 20) +#define GUI_GRID_OLD_X (safezoneX) +#define GUI_GRID_OLD_Y (safezoneY + safezoneH - GUI_GRID_OLD_HAbs) + +//--- Centered +//#define GUI_GRID_OLD_X (safezoneX + (safezoneW - GUI_GRID_OLD_CENTER_WAbs)/2) +//--- Dark magic +//#define GUI_GRID_OLD_X (profilenamespace getvariable ['GUI_GRID_OLD_X',(safezoneX + (safezoneW - GUI_GRID_OLD_CENTER_WAbs)/2)]) +//#define GUI_GRID_OLD_Y (profilenamespace getvariable ['GUI_GRID_OLD_Y',(safezoneY + safezoneH - GUI_GRID_OLD_HAbs)]) + +//MUF-TEST: Anchor near the right edge of the screen - when changing Interface size, this point doesn't change its X position +#define GUI_ANCHOR_RIGHT (0.983 * safezoneW + safezoneX) +#define GUI_ANCHOR_LEFT 0 + +//--- Screen Center +#define GUI_GRID_OLD_CENTER_WAbs GUI_GRID_OLD_WAbs +#define GUI_GRID_OLD_CENTER_HAbs GUI_GRID_OLD_HAbs +#define GUI_GRID_OLD_CENTER_W GUI_GRID_OLD_W +#define GUI_GRID_OLD_CENTER_H GUI_GRID_OLD_H +#define GUI_GRID_OLD_CENTER_X (safezoneX + (safezoneW - GUI_GRID_OLD_CENTER_WAbs)/2) +#define GUI_GRID_OLD_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_OLD_CENTER_HAbs)/2) + +//--- 2D Editor +#define GUI_GRID_OLD_EDITOR_WAbs GUI_GRID_OLD_CENTER_WAbs +#define GUI_GRID_OLD_EDITOR_HAbs GUI_GRID_OLD_CENTER_HAbs +#define GUI_GRID_OLD_EDITOR_W GUI_GRID_OLD_CENTER_W +#define GUI_GRID_OLD_EDITOR_H GUI_GRID_OLD_CENTER_H +#define GUI_GRID_OLD_EDITOR_X GUI_GRID_OLD_CENTER_X +#define GUI_GRID_OLD_EDITOR_Y (safezoneY) + +//--- Debug console (center down) +#define GUI_GRID_OLD_DEBUG_WAbs GUI_GRID_OLD_WAbs +#define GUI_GRID_OLD_DEBUG_HAbs GUI_GRID_OLD_HAbs +#define GUI_GRID_OLD_DEBUG_W GUI_GRID_OLD_W +#define GUI_GRID_OLD_DEBUG_H GUI_GRID_OLD_H +#define GUI_GRID_OLD_DEBUG_X (safezoneX + (safezoneW - GUI_GRID_OLD_DEBUG_WAbs)/2) +#define GUI_GRID_OLD_DEBUG_Y (safezoneY + safezoneH - GUI_GRID_OLD_DEBUG_HAbs) + +//--- IGUI Common +#define IGUI_GRID_OLD_WAbs GUI_GRID_OLD_WAbs +#define IGUI_GRID_OLD_HAbs GUI_GRID_OLD_HAbs +#define IGUI_GRID_OLD_W GUI_GRID_OLD_W +#define IGUI_GRID_OLD_H GUI_GRID_OLD_H +#define IGUI_GRID_OLD_X (safezoneX + (safezoneW - IGUI_GRID_OLD_WAbs) / 2) +#define IGUI_GRID_OLD_Y (safezoneY + safezoneH - IGUI_GRID_OLD_HAbs) + +//--- IGUI Bottom +#define IGUI_GRID_OLD_BOTTOM_WAbs IGUI_GRID_OLD_WAbs +#define IGUI_GRID_OLD_BOTTOM_HAbs IGUI_GRID_OLD_HAbs +#define IGUI_GRID_OLD_BOTTOM_W IGUI_GRID_OLD_W +#define IGUI_GRID_OLD_BOTTOM_H IGUI_GRID_OLD_H +#define IGUI_GRID_OLD_BOTTOM_X (safezoneX + (safezoneW - IGUI_GRID_OLD_BOTTOM_WAbs) / 2) +#define IGUI_GRID_OLD_BOTTOM_Y (safezoneY + safezoneH - IGUI_GRID_OLD_BOTTOM_HAbs) + +//--- IGUI Analogue Gauges ----------------------------------------------------------------------------------------------------- +//--- Analogue gauge - Speed +#define IGUI_GRID_GAUGESPEED_XDef (safezoneX + (safezoneW / 2) - 19.75 * GUI_GRID_W) +#define IGUI_GRID_GAUGESPEED_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGESPEED_X (profilenamespace getvariable ['IGUI_GRID_GAUGESPEED_X',IGUI_GRID_GAUGESPEED_XDef]) +#define IGUI_GRID_GAUGESPEED_Y (profilenamespace getvariable ['IGUI_GRID_GAUGESPEED_Y',IGUI_GRID_GAUGESPEED_YDef]) +#define IGUI_GRID_GAUGESPEED_WAbs (7.5 * GUI_GRID_W) +#define IGUI_GRID_GAUGESPEED_HAbs (7.5 * GUI_GRID_H) + +//--- Analogue gauge - Alt +#define IGUI_GRID_GAUGEALT_XDef (safezoneX + (safezoneW / 2) - 11.75 * GUI_GRID_W) +#define IGUI_GRID_GAUGEALT_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGEALT_X (profilenamespace getvariable ['IGUI_GRID_GAUGEALT_X',IGUI_GRID_GAUGEALT_XDef]) +#define IGUI_GRID_GAUGEALT_Y (profilenamespace getvariable ['IGUI_GRID_GAUGEALT_Y',IGUI_GRID_GAUGEALT_YDef]) +#define IGUI_GRID_GAUGEALT_WAbs (7.5 * GUI_GRID_W) +#define IGUI_GRID_GAUGEALT_HAbs (7.5 * GUI_GRID_H) + +//--- Analogue gauge - Horizon +#define IGUI_GRID_GAUGEHORIZON_XDef (safezoneX + ((safezoneW - 7.5 * GUI_GRID_W) / 2)) +#define IGUI_GRID_GAUGEHORIZON_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGEHORIZON_X (profilenamespace getvariable ['IGUI_GRID_GAUGEHORIZON_X',IGUI_GRID_GAUGEHORIZON_XDef]) +#define IGUI_GRID_GAUGEHORIZON_Y (profilenamespace getvariable ['IGUI_GRID_GAUGEHORIZON_Y',IGUI_GRID_GAUGEHORIZON_YDef]) +#define IGUI_GRID_GAUGEHORIZON_WAbs (7.5 * GUI_GRID_W) +#define IGUI_GRID_GAUGEHORIZON_HAbs (7.5 * GUI_GRID_H) + +//--- Analogue gauge - Stability +#define IGUI_GRID_GAUGESTABILITY_XDef (safezoneX + (safezoneW / 2) + 4.25 * GUI_GRID_W) +#define IGUI_GRID_GAUGESTABILITY_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGESTABILITY_X (profilenamespace getvariable ['IGUI_GRID_GAUGESTABILITY_X',IGUI_GRID_GAUGESTABILITY_XDef]) +#define IGUI_GRID_GAUGESTABILITY_Y (profilenamespace getvariable ['IGUI_GRID_GAUGESTABILITY_Y',IGUI_GRID_GAUGESTABILITY_YDef]) +#define IGUI_GRID_GAUGESTABILITY_WAbs (7.5 * GUI_GRID_W) +#define IGUI_GRID_GAUGESTABILITY_HAbs (7.5 * GUI_GRID_H) + +//--- Analogue gauge - Compass +#define IGUI_GRID_GAUGECOMPASS_XDef (safezoneX + (safezoneW / 2) + 12.25 * GUI_GRID_W) +#define IGUI_GRID_GAUGECOMPASS_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGECOMPASS_X (profilenamespace getvariable ['IGUI_GRID_GAUGECOMPASS_X',IGUI_GRID_GAUGECOMPASS_XDef]) +#define IGUI_GRID_GAUGECOMPASS_Y (profilenamespace getvariable ['IGUI_GRID_GAUGECOMPASS_Y',IGUI_GRID_GAUGECOMPASS_YDef]) +#define IGUI_GRID_GAUGECOMPASS_WAbs (7.5 * GUI_GRID_W) +#define IGUI_GRID_GAUGECOMPASS_HAbs (7.5 * GUI_GRID_H) + +//--- Analogue gauge - Damage indicators +// #define IGUI_GRID_GAUGEDAMAGE_XDef (safezoneX + (safezoneW / 2) - 19 * GUI_GRID_W) +// #define IGUI_GRID_GAUGEDAMAGE_YDef (safezoneY + safezoneH - 7 * GUI_GRID_H) +// #define IGUI_GRID_GAUGEDAMAGE_X (profilenamespace getvariable ['IGUI_GRID_GAUGEDAMAGE_X',IGUI_GRID_GAUGEDAMAGE_XDef]) +// #define IGUI_GRID_GAUGEDAMAGE_Y (profilenamespace getvariable ['IGUI_GRID_GAUGEDAMAGE_Y',IGUI_GRID_GAUGEDAMAGE_YDef]) +// #define IGUI_GRID_GAUGEDAMAGE_WAbs (9.6 * GUI_GRID_W) +// #define IGUI_GRID_GAUGEDAMAGE_HAbs (2.4 * GUI_GRID_H) +//--- IGUI Analogue Gauges ----------------------------------------------------------------------------------------------------- + +//--- Sling Load Assistant +#define IGUI_GRID_SLINGLOADASSISTANT_XDef (safezoneX + safezoneW - 8 * GUI_GRID_W) +#define IGUI_GRID_SLINGLOADASSISTANT_YDef (safezoneY + safezoneH - 19.5 * GUI_GRID_H) +#define IGUI_GRID_SLINGLOADASSISTANT_WDef (7 * GUI_GRID_W) +#define IGUI_GRID_SLINGLOADASSISTANT_HDef (9.5 * GUI_GRID_H) +#define IGUI_GRID_SLINGLOADASSISTANT_X (profilenamespace getvariable ['IGUI_GRID_SLINGLOADASSISTANT_X',IGUI_GRID_SLINGLOADASSISTANT_XDef]) +#define IGUI_GRID_SLINGLOADASSISTANT_Y (profilenamespace getvariable ['IGUI_GRID_SLINGLOADASSISTANT_Y',IGUI_GRID_SLINGLOADASSISTANT_YDef]) +#define IGUI_GRID_SLINGLOADASSISTANT_WAbs (profilenamespace getvariable ['IGUI_GRID_SLINGLOADASSISTANT_W',IGUI_GRID_SLINGLOADASSISTANT_WDef]) +#define IGUI_GRID_SLINGLOADASSISTANT_HAbs (profilenamespace getvariable ['IGUI_GRID_SLINGLOADASSISTANT_H',IGUI_GRID_SLINGLOADASSISTANT_HDef]) + +//--- Squad Radar +// #define IGUI_GRID_SQUADRADAR_XDef (safezoneX + (safezoneW / 2) - 3 * GUI_GRID_W) +// #define IGUI_GRID_SQUADRADAR_YDef (safezoneY + safezoneH - 10.9 * GUI_GRID_H) +// #define IGUI_GRID_SQUADRADAR_X (profilenamespace getvariable ['IGUI_GRID_SQUADRADAR_X',IGUI_GRID_SQUADRADAR_XDef]) +// #define IGUI_GRID_SQUADRADAR_Y (profilenamespace getvariable ['IGUI_GRID_SQUADRADAR_Y',IGUI_GRID_SQUADRADAR_YDef]) +// #define IGUI_GRID_SQUADRADAR_WAbs (6 * GUI_GRID_W) +// #define IGUI_GRID_SQUADRADAR_HAbs (6 * GUI_GRID_H) + +// #define IGUI_GRID_SQUADRADAR_LIST1_XDef (IGUI_GRID_SQUADRADAR_XDef + IGUI_GRID_SQUADRADAR_WAbs) +// #define IGUI_GRID_SQUADRADAR_LIST1_YDef (IGUI_GRID_SQUADRADAR_YDef) +// #define IGUI_GRID_SQUADRADAR_LIST1_X (profilenamespace getvariable ['IGUI_GRID_SQUADRADAR_LIST1_X',IGUI_GRID_SQUADRADAR_LIST1_XDef]) +// #define IGUI_GRID_SQUADRADAR_LIST1_Y (profilenamespace getvariable ['IGUI_GRID_SQUADRADAR_LIST1_Y',IGUI_GRID_SQUADRADAR_LIST1_YDef]) +// #define IGUI_GRID_SQUADRADAR_LIST1_WAbs (6 * GUI_GRID_W) +// #define IGUI_GRID_SQUADRADAR_LIST1_HAbs (6 * GUI_GRID_H) + +// #define IGUI_GRID_SQUADRADAR_LIST2_XDef (IGUI_GRID_SQUADRADAR_LIST1_XDef + IGUI_GRID_SQUADRADAR_LIST1_WAbs) +// #define IGUI_GRID_SQUADRADAR_LIST2_YDef (IGUI_GRID_SQUADRADAR_LIST1_YDef) +// #define IGUI_GRID_SQUADRADAR_LIST2_X (profilenamespace getvariable ['IGUI_GRID_SQUADRADAR_LIST2_X',IGUI_GRID_SQUADRADAR_LIST2_XDef]) +// #define IGUI_GRID_SQUADRADAR_LIST2_Y (profilenamespace getvariable ['IGUI_GRID_SQUADRADAR_LIST2_Y',IGUI_GRID_SQUADRADAR_LIST2_YDef]) +// #define IGUI_GRID_SQUADRADAR_LIST2_WAbs (6 * GUI_GRID_W) +// #define IGUI_GRID_SQUADRADAR_LIST2_HAbs (6 * GUI_GRID_H) + +//--- IGUI Action / Command Menu +#define IGUI_GRID_OLD_MENU_WAbs (4.5 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_MENU_HAbs (10 * (IGUI_TEXT_SIZE_MEDIUM * 1.3)) +#define IGUI_GRID_OLD_MENU_XDef (1 * IGUI_GRID_OLD_W + safezoneX) +#define IGUI_GRID_OLD_MENU_YDef (5 * IGUI_GRID_OLD_H + safezoneY) +#define IGUI_GRID_OLD_MENU_X (profilenamespace getvariable ["IGUI_GRID_OLD_MENU_X",IGUI_GRID_OLD_MENU_XDef]) +#define IGUI_GRID_OLD_MENU_Y (profilenamespace getvariable ["IGUI_GRID_OLD_MENU_Y",IGUI_GRID_OLD_MENU_YDef]) +#define IGUI_GRID_OLD_MENU_W IGUI_GRID_OLD_W +#define IGUI_GRID_OLD_MENU_H IGUI_GRID_OLD_H + +//--- E3 +/* +#define IGUI_GRID_OLD_MENU_WAbs (4.5 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_MENU_HAbs (10 * (IGUI_TEXT_SIZE_MEDIUM * 1.3)) +#define IGUI_GRID_OLD_MENU_XDef (0.6) +#define IGUI_GRID_OLD_MENU_YDef (0.55) +#define IGUI_GRID_OLD_MENU_X (profilenamespace getvariable ["IGUI_GRID_OLD_MENU_X",IGUI_GRID_OLD_MENU_XDef]) +#define IGUI_GRID_OLD_MENU_Y (profilenamespace getvariable ["IGUI_GRID_OLD_MENU_Y",IGUI_GRID_OLD_MENU_YDef]) +#define IGUI_GRID_OLD_MENU_W IGUI_GRID_OLD_W +#define IGUI_GRID_OLD_MENU_H IGUI_GRID_OLD_H +*/ + +//--- IGUI Task +#define IGUI_GRID_OLD_TASK_WAbs (12 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_TASK_HAbs (2 * IGUI_GRID_OLD_H) +#define IGUI_GRID_OLD_TASK_XDef (10 * IGUI_GRID_OLD_W + IGUI_GRID_OLD_X) +#define IGUI_GRID_OLD_TASK_YDef (1 * IGUI_GRID_OLD_H + safezoneY) +#define IGUI_GRID_OLD_TASK_X IGUI_GRID_OLD_TASK_XDef +#define IGUI_GRID_OLD_TASK_Y IGUI_GRID_OLD_TASK_YDef +#define IGUI_GRID_OLD_TASK_W IGUI_GRID_OLD_W +#define IGUI_GRID_OLD_TASK_H IGUI_GRID_OLD_H + +//--- IGUI PIP +#define IGUI_GRID_OLD_PIP_XDef (safezoneX + safezoneW - 6.8 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_PIP_YDef (7 * IGUI_GRID_OLD_H + IGUI_GRID_OLD_Y) +#define IGUI_GRID_OLD_PIP_WDef (6 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_PIP_HDef (IGUI_GRID_OLD_PIP_WDef) +//#define IGUI_GRID_OLD_PIP_X (profilenamespace getvariable ['IGUI_GRID_OLD_PIP_X',IGUI_GRID_OLD_PIP_XDef]) +//#define IGUI_GRID_OLD_PIP_Y (profilenamespace getvariable ['IGUI_GRID_OLD_PIP_Y',IGUI_GRID_OLD_PIP_YDef]) +//#define IGUI_GRID_OLD_PIP_WAbs (profilenamespace getvariable ['IGUI_GRID_OLD_PIP_W',IGUI_GRID_OLD_PIP_WDef]) +#define IGUI_GRID_OLD_PIP_X IGUI_GRID_OLD_PIP_XDef +#define IGUI_GRID_OLD_PIP_Y IGUI_GRID_OLD_PIP_YDef +#define IGUI_GRID_OLD_PIP_WAbs IGUI_GRID_OLD_PIP_WDef +#define IGUI_GRID_OLD_PIP_HAbs (IGUI_GRID_OLD_PIP_WAbs) + + +//--- MUF - experimental optics grid +// #define GUI_GRID_OLD_OPTICS_X (SafezoneX + ((SafezoneW - SafezoneH) / 2)) +// #define GUI_GRID_OLD_OPTICS_Y (SafezoneY) +// #define GUI_GRID_OLD_OPTICS_W (0.01875) +// #define GUI_GRID_OLD_OPTICS_H (0.025) +// #define GUI_GRID_OLD_OPTICS_WAbs ((SafezoneX + ((SafezoneW - SafezoneH) / 2)) / 0.01875) +// #define GUI_GRID_OLD_OPTICS_HAbs (SafezoneH / 0.01875) + +#define GUI_GRID_OLD_OPTICS_X (SafezoneX + ((SafezoneW - SafezoneH) / 2)) +#define GUI_GRID_OLD_OPTICS_Y (SafezoneY) +#define GUI_GRID_OLD_OPTICS_W (0.01875 * SafezoneH) +#define GUI_GRID_OLD_OPTICS_H (0.025 * SafezoneH) +#define GUI_GRID_OLD_OPTICS_WAbs (SafezoneH) +#define GUI_GRID_OLD_OPTICS_HAbs (SafezoneH) + +//--- MUF - experimental AV Terminal grid +#define GUI_GRID_OLD_AV_TERMINAL_X (safezoneX) +#define GUI_GRID_OLD_AV_TERMINAL_Y (safezoneY) +#define GUI_GRID_OLD_AV_TERMINAL_W (safezoneW / 64) +#define GUI_GRID_OLD_AV_TERMINAL_H (safezoneH / 40) +#define GUI_GRID_OLD_AV_TERMINAL_WAbs (safezoneW) +#define GUI_GRID_OLD_AV_TERMINAL_HAbs (safezoneH) diff --git a/include/a3/ui_f/hpp/defineDIKCodes.inc b/include/a3/ui_f/hpp/defineDIKCodes.inc new file mode 100644 index 0000000..c641d60 --- /dev/null +++ b/include/a3/ui_f/hpp/defineDIKCodes.inc @@ -0,0 +1,190 @@ +#ifndef DIK_ESCAPE + +/**************************************************************************** + * + * DirectInput keyboard scan codes + * + ****************************************************************************/ + +#define DIK_ESCAPE 0x01 +#define DIK_1 0x02 +#define DIK_2 0x03 +#define DIK_3 0x04 +#define DIK_4 0x05 +#define DIK_5 0x06 +#define DIK_6 0x07 +#define DIK_7 0x08 +#define DIK_8 0x09 +#define DIK_9 0x0A +#define DIK_0 0x0B +#define DIK_MINUS 0x0C /* - on main keyboard */ +#define DIK_EQUALS 0x0D +#define DIK_BACK 0x0E /* backspace */ +#define DIK_TAB 0x0F +#define DIK_Q 0x10 +#define DIK_W 0x11 +#define DIK_E 0x12 +#define DIK_R 0x13 +#define DIK_T 0x14 +#define DIK_Y 0x15 +#define DIK_U 0x16 +#define DIK_I 0x17 +#define DIK_O 0x18 +#define DIK_P 0x19 +#define DIK_LBRACKET 0x1A +#define DIK_RBRACKET 0x1B +#define DIK_RETURN 0x1C /* Enter on main keyboard */ +#define DIK_LCONTROL 0x1D +#define DIK_A 0x1E +#define DIK_S 0x1F +#define DIK_D 0x20 +#define DIK_F 0x21 +#define DIK_G 0x22 +#define DIK_H 0x23 +#define DIK_J 0x24 +#define DIK_K 0x25 +#define DIK_L 0x26 +#define DIK_SEMICOLON 0x27 +#define DIK_APOSTROPHE 0x28 +#define DIK_GRAVE 0x29 /* accent grave */ +#define DIK_LSHIFT 0x2A +#define DIK_BACKSLASH 0x2B +#define DIK_Z 0x2C +#define DIK_X 0x2D +#define DIK_C 0x2E +#define DIK_V 0x2F +#define DIK_B 0x30 +#define DIK_N 0x31 +#define DIK_M 0x32 +#define DIK_COMMA 0x33 +#define DIK_PERIOD 0x34 /* . on main keyboard */ +#define DIK_SLASH 0x35 /* / on main keyboard */ +#define DIK_RSHIFT 0x36 +#define DIK_MULTIPLY 0x37 /* * on numeric keypad */ +#define DIK_LMENU 0x38 /* left Alt */ +#define DIK_SPACE 0x39 +#define DIK_CAPITAL 0x3A +#define DIK_F1 0x3B +#define DIK_F2 0x3C +#define DIK_F3 0x3D +#define DIK_F4 0x3E +#define DIK_F5 0x3F +#define DIK_F6 0x40 +#define DIK_F7 0x41 +#define DIK_F8 0x42 +#define DIK_F9 0x43 +#define DIK_F10 0x44 +#define DIK_NUMLOCK 0x45 +#define DIK_SCROLL 0x46 /* Scroll Lock */ +#define DIK_NUMPAD7 0x47 +#define DIK_NUMPAD8 0x48 +#define DIK_NUMPAD9 0x49 +#define DIK_SUBTRACT 0x4A /* - on numeric keypad */ +#define DIK_NUMPAD4 0x4B +#define DIK_NUMPAD5 0x4C +#define DIK_NUMPAD6 0x4D +#define DIK_ADD 0x4E /* + on numeric keypad */ +#define DIK_NUMPAD1 0x4F +#define DIK_NUMPAD2 0x50 +#define DIK_NUMPAD3 0x51 +#define DIK_NUMPAD0 0x52 +#define DIK_DECIMAL 0x53 /* . on numeric keypad */ +#define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */ +#define DIK_F11 0x57 +#define DIK_F12 0x58 + +#define DIK_F13 0x64 /* (NEC PC98) */ +#define DIK_F14 0x65 /* (NEC PC98) */ +#define DIK_F15 0x66 /* (NEC PC98) */ + +#define DIK_KANA 0x70 /* (Japanese keyboard) */ +#define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */ +#define DIK_CONVERT 0x79 /* (Japanese keyboard) */ +#define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */ +#define DIK_YEN 0x7D /* (Japanese keyboard) */ +#define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */ +#define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */ +#define DIK_PREVTRACK 0x90 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */ +#define DIK_AT 0x91 /* (NEC PC98) */ +#define DIK_COLON 0x92 /* (NEC PC98) */ +#define DIK_UNDERLINE 0x93 /* (NEC PC98) */ +#define DIK_KANJI 0x94 /* (Japanese keyboard) */ +#define DIK_STOP 0x95 /* (NEC PC98) */ +#define DIK_AX 0x96 /* (Japan AX) */ +#define DIK_UNLABELED 0x97 /* (J3100) */ +#define DIK_NEXTTRACK 0x99 /* Next Track */ +#define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */ +#define DIK_RCONTROL 0x9D +#define DIK_MUTE 0xA0 /* Mute */ +#define DIK_CALCULATOR 0xA1 /* Calculator */ +#define DIK_PLAYPAUSE 0xA2 /* Play / Pause */ +#define DIK_MEDIASTOP 0xA4 /* Media Stop */ +#define DIK_VOLUMEDOWN 0xAE /* Volume - */ +#define DIK_VOLUMEUP 0xB0 /* Volume + */ +#define DIK_WEBHOME 0xB2 /* Web home */ +#define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */ +#define DIK_DIVIDE 0xB5 /* / on numeric keypad */ +#define DIK_SYSRQ 0xB7 +#define DIK_RMENU 0xB8 /* right Alt */ +#define DIK_PAUSE 0xC5 /* Pause */ +#define DIK_HOME 0xC7 /* Home on arrow keypad */ +#define DIK_UP 0xC8 /* UpArrow on arrow keypad */ +#define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */ +#define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */ +#define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */ +#define DIK_END 0xCF /* End on arrow keypad */ +#define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */ +#define DIK_NEXT 0xD1 /* PgDn on arrow keypad */ +#define DIK_INSERT 0xD2 /* Insert on arrow keypad */ +#define DIK_DELETE 0xD3 /* Delete on arrow keypad */ +#define DIK_LWIN 0xDB /* Left Windows key */ +#define DIK_RWIN 0xDC /* Right Windows key */ +#define DIK_APPS 0xDD /* AppMenu key */ +#define DIK_POWER 0xDE /* System Power */ +#define DIK_SLEEP 0xDF /* System Sleep */ +#define DIK_WAKE 0xE3 /* System Wake */ +#define DIK_WEBSEARCH 0xE5 /* Web Search */ +#define DIK_WEBFAVORITES 0xE6 /* Web Favorites */ +#define DIK_WEBREFRESH 0xE7 /* Web Refresh */ +#define DIK_WEBSTOP 0xE8 /* Web Stop */ +#define DIK_WEBFORWARD 0xE9 /* Web Forward */ +#define DIK_WEBBACK 0xEA /* Web Back */ +#define DIK_MYCOMPUTER 0xEB /* My Computer */ +#define DIK_MAIL 0xEC /* Mail */ +#define DIK_MEDIASELECT 0xED /* Media Select */ + +/* + * Alternate names for keys, to facilitate transition from DOS. + */ +#define DIK_BACKSPACE DIK_BACK /* backspace */ +#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */ +#define DIK_LALT DIK_LMENU /* left Alt */ +#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */ +#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */ +#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */ +#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */ +#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */ +#define DIK_RALT DIK_RMENU /* right Alt */ +#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */ +#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */ +#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */ +#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */ +#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */ +#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */ + +/* + * Alternate names for keys originally not used on US keyboards. + */ +#define DIK_CIRCUMFLEX DIK_PREVTRACK /* Japanese keyboard */ + + +/* + * Combination keys + */ +#define INPUT_CTRL_OFFSET 512 +#define INPUT_SHIFT_OFFSET 1024 +#define INPUT_ALT_OFFSET 2048 + + +#endif /* DIK_ESCAPE */ + diff --git a/include/a3/ui_f/hpp/defineResincl.inc b/include/a3/ui_f/hpp/defineResincl.inc new file mode 100644 index 0000000..818fd43 --- /dev/null +++ b/include/a3/ui_f/hpp/defineResincl.inc @@ -0,0 +1,3186 @@ +#ifndef _RESINCL_HPP +#define _RESINCL_HPP + +/*******************/ +/* Tactical menu */ +/*******************/ + +// Menu commands + // main menu +#define CMD_SEPARATOR -1 +#define CMD_NOTHING -2 +#define CMD_HIDE_MENU -3 +#define CMD_BACK -4 +// Custom menu command +#define CMD_EXECUTE -5 + +#ifdef _CONFIG +enum +{ +// note: this CMD should be if possible organized as is menu +// (items from the same menu together) +// this makes searching much easier + +//main menu level +CMD_GETIN, +CMD_GETOUT, +CMD_ACTION, + +// move submenu + +// other commands +CMD_ADVANCE, +CMD_STAY_BACK, +CMD_FLANK_LEFT, +CMD_FLANK_RIGHT, +CMD_NEXT_WAYPOINT, +CMD_HIDE, +CMD_JOIN, +CMD_STOP, +CMD_EXPECT, +CMD_MOVE, + + // formations +CMD_FORM_COLUMN, +CMD_FORM_STAGCOL, +CMD_FORM_WEDGE, +CMD_FORM_ECHLEFT, +CMD_FORM_ECHRIGHT, +CMD_FORM_VEE, +CMD_FORM_LINE, +CMD_FORM_DIAMOND, +CMD_FORM_FILE, + +// engage +CMD_ENGAGE, +CMD_LOOSE_FORM, +CMD_KEEP_FORM, + +CMD_HOLD_FIRE, +CMD_OPEN_FIRE, +CMD_FIRE, + +// status +CMD_WATCH, +CMD_WATCH_AROUND, +CMD_WATCH_AUTO, +CMD_WATCH_DIR, + +// combat modes +CMD_STEALTH, +CMD_COMBAT, +CMD_AWARE, +CMD_SAFE, + +// heal +CMD_HEALBLEEDING, +CMD_HEAL, +CMD_HEAL_SELF, +CMD_REPAIR_VEHICLE, +CMD_CARRY, +CMD_DROP_CARRIED, +CMD_PUTIN, +CMD_UNLOADFROM, + +// swiming and diving +CMD_KEEP_DEPTH_RELATIVE_UP, +CMD_KEEP_DEPTH_RELATIVE_DOWN, +CMD_KEEP_DEPTH_LEADER, +CMD_KEEP_DEPTH_UNDERSURFACE, +CMD_KEEP_DEPTH_ABOVESURFACE, +CMD_KEEP_DEPTH_BOTTOM, + +//suppress fire +CMD_SUPPRESS, + +CMD_POS_UP, +CMD_POS_MIDDLE, +CMD_POS_DOWN, +CMD_POS_AUTO, + // teams +CMD_TEAM_MAIN, +CMD_TEAM_RED, +CMD_TEAM_GREEN, +CMD_TEAM_BLUE, +CMD_TEAM_YELLOW, +CMD_ASSIGN_MAIN, +CMD_ASSIGN_RED, +CMD_ASSIGN_GREEN, +CMD_ASSIGN_BLUE, +CMD_ASSIGN_YELLOW, +CMD_TEAM_DISSOLVE, + +// radio +CMD_RADIO_ALPHA, +CMD_RADIO_BRAVO, +CMD_RADIO_CHARLIE, +CMD_RADIO_DELTA, +CMD_RADIO_ECHO, +CMD_RADIO_FOXTROT, +CMD_RADIO_GOLF, +CMD_RADIO_HOTEL, +CMD_RADIO_INDIA, +CMD_RADIO_JULIET, + +// reply commands + +CMD_REPLY_DONE, +CMD_REPLY_FAIL, +CMD_REPLY_COPY, +CMD_REPLY_REPEAT, +CMD_REPLY_WHERE_ARE_YOU, +CMD_REPORT, +CMD_REPLY_ENGAGING, +CMD_REPLY_UNDER_FIRE, +CMD_REPLY_HIT, +CMD_REPLY_ONE_LESS, +CMD_REPLY_FIREREADY, +CMD_REPLY_FIRENOTREADY, +CMD_REPLY_KILLED, +CMD_REPLY_AMMO_LOW, +CMD_REPLY_FUEL_LOW, +CMD_REPLY_INJURED, +CMD_REPLY_OUT_OF_FAKs, + +CMD_SUPPORT_MEDIC, +CMD_SUPPORT_AMBULANCE, +CMD_SUPPORT_REPAIR, +CMD_SUPPORT_REARM, +CMD_SUPPORT_REFUEL, +CMD_SUPPORT_DONE, + +CMD_RADIO_CUSTOM, +CMD_RADIO_CUSTOM_1, +CMD_RADIO_CUSTOM_2, +CMD_RADIO_CUSTOM_3, +CMD_RADIO_CUSTOM_4, +CMD_RADIO_CUSTOM_5, +CMD_RADIO_CUSTOM_6, +CMD_RADIO_CUSTOM_7, +CMD_RADIO_CUSTOM_8, +CMD_RADIO_CUSTOM_9, +CMD_RADIO_CUSTOM_0, + +CMD_UNIT_1, +CMD_UNIT_2, +CMD_UNIT_3, +CMD_UNIT_4, +CMD_UNIT_5, +CMD_UNIT_6, +CMD_UNIT_7, +CMD_UNIT_8, +CMD_UNIT_9, +CMD_UNIT_10, +CMD_UNIT_11, +CMD_UNIT_12, +CMD_UNITS_ALL, + +CMD_MY_VEHICLE, + +CMD_SELECT_MAIN, +CMD_SELECT_RED, +CMD_SELECT_GREEN, +CMD_SELECT_BLUE, +CMD_SELECT_YELLOW, + +CMD_VEHICLE_1, +CMD_VEHICLE_2, +CMD_VEHICLE_3, +CMD_VEHICLE_4, +CMD_VEHICLE_5, +CMD_VEHICLE_6, +CMD_VEHICLE_7, +CMD_VEHICLE_8, +CMD_VEHICLE_9, +CMD_VEHICLE_10, +CMD_VEHICLE_11, +CMD_VEHICLE_12, + +CMD_SINGLE_UNITS, + +CMD_MP_CHANNEL_GLOBAL, +CMD_MP_CHANNEL_SIDE, +CMD_MP_CHANNEL_COMMAND, +CMD_MP_CHANNEL_GROUP, +CMD_MP_CHANNEL_VEHICLE, + +CMD_CONVERSATION, + +// Context sensitive commands +CMD_MOVE_AUTO, +CMD_STOP_AUTO, +CMD_WATCH_CTX, +CMD_GETIN_AUTO, +CMD_REARM_AUTO, +CMD_ATTACK_AUTO, +CMD_FIRE_AT_POSITION_AUTO, +CMD_SELECT_AUTO, +CMD_SELECT_AUTO_ADD, +CMD_DESELECT_AUTO, +CMD_JOIN_AUTO, +CMD_OPEN_FIRE_AUTO, +CMD_HOLD_FIRE_AUTO, +CMD_COMPLEX_COMMAND, +CMD_DISABLE_MINE, + +CMD_SELECT_UNIT_FROM_BAR, +CMD_DESELECT_UNIT_FROM_BAR, +CMD_SELECT_VEHICLE_FROM_BAR, +CMD_DESELECT_VEHICLE_FROM_BAR, +CMD_SELECT_TEAM_FROM_BAR, +CMD_DESELECT_TEAM_FROM_BAR, + +CMD_JOIN_ALL, + +CMD_SWITCH_TO_LEADER, +CMD_SWITCH_TO_SELECTED, + +CMD_NOTARGET, + +CMD_HC_SELECT_AUTO, +CMD_HC_SELECT_AUTO_ADD, +CMD_HC_DESELECT_AUTO, +CMD_HC_SELECT_UNIT_FROM_BAR, +CMD_HC_DESELECT_UNIT_FROM_BAR, +CMD_HC_SELECT_TEAM_FROM_BAR, +CMD_HC_DESELECT_TEAM_FROM_BAR, +CMD_OPENPARACHUTE, +CMD_TAKE_BACKPACK, +CMD_ASSEMBLE_WEAPON, +CMD_DISASSEMBLE_WEAPON, +CMD_ENGAGE_AUTO, +CMD_FIRE_AUTO, +CMD_FIRE_AT_POSITION_AMMO // same as CMD_FIRE_AT_POSITION_AUTO but with custom magazine +}; + +/// In-game UI hiding animation type +enum HideType +{ + HTNone, // no animation + HTFade, // fade in / fade out + HTMoveLeft, // move from / to the left + HTMoveRight // move from / to the right +}; + +enum +{ + SPTPlain, + SPTPercents +}; + +#endif + + +/*******************/ +/* Controls */ +/*******************/ + +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_CONTROLS_TABLE 19 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 +#define CT_VEHICLE_DIRECTION 105 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +#define ST_TITLE ST_TITLE_BAR + ST_CENTER + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// MessageBox styles +#define MB_BUTTON_OK 1 +#define MB_BUTTON_CANCEL 2 +#define MB_BUTTON_USER 4 +#define MB_ERROR_DIALOG 8 + +// Xbox buttons +#define KEY_XINPUT 0x00050000 + +#define KEY_XBOX_A KEY_XINPUT + 0 +#define KEY_XBOX_B KEY_XINPUT + 1 +#define KEY_XBOX_X KEY_XINPUT + 2 +#define KEY_XBOX_Y KEY_XINPUT + 3 +#define KEY_XBOX_Up KEY_XINPUT + 4 +#define KEY_XBOX_Down KEY_XINPUT + 5 +#define KEY_XBOX_Left KEY_XINPUT + 6 +#define KEY_XBOX_Right KEY_XINPUT + 7 +#define KEY_XBOX_Start KEY_XINPUT + 8 +#define KEY_XBOX_Back KEY_XINPUT + 9 +#define KEY_XBOX_LeftBumper KEY_XINPUT + 10 +#define KEY_XBOX_RightBumper KEY_XINPUT + 11 +#define KEY_XBOX_LeftTrigger KEY_XINPUT + 12 +#define KEY_XBOX_RightTrigger KEY_XINPUT + 13 +#define KEY_XBOX_LeftThumb KEY_XINPUT + 14 +#define KEY_XBOX_RightThumb KEY_XINPUT + 15 +#define KEY_XBOX_LeftThumbXRight KEY_XINPUT + 16 +#define KEY_XBOX_LeftThumbYUp KEY_XINPUT + 17 +#define KEY_XBOX_RightThumbXRight KEY_XINPUT + 18 +#define KEY_XBOX_RightThumbYUp KEY_XINPUT + 19 +#define KEY_XBOX_LeftThumbXLeft KEY_XINPUT + 20 +#define KEY_XBOX_LeftThumbYDown KEY_XINPUT + 21 +#define KEY_XBOX_RightThumbXLeft KEY_XINPUT + 22 +#define KEY_XBOX_RightThumbYDown KEY_XINPUT + 23 + +// Predefined controls +#define IDC_OK 1 +#define IDC_CANCEL 2 +#define IDC_AUTOCANCEL 3 +#define IDC_ABORT 4 +#define IDC_RESTART 5 +#define IDC_USER_BUTTON 6 +#define IDC_EXIT_TO_MAIN 7 + +// my own control window for tests +#define IDC_MY_FIRST_LISTBOX 110 +#define IDC_MY_FIRST_BUTTON 111 +#define IDC_MY_FIRST_SLIDER 112 + +#define IDC_MAP 51 +#define IDC_WEATHER 52 +#define IDC_POSITION 53 +#define IDC_TIME 54 +#define IDC_DATE 55 +#define IDC_BRIEFING 56 +#define IDC_MAP_NOTES 57 +#define IDC_MAP_PLAN 58 +#define IDC_MAP_TEAM_SWITCH 59 +#define IDC_MAP_GROUP 60 +//#define IDC_MAP_BRIEFING 61 +//#define IDC_MAP_DEBRIEFING 62 +#define IDC_RADIO_ALPHA 63 +#define IDC_RADIO_BRAVO 64 +#define IDC_RADIO_CHARLIE 65 +#define IDC_RADIO_DELTA 66 +#define IDC_RADIO_ECHO 67 +#define IDC_RADIO_FOXTROT 68 +#define IDC_RADIO_GOLF 69 +#define IDC_RADIO_HOTEL 70 +#define IDC_RADIO_INDIA 71 +#define IDC_RADIO_JULIET 72 +#define IDC_MAP_NAME 73 +#define IDC_WARRANT 74 +#define IDC_GPS 75 + +#define IDC_NOTEPAD_PICTURE 76 + +#define IDC_GPS_ALT 77 +#define IDC_GPS_HEADING 78 + +// - diary topics (used in multiple displays - diary, map, briefing, debriefing) +#define IDC_DIARY_TOPIC_MAP 80 +#define IDC_DIARY_TOPIC_1 81 +#define IDC_DIARY_TOPIC_2 82 +#define IDC_DIARY_TOPIC_3 83 +#define IDC_DIARY_TOPIC_4 84 +#define IDC_DIARY_TOPIC_5 85 +#define IDC_DIARY_TOPIC_6 86 +#define IDC_DIARY_TOPIC_7 87 +#define IDC_DIARY_TOPIC_8 88 +#define IDC_DIARY_TOPIC_9 89 + +#define IDC_HSLIDER 98 +#define IDC_VSLIDER 99 + +#define IDC_ARTILLERY_MAP 500 +#define IDC_ARTILLERY_MAP_FIRE 501 + +#define IDC_ARTILLERY_MAP_NAME 502 +#define IDC_ARTILLERY_MAP_ID 503 +#define IDC_ARTILLERY_MAP_GRID 504 +#define IDC_ARTILLERY_MAP_DIST 505 +#define IDC_ARTILLERY_MAP_MIN 506 +#define IDC_ARTILLERY_MAP_MAX 507 +#define IDC_ARTILLERY_MAP_DIR 508 +#define IDC_ARTILLERY_MAP_ALT 509 +#define IDC_ARTILLERY_MAP_MODE 510 +#define IDC_ARTILLERY_MAP_AMMO 511 +#define IDC_ARTILLERY_MAP_SHELLS 512 +#define IDC_ARTILLERY_MAP_SPREAD 513 +#define IDC_ARTILLERY_MAP_ETA 514 +#define IDC_ARTILLERY_MAP_AMMOCOUNT 515 +#define IDC_ARTILLERY_MAP_WARNING 516 +#define IDC_ARTILLERY_MAP_AIMABOVE 517 + +#define IDC_DIARY_TOPIC_LIST 1001 +#define IDC_DIARY_TOPIC_LISTINDEX 1002 +#define IDC_DIARY_TOPIC_HTML 1003 +#define IDC_DIARY_TOPIC_ADD_RECORD 1004 +#define IDC_DIARY_TOPIC_HTML_GROUP 1013 + +#define IDC_DIARY_PLAYER_NAME 111 +#define IDC_DIARY_MISSION_NAME 112 +#define IDC_DIARY_CURRENT_TASK 113 +#define IDC_DIARY_PLAYER_RANK 116 +//VON/chat muting in Diary +#define IDC_DIARY_PLAYERS_BUTTON 117 +#define IDC_DIARY_PLAYERS_SORT 118 +#define IDC_DIARY_MUTE_ALL 119 + +#define IDC_DIARY_TOPIC_BACKGROUND 1021 +#define IDC_DIARY_SUBTOPIC_BACKGROUND 1022 +#define IDC_DIARY_CONTENT_BACKGROUND 1023 + +//IDCs for marker color and icon. +//Are directly connected to RscMapControl, namely its idcMarkerColor and idcMarkerIcon parameters. +//Engine searches for the parameters in any display where RscMapControl is used, that's why they got more uncommon IDCs. +#define IDC_DIARY_MARKER_COLOR 1090 +#define IDC_DIARY_MARKER_ICON 1091 + + +// Instances of display +#define IDD_MAIN 0 +#define IDD_GAME 1 +#define IDD_SINGLE_MISSION 2 +#define IDD_OPTIONS 3 +#define IDD_CONFIGURE 4 +#define IDD_OPTIONS_VIDEO 5 +#define IDD_OPTIONS_AUDIO 6 +#define IDD_MULTIPLAYER 8 +#define IDD_LOAD_AAR 9 +#define IDD_MAIN_MAP 12 +#define IDD_SAVE 13 +#define IDD_END 14 +#define IDD_SERVER 17 +#define IDD_CLIENT 18 +#define IDD_IP_ADDRESS 19 +#define IDD_SERVER_SETUP 20 +#define IDD_CLIENT_SETUP 21 +#define IDD_CLIENT_WAIT 22 +#define IDD_CHAT 24 +#define IDD_CUSTOM_ARCADE 25 +#define IDD_ARCADE_MAP 26 +#define IDD_ARCADE_UNIT 27 +#define IDD_ARCADE_WAYPOINT 28 +#define IDD_TEMPLATE_SAVE 29 +#define IDD_TEMPLATE_LOAD 30 +#define IDD_LOGIN 31 +#define IDD_INTEL 32 +#define IDD_CAMPAIGN 33 +#define IDD_CREDITS 34 +#define IDD_INTEL_GETREADY 37 +#define IDD_ARCADE_GROUP 40 +#define IDD_ARCADE_SENSOR 41 +#define IDD_NEW_USER 42 +#define IDD_CAMPAIGN_LOAD 43 +#define IDD_ARCADE_EFFECTS 44 +#define IDD_ARCADE_MARKER 45 +#define IDD_MISSION 46 +#define IDD_INTRO 47 +#define IDD_OUTRO 48 +#define IDD_INTERRUPT 49 +#define IDD_DEBRIEFING 50 +#define IDD_SELECT_ISLAND 51 +#define IDD_SERVER_GET_READY 52 +#define IDD_CLIENT_GET_READY 53 +#define IDD_INSERT_MARKER 54 +#define IDD_VOICE_CHAT 55 +#define IDD_DEBUG 56 +#define IDD_HINTC 57 +#define IDD_MISSION_END 58 +#define IDD_SERVER_SIDE 59 +#define IDD_CLIENT_SIDE 60 +#define IDD_MULTIPLAYER_ROLE 61 +#define IDD_AWARD 62 +#define IDD_CHANNEL 63 +#define IDD_PASSWORD 64 +#define IDD_MP_PLAYERS 65 +#define IDD_REVERT 66 +#define IDD_PORT 69 +#define IDD_MP_SETUP 70 +#define IDD_FILTER 71 +#define IDD_HINTC_EX 72 +#define IDD_SELECT_PROFILE 73 +#define IDD_CAMPAIGN_SELECT 74 +#define IDD_PROFILE 75 +#define IDD_PROFILE_NAME 76 +#define IDD_PROFILE_FACE 77 +#define IDD_PROFILE_VOICE 78 +#define IDD_PROFILE_CONTROLLER 79 +#define IDD_PROFILE_AUDIO 80 +#define IDD_PROFILE_VIDEO 81 +#define IDD_PROFILE_LIVE 82 +#define IDD_MP_TYPE 83 +#define IDD_MP_PASSCODE 84 +#define IDD_OPTIMATCH_FILTER 86 +#define IDD_QUICKMATCH 87 +#define IDD_FRIENDS 88 +#define IDD_FRIENDS_OPTIONS 89 +#define IDD_XWIZARD_TEMPLATE 90 +#define IDD_XWIZARD_INTEL 91 +#define IDD_XWIZARD_NAME 92 +#define IDD_XWIZARD_ISLAND 93 +#define IDD_XWIZARD_WEATHER 94 +#define IDD_XWIZARD_TIME 95 +#define IDD_XWIZARD_UNIT 96 +#define IDD_XWIZARD_MAP 97 +#define IDD_XWIZARD_UNIT_SELECT 98 +#define IDD_XWIZARD_UNIT_SELECT_CUSTOM 99 +#define IDD_XWIZARD_WAYPOINT 100 +#define IDD_DOWNLOAD_CONTENT 101 +#define IDD_DOWNLOAD_CONTENT_DETAILS 102 +#define IDD_XPLAYERS 103 +#define IDD_XPLAYERS_ACTIONS 104 +#define IDD_XPLAYERS_FEEDBACK 105 +#define IDD_GEAR 106 +#define IDD_EQUIP 555 +#define IDD_DOWNLOAD_CONTENT_INSTALL 108 +#define IDD_SERVER_SETTINGS 109 +#define IDD_SERVER_ADVANCED 110 +#define IDD_SERVER_SELECT_PLAYER 112 +#define IDD_DEDICATED_SERVER 114 +#define IDD_FRIEND_MISSIONS 115 +#define IDD_LIVE_STATS 116 +#define IDD_LIVE_STATS_BOARD 117 +#define IDD_NETWORK_CONDITIONS 118 +#define IDD_SEND_VOICE_MAIL 119 +#define IDD_RECEIVE_VOICE_MAIL 120 +#define IDD_SELECT_ISLAND_NEW 351 + +#define IDD_EDIT_OBJECT 121 +#define IDD_MISSION_LOAD 122 +#define IDD_MISSION_SAVE 123 + +#define IDD_EDIT_DIARY_RECORD 125 + +#define IDD_SERVER_VOTED 126 +#define IDD_DEDICATED_SERVER_SETTINGS 127 + +#define IDD_MISSION_EDITOR 128 + +#define IDD_DIARY 129 + +#define IDD_TEAM_SWITCH 130 + +#define IDD_CONFIGURE_ACTION 131 + +#define IDD_HOST_SETTINGS 132 + +#define IDD_MINIMAP 133 +#define IDD_OVERLAY_CREATE 134 +#define IDD_OVERLAY_LOAD 135 + +#define IDD_ESRB 136 + +#define IDD_MISSION_EDITOR_REALTIME 137 + +//TODO: Has to be checked by Pete! +#define IDD_EDIT_BRIEFING 138 +#define IDD_LIVE 139 + +#define IDD_LASE 141 + +#define IDD_LAYER_LOAD 142 + +#define IDD_CONTROLS 143 +#define IDD_INTERRUPT_REVERT 144 + +#define IDD_PERFORMANCE 145 +#define IDD_XWIZARD_PARAMS 146 +#define IDD_XWIZARD_PARAMETER 147 + +#define IDD_CONFIGURE_JOYSTICKS 148 +#define IDD_CAPTURE 149 +#define IDD_CUSTOMIZE_CONTROLLER 150 +#define IDD_GAMEOPTIONS 151 + +//new editor dialog +#define IDD_ARCADE_MODULES 153 +#define IDD_SELECT_SAVE 154 +#define IDD_DSINTERFACE 155 +#define IDD_ADDON_ACTIONS 156 + +// PhysX debug window +#define IDD_PHYSX_DEBUG 157 + +// mod launcher dialog +#define IDD_MOD_LAUNCHER 157 +#define IDD_NEW_MOD 158 + +// joystick schemes mapping dialog +#define IDD_JOYSTICK_SCHEMES 159 + +//AV Terminal dialog - MUF +#define IDD_AV_TERMINAL 160 +//Field Manual +#define IDD_FIELD_MANUAL 162 +//Dialogue for controls scheme selection +#define IDD_CONTROLS_SCHEME 163 +//Dialogue for choosing layout of mission editor. NOTE: 161-163 are already in use, see A3\Ui_f\hpp\defineResincl.inc +#define IDD_EDITOR_LAYOUT 164 +//Dialogue for publishing mission on Steam. +#define IDD_PUBLISH_MISSION 165 +//Dialogue for selecting tags for mission on Steam. +#define IDD_PUBLISH_MISSION_TAGS 166 +//Dialogue for selecting file from the hard drive +#define IDD_FILE_SELECT_DIALOG 167 +//Idd reserved for debriefing 168 +#define IDD_DLC_VEHICLEMSGBOX 169 +#define IDD_DLC_PURCHASENOTIFICATION 170 +#define IDD_BOOTCAMPMSGBOX 171 +#define IDD_COMMUNITY_GUIDE 172 +#define IDD_SLING_LOAD_ASSISTANT 173 +#define IDD_DLC_CONTENTBROWSER 174 +#define IDD_MP_SCORE_TABLE 175 +#define IDD_CAMPAIGN_MP 176 +#define IDD_MP_QUICK_PLAY 177 +#define IDD_MP_SERVER_SEARCH 178 +#define IDD_MP_SERVER_FOUND 179 +#define IDD_KEYMAPMSGBOX 180 + +// MessageBoxes +#define IDD_MSG_DELETEPLAYER 200 +#define IDD_MSG_DELETEGAME 201 +#define IDD_MSG_CLEARTEMPLATE 202 +#define IDD_MSG_EXITTEMPLATE 203 +#define IDD_MSG_LAUNCHGAME 204 // ADDED IN PATCH 1.04 + +#define IDD_MSG_NEWACCOUNT 205 + +#define IDD_MSG_FRIENDS_REMOVE 206 +#define IDD_MSG_FRIENDS_BLOCK 207 +#define IDD_MSG_FRIENDS_INVITE 208 + +#define IDD_MSG_DELETEMISSION 209 + +#define IDD_MSG_XONLINE_CONNECTION_FAILED 210 +#define IDD_MSG_XONLINE_UPDATE_REQUIRED 211 +#define IDD_MSG_XONLINE_SERVER_BUSY 212 +#define IDD_MSG_XONLINE_REQUIRED_MSG 213 +#define IDD_MSG_XONLINE_RECOMMENDED_MSG 214 +#define IDD_MSG_XONLINE_INVALID_USER 215 +#define IDD_MSG_XONLINE_WRONG_PASSCODE 216 + +#define IDD_MSG_CANCEL_SUBSCRIPTION 217 +#define IDD_MSG_SUBSCRIBE 218 +#define IDD_MSG_PURCHASE 219 +#define IDD_MSG_INSTALL_ABORT 220 +#define IDD_MSG_INSTALL_RESULT 221 + +#define IDD_MSG_DECLINE_INVITATION 222 +#define IDD_MSG_REVOKE_INVITATION 223 +#define IDD_MSG_BLOCK_REQUEST 224 +#define IDD_MSG_DECLINE_REQUEST 225 +#define IDD_MSG_CANCEL_REQUEST 226 +#define IDD_MSG_KICK_OFF 227 +#define IDD_MSG_TERMINATE_SESSION 228 +#define IDD_MSG_NETWORK_CONDITIONS 229 + +#define IDD_MSG_STATS_NOT_UPLOADED 230 + +#define IDD_MSG_LOAD_FAILED 231 +#define IDD_MSG_DELETESAVE 232 + +#define IDD_MSG_DISK_FULL 233 + +#define IDD_MSG_RESTART_MISSION 234 +#define IDD_MSG_SAVE_MISSION 235 +#define IDD_MSG_SIGN_OUT 236 +#define IDD_MSG_LOAD_MISSION 237 +#define IDD_MSG_NEGATIVE_FEEDBACK 238 +#define IDD_MSG_PENDING_INVITATION 239 +#define IDD_MSG_HOST_SESSION 240 +#define IDD_MSG_ROLES_LOST 241 +#define IDD_MSG_ACCEPT_INVITATION 242 +#define IDD_MSG_MP_PLAYER_COUNT 243 +#define IDD_MSG_GAME_JOIN 244 +#define IDD_MSG_EDITOR_WIZARD_NONAME_MISSION 245 + +#define IDD_MSG_RESTART_NEEDED 246 + +// new editor +#define IDD_MSG_COMMIT_OVERLAY 247 +#define IDD_MSG_CLEAR_OVERLAY 248 +#define IDD_MSG_LOAD_OVERLAY 249 +#define IDD_MSG_EXIT_OVERLAY 250 +#define IDD_MSG_CREATE_OVERLAY 251 +#define IDD_MSG_CLOSE_OVERLAY 252 +#define IDD_MSG_LOAD_AAR 253 +#define IDD_MSG_CLEAR_MISSION 254 +#define IDD_MSG_RETRY_MISSION 255 +#define IDD_MSG_DELETE_DIARY_RECORD 256 + +// XBOX 360 profile and save messages +#define IDD_MSG_XBOX_NO_SIGN_IN 257 +#define IDD_MSG_XBOX_NO_STORAGE 258 +#define IDD_MSG_XBOX_STORAGE_CHANGED 259 +#define IDD_MSG_XBOX_SAVE_FAILED 260 +#define IDD_MSG_XBOX_NO_STORAGE_ON_INVITE 261 + +#define IDD_OPTIONS_AUDIO_ADJUST_MIC 262 + +//MUF-MessageBox for restarting mission editor during layout change +#define IDD_MSG_RESTART_EDITOR 263 + +#define IDD_PROGRESS_MESSAGE 264 + +//Message box for confirming deleting published mission +#define IDD_MSG_DELETE_STEAM_MISSION 265 +//Message box for confirming updating published mission +#define IDD_MSG_UPDATE_STEAM_MISSION 266 +//Message box for confirming saving current mission before the publish dialog is opened +#define IDD_MSG_SAVE_MISSION_BEFORE_PUBLISH 267 +//Message box for asking user to agree with Battleye licence. +#define IDD_MSG_BATTLEYE_LICENCE 268 +#define IDD_MSG_UPNP_ACTIVATION 269 +//#define IDD_MSG_ACCOUNT_LOGIN_GUIDE 270 - Reserved + +// InGameUI +#define IDD_UNITINFO 300 +#define IDD_HINT 301 +#define IDD_TASKHINT 302 +#define IDD_STANCEINFO 303 +#define IDD_AVCAMERA 304 +#define IDD_STAMINA_BAR 305 + +//Custom Info +#define IDD_CUSTOMINFO 310 +#define IDD_CUSTOMINFO_MINIMAP 311 +#define IDD_CUSTOMINFO_SLA 312 +#define IDD_CUSTOMINFO_CREW 313 +#define IDD_CUSTOMINFO_SENS 314 +#define IDD_CUSTOMINFO_FEEDUAV 315 +#define IDD_CUSTOMINFO_FEEDDRIVER 316 +#define IDD_CUSTOMINFO_FEEDPRIMARYGUNNER 317 +#define IDD_CUSTOMINFO_FEEDCOMMANDER 318 +#define IDD_CUSTOMINFO_FEEDMISSILE 319 +#define IDD_CUSTOMINFO_MINEDETECT 320 + + +// Futura ui +#define IDD_FUTURAGEAR 602 +// FUTURA GEAR controls +#define IDC_FG_PRIMARY 610 +#define IDC_FG_SECONDARY 611 +#define IDC_FG_HANDGUN 612 + +// prefix 620 means slot items +//--- +#define IDC_FG_MAP 6211 +#define IDC_FG_COMPASS 6212 +#define IDC_FG_WATCH 6213 +#define IDC_FG_RADIO 6214 +#define IDC_FG_GPS 6215 + +#define IDC_FG_GOGGLES 6216 +#define IDC_FG_HMD 6217 +#define IDC_FG_BINOC 6238 + +#define IDC_FG_BACKPACK2 6239 +#define IDC_FG_HEADGEAR 6240 + +// prefix 630 means slot container items(uniform, vest, backpack) +#define IDC_FG_UNIFORM_SLOT 6301 +#define IDC_FG_VEST_SLOT 6302 +#define IDC_FG_BACKPACK_SLOT 6303 +/// containers load +#define IDC_FG_UNIFORM_LOAD 6304 +#define IDC_FG_VEST_LOAD 6305 +#define IDC_FG_BACKPACK_LOAD 6306 +#define IDC_FG_GROUND_LOAD 6307 +#define IDC_FG_TOTAL_LOAD 6308 +//--- +#define IDC_FG_MAGAZINES 618 +// primary +#define IDC_FG_PW_MUZZLE 620 +#define IDC_FG_PW_OPTICS 621 +#define IDC_FG_PW_FLASHLIGHT 622 +#define IDC_FG_PW_MAGAZINE 623 +// secondary +#define IDC_FG_SW_MUZZLE 624 +#define IDC_FG_SW_OPTICS 625 +#define IDC_FG_SW_FLASHLIGHT 626 +#define IDC_FG_SW_MAGAZINE 627 +// handgun +#define IDC_FG_HG_MUZZLE 628 +#define IDC_FG_HG_OPTICS 629 +#define IDC_FG_HG_FLASHLIGHT 630 +#define IDC_FG_HG_MAGAZINE 631 + +#define IDC_FG_GROUND_ITEMS 632 +#define IDC_FG_CHOSEN_CONTAINER 640 +#define IDC_FG_PW_UNDERBARREL 641 +#define IDC_FG_SW_UNDERBARREL 642 +#define IDC_FG_HG_UNDERBARREL 643 +#define IDC_FG_PW_MAGAZINE_GL 644 +// #define IDC_FG_BACKPACK_ITEMS 633 +// #define IDC_FG_ITEMS 619 + +// new inventory + +// filter +#define IDC_FG_GROUND_FILTER 6554 + +// images which will painted over containers during DnD state +#define IDC_FG_GROUND_MARKER 6385 +#define IDC_FG_CONTAINER_MARKER 6325 +#define IDC_FG_CHOSEN_MARKER 6405 + +#define IDC_FG_VEST_CONTAINER 638 +#define IDC_FG_UNIFORM_CONTAINER 633 +#define IDC_FG_BACKPACK_CONTAINER 619 + +#define IDC_FG_VEST_TAB 6381 +#define IDC_FG_VEST_TEXT 6382 +#define IDC_FG_UNIFORM_TAB 6331 +#define IDC_FG_UNIFORM_TEXT 6332 +#define IDC_FG_BACKPACK_TAB 6191 +#define IDC_FG_BACKPACK_TEXT 6192 + +#define IDC_FG_CHOSEN_TAB 6401 +#define IDC_FG_CHOSEN_TEXT 6402 +#define IDC_FG_GROUND_TAB 6321 +#define IDC_FG_GROUND_TEXT 6322 +#define IDC_DLC_TEMPLATE_LOGO 100 +#define IDC_DLC_TEMPLATE_BACKGROUND 101 +/////////////// + +/// weight info +#define IDC_FG_GROUND_WEIGHT 634 +#define IDC_FG_BACKPACK_WEIGHT 635 +#define IDC_FG_ITEMS_WEIGHT 636 + +/// player info +#define IDC_FG_TOTAL_WEIGHT 637 +////// + +// Arcade Sites +#define IDD_ARCADE_SITE 700 + +#define IDC_AS_AZIMUT 701 +#define IDC_AS_AZIMUT_PICTURE 702 + +// ---- combos +#define IDC_AS_SIDE 703 +#define IDC_AS_FACTION 704 +#define IDC_AS_CLASS 705 +#define IDC_AS_SITETYPE 706 +#define IDC_AS_REPAIRABLE 707 +#define IDC_AS_FASTTRAVEL 708 +#define IDC_AS_STORAGE 709 +// ---- flags +#define IDC_AS_FLGEQUIP 710 +#define IDC_AS_FLGFOOD 711 +#define IDC_AS_FLGARMORED 712 +#define IDC_AS_FLGFUEL 713 +#define IDC_AS_FLGWEAPON 714 +// ---- strings +#define IDC_AS_NAME 715 +#define IDC_AS_DESC 716 +#define IDC_AS_INIT 717 +#define IDC_AS_CONDITION 718 +#define IDC_AS_RADIUS 719 +// ---- sliders +#define IDC_AS_HEALTH 720 +#define IDC_AS_MOOD 721 +#define IDC_AS_PRESENCE 722 + +#define IDC_AS_ARGUMENTS 733 +//////////////////////////////////////// + +// Virtual keyboard +#define IDC_VK_SHIFT 1001 +#define IDC_VK_CAPSLOCK 1002 +#define IDC_VK_SYMBOLS 1003 +#define IDC_VK_ACCENTS 1004 +#define IDC_VK_BACKSPACE 1005 +#define IDC_VK_LEFT 1006 +#define IDC_VK_RIGHT 1007 +#define IDC_VK_BASE 1010 + +// Main display controls +#define IDC_MAIN_GAME 101 +#define IDC_MAIN_OPTIONS 102 +#define IDC_MAIN_TRAINING 103 +#define IDC_MAIN_CUSTOM 104 +#define IDC_MAIN_MULTIPLAYER 105 +#define IDC_MAIN_QUIT 106 +#define IDC_MAIN_CREDITS 107 +#define IDC_MAIN_ARCADE 108 +#define IDC_MAIN_PLAYER 109 +#define IDC_MAIN_RANK 110 +#define IDC_MAIN_ISLAND 111 +#define IDC_MAIN_DATE 112 +#define IDC_MAIN_MISSION 113 +#define IDC_MAIN_CONTINUE 114 +#define IDC_MAIN_EDITOR 115 +#define IDC_MAIN_BOOK 116 +#define IDC_MAIN_SINGLE 117 +#define IDC_MAIN_VERSION 118 +#define IDC_MAIN_SINGLE_PROFILES 119 +#define IDC_MAIN_CAMPAIGN_PROFILES 120 +#define IDC_MAIN_MP_PROFILES 121 +#define IDC_MAIN_SETTINGS_PROFILES 122 +#define IDC_MAIN_SYSTEM_LINK 123 +#define IDC_MAIN_CUSTOM_PROFILES 124 +#define IDC_MAIN_SIGN_IN_STATUS 125 +#define IDC_MAIN_PLAYER_LABEL 126 +#define IDC_MAIN_PLAYER_NAME 127 +#define IDC_MAIN_CONTROLS 128 +#define IDC_MAIN_PLAYER_ID 129 +#define IDC_MAIN_PLAYER_COLOR 130 +#define IDC_MAIN_SERVICE_ID_LABEL 131 +#define IDC_MAIN_NICKNAME_LABEL 132 +#define IDC_MAIN_NICKNAME_BG 133 +#define IDC_MAIN_LOAD 134 +#define IDC_MAIN_SAVE 135 +#define IDC_MAIN_AAR 136 +#define IDC_MAIN_ACHIEVEMENTS 137 +#define IDC_MAIN_SINGLEPLAYER 138 +#define IDC_MAIN_MOD_LIST 139 +#define IDC_MAIN_MOD_LAUNCHER 140 +#define IDC_MAIN_MOD_ICONS 141 +#define IDC_SP_EDITOR 142 +#define IDC_MAIN_FIELD_MANUAL 143 +#define IDC_MAIN_DLC_ICONS 144 +#define IDC_MAIN_DLC_OWNED_ICONS 145 +#define IDC_MAIN_DLC_ICONS_BACK 146 +#define IDC_MAIN_MOD_ICONS_BACK 147 +#define IDC_MAIN_DLC_OWNED_ICONS_BACK 148 +#define IDC_MAIN_BOOTCAMP_CAMPAIGN 149 +#define IDC_MAIN_BOOTCAMP_SHOWCASES 150 +#define IDC_MAIN_BOOTCAMP_CHALLENGES 151 +#define IDC_MAIN_BOOTCAMP_VRTRAINING 152 +#define IDC_MAIN_QUICKPLAY 154 +#define IDC_MAIN_UNIT 155 + +#define IDC_MAIN_CARDAS_CUDL 199 // muj vlastni cudl + +#define IDC_MAIN_VIDEOCONTROL 3335 + +#define IDC_MAIN_TAB_LOGIN 9001 +#define IDC_MAIN_TAB_LIBRARY 9002 +#define IDC_MAIN_TAB_SINGLE 9003 +#define IDC_MAIN_TAB_MULTIPLAYER 9004 +#define IDC_MAIN_TAB_OPTIONS 9005 +#define IDC_MAIN_TAB_CONTROLS 9006 +#define IDC_MAIN_TAB_EDITOR 9007 +#define IDC_MAIN_TAB_QUIT 9008 +#define IDC_MAIN_TAB_AAR 9011 + +#define IDC_BUILD_VERSION 9009 +#define IDC_BUILD_DATE 9010 + +// Single player display controls +#define IDC_SP_TRAINING 101 +//#define IDC_SP_EDITOR 102 +#define IDC_SP_MISSION 103 +#define IDC_SP_CAMPAIGN 104 + +// Select profile display controls +#define IDC_PROFILES_LIST 101 +#define IDC_PROFILES_HEAD 102 +#define IDC_PROFILES_TITLE 103 +#define IDC_PROFILES_CONTROLLER 104 +#define IDC_PROFILES_DIFFICULTY 105 +#define IDC_PROFILES_MISSION 106 +#define IDC_PROFILES_LIVE 107 +#define IDC_PROFILES_MISSION_TEXT 108 +#define IDC_PROFILES_SIGN_IN_STATUS 109 +#define IDC_PROFILES_EDIT 110 +#define IDC_PROFILES_DELETE 111 + +// Edit profile display controls +#define IDC_PROFILE_NAME 101 +#define IDC_PROFILE_FACE 102 +#define IDC_PROFILE_VOICE 103 +#define IDC_PROFILE_CONTROLLER 104 +#define IDC_PROFILE_AUDIO 105 +#define IDC_PROFILE_VIDEO 106 +#define IDC_PROFILE_HEAD 108 +#define IDC_PROFILE_SUM_NAME 109 +#define IDC_PROFILE_SUM_CONTROLLER 110 +#define IDC_PROFILE_SUM_LIVE 111 +#define IDC_PROFILE_VOICE_MASK 112 +#define IDC_PROFILE_SIGN_IN_STATUS 113 +#define IDC_PROFILE_CREDITS 114 +#define IDC_PROFILE_STORAGE_DEVICE 115 + +// Edit profile name display controls +#define IDC_PROFILE_NAME_PREVIEW 101 + +// Edit profile face +#define IDC_PROF_FACE_FACE 101 +#define IDC_PROF_FACE_GLASSES 102 +#define IDC_PROF_FACE_HEAD 103 + +// Edit profile voice +#define IDC_PROF_VOICE_SPEAKER 101 +#define IDC_PROF_VOICE_PITCH_TITLE 102 +#define IDC_PROF_VOICE_PITCH_VALUE 103 +#define IDC_PROF_VOICE_PITCH 104 +#define IDC_PROF_VOICE_MASK 105 +#define IDC_PROF_VOICE_THROUGH_SPEAKERS 106 +#define IDC_PROF_VOICE_HEAD 107 +#define IDC_PROF_VOICE_DEFAULT 108 + +// Edit profile controller +#define IDC_PROF_CONTR_VEHICLE 101 +#define IDC_PROF_CONTR_TYPE 102 +#define IDC_PROF_CONTR_IMAGE 103 +#define IDC_PROF_CONTR_SCHEME 104 +#define IDC_PROF_CONTR_SENSITIVITY 105 +#define IDC_PROF_CONTR_A 200 +#define IDC_PROF_CONTR_B 201 +#define IDC_PROF_CONTR_Y 202 +#define IDC_PROF_CONTR_X 203 +#define IDC_PROF_CONTR_WHITE 204 +#define IDC_PROF_CONTR_BLACK 205 +#define IDC_PROF_CONTR_LEFT 206 +#define IDC_PROF_CONTR_RIGHT 207 +#define IDC_PROF_CONTR_UP 208 +#define IDC_PROF_CONTR_DOWN 209 +#define IDC_PROF_CONTR_BACK 210 +#define IDC_PROF_CONTR_START 211 +#define IDC_PROF_CONTR_LEFT_THUMB 212 +#define IDC_PROF_CONTR_LEFT_THUMB_MOVE_X 213 +#define IDC_PROF_CONTR_LEFT_THUMB_MOVE_Y 214 +#define IDC_PROF_CONTR_RIGHT_THUMB 215 +#define IDC_PROF_CONTR_RIGHT_THUMB_MOVE_X 216 +#define IDC_PROF_CONTR_RIGHT_THUMB_MOVE_Y 217 +#define IDC_PROF_CONTR_LEFT_TRIGGER 218 +#define IDC_PROF_CONTR_RIGHT_TRIGGER 219 +#define IDC_PROF_CONTR_LEFT_THUMB_MOVE 220 +#define IDC_PROF_CONTR_RIGHT_THUMB_MOVE 221 +#define IDC_PROF_CONTR_DPAD 222 +#define IDC_PROF_CONTR_NEXT_SCHEME 223 +#define IDC_PROF_CONTR_PREV_SCHEME 224 +#define IDC_PROF_CONTR_Y_AXIS 225 +#define IDC_PROF_CONTR_VIBRATIONS 226 + +// Controller buttons +// #define IDC_CONTROLLER_BUTTONS 101 + +// Edit profile audio options +#define IDC_PROF_AUDIO_MUSIC_TITLE 101 +#define IDC_PROF_AUDIO_MUSIC_VALUE 102 +#define IDC_PROF_AUDIO_MUSIC 103 +#define IDC_PROF_AUDIO_RADIO_TITLE 104 +#define IDC_PROF_AUDIO_RADIO_VALUE 105 +#define IDC_PROF_AUDIO_RADIO 106 +#define IDC_PROF_AUDIO_EFFECT_TITLE 107 +#define IDC_PROF_AUDIO_EFFECT_VALUE 108 +#define IDC_PROF_AUDIO_EFFECT 109 +#define IDC_PROF_AUDIO_DEFAULT 110 + +// Edit profile video options +#define IDC_PROF_VIDEO_BRIGHT 101 +#define IDC_PROF_VIDEO_BRIGHT_TITLE 102 +#define IDC_PROF_VIDEO_BRIGHT_VALUE 103 +#define IDC_PROF_VIDEO_GAMMA 104 +#define IDC_PROF_VIDEO_GAMMA_TITLE 105 +#define IDC_PROF_VIDEO_GAMMA_VALUE 106 +#define IDC_PROF_VIDEO_SUBTITLES 107 +#define IDC_PROF_VIDEO_RADIO 108 +#define IDC_PROF_VIDEO_DEFAULT 109 + +// Select profile an Xbox live account display controls +#define IDC_PROFILE_LIVE_ACCOUNTS 101 +#define IDC_PROFILE_LIVE_CREATE 102 + +// Select difficulty dialog +#define IDC_DIFF_LIST 108 +#define IDC_DIFF_DESC 102 + +// Single mission display controls +#define IDC_SINGLE_MISSION 101 +#define IDC_SINGLE_OVERVIEW 102 +#define IDC_SINGLE_MISSION_PAD 103 +#define IDC_SINGLE_DIFF 104 +#define IDC_SINGLE_LOAD 105 +#define IDC_SINGLE_TITLE 106 +#define IDC_SINGLE_DELETE 107 +#define IDC_SINGLE_COPY 108 +#define IDC_SINGLE_EDIT 109 +#define IDC_SINGLE_NAME 110 +#define IDC_SINGLE_AUTHOR 111 +#define IDC_SINGLE_PICTURE 112 +#define IDC_SINGLE_DESCRIPTION 113 +#define IDC_SINGLE_LOADING_PICTURE 114 +#define IDC_SINGLE_SHOW_MISSION_WORKSHOP 115 +#define IDC_SINGLE_SHOW_GAME_WORKSHOP 116 +#define IDC_SINGLE_SHOW_GAME_OR_MISSION_WORKSHOP 117 +#define IDC_SINGLE_MISSION_SORT_COMBO 118 +#define IDC_SINGLE_MISSION_SORT_ORDER 119 +#define IDC_SINGLE_MISSION_BUY_DLC 120 +#define IDC_SINGLE_MISSION_DLCSTRIPE 121 +#define IDC_SINGLE_MISSION_DLCICON 122 + +// Xbox style mission wizard +#define IDC_XWIZ_TEMPLATE 101 +#define IDC_XWIZ_TEMPLATE_OVERVIEW 102 + +#define IDC_XWIZ_NAME 101 +#define IDC_XWIZ_ISLAND 102 +#define IDC_XWIZ_WEATHER 103 +#define IDC_XWIZ_TIME 104 +#define IDC_XWIZ_SUM_NAME 105 +#define IDC_XWIZ_SUM_TIME 106 +#define IDC_XWIZ_SUM_TEMPLATE 107 +#define IDC_XWIZ_SUM_ISLAND 108 +#define IDC_XWIZ_SUM_WEATHER 109 +#define IDC_XWIZ_SUM_WEATHER_FORECAST 110 +#define IDC_XWIZ_UNIT 111 +#define IDC_XWIZ_MAP 112 +#define IDC_XWIZ_SUM_DATE 113 +#define IDC_XWIZ_PARAM 114 +#define IDC_XWIZ_SAVE 115 + +#define IDC_XWIZ_UNITS 101 +#define IDC_XWIZ_UNITS_OVERVIEW 102 + +#define IDC_XWIZ_PARAMS 101 +#define IDC_XWIZ_PARAMS_TITLES 102 +#define IDC_XWIZ_PARAMS_VALUES 103 +#define IDC_EDIT 104 +#define IDD_XWIZARD_PARAMETER_TITLE 105 + +#define IDC_XWIZ_UNIT_SELECT 101 +#define IDC_XWIZ_UNIT_SELECT_TITLE 102 + +#define IDC_XWIZ_UNIT_CLASS 101 +#define IDC_XWIZ_UNIT_TYPE 102 +#define IDC_XWIZ_UNIT_COUNT 103 +#define IDC_XWIZ_UNIT_SIDE 104 +#define IDC_XWIZ_UNIT_SELECT_CUSTOM_TITLE 105 + +#define IDC_XWIZ_WP_TYPE 101 +#define IDC_XWIZ_WP_BEHAVIOUR 102 +#define IDC_XWIZ_WP_FORMATION 103 +#define IDC_XWIZ_WP_COMBAT_MODE 104 + +#define IDC_XWIZ_ISLAND_LIST 101 +#define IDC_XWIZ_ISLAND_MAP 102 +#define IDC_XWIZ_ISLAND_SHOTS 103 + +#define IDC_XWIZ_WEATHER_TITLE 101 +#define IDC_XWIZ_WEATHER_VALUE 102 +#define IDC_XWIZ_WEATHER_FORECAST_TITLE 103 +#define IDC_XWIZ_WEATHER_FORECAST_VALUE 104 +#define IDC_XWIZ_FOG_TITLE 105 +#define IDC_XWIZ_FOG_VALUE 106 +#define IDC_XWIZ_FOG_FORECAST_TITLE 107 +#define IDC_XWIZ_FOG_FORECAST_VALUE 108 +#define IDC_XWIZ_VIEW_DISTANCE_TITLE 109 +#define IDC_XWIZ_VIEW_DISTANCE_VALUE 110 + +#define IDC_XWIZ_TIME_HOUR 101 +#define IDC_XWIZ_TIME_MINUTE 102 +#define IDC_XWIZ_TIME_DAY 103 +#define IDC_XWIZ_TIME_MONTH 104 +#define IDC_XWIZ_TIME_YEAR 105 + +#define IDC_XWIZ_MAP_POINTS 101 +#define IDC_XWIZ_MAP_DELETE 102 +#define IDC_XWIZ_MAP_EDIT 103 +#define IDC_XWIZ_MAP_INSERT_WP 104 +#define IDC_XWIZ_MAP_NOTEPAD 105 +#define IDC_XWIZ_MAP_MOVE 106 + +// Select campaign display +#define IDC_CAMPAIGNS_LIST 101 +#define IDC_CAMPAIGNS_CAMPAIGN 102 +#define IDC_CAMPAIGNS_DESCRIPTION 103 + +// Campaign display +#define IDC_CAMPAIGN_HISTORY 101 +#define IDC_CAMPAIGN_REPLAY 102 +#define IDC_CAMPAIGN_DIFF 103 +#define IDC_CAMPAIGN_NAME 104 +#define IDC_CAMPAIGN_AUTHOR 105 +#define IDC_CAMPAIGN_PICTURE 106 +#define IDC_CAMPAIGN_DESCRIPTION 107 +#define IDC_CAMPAIGN_TEXT_ESTDEPLOY 108 +#define IDC_CAMPAIGN_RELEASEDATE 109 +#define IDC_CAMPAIGN_BUY_DLC 110 +#define IDC_CAMPAIGN_DLCSTRIPE 111 +#define IDC_CAMPAIGN_DLCICON 112 + +// MP campaign display +#define IDC_CAMPAIGN_MP_LIST 101 +#define IDC_CAMPAIGN_MP_TITLE 102 +#define IDC_CAMPAIGN_MP_NAME 103 +#define IDC_CAMPAIGN_MP_AUTHOR 104 +#define IDC_CAMPAIGN_MP_PICTURE 105 +#define IDC_CAMPAIGN_MP_DESCRIPTION 106 +#define IDC_CAMPAIGN_MP_PLAY 107 +#define IDC_CAMPAIGN_MP_HOST 108 +#define IDC_CAMPAIGN_MP_JOIN 109 +#define IDC_CAMPAIGN_MP_BUY_DLC 110 + +// Revert display +#define IDC_REVERT_BOOK 101 +#define IDC_REVERT_TITLE 102 +#define IDC_REVERT_QUESTION 103 + +// Game display controls +#define IDC_GAME_SELECT 301 +#define IDC_SIDE_NAME 101 + +// Options display controls +#define IDC_OPTIONS_VIDEO 301 +#define IDC_OPTIONS_AUDIO 302 +#define IDC_OPTIONS_CONFIGURE 303 +#define IDC_OPTIONS_DIFFICULTY 304 +#define IDC_OPTIONS_NOTEBOOK 305 +#define IDC_OPTIONS_CREDITS 306 +#define IDC_OPTIONS_GAMEOPTIONS 307 + +#define IDC_OPTIONS_OBJECT_VISIBILITY_VALUE 308 +#define IDC_OPTIONS_OBJECT_VISIBILITY_SLIDER 309 +#define IDC_OPTIONS_VISIBILITY_TEXT 310 +#define IDC_OPTIONS_SHADOW_VISIBILITY_VALUE 311 +#define IDC_OPTIONS_SHADOW_VISIBILITY_SLIDER 312 +#define IDC_OPTIONS_SHADOW_VISIBILIT_TEXT 313 +#define IDC_OPTIONS_TRAFFIC_VISIBILITY_VALUE 314 +#define IDC_OPTIONS_TRAFFIC_VISIBILITY_SLIDER 315 +#define IDC_OPTIONS_PIP_VISIBILITY_VALUE 316 +#define IDC_OPTIONS_PIP_VISIBILITY_SLIDER 317 + +#define IDC_OPTIONS_PIP_VALUE 334 +#define IDC_OPTIONS_SW_VALUE 335 +#define IDC_OPTIONS_FXAA_VALUE 336 +#define IDC_OPTIONS_WATER_SS_REFLECTIONS_VALUE 337 + +#define IDC_OPTIONS_QUALITY_VALUE 101 +#define IDC_OPTIONS_QUALITY_SLIDER 102 +#define IDC_OPTIONS_VISIBILITY_VALUE 103 +#define IDC_OPTIONS_VISIBILITY_SLIDER 104 + +#define IDC_OPTIONS_DRAWDISTANCE_VALUE 1336 +#define IDC_OPTIONS_DRAWDISTANCE_SLIDER 1337 + +#define IDC_OPTIONS_RATE_VALUE 105 +#define IDC_OPTIONS_RATE_SLIDER 106 +#define IDC_OPTIONS_TEXTURES_VALUE 107 +#define IDC_OPTIONS_TEXTURES_SLIDER 108 +#define IDC_OPTIONS_GAMMA_VALUE 109 +#define IDC_OPTIONS_GAMMA_SLIDER 110 +#define IDC_OPTIONS_BRIGHT_VALUE 111 +#define IDC_OPTIONS_BRIGHT_SLIDER 112 +#define IDC_OPTIONS_RESOLUTION 113 +#define IDC_OPTIONS_DISPLAY_MODE 1131 +#define IDC_OPTIONS_REFRESH 114 +#define IDC_OPTIONS_OBJSHADOWS 115 +//#define IDC_OPTIONS_VEHSHADOWS 116 +//#define IDC_OPTIONS_CLOUDLETS 117 +//#define IDC_OPTIONS_HWTL 118 +#define IDC_OPTIONS_BLOOD 119 +//#define IDC_OPTIONS_MULTITEXTURING 120 +#define IDC_OPTIONS_WBUFFER 121 +#define IDC_OPTIONS_BLOOD_TEXT 122 +#define IDC_OPTIONS_TERRAIN 123 +#define IDC_OPTIONS_LIFESTATE 199 +#define IDC_OPTIONS_TUTORIAL_HINTS 140 + +#define IDC_OBJECTS_DETAIL 124 +#define IDC_TEXTURE_DETAIL 125 +#define IDC_QUALITY_PREFERENCE 126 +#define IDC_SHADING_DETAIL 127 +#define IDC_SHADOW_DETAIL 128 + +#define IDC_OPTIONS_VIDEO_DEFAULT 129 +#define IDC_OPTIONS_VIDEO_AUTODETECT 1291 + +#define IDC_ANISO_DETAIL 130 +#define IDC_HDR_DETAIL 131 +#define IDC_POSTPROCESS_EFFECTS 132 +#define IDC_FSAA_DETAIL 133 +#define IDC_ASPECT_RATIO 134 +#define IDC_ATOC_DETAIL 1300 +#define IDC_PPAA_DETAIL 1301 + +#define IDC_OPTIONS_PP_SSAO 1310 +#define IDC_OPTIONS_PP_BLOOM_SLIDER 1311 +#define IDC_OPTIONS_PP_BLOOM_VALUE 1312 +#define IDC_OPTIONS_PP_ROTBLUR_SLIDER 1313 +#define IDC_OPTIONS_PP_ROTBLUR_VALUE 1314 +#define IDC_OPTIONS_PP_RADIALBLUR_SLIDER 1315 +#define IDC_OPTIONS_PP_RADIALBLUR_VALUE 1316 +#define IDC_OPTIONS_PP_DOF_SLIDER 1317 +#define IDC_OPTIONS_PP_DOF_VALUE 1318 +#define IDC_OPTIONS_PP_CAUSTICS 1319 +#define IDC_OPTIONS_PP_SHARPEN_SLIDER 1320 +#define IDC_OPTIONS_PP_SHARPEN_VALUE 1321 +#define IDC_OPTIONS_PP_COLOR_CORRECTIONS 1322 +#define IDC_OPTIONS_PP_BRIGHTNESS_SLIDER 1323 +#define IDC_OPTIONS_PP_BRIGHTNESS_VALUE 1324 +#define IDC_OPTIONS_PP_CONTRAST_SLIDER 1325 +#define IDC_OPTIONS_PP_CONTRAST_VALUE 1326 +#define IDC_OPTIONS_PP_SATURATION_SLIDER 1327 +#define IDC_OPTIONS_PP_SATURATION_VALUE 1328 + +#define IDC_OPTIONS_VIDEO_FPS_TEXT 1400 +#define IDC_OPTIONS_VIDEO_PERF_WARNING 1401 + + +#define IDC_OPTIONS_LANGUAGE 135 + +#define IDC_OPTIONS_IGUISIZE 136 +#define IDC_OPTIONS_IGUISIZE_LABEL 1014 +#define IDC_OPTIONS_IGUISIZE_TEXT 137 +#define IDC_OPTIONS_HEADBOB 138 + +#define IDC_VRAM_VALUE 139 + +#define IDC_VSYNC_VALUE 140 +#define IDC_OPTIONS_IMPERIALUNITS 141 +#define IDC_OPTIONS_VEHICLEFREELOOK 142 +#define IDC_OPTIONS_STREAM_FRIENDLY 143 +#define IDC_OPTIONS_ADAPTIVE_CROSSHAIR 144 +#define IDC_OPTIONS_INSTRUCTOR_FIGURE 145 +#define IDC_OPTIONS_ENABLE_RTD 146 +#define IDC_OPTIONS_ALLOW_FULL_RTD_HUD 147 +#define IDC_OPTIONS_ALLOW_ROUGH_LANDING_RTD 148 +#define IDC_OPTIONS_WIND_INFLUENCE_DYN_RTD 149 +#define IDC_OPTIONS_AUTO_TRIM_RTD 150 +#define IDC_OPTIONS_STRESS_DAMAGE_RTD 151 + +#define IDC_PARTICLES_EFFECTS 143 +#define IDC_OPTIONS_DYNAMIC_LIGHTS 144 + +#define IDC_OPTIONS_SLIDER_FILLRATE 1234 +#define IDC_OPTIONS_VALUE_FILLRATE 1236 + + +#define IDC_OPTIONS_MUSIC_VALUE 101 +#define IDC_OPTIONS_MUSIC_SLIDER 102 +#define IDC_OPTIONS_EFFECTS_VALUE 103 +#define IDC_OPTIONS_EFFECTS_SLIDER 104 +#define IDC_OPTIONS_VOICES_VALUE 105 +#define IDC_OPTIONS_VOICES_SLIDER 106 +#define IDC_OPTIONS_SAMPLING 107 +#define IDC_OPTIONS_HWACC 108 +#define IDC_OPTIONS_EAX 109 +#define IDC_OPTIONS_SINGLE_VOICE 110 +#define IDC_OPTIONS_AUDIO_DEFAULT 111 +#define IDC_OPTIONS_PLAYER_VOICE 112 +#define IDC_OPTIONS_VON_VALUE 113 +#define IDC_OPTIONS_VON_SLIDER 114 +//samples setting was replaced by audio output device +#define IDC_OPTIONS_SAMPLES_VALUE 115 +#define IDC_OPTIONS_SAMPLES_SLIDER 116 + +#define IDC_OPTIONS_AUDIO_OUTPUT_REFRESH 115 +#define IDC_OPTIONS_AUDIO_OUTPUT_COMBO 116 + +#define IDC_OPTIONS_MIC_SENS_SLIDER 117 +#define IDC_OPTIONS_MIC_ADJUST 118 + +#define IDC_OPTIONS_MAPDUCKING_VALUE 119 +#define IDC_OPTIONS_MAPDUCKING_SLIDER 120 + +// microphone adjustment +#define IDC_OPTIONS_MIC_PROGRESS_BAR 1001 +#define IDC_OPTIONS_MIC_PROGRESS 1002 + +#define IDC_OPTIONS_SUBTITLES 102 +#define IDC_OPTIONS_RADIO 103 + +#define IDC_DIFF_AI_LEVEL_TEXT 1510 +#define IDC_DIFF_AI_LEVEL 1511 +#define IDC_DIFF_AI_SKILL_LABEL 1512 +#define IDC_DIFF_AI_SKILL_SLIDER 1513 +#define IDC_DIFF_AI_SKILL_VALUE 1514 +#define IDC_DIFF_AI_PRECISION_LABEL 1515 +#define IDC_DIFF_AI_PRECISION_SLIDER 1516 +#define IDC_DIFF_AI_PRECISION_VALUE 1517 +#define IDC_DIFF_PICTURE 1518 +#define IDC_DIFF_DESCRIPTION 1519 +#define IDC_DIFF_OPTIONS_GROUP 1520 +#define IDC_DIFF_REDUCED_DAMAGE 1521 +#define IDC_DIFF_GROUP_INDICATORS 1522 +#define IDC_DIFF_FRIENDLY_TAG 1523 +#define IDC_DIFF_ENEMY_TAG 1524 +#define IDC_DIFF_MINES 1525 +#define IDC_DIFF_COMMANDS 1526 +#define IDC_DIFF_WAYPOINTS 1527 +#define IDC_DIFF_WEAPON_INFO 1528 +#define IDC_DIFF_STANCE_INDICATOR 1529 +#define IDC_DIFF_STAMINA_BAR 1530 +#define IDC_DIFF_CROSSHAIR 1531 +#define IDC_DIFF_VISION_AID 1532 +#define IDC_DIFF_THIRD_PERSON 1533 +#define IDC_DIFF_CAMERA_SHAKE 1534 +#define IDC_DIFF_SCORE_TABLE 1535 +#define IDC_DIFF_KILLED_BY 1536 +#define IDC_DIFF_VON_ID 1537 +#define IDC_DIFF_EXTENDED_MAP_FRIENDLY 1538 +#define IDC_DIFF_AUTO_REPORT 1539 +#define IDC_DIFF_MULTIPLE_SAVES 1540 +// #define IDC_DIFF_SQUAD_RADAR 1541 +#define IDC_DIFF_TACTICAL_PING 1542 +#define IDC_DIFF_EXTENDED_MAP_ENEMY 1543 +#define IDC_DIFF_EXTENDED_MAP_MINES 1544 +#define IDC_DIFF_MINIMAP_ALLOWED 1545 +#define IDC_DIFF_EXTENDED_MAP_PING 1546 + +// Configure display controls +#define IDC_CONFIG_DEFAULT 101 +#define IDC_CONFIG_KEYS 102 +#define IDC_CONFIG_XAXIS 103 +#define IDC_CONFIG_YAXIS 104 +#define IDC_CONFIG_YREVERSED 105 +#define IDC_CONFIG_JOYSTICK 106 +#define IDC_CONFIG_BUTTONS 107 +#define IDC_CONFIG_CONTROLS_PAGE 108 +#define IDC_CONFIG_FLOATING_ZONE 109 +#define IDC_CONFIG_MOUSE_FILTERING 110 +#define IDC_CONFIG_GEARBOX_MODE 112 +#define IDC_CONFIG_MOUSE_ACCELERATION 113 +#define IDC_CONFIG_KEY_PRESETS 114 + +// dialog for selecting default controls preset +#define IDC_CONFIG_DEFAULTCONTROLS_LIST 101 + +// Multiplayer type display controls +#define IDC_MP_TYPE_RANKED_MATCH 101 +#define IDC_MP_TYPE_PLAYER_MATCH 102 +#define IDC_MP_TYPE_SYSTEM_LINK 103 +#define IDC_MP_TYPE_FRIENDS 104 +#define IDC_MP_TYPE_DOWNLOAD 105 +#define IDC_MP_TYPE_INFO 106 +#define IDC_MP_TYPE_STATS 107 +#define IDC_MP_TYPE_SIGN_OUT 108 +#define IDC_MP_TYPE_DEDICATED_SERVER 109 +#define IDC_MP_TYPE_SERVER 110 +#define IDC_MP_TYPE_APPEAR_OFFLINE 111 + +// Xbox Live display controls +#define IDC_LIVE_QUICK_MATCH 101 +#define IDC_LIVE_CUSTOM_MATCH 102 +#define IDC_LIVE_CREATE_MATCH 103 + +// Friends dialog +#define IDC_FRIENDS_LIST 101 +#define IDC_FRIENDS_STATUS 102 + +// Friends options dialog +#define IDC_FRIENDS_PLAYER 101 +#define IDC_FRIENDS_GAME_INVITE 102 +#define IDC_FRIENDS_GAME_CANCEL 103 +#define IDC_FRIENDS_GAME_ACCEPT 104 +#define IDC_FRIENDS_GAME_DECLINE 105 +#define IDC_FRIENDS_GAME_JOIN 106 +#define IDC_FRIENDS_ACCEPT 107 +#define IDC_FRIENDS_DECLINE 108 +#define IDC_FRIENDS_STOP 109 +#define IDC_FRIENDS_CANCEL 110 +#define IDC_FRIENDS_REMOVE 111 +#define IDC_FRIENDS_VOICE 112 +#define IDC_FRIENDS_FEEDBACK 113 +#define IDC_FRIENDS_GAME_INVITE_VOICE 114 +#define IDC_FRIENDS_PLAY_MESSAGE 115 +#define IDC_FRIENDS_MISSIONS 152 +#define IDC_MULTI_BATTLEYE_FILTER 154 +#define IDC_MULTI_EXPANSIONS_FILTER 155 + +// Send voice mail dialog +#define IDC_SVM_TITLE 101 +#define IDC_SVM_PLAYER 102 +#define IDC_SVM_RECORD 103 +#define IDC_SVM_PLAY 104 +#define IDC_SVM_SEND 105 +#define IDC_SVM_PROGRESS 106 +#define IDC_SVM_TIME 107 + +// Receive voice mail dialog +#define IDC_RVM_TITLE 101 +#define IDC_RVM_PLAYER 102 +#define IDC_RVM_PLAY 103 +#define IDC_RVM_FEEDBACK 104 +#define IDC_RVM_PROGRESS 105 +#define IDC_RVM_TIME 106 + +// Xbox players dialog +#define IDC_XPLAYERS_LIST 101 +#define IDC_XPLAYERS_STATUS 102 +#define IDC_XPLAYERS_DISABLE_VOICE 103 +#define IDC_XPLAYERS_ENABLE_VOICE 104 +#define IDC_XPLAYERS_KICKOFF 105 + +// Xbox players options dialog +#define IDC_XPLAYERS_PLAYER 101 +#define IDC_XPLAYERS_ASK 102 +#define IDC_XPLAYERS_MUTE 103 +#define IDC_XPLAYERS_FEEDBACK 104 +#define IDC_XPLAYERS_CANCEL 105 +#define IDC_XPLAYERS_ASK_VOICE 107 + +// Feedback dialog +#define IDC_FEEDBACK_PLAYER 101 +#define IDC_FEEDBACK_DATE 102 +#define IDC_FEEDBACK_GREAT_SESSION 103 +#define IDC_FEEDBACK_GOOD_ATTITUDE 104 +#define IDC_FEEDBACK_BAD_NAME 105 +#define IDC_FEEDBACK_CURSING 106 +#define IDC_FEEDBACK_SCREAM 107 +#define IDC_FEEDBACK_CHEAT 108 +#define IDC_FEEDBACK_THREAT 109 +#define IDC_FEEDBACK_MSG_HARASSING 110 +#define IDC_FEEDBACK_MSG_OFFENSIVE 111 +#define IDC_FEEDBACK_MSG_SPAM 112 + +// Download content display controls +#define IDC_DOWNLOAD_CONTENT_LIST 101 + +#define IDC_DOWNLOAD_CONTENT_TITLE 101 +#define IDC_DOWNLOAD_CONTENT_TERMS 102 +#define IDC_DOWNLOAD_CONTENT_PICTURE 103 +#define IDC_DOWNLOAD_CONTENT_SHOW_PRICE 104 + +#define IDC_DOWNLOAD_CONTENT_PRICE_TITLE 101 +#define IDC_DOWNLOAD_CONTENT_PRICE 102 +#define IDC_DOWNLOAD_CONTENT_PRICE_QUESTION 103 + +#define IDC_INSTALL_CONTENT_PROGRESS 101 +#define IDC_INSTALL_CONTENT_NAME 102 +#define IDC_INSTALL_CONTENT_TIME 103 + +// Multiplayer passcode display controls +#define IDC_MP_PASSCODE_FIRST 101 + +// Multiplayer display controls +#define IDC_MULTI_TITLE 101 +#define IDC_MULTI_SESSIONS 102 +//#define IDC_MULTI_REMOTE 103 //Renamed to IDC_MULTI_TAB_DIRECT_CONNECT +//#define IDC_MULTI_NEW 104 //Renamed to IDC_MULTI_TAB_HOST_SERVER +#define IDC_MULTI_JOIN 105 +#define IDC_MULTI_NOTEBOOK 106 +#define IDC_MULTI_PASSWORD 107 +#define IDC_MULTI_PORT 108 +#define IDC_MULTI_SERVER_ICON 111 +#define IDC_MULTI_SERVER_COLUMN 112 +#define IDC_MULTI_MISSION_ICON 113 +#define IDC_MULTI_MISSION_COLUMN 114 +#define IDC_MULTI_STATE_ICON 115 +#define IDC_MULTI_STATE_COLUMN 116 +#define IDC_MULTI_PLAYERS_ICON 117 +#define IDC_MULTI_PLAYERS_COLUMN 118 +#define IDC_MULTI_PING_ICON 119 +#define IDC_MULTI_PING_COLUMN 120 +#define IDC_MULTI_PROGRESS 121 +#define IDC_MULTI_INTERNET 122 +#define IDC_MULTI_REFRESH 123 +#define IDC_MULTI_FILTER 124 +#define IDC_MULTI_SERVER_FILTER 125 +#define IDC_MULTI_MISSION_FILTER 126 +#define IDC_MULTI_PLAYERS_FILTER 127 +#define IDC_MULTI_PING_FILTER 128 +#define IDC_MP_HOST 129 +#define IDC_MP_TYPE 130 +#define IDC_MP_MISSION 131 +#define IDC_MP_ISLAND 132 +#define IDC_MP_STATE 133 +#define IDC_MP_TIMELEFT 134 +#define IDC_MP_SLOTS_PUBLIC 135 +#define IDC_MP_SLOTS_PRIVATE 136 +#define IDC_MP_NO_SESSION 137 +#define IDC_MP_DIFFICULTY 138 +#define IDC_MP_LANGUAGE 139 +#define IDC_MULTI_GAMETYPE_ICON 140 +#define IDC_MULTI_GAMETYPE_COLUMN 141 +#define IDC_MP_PING 142 +#define IDC_MP_PASSWORD 143 +#define IDC_MP_PLATFORM 144 +#define IDC_MP_COUNTRY 145 +#define IDC_MP_VERSION 146 +#define IDC_MP_VERSION_REQUIRED 147 +#define IDC_MP_MODS 148 +#define IDC_MP_PLAYERS_ROW 149 +#define IDC_MULTI_PASSWORDED_FILTER 150 +#define IDC_MULTI_FULL_FILTER 151 +#define IDC_MULTI_TYPE_FILTER 152 +#define IDC_MP_NEXT_SESSION 153 +#define IDC_MULTI_BATTLEYE_FILTER 154 +#define IDC_MULTI_EXPANSIONS_FILTER 155 +#define IDC_MULTI_FAVORITE_COLUMN 156 +#define IDC_MULTI_FAVORITE_ICON 157 +#define IDC_MULTI_SERVER_COUNT 158 +#define IDC_MULTI_TAB_INTERNET 159 +#define IDC_MULTI_TAB_RECENT 160 +#define IDC_MULTI_TAB_LAN 161 +#define IDC_MULTI_TAB_FRIENDS 162 +#define IDC_MULTI_TAB_OFFICIAL 163 //Changed 164 to 163 +#define IDC_MULTI_TAB_QUICK_PLAY 164 //IDC_MULTI_QUICK_PLAY renamed to IDC_MULTI_TAB_OFFICIAL, changed to 164 +#define IDC_MULTI_TAB_SERVERS 165 //IDC_MULTI_SERVERS renamed to IDC_MULTI_TAB_SERVERS, changed to 165 +#define IDC_MULTI_TAB_DIRECT_CONNECT 166 //IDC_MULTI_REMOTE 103 renamed and changed to IDC_MULTI_TAB_DIRECT_CONNECT +#define IDC_MULTI_TAB_HOST_SERVER 167 //IDC_MULTI_NEW 104 renamed and changed to IDC_MULTI_TAB_HOST_SERVER +#define IDC_MULTI_LAUNCHER 168 //Launcher button +#define IDC_MP_FILEPATCHING 169 + +//MP Quick Play dialogue +#define IDC_MP_QUICK_GAME_TYPE 110 +#define IDC_MP_QUICK_MAX_PING 111 +#define IDC_MP_QUICK_BEST_SERVER 112 +#define IDC_MP_QUICK_FIND_SERVER 113 +#define IDC_MP_QUICK_SHOW_SERVERS 114 +#define IDC_MP_QUICK_SHOW_SERVERS 114 +#define IDC_MP_QUICK_MODE_TITLE 115 +#define IDC_MP_QUICK_MODE_PICTURE 116 +#define IDC_MP_QUICK_MODE_DESCRIPTION 117 +#define IDC_MP_QUICK_MODE_BACKGROUND 118 + +//Server Search dialogue +#define IDC_MP_SERVER_SEARCH_STATUS 101 +#define IDC_MP_SERVER_SEARCH_PROGRESS 102 + +//Server Found dialogue +#define IDC_MP_SERVER_FOUND_COUNTDOWN 101 +#define IDC_MP_SERVER_FOUND_MISSION 102 +#define IDC_MP_SERVER_FOUND_GAME_TYPE 103 +#define IDC_MP_SERVER_FOUND_PLAYERS 104 +#define IDC_MP_SERVER_FOUND_BUTTON_NEXT 105 +#define IDC_MP_SERVER_FOUND_BUTTON_JOIN 106 + +#define IDC_OPTIMATCH_FILTER_SPEED 101 +#define IDC_OPTIMATCH_FILTER_TYPE 102 +#define IDC_OPTIMATCH_FILTER_MIN_PLAYERS 103 +#define IDC_OPTIMATCH_FILTER_MAX_PLAYERS 104 +#define IDC_OPTIMATCH_FILTER_LANGUAGE 105 +#define IDC_OPTIMATCH_FILTER_DIFFICULTY 106 + +#define IDC_PASSWORD 101 + +#define IDC_IP_ADDRESS 101 +#define IDC_IP_PORT 102 + +#define IDC_PORT_PORT 101 + +#define IDC_FILTER_SERVER 101 +#define IDC_FILTER_MISSION 102 +#define IDC_FILTER_MAXPING 103 +#define IDC_FILTER_MINPLAYERS 104 +#define IDC_FILTER_MAXPLAYERS 105 +#define IDC_FILTER_FULL 106 +#define IDC_FILTER_PASSWORDED 107 +#define IDC_FILTER_DEFAULT 108 +#define IDC_FILTER_TYPE 109 +#define IDC_FILTER_BATTLEYE 110 +#define IDC_FILTER_EXPANSIONS 111 +#define IDC_FILTER_MONETIZED 112 + +#define IDC_CLIENT_TEXT 101 +#define IDC_CLIENT_PLAYERS 102 +#define IDC_CLIENT_PROGRESS 103 + +#define IDC_SERVER_ISLAND 101 +#define IDC_SERVER_MISSION 102 +#define IDC_SERVER_EDITOR 103 +#define IDC_SERVER_DIFF 104 +#define IDC_SERVER_PLAYERS 105 +#define IDC_SERVER_GAMETYPE 106 +#define IDC_SERVER_SLOTS 107 +#define IDC_SERVER_SLOTS_PRIVATE 108 +#define IDC_SERVER_SLOTS_PUBLIC 109 +#define IDC_SERVER_MIN_PLAYERS 110 +#define IDC_SERVER_MAX_PLAYERS 111 +#define IDC_SERVER_SLOTS_PRIVATE_TITLE 112 +#define IDC_SERVER_SLOTS_PRIVATE_TEXT 112 +#define IDC_SERVER_SLOTS_PUBLIC_TITLE 113 +#define IDC_SERVER_SLOTS_PUBLIC_TEXT 113 +#define IDC_SERVER_SLOTS_PUBLIC_VALUE 114 +#define IDC_SERVER_SLOTS_PRIVATE_VALUE 115 +#define IDC_SERVER_VOTED_MISSIONS 116 +#define IDC_SERVER_PLAYERS_TITLE 117 +#define IDC_SERVER_TIMEOUT 118 +#define IDC_SERVER_VOTED_DIFFICULTY 119 +#define IDC_SERVER_DELETE 120 +#define IDC_SERVER_COPY 121 +#define IDC_SERVER_EDIT 122 +#define IDC_SERVER_LOAD 123 +#define IDC_SERVER_PRIVATE_SLOTS_TITLE 124 +#define IDC_SERVER_PRIVATE_SLOTS_VALUE 125 +#define IDC_SERVER_PRIVATE_SLOTS 126 +#define IDC_SERVER_MAXIMUM_SLOTS_TITLE 127 +#define IDC_SERVER_MAXIMUM_SLOTS 128 +#define IDC_SERVER_MAXIMUM_SLOTS_VALUE 129 +#define IDC_SERVER_MI_OVERVIEW 130 +#define IDC_SERVER_MI_GAMETYPE 131 +#define IDC_SERVER_MI_MAX_PLAYERS 132 +#define IDC_SERVER_MI_RESPAWN 133 +#define IDC_SERVER_MI_MIN_PLAYERS 134 +#define IDC_SERVER_SHOW_MISSION_WORKSHOP 135 +#define IDC_SERVER_SHOW_GAME_WORKSHOP 136 +#define IDC_SERVER_MI_NAME 137 +#define IDC_SERVER_MI_AUTHOR 138 +#define IDC_SERVER_MI_PICTURE 139 +#define IDC_SERVER_MI_DESCRIPTION 140 +#define IDC_SERVER_LOADING_PICTURE 141 +#define IDC_SERVER_GAME_OR_MISSION_WORKSHOP 142 +#define IDC_SERVER_ISLAND_TITLE 143 +#define IDC_SERVER_MISSION_TITLE 144 +#define IDC_SERVER_DIFF_INDICATOR 145 +#define IDC_SERVER_PURCHASE_BUTTON 146 + + +#define IDC_REQUIRED_BATTLEYE 201 + +// _VBS3 +#define IDC_AAR_SERVER 121 +#define IDC_AAR_SERVER_FILES 122 +#define IDC_AAR_DOWNLOADPROGRESS 123 +#define IDC_AAR_DOWNLOADSTART 124 +#define IDC_AAR_DOWNLOADSTOP 125 + +// Host settings dialog +#define IDC_HOST_NAME 101 +#define IDC_HOST_PASSWORD 102 +#define IDC_HOST_MAX_PLAYERS 103 +#define IDC_HOST_PRIVATE 104 +#define IDC_HOST_PORT 105 +#define IDC_HOST_PORT_WARNING 106 +#define IDC_HOST_UPNP 107 + +#define IDC_DED_SERVER_SLOTS_PUBLIC 101 +#define IDC_DED_SERVER_SLOTS_PUBLIC_TITLE 102 +#define IDC_DED_SERVER_SLOTS_PUBLIC_VALUE 103 +#define IDC_DED_SERVER_SLOTS_PRIVATE 104 +#define IDC_DED_SERVER_SLOTS_PRIVATE_TITLE 105 +#define IDC_DED_SERVER_SLOTS_PRIVATE_VALUE 106 + +#define IDC_WIZT_TEMPLATES 101 +#define IDC_WIZT_OVERVIEW 102 +#define IDC_WIZT_NAME 103 + +#define IDC_WIZM_EDIT 101 + +#define IDC_SRVSETUP_PLAYERS 101 +#define IDC_SRVSETUP_UNITS 102 +#define IDC_SRVSETUP_ISLAND 103 +#define IDC_SRVSETUP_NAME 104 +#define IDC_SRVSETUP_DESC 105 +#define IDC_SRVSETUP_ASSIGN 106 +#define IDC_SRVSETUP_UNASSIGN 107 +#define IDC_SRVSETUP_RANDOM 108 +#define IDC_SRVSETUP_PARAM1 109 +#define IDC_SRVSETUP_PARAM1_TEXT 110 +#define IDC_SRVSETUP_PARAM2 111 +#define IDC_SRVSETUP_PARAM2_TEXT 112 + +#define IDC_SRVSIDE_NAME 101 +#define IDC_SRVSIDE_ISLAND 102 +#define IDC_SRVSIDE_POOL 103 +#define IDC_SRVSIDE_WEST 104 +#define IDC_SRVSIDE_EAST 105 +#define IDC_SRVSIDE_RESIST 106 +#define IDC_SRVSIDE_CIVIL 107 +#define IDC_SRVSIDE_WEST_TEXT 108 +#define IDC_SRVSIDE_EAST_TEXT 109 +#define IDC_SRVSIDE_RESIST_TEXT 110 +#define IDC_SRVSIDE_CIVIL_TEXT 111 +#define IDC_SRVSIDE_DEFAULT 112 +#define IDC_SRVSIDE_PARAM1 113 +#define IDC_SRVSIDE_PARAM1_TEXT 114 +#define IDC_SRVSIDE_PARAM2 115 +#define IDC_SRVSIDE_PARAM2_TEXT 116 +#define IDC_SRVSIDE_PLAYERS 117 + +#define IDC_MPROLE_TITLE 101 +#define IDC_MPROLE_NAME 102 +#define IDC_MPROLE_ISLAND 103 +#define IDC_MPROLE_DESC 104 +#define IDC_MPROLE_POOL 105 +#define IDC_MPROLE_POOL_TEXT 106 +#define IDC_MPROLE_ROLES 107 +#define IDC_MPROLE_DEFAULT 108 +#define IDC_MPROLE_ENABLE 109 +#define IDC_MPROLE_SIDES 110 +#define IDC_MPROLE_ENABLE_ALL 111 + +#define IDC_CLIENT_GAME 101 + +#define IDC_CLIENTMAP_START1 101 +#define IDC_CLIENTMAP_START2 102 + +#define IDC_CLIENT_READY_PLAYERS 120 +#define IDC_CLIENT_READY_PLAYERS_TITLE 121 +#define IDC_CLIENT_READY_TIMEOUT 122 + +#define IDC_SERVER_READY_PLAYERS 120 +#define IDC_SERVER_READY_PLAYERS_TITLE 121 + +#define IDC_MP_PLAYERS 101 +#define IDC_MP_PL 102 +#define IDC_MP_PL_NAME 103 +#define IDC_MP_PL_MAIL 104 +#define IDC_MP_PL_ICQ 105 +#define IDC_MP_PL_REMARK 106 +#define IDC_MP_SQ 107 +#define IDC_MP_SQ_NAME 108 +#define IDC_MP_SQ_ID 109 +#define IDC_MP_SQ_MAIL 110 +#define IDC_MP_SQ_WEB 111 +#define IDC_MP_SQ_PICTURE 112 +#define IDC_MP_SQ_TITLE 113 +#define IDC_MP_KICKOFF 114 +#define IDC_MP_BAN 115 +#define IDC_MP_PL_MISSION 116 +#define IDC_MP_PL_ISLAND 117 +#define IDC_MP_PL_TIME 118 +#define IDC_MP_PL_MINPING 119 +#define IDC_MP_PL_AVGPING 120 +#define IDC_MP_PL_MAXPING 121 +#define IDC_MP_PL_MINBAND 122 +#define IDC_MP_PL_AVGBAND 123 +#define IDC_MP_PL_MAXBAND 124 +#define IDC_MP_PL_DESYNC 125 +#define IDC_MP_PL_REST 126 +#define IDC_MP_MUTE 127 + +#define IDC_CLIENT_WAIT_TITLE 130 // is used together with MP_PL + +#define IDC_MPSETUP_NAME 101 +#define IDC_MPSETUP_ISLAND 102 +#define IDC_MPSETUP_DESC 103 +#define IDC_MPSETUP_WEST 104 +#define IDC_MPSETUP_EAST 105 +#define IDC_MPSETUP_GUERRILA 106 +#define IDC_MPSETUP_CIVILIAN 107 +#define IDC_MPSETUP_ROLES_TITLE 108 +#define IDC_MPSETUP_ROLES 109 +#define IDC_MPSETUP_PARAM1_TITLE 110 +#define IDC_MPSETUP_PARAM1 111 +#define IDC_MPSETUP_PARAM2_TITLE 112 +#define IDC_MPSETUP_PARAM2 113 +#define IDC_MPSETUP_POOL 114 +#define IDC_MPSETUP_MESSAGE 115 +#define IDC_MPSETUP_KICK 116 +#define IDC_MPSETUP_ENABLE_ALL 117 +#define IDC_MPSETUP_LOCK 118 +#define IDC_MPSETUP_SIDE 119 +#define IDC_MPSETUP_POOL_TITLE 120 +#define IDC_MPSETUP_TIMEOUT 121 +#define IDC_MPSETUP_PLAYERS 122 +#define IDC_MPSETUP_FRIENDS 123 +#define IDC_MPSETUP_ADVANCED 124 +#define IDC_MPSETUP_GAMERCARD 125 +#define IDC_MPSETUP_PARTYGUI 126 +#define IDC_MPSETUP_ASSIGNROLE 127 +#define IDC_MPSETUP_PARAMS 128 +#define IDC_MPSETUP_DSINTERFACE 129 +#define IDC_MPSETUP_MISSION_WORKSHOP 130 +#define IDC_MPSETUP_LOGIC 131 +#define IDC_MPSETUP_VIRTUAL 132 +#define IDC_MPSETUP_PLAYERS_BUTTON 133 +#define IDC_MPSETUP_PLAYERS_SORT 134 +#define IDC_MPSETUP_PING_BUTTON 135 +#define IDC_MPSETUP_PING_SORT 136 +#define IDC_MPSETUP_MUTE_ALL 137 + +#define IDC_MPSETUP_MSG_MESSAGE 101 +#define IDC_MPSETUP_MSG_PROGRESS 102 +#define IDC_MPSETUP_MSG_TIME 103 + +#define IDC_PROGRESS_MSG_MESSAGE 101 +#define IDC_PROGRESS_MSG_PROGRESS 102 +#define IDC_PROGRESS_MSG_TIME 103 + +#define IDC_SERVER_SETTINGS_PARAM1_TEXT 101 +#define IDC_SERVER_SETTINGS_PARAM1 102 +#define IDC_SERVER_SETTINGS_PARAM2_TEXT 103 +#define IDC_SERVER_SETTINGS_PARAM2 104 +#define IDC_SERVER_SETTINGS_AI 105 +#define IDC_SERVER_SETTINGS_ASSIGN 106 + +#define IDC_SERVER_ADVANCED_ROLES 101 +#define IDC_SERVER_ADVANCED_DISABLE_ALL 102 +#define IDC_SERVER_ADVANCED_AUTOASSIGN 103 + +#define IDC_SERVER_SELECT_PLAYERS 101 + +// Main map display controls +#define IDC_MAP_WATCH 101 +#define IDC_MAP_COMPASS 102 +#define IDC_MAP_WALKIE_TALKIE 103 +#define IDC_MAP_NOTEPAD 104 +#define IDC_MAP_WARRANT 105 +#define IDC_MAP_GPS 106 +#define IDC_MAP_TEXTURES 107 +#define IDC_MAP_BRIEFING_SHOW 108 +#define IDC_MAP_BRIEFING_PAGE 109 +#define IDC_MAP_PREV_MARKER 110 +#define IDC_MAP_NEXT_MARKER 111 +#define IDC_MAP_GEAR 112 + +// Diary display controls +#define IDC_DIARY 101 +#define IDC_DIARY_INDEX 102 +#define IDC_DIARY_PAGE 103 +#define IDC_DIARY_ADD 104 + +// Select island display controls +#define IDC_SELECT_ISLAND 101 +#define IDC_SELECT_ISLAND_NOTEBOOK 102 +#define IDC_SELECT_ISLAND_WIZARD 103 +#define IDC_SELECT_ISLAND_EDITOR 104 +#define IDC_SELECT_ISLAND_EDITOR_OLD 105 +//Redefined in Eden +//IDC_SELECT_ISLAND_EDITOR_OLD 105 +//IDC_SELECT_ISLAND_3DEN 106 +#define IDC_SELECT_ISLAND_BUTTON_PURCHASE 107 + +// Custom arcade display controls +#define IDC_CUST_GAME 101 +#define IDC_CUST_PLAY 102 +#define IDC_CUST_EDIT 103 +#define IDC_CUST_DELETE 104 +#define IDC_CUST_EDIT_2 105 + +#define IDC_MISSION_PARAMS_LABEL 101 +#define IDC_MISSION_PARAMS_COMBO 102 + +#define IDC_ARCMAP_LOAD 101 +#define IDC_ARCMAP_SAVE 102 +#define IDC_ARCMAP_CLEAR 103 +#define IDC_ARCMAP_MODE 104 +#define IDC_ARCMAP_INTEL 105 +#define IDC_ARCMAP_MERGE 106 +#define IDC_ARCMAP_PREVIEW 107 +#define IDC_ARCMAP_CONTINUE 108 +#define IDC_ARCMAP_SECTION 109 +#define IDC_ARCMAP_IDS 111 +#define IDC_ARCMAP_TEXTURES 112 +#define IDC_ARCMAP_MISSION_NAME 113 +#define IDC_ARCMAP_MAP 114 +#define IDC_ARCMAP_BACKGROUND 115 +#define IDC_ARCMAP_LAYOUT 116 +#define IDC_ARCMAP_PUBLISH_MISSION 117 + +#define IDC_ARCUNIT_TITLE 101 +#define IDC_ARCUNIT_SIDE 102 +#define IDC_ARCUNIT_VEHICLE 103 +#define IDC_ARCUNIT_RANK 104 +#define IDC_ARCUNIT_CTRL 105 +#define IDC_ARCUNIT_CLASS 107 +#define IDC_ARCUNIT_HEALTH 108 +#define IDC_ARCUNIT_FUEL 109 +#define IDC_ARCUNIT_AMMO 110 +#define IDC_ARCUNIT_AZIMUT 111 +#define IDC_ARCUNIT_SPECIAL 112 +#define IDC_ARCUNIT_AGE 113 +#define IDC_ARCUNIT_AZIMUT_PICTURE 114 +#define IDC_ARCUNIT_PLACE 115 +#define IDC_ARCUNIT_PRESENCE 116 +#define IDC_ARCUNIT_PRESENCE_COND 117 +#define IDC_ARCUNIT_TEXT 118 +#define IDC_ARCUNIT_LOCK 119 +#define IDC_ARCUNIT_INIT 120 +#define IDC_ARCUNIT_SKILL 121 +#define IDC_ARCUNIT_DESC 122 +#define IDC_ARCUNIT_FACTION 123 +#define IDC_ARCUNIT_ELEVATION 124 +#define IDC_ARCUNIT_EQUIP 125 +#define IDC_ARCUNIT_RADIUS 126 +#define IDC_ARCUNIT_ARGUMENTS 127 +#define IDC_ARCUNIT_CATEGORY 128 +#define IDC_ARCUNIT_SETTINGS 2301 + +#define IDC_ARCGRP_SIDE 101 +#define IDC_ARCGRP_TYPE 102 +#define IDC_ARCGRP_NAME 103 +#define IDC_ARCGRP_AZIMUT 104 +#define IDC_ARCGRP_AZIMUT_PICTURE 105 +#define IDC_ARCGRP_FACTION 106 +#define IDC_ARCGRP_UNITS_LIST 107 + +#define IDC_ARCWP_TITLE 101 +#define IDC_ARCWP_TYPE 102 +#define IDC_ARCWP_SEQ 103 +#define IDC_ARCWP_DESC 104 +#define IDC_ARCWP_SEMAPHORE 105 +#define IDC_ARCWP_FORM 106 +#define IDC_ARCWP_SPEED 107 +#define IDC_ARCWP_COMBAT 108 +#define IDC_ARCWP_PLACE 109 +#define IDC_ARCWP_EFFECTS 110 +#define IDC_ARCWP_TIMEOUT_MIN 111 +#define IDC_ARCWP_TIMEOUT_MAX 112 +#define IDC_ARCWP_TIMEOUT_MID 113 +#define IDC_ARCWP_HOUSEPOS 114 +#define IDC_ARCWP_HOUSEPOSTEXT 115 +#define IDC_ARCWP_EXPACTIV 116 +#define IDC_ARCWP_SHOW 117 +#define IDC_ARCWP_EXPCOND 118 +#define IDC_ARCWP_SCRIPT 119 +#define IDC_ARCWP_PREC 120 +#define IDC_ARCWP_HEIGHT 121 +#define IDC_ARCWP_HEIGHTTEXT 122 +#define IDC_ARCWP_SCRIPTTEXT 123 +#define IDC_ARCWP_CATEGORY 124 + +#define IDC_ARCWP_ARGUMENTS 125 +#define IDC_ARCWP_ARGUMENTSTEXT 126 +#define IDC_ARCWP_NAME 127 + +#define IDC_ARCEFF_SOUND 103 +#define IDC_ARCEFF_VOICE 104 +#define IDC_ARCEFF_SOUND_ENV 105 +#define IDC_ARCEFF_SOUND_DET 106 +#define IDC_ARCEFF_MUSIC 107 +#define IDC_ARCEFF_TITTYPE 108 +#define IDC_ARCEFF_TITEFF 109 +#define IDC_ARCEFF_TITTEXT 110 +#define IDC_ARCEFF_TITRES 111 +#define IDC_ARCEFF_TITOBJ 112 +//#define IDC_ARCEFF_PLAYERONLY 113 +#define IDC_ARCEFF_CONDITION 113 +#define IDC_ARCEFF_TEXT_TITTEXT 114 + +#define IDC_ARCSENS_TITLE 101 +#define IDC_ARCSENS_A 102 +#define IDC_ARCSENS_B 103 +#define IDC_ARCSENS_ANGLE 104 +#define IDC_ARCSENS_ACTIV 105 +#define IDC_ARCSENS_PRESENCE 106 +#define IDC_ARCSENS_REPEATING 107 +#define IDC_ARCSENS_INTERRUPT 108 +#define IDC_ARCSENS_TIMEOUT_MIN 109 +#define IDC_ARCSENS_TIMEOUT_MAX 110 +#define IDC_ARCSENS_TIMEOUT_MID 111 +#define IDC_ARCSENS_TYPE 112 +#define IDC_ARCSENS_OBJECT 113 +#define IDC_ARCSENS_TEXT 114 +#define IDC_ARCSENS_AGE 115 +#define IDC_ARCSENS_EFFECTS 116 +#define IDC_ARCSENS_EXPCOND 117 +#define IDC_ARCSENS_EXPACTIV 118 +#define IDC_ARCSENS_EXPDESACTIV 119 +#define IDC_ARCSENS_RECT 120 +#define IDC_ARCSENS_NAME 121 + +#define IDC_ARCMARK_TITLE 101 +#define IDC_ARCMARK_NAME 102 +#define IDC_ARCMARK_MARKER 103 +#define IDC_ARCMARK_TYPE 104 +#define IDC_ARCMARK_COLOR 105 +#define IDC_ARCMARK_A 106 +#define IDC_ARCMARK_B 107 +#define IDC_ARCMARK_ANGLE 108 +#define IDC_ARCMARK_TYPE_TEXT 109 +#define IDC_ARCMARK_FILL 110 +#define IDC_ARCMARK_TEXT 111 + +#define IDC_INTEL_RESISTANCE 101 +#define IDC_INTEL_MONTH 102 +#define IDC_INTEL_DAY 103 +#define IDC_INTEL_HOUR 104 +#define IDC_INTEL_MINUTE 105 +#define IDC_INTEL_BRIEFING_NAME 106 +#define IDC_INTEL_BRIEFING_DESC 107 +#define IDC_INTEL_WEATHER 108 +#define IDC_INTEL_FOG 109 +#define IDC_INTEL_WEATHER_FORECAST 110 +#define IDC_INTEL_FOG_FORECAST 111 +#define IDC_INTEL_YEAR 112 +//added by MUF - new intel dialog-------------------------- +#define IDC_INTEL_WEATHER_TB 113 +#define IDC_INTEL_WEATHER_FORECAST_TB 114 + +#define IDC_INTEL_FOG_CB 115 +#define IDC_INTEL_FOG_TB 116 +#define IDC_INTEL_FOG_FORECAST_TB 117 + +#define IDC_INTEL_RAIN_CB 118 +#define IDC_INTEL_RAIN 119 +#define IDC_INTEL_RAIN_TB 120 +#define IDC_INTEL_RAIN_FORECAST 121 +#define IDC_INTEL_RAIN_FORECAST_TB 122 + +#define IDC_INTEL_LIGHTN_CB 123 +#define IDC_INTEL_LIGHTN 124 +#define IDC_INTEL_LIGHTN_TB 125 +#define IDC_INTEL_LIGHTN_FORECAST 126 +#define IDC_INTEL_LIGHTN_FORECAST_TB 127 + +#define IDC_INTEL_WAVES_CB 128 +#define IDC_INTEL_WAVES 129 +#define IDC_INTEL_WAVES_TB 130 +#define IDC_INTEL_WAVES_FORECAST 131 +#define IDC_INTEL_WAVES_FORECAST_TB 132 + +#define IDC_INTEL_WIND_CB 133 +#define IDC_INTEL_STRENGTH 134 +#define IDC_INTEL_STRENGTH_TB 135 +#define IDC_INTEL_STRENGTH_FORECAST 136 +#define IDC_INTEL_STRENGTH_FORECAST_TB 137 + +#define IDC_INTEL_GUSTS 138 +#define IDC_INTEL_GUSTS_TB 139 +#define IDC_INTEL_GUSTS_FORECAST 140 +#define IDC_INTEL_GUSTS_FORECAST_TB 141 + +#define IDC_INTEL_WINDDIR 142 +#define IDC_INTEL_WINDDIR_TB 143 +#define IDC_INTEL_WINDDIR_FORECAST 144 +#define IDC_INTEL_WINDDIR_FORECAST_TB 145 + +#define IDC_INTEL_CHNGTIME 146 +#define IDC_INTEL_CHNGTIME_HOUR_TB 147 +#define IDC_INTEL_CHNGTIME_MIN_TB 148 + +#define IDC_INTEL_CHNGTIME_HLEFT 149 +#define IDC_INTEL_CHNGTIME_HMIDDLE 150 +#define IDC_INTEL_CHNGTIME_HRIGHT 151 + +//added by MUF - new intel dialog-------------------------- + +// Dialog for choosing Editor's layout +#define IDC_LAYOUT_LIST 101 +#define IDC_LAYOUT_PICTURE 102 + +// Chat +#define IDC_CHANNEL 101 +#define IDC_CHANNEL_VOICE 102 +#define IDC_CHANNEL_MUTE_VON 103 +#define IDC_CHANNEL_MUTE_CHAT 104 + +#define IDC_CHAT 101 + +#define IDC_VOICE_CHAT 101 + +// Save / load template +#define IDC_TEMPL_NAME 101 +#define IDC_TEMPL_TITLE 102 +#define IDC_TEMPL_MODE 103 +#define IDC_TEMPL_ISLAND 104 + +// publish / update to Steam workshop +#define IDC_PUBLISH_STEAM_TITLE 101 +#define IDC_PUBLISH_STEAM_TAGS 102 +#define IDC_PUBLISH_STEAM_PICTURE 103 +#define IDC_PUBLISH_STEAM_DESCRIPTION 104 +#define IDC_PUBLISH_STEAM_MISSION_LIST 105 +#define IDC_PUBLISH_STEAM_VISIBILITY 106 +#define IDC_PUBLISH_STEAM_CHANGE_NOTES 107 +#define IDC_PUBLISH_STEAM_PREVIEW_FILE 108 +#define IDC_PUBLISH_CHECKBOX_LICENCE 109 +#define IDC_PUBLISH_TEXT_MISSION_SIZE 110 +#define IDC_PUBLISH_TEXT_QUOTA 111 +#define IDC_PUBLISH_BUTTON_PUBLISH 112 +#define IDC_PUBLISH_BUTTON_UPDATE 113 +#define IDC_PUBLISH_BUTTON_DELETE 114 +#define IDC_PUBLISH_BUTTON_EDIT_TAGS 115 +#define IDC_PUBLISH_BUTTON_WORKSHOP 116 +#define IDC_PUBLISH_BUTTON_WORKSHOP_LICENCE 117 +#define IDC_PUBLISH_BUTTON_SELECT_PREVIEW 118 +#define IDC_PUBLISH_BUTTON_DEFAULT_PREVIEW 119 +#define IDC_PUBLISH_STORAGE_SLIDER 120 +// group that is hidden when new mission is selected and shown when already uploaded mission is selected +#define IDC_PUBLISH_STEAM_HIDE_NEW_MISSION 121 +// group that is shown when new mission is selected and hidden when already uploaded mission is selected +#define IDC_PUBLISH_STEAM_SHOW_NEW_MISSION 122 + +// publish / update to Steam workshop - tags dialog +#define IDC_PUBLISH_STEAM_TAGS_AVAILABLE 101 +#define IDC_PUBLISH_STEAM_TAGS_SELECTED 102 +#define IDC_PUBLISH_STEAM_TAGS_ADD 103 +#define IDC_PUBLISH_STEAM_TAGS_REMOVE 104 +#define IDC_PUBLISH_STEAM_TAGS_NEXT 105 +#define IDC_PUBLISH_STEAM_TAGS_BACK 106 +#define IDC_PUBLISH_STEAM_TAGS_TITLE 107 + +// select file dialog +#define IDC_FILE_SELECT_PATH 101 +#define IDC_FILE_SELECT_DIR_TREE 102 +#define IDC_FILE_SELECT_FILE_LIST 103 +#define IDC_FILE_SELECT_PREVIEW 104 + + +//Login display +#define IDC_LOGIN_USER_LIST 101 +#define IDC_LOGIN_EDIT 102 +#define IDC_LOGIN_NEW_USER 103 +#define IDC_LOGIN_DELETE 104 +#define IDC_LOGIN_NAME 105 +#define IDC_LOGIN_FACE 106 +#define IDC_LOGIN_SPEAKER 107 +#define IDC_LOGIN_PITCH 108 +#define IDC_LOGIN_HEAD 109 +#define IDC_LOGIN_GLASSES 110 +#define IDC_LOGIN_ID 111 +#define IDC_LOGIN_SQUAD 112 +#define IDC_LOGIN_SQUAD_TEXT 113 +#define IDC_LOGIN_DISCARD 114 +#define IDC_LOGIN_TAB_AVATAR 115 +#define IDC_LOGIN_TAB_UNIT 116 +#define IDC_LOGIN_UNIT_SELECT 117 +#define IDC_LOGIN_UNIT_LOGO 118 +#define IDC_LOGIN_UNIT_NAME 119 +#define IDC_LOGIN_UNIT_MOTTO 120 +#define IDC_LOGIN_UNIT_DESCRIPTION 121 +#define IDC_LOGIN_ID_TEXT 122 +#define IDC_LOGIN_REFRESH 123 + +// Interrupt display +#define IDC_INT_OPTIONS 101 +#define IDC_INT_LOAD 102 +#define IDC_INT_SAVE 103 +#define IDC_INT_ABORT 104 +#define IDC_INT_RETRY 105 +#define IDC_INT_TITLE 106 +#define IDC_INT_SETTINGS 107 +#define IDC_INT_FRIENDS 108 +#define IDC_INT_PLAYERS 109 +#define IDC_INT_APPEAR_OFFLINE 110 +#define IDC_INT_MISSION 111 +#define IDC_INT_SIGN_IN_STATUS 112 +#define IDC_INT_EDIT_MAP 113 +#define IDC_INT_EDIT_3D 114 +#define IDC_INT_EDIT_PREVIEW 115 +#define IDC_INT_EDIT_REALTIME 116 +#define IDC_INT_RESTART 117 +#define IDC_INT_DIARY 118 +#define IDC_INT_REVERT 119 +#define IDC_INT_MISSIONNAME 120 +#define IDC_INT_TRAFFIC_LIGHT 121 +#define IDC_INT_FIELD_MANUAL 122 + +// Interrupt revert display +#define IDC_INT_REVERT_TYPE 101 + +// Select save display +#define IDC_SELECT_SAVE_SLOTS 101 + +// Mission end display +#define IDC_ME_SUBTITLE 101 +#define IDC_ME_QUOTATION 102 +#define IDC_ME_AUTHOR 103 +#define IDC_ME_RETRY 104 +#define IDC_ME_LOAD 105 +#define IDC_ME_RESTART 106 +#define IDC_ME_TEAM_SWITCH 107 + +// Get ready display +#define IDC_GETREADY_NAME 101 +#define IDC_GETREADY_DESC 102 +#define IDC_GETREADY_PRIMARY 105 +#define IDC_GETREADY_SECONDARY 106 +#define IDC_GETREADY_PLAYER 107 +#define IDC_GETREADY_DATE 108 +#define IDC_GETREADY_MODE 110 +#define IDC_GETREADY_PRIMARY_TEXT 111 +#define IDC_GETREADY_SECONDARY_TEXT 112 +#define IDC_GETREADY_EDITMODE 113 +#define IDC_GETREADY_TITLE 114 + +#define IDC_GEAR_UNIT 101 +#define IDC_GEAR_SKILL 102 +#define IDC_GEAR_VEHICLE 103 +#define IDC_GEAR_POOL 105 +#define IDC_GEAR_OVERVIEW 106 +#define IDC_GEAR_SLOT_PRIMARY 107 +#define IDC_GEAR_SLOT_SECONDARY 108 +#define IDC_GEAR_SLOT_ITEM1 109 +#define IDC_GEAR_SLOT_ITEM2 110 +#define IDC_GEAR_SLOT_ITEM3 111 +#define IDC_GEAR_SLOT_ITEM4 112 +#define IDC_GEAR_SLOT_ITEM5 113 +#define IDC_GEAR_SLOT_ITEM6 114 +#define IDC_GEAR_SLOT_ITEM7 115 +#define IDC_GEAR_SLOT_ITEM8 116 +#define IDC_GEAR_SLOT_ITEM9 117 +#define IDC_GEAR_SLOT_ITEM10 118 +#define IDC_GEAR_SLOT_ITEM11 119 +#define IDC_GEAR_SLOT_ITEM12 120 +#define IDC_GEAR_SLOT_HANDGUN 121 +#define IDC_GEAR_SLOT_HANGUN_ITEM1 122 +#define IDC_GEAR_SLOT_HANGUN_ITEM2 123 +#define IDC_GEAR_SLOT_HANGUN_ITEM3 124 +#define IDC_GEAR_SLOT_HANGUN_ITEM4 125 +#define IDC_GEAR_SLOT_HANGUN_ITEM5 126 +#define IDC_GEAR_SLOT_HANGUN_ITEM6 127 +#define IDC_GEAR_SLOT_HANGUN_ITEM7 128 +#define IDC_GEAR_SLOT_HANGUN_ITEM8 129 +#define IDC_GEAR_SLOT_SPECIAL1 130 +#define IDC_GEAR_SLOT_SPECIAL2 131 +#define IDC_GEAR_REARM 132 +#define IDC_GEAR_CONTINUE 133 +#define IDC_GEAR_SLOT_INVENTORY1 134 +#define IDC_GEAR_SLOT_INVENTORY2 135 +#define IDC_GEAR_SLOT_INVENTORY3 136 +#define IDC_GEAR_SLOT_INVENTORY4 137 +#define IDC_GEAR_SLOT_INVENTORY5 138 +#define IDC_GEAR_SLOT_INVENTORY6 139 +#define IDC_GEAR_SLOT_INVENTORY7 140 +#define IDC_GEAR_SLOT_INVENTORY8 141 +#define IDC_GEAR_SLOT_INVENTORY9 142 +#define IDC_GEAR_SLOT_INVENTORY10 143 +#define IDC_GEAR_SLOT_INVENTORY11 144 +#define IDC_GEAR_SLOT_INVENTORY12 145 + +#define IDC_GEAR_ADD_ITEM 146 +#define IDC_GEAR_REMOVE_ITEM 147 + +#define IDC_GEAR_FILTER 148 +#define IDC_GEAR_FILTER_ICON1 149 +#define IDC_GEAR_FILTER_ICON2 150 +#define IDC_GEAR_FILTER_ICON3 151 +#define IDC_GEAR_FILTER_ICON4 152 +#define IDC_GEAR_FILTER_ICON5 153 +#define IDC_GEAR_FILTER_ICON6 154 + +#define IDC_GEAR_POOL_GROUP 155 +#define IDC_GEAR_SOURCE_NAME 156 +#define IDC_GEAR_OPEN_BAG 157 +#define IDC_GEAR_CLOSE_BAG 158 +#define IDC_GEAR_ADD_DEFAULT 255 +#define IDC_GEAR_CLEAR_ALL 256 +#define IDC_BAG_ITEMS_GROUP 159 +#define IDC_UNIT_ITEMS_GROUP 160 + +#define IDC_GEAR_BAG_EMPTY 5000 +/* +#define IDC_GEAR_BAG_EMPTY_SLOT1 5000 +#define IDC_GEAR_BAG_EMPTY_SLOT2 5001 +#define IDC_GEAR_BAG_EMPTY_SLOT3 5002 +. +. +. +#define IDC_GEAR_BAG_EMPTY_SLOT499 5498 +#define IDC_GEAR_BAG_EMPTY_SLOT500 5499 +*/ +#define IDC_GEAR_BAG_FULL 5500 + +// Debriefing +/* +#define IDC_DEBRIEFING_LEFT 101 +#define IDC_DEBRIEFING_RIGHT 102 +*/ +#define IDC_DEBRIEFING_STAT 103 +#define IDC_DEBRIEFING_RESTART 104 +#define IDC_DEBRIEFING_PAD2 105 +#define IDC_DEBRIEFING_PLAYERS_TITLE_BG 106 +#define IDC_DEBRIEFING_PLAYERS_TITLE 107 +#define IDC_DEBRIEFING_PLAYERS_BG 108 +#define IDC_DEBRIEFING_PLAYERS 109 +#define IDC_DEBRIEFING_TIMEOUT 110 +#define IDC_DEBRIEFING_RESULT 111 +#define IDC_DEBRIEFING_TITLE 112 +#define IDC_DEBRIEFING_DEBRIEFING 113 +#define IDC_DEBRIEFING_OBJECTIVES 114 +#define IDC_DEBRIEFING_INFO 115 +#define IDC_DEBRIEFING_SHOW_PLAYERS 116 +#define IDC_DEBRIEFING_SHOW_PAGE2 117 +#define IDC_DEBRIEFING_LIVE_STATS 118 +#define IDC_DEBRIEFING_PREV_PAGE 119 +#define IDC_DEBRIEFING_NEXT_PAGE 120 +#define IDC_DEBRIEFING_LOAD 121 +#define IDC_DEBRIEFING_TEXT_GROUP 122 +#define IDC_DEBRIEFING_OBJECTIVES_GROUP 123 +#define IDC_DEBRIEFING_STATS_GROUP 124 +#define IDC_DEBRIEFING_MISSION_WORKSHOP 125 +#define IDC_DEBRIEFING_READY 126 +#define IDC_DEBRIEFING_DISCONNECT 127 + +// Debug display +#define IDC_DEBUG_EXP 101 +#define IDC_DEBUG_APPLY 102 +#define IDC_DEBUG_LOG 103 +#define IDC_DEBUG_SEARCH 161 +#define IDC_DEBUG_SEARCH_BUTTON 162 +#define IDC_DEBUG_HISTORY 163 + +#define IDC_DEBUG_EXP1 121 +#define IDC_DEBUG_EXP2 122 +#define IDC_DEBUG_EXP3 123 +#define IDC_DEBUG_EXP4 124 + +#define IDC_DEBUG_RES1 141 +#define IDC_DEBUG_RES2 142 +#define IDC_DEBUG_RES3 143 +#define IDC_DEBUG_RES4 144 + +#define IDC_DEBUG_CLEAR_LOG 151 +#define IDC_DEBUG_FILTER_EDIT 152 + +// Debug PhysX Display +#define IDC_PHYSX_DEBUG_DIAGMODE 101 +#define IDC_PHYSX_DEBUG_DIAGMODEDRAW 102 + +#define IDC_PHYSX_DEBUG_TERRAIN 103 +#define IDC_PHYSX_DEBUG_STATIC 104 +#define IDC_PHYSX_DEBUG_KINEMATIC 105 +#define IDC_PHYSX_DEBUG_DYNAMIC 106 + +#define IDC_PHYSX_DEBUG_CHECK_BUTTONS_START 109 +#define IDC_PHYSX_DEBUG_WORLD_AXES 110 +#define IDC_PHYSX_DEBUG_BODY_AXES 111 +#define IDC_PHYSX_DEBUG_BODY_MASS_AXES 112 +#define IDC_PHYSX_DEBUG_BODY_LIN_VELOCITY 113 +#define IDC_PHYSX_DEBUG_BODY_ANG_VELOCITY 114 +#define IDC_PHYSX_DEBUG_BODY_JOINT_GROUPS 115 +#define IDC_PHYSX_DEBUG_JOINT_LOCAL_AXES 116 +#define IDC_PHYSX_DEBUG_JOINT_WORLD_AXES 117 +#define IDC_PHYSX_DEBUG_JOINT_LIMITS 118 +#define IDC_PHYSX_DEBUG_CONTACT_POINT 119 +#define IDC_PHYSX_DEBUG_CONTACT_NORMAL 120 +#define IDC_PHYSX_DEBUG_CONTACT_ERROR 121 +#define IDC_PHYSX_DEBUG_CONTACT_FORCE 122 +#define IDC_PHYSX_DEBUG_ACTOR_AXES 123 +#define IDC_PHYSX_DEBUG_COLLISION_AABBS 124 +#define IDC_PHYSX_DEBUG_COLLISION_SHAPES 125 +#define IDC_PHYSX_DEBUG_COLLISION_AXES 126 +#define IDC_PHYSX_DEBUG_COLLISION_COMPOUNDS 127 +#define IDC_PHYSX_DEBUG_COLLISION_VNORMALS 128 +#define IDC_PHYSX_DEBUG_COLLISION_FNORMALS 129 +#define IDC_PHYSX_DEBUG_COLLISION_EDGES 130 +#define IDC_PHYSX_DEBUG_COLLISION_SPHERES 131 +#define IDC_PHYSX_DEBUG_COLLISION_STATIC 132 +#define IDC_PHYSX_DEBUG_COLLISION_DYNAMIC 133 +#define IDC_PHYSX_DEBUG_COLLISION_FREE 134 +#define IDC_PHYSX_DEBUG_COLLISION_CCD 135 +#define IDC_PHYSX_DEBUG_COLLISION_SKELETONS 136 +#define IDC_PHYSX_DEBUG_CHECK_BUTTONS_END 148 + +#define IDC_PHYSX3_DEBUG_CHECK_BUTTONS_START 149 +#define IDC_PHYSX3_DEBUG_WORLD_AXES 150 +#define IDC_PHYSX3_DEBUG_BODY_AXES 151 +#define IDC_PHYSX3_DEBUG_BODY_MASS_AXES 152 +#define IDC_PHYSX3_DEBUG_BODY_LIN_VELOCITY 153 +#define IDC_PHYSX3_DEBUG_BODY_ANG_VELOCITY 154 +#define IDC_PHYSX3_DEBUG_BODY_JOINT_GROUPS 155 +#define IDC_PHYSX3_DEBUG_CONTACT_POINT 156 +#define IDC_PHYSX3_DEBUG_CONTACT_NORMAL 157 +#define IDC_PHYSX3_DEBUG_CONTACT_ERROR 158 +#define IDC_PHYSX3_DEBUG_CONTACT_FORCE 159 +#define IDC_PHYSX3_DEBUG_ACTOR_AXES 160 +#define IDC_PHYSX3_DEBUG_COLLISION_AABBS 161 +#define IDC_PHYSX3_DEBUG_COLLISION_SHAPES 162 +#define IDC_PHYSX3_DEBUG_COLLISION_AXES 163 +#define IDC_PHYSX3_DEBUG_COLLISION_COMPOUNDS 164 +#define IDC_PHYSX3_DEBUG_COLLISION_FNORMALS 165 +#define IDC_PHYSX3_DEBUG_COLLISION_EDGES 166 +#define IDC_PHYSX3_DEBUG_COLLISION_STATIC 167 +#define IDC_PHYSX3_DEBUG_COLLISION_DYNAMIC 168 +#define IDC_PHYSX3_DEBUG_COLLISION_PAIRS 169 +#define IDC_PHYSX3_DEBUG_JOINT_LOCAL_AXES 170 +#define IDC_PHYSX3_DEBUG_JOINT_LIMITS 171 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_POSITION 172 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_VELOCITY 173 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_COLLISION_NORMAL 174 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_BOUNDS 175 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_GRID 176 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_BROADPHASE_BOUNDS 177 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_MAX_MOTION_DISTANCE 178 +#define IDC_PHYSX3_DEBUG_CHECK_BUTTONS_END 188 + +#define IDC_PHYSX_DEBUG_ALL 190 +#define IDC_PHYSX_DEBUG_NONE 191 +#define IDC_PHYSX_DEBUG_DIAGMODEPERF 192 +#define IDC_PHYSX_DEBUG_DIAGMODESTATS 193 + +#define IDC_PHYSX_DEBUG_USECONVEXSHAPES 194 +#define IDC_PHYSX_DEBUG_USEROADWAYS 195 +#define IDC_PHYSX_DEBUG_USEONECAPSULE 196 +#define IDC_PHYSX_DEBUG_IMMEDIATEFETCH 197 + +#define IDC_PHYSX_DEBUG_BASIC 198 + +// DS interface display +#define IDC_DSI_PLAYERLIST 101 +#define IDC_DSI_MISSONLIST 102 + +// HintC display +#define IDC_HINTC_BG 101 +#define IDC_HINTC_HINT 102 +#define IDC_HINTC_TITLE 103 +#define IDC_HINTC_CONTINUE 104 +#define IDC_HINTC_LINE1 105 +#define IDC_HINTC_LINE2 106 + +// Insert marker display +#define IDC_INSERT_MARKER 101 +#define IDC_INSERT_MARKER_PICTURE 102 +#define IDC_INSERT_MARKER_CHANNELS 103 + +// InGameUI +// - unit info +#define IDC_IGUI_TIME 101 +#define IDC_IGUI_DATE 102 +#define IDC_IGUI_NAME 103 +#define IDC_IGUI_UNIT 104 +#define IDC_IGUI_VALUE_EXP 106 +#define IDC_IGUI_COMBAT_MODE 107 +#define IDC_IGUI_VALUE_HEALTH 109 +#define IDC_IGUI_HITZONES 111 +#define IDC_IGUI_VALUE_FUEL 113 +#define IDC_IGUI_CARGO_MAN 114 +#define IDC_IGUI_CARGO_FUEL 115 +#define IDC_IGUI_CARGO_REPAIR 116 +#define IDC_IGUI_CARGO_AMMO 117 +#define IDC_IGUI_WEAPON 118 +#define IDC_IGUI_AMMO 119 +#define IDC_IGUI_VEHICLE 120 +#define IDC_IGUI_SPEED 121 +#define IDC_IGUI_ALT 122 +#define IDC_IGUI_FORMATION 123 +#define IDC_IGUI_BG 124 +#define IDC_IGUI_COMMANDER 125 +#define IDC_IGUI_DRIVER 126 +#define IDC_IGUI_GUNNER 127 + +#define IDC_IGUI_SPEED_FREEFALL 380 +#define IDC_IGUI_SPEED_VERTICAL_FREEFALL 381 +#define IDC_IGUI_ALT_FREEFALL 382 + +#define IDC_IGUI_ANALOGUE_HORIZON 383 +#define IDC_IGUI_ANALOGUE_SPEED_LADDER 384 +#define IDC_IGUI_ANALOGUE_ALT_LADDER 385 + +#define IDC_IGUI_OPTICS_GROUP 390 +#define IDC_IGUI_DRIVER_GROUP 391 +#define IDC_IGUI_DRIVER_OPTICS_GROUP 392 +#define IDC_IGUI_VEHICLE_PITCH 393 + + +//AV_Terminal +#define IDC_IGUI_AVT_NAME 100 +#define IDC_IGUI_AVT_TAKE_CONTROL 101 +#define IDC_IGUI_AVT_STATUS 102 +#define IDC_IGUI_AVT_TARGET 103 +#define IDC_IGUI_AVT_POSITION 104 +#define IDC_IGUI_AVT_PIP1 105 +#define IDC_IGUI_AVT_PIP2 106 +#define IDC_IGUI_AVT_COUNT 107 +#define IDC_IGUI_AVT_EDITOR_MENU 108 +#define IDC_IGUI_AVT_FUEL 109 +#define IDC_IGUI_AVT_WEAPON 110 +#define IDC_IGUI_AVT_AMMO 111 +#define IDC_IGUI_AVT_WEAPON_SEC 112 +#define IDC_IGUI_AVT_AMMO_SEC 113 +#define IDC_IGUI_AVT_TAKE_CONTROL_DRIVER 114 +#define IDC_IGUI_AVT_TAKE_CONTROL_GUNNER 115 +#define IDC_IGUI_AVT_AUTONOMOUS 116 +#define IDC_IGUI_AVT_COMBO 117 +#define IDC_IGUI_AVT_ALLOW_LIGHTS 118 + +//AV Camera +#define IDC_IGUI_AVC_PIP_DRIVER 100 +#define IDC_IGUI_AVC_PIP_GUNNER 101 +#define IDC_IGUI_AVC_PIP_SINGLE_VIEW 102 +#define IDC_IGUI_AVC_PIP_SOURCE 103 +#define IDC_IGUI_AVC_PIP_HEADING 104 +#define IDC_IGUI_AVC_PIP_MODE 105 + +//Sling Load Assistant +#define IDC_SLA_MAP 100 +#define IDC_SLA_HDIST 101 +#define IDC_SLA_VDIST 102 +#define IDC_SLA_STATUS 103 +#define IDC_SLA_LIFT_PROGRESS 104 +#define IDC_SLA_HEIGHT_BAR 105 +#define IDC_SLA_MAX_ALT 106 +#define IDC_SLA_VIEWPORT 107 + +//Sensors Display +#define IDC_SENS_VIEWPORT 101 +#define IDC_SENS_CIRCLES 102 +#define IDC_SENS_VEHICLE 103 +#define IDC_SENS_RANGE 104 +#define IDC_SENS_RADARON 105 +#define IDC_SENS_RADAROFF 106 +#define IDC_SENS_TARGET 107 +#define IDC_SENS_TARGETRANGE 108 +#define IDC_SENS_TARGETSPEED 109 +#define IDC_SENS_TARGETALT 110 +#define IDC_SENS_HEADING 111 + +//Mine detector Display +#define IDC_MINEDETECT_VIEWPORT 101 +#define IDC_MINEDETECT_CIRCLES 102 +#define IDC_MINEDETECT_VEHICLE 103 +#define IDC_MINEDETECT_RANGE 104 + +//Crew list +#define IDC_CREW_VEHICLE 101 +#define IDC_CREW_LIST 102 + +//MP Score Table +#define IDC_MP_SCORE_TABLE_TITLE 101 +#define IDC_MP_SCORE_TABLE_PLAYERS_LIST 102 +#define IDC_MP_SCORE_TABLE_SIDES_LIST 103 +#define IDC_MP_SCORE_TABLE_LINE_TEMPLATE 104 +#define IDC_MP_SCORE_TABLE_LINE_BACK 105 +#define IDC_MP_SCORE_TABLE_ORDER 106 +#define IDC_MP_SCORE_TABLE_PLAYERSNAME 107 +#define IDC_MP_SCORE_TABLE_KILLS_INF 108 +#define IDC_MP_SCORE_TABLE_KILLS_SOFT 109 +#define IDC_MP_SCORE_TABLE_KILLS_ARMOR 110 +#define IDC_MP_SCORE_TABLE_KILLS_AIR 111 +#define IDC_MP_SCORE_TABLE_KILLED 112 +#define IDC_MP_SCORE_TABLE_KILLSTOTAL 113 + +//Vehicle MessageBox +#define IDC_VEHICLEMSGBOX_BACKGROUND 100 +#define IDC_VEHICLEMSGBOX_LOGO 101 +#define IDC_VEHICLEMSGBOX_TEXT 102 +#define IDC_VEHICLEMSGBOX_PURCHASE 103 + +//Action Notification +#define IDC_DLC_ACTION_NOTIFICATION_GROUP 11406 +#define IDC_DLC_ACTION_NOTIFICATION_LOGO 100 +#define IDC_DLC_ACTION_NOTIFICATION_TEXT 101 +#define IDC_DLC_ACTION_NOTIFICATION_TITLE 102 + +//first aid icons +#define IDC_IGUI_BLEEDING0 401 +#define IDC_IGUI_BLEEDING1 402 +#define IDC_IGUI_INJURED_HEAD0 403 +#define IDC_IGUI_INJURED_HEAD1 404 +#define IDC_IGUI_INJURED_HANDS0 405 +#define IDC_IGUI_INJURED_HANDS1 406 +#define IDC_IGUI_INJURED_HANDS2 407 +#define IDC_IGUI_INJURED_LEGS0 408 +#define IDC_IGUI_INJURED_LEGS1 409 +#define IDC_IGUI_INJURED_LEGS2 410 +#define IDC_IGUI_BODY 411 +#define IDC_IGUI_VALUE_OXYGEN 412 +#define IDC_IGUI_BURNING 413 + +#define IDC_IGUI_ALT_WANTED 128 +#define IDC_IGUI_SPEED_WANTED 129 +#define IDC_IGUI_POSITION 130 +#define IDC_IGUI_OPTIC 131 + +// _VBS3 + #define IDC_IGUI_MAGAZINE 132 + #define IDC_IGUI_OVR_STATUS 133 + //TI + #define IDC_IGUI_TI_BACK 134 + #define IDC_IGUI_TI_MODE 135 + #define IDC_IGUI_TI_BRIGHTNESS_TXT 136 + #define IDC_IGUI_TI_BRIGHTNESS 137 + #define IDC_IGUI_TI_CONTRAST_TXT 138 + #define IDC_IGUI_TI_CONTRAST 139 + #define IDC_IGUI_TI_AUTO_CONTRAST 140 + + //LASE + #define IDC_IGLR_RANGE 141 + #define IDC_IGLR_BG 142 + #define IDC_IGLR_RANGE_NUM 143 + + //AVRS + #define IDC_IGUI_NICK 144 + #define IDC_IGUI_NICK_VAL 145 + #define IDC_IGUI_BANK 146 + #define IDC_IGUI_BANK_VAL 147 +// !_VBS3 +#define IDC_IGUI_HEADING 148 + +// !new arrowhead +#define IDC_IGUI_WEAPON_MODE 149 +#define IDC_IGUI_WEAPON_GUNNER 150 +#define IDC_IGUI_COUNTER_MEASURES_AMMO 151 +#define IDC_IGUI_COUNTER_MEASURES_MODE 152 + +#define IDC_IGUI_RADARRANGE 153 +#define IDC_IGUI_VALUE_RELOAD 154 +#define IDC_IGUI_WEAPON_AMMO 155 + +// New Arma 3 +#define IDC_IGUI_STANCE_INDICATOR 188 +#define IDC_IGUI_GPS_PLAYER 189 +#define IDC_IGUI_SPEED2 190 +#define IDC_IGUI_ALT2 191 +#define IDC_IGUI_PILOT_OPTIC_ZOOM 192 +#define IDC_IGUI_STAMINA_BAR 193 + +// weapon/turret info controls +#define IDC_IGUI_WEAPON_DISTANCE 151 +#define IDC_IGUI_WEAPON_VISION_MODE 152 +#define IDC_IGUI_WEAPON_FLIR_MODE 153 +#define IDC_IGUI_WEAPON_FOV_MODE 154 +#define IDC_IGUI_WEAPON_COMPASS 155 +#define IDC_IGUI_WEAPON_HEADING 156 +#define IDC_IGUI_WEAPON_AUTOHOVER 157 +#define IDC_IGUI_WEAPON_LASER_MARKER_ON 158 +#define IDC_IGUI_WEAPON_BALL_ENABLED 159 +#define IDC_IGUI_WEAPON_JAVELIN_DAY 160 +#define IDC_IGUI_WEAPON_JAVELIN_FLTR 161 +#define IDC_IGUI_WEAPON_JAVELIN_NFOV 162 +#define IDC_IGUI_WEAPON_JAVELIN_WFOV 163 +#define IDC_IGUI_WEAPON_BALL_RANGE 164 +#define IDC_IGUI_WEAPON_BALISTIC_COMP 165 +#define IDC_IGUI_WEAPON_JAVELIN_SEEK 166 +#define IDC_IGUI_WEAPON_JAVELIN_MISSLE 167 +#define IDC_IGUI_WEAPON_ELEVATION 168 +#define IDC_IGUI_WEAPON_ELEVATION_TEXT 169 +#define IDC_IGUI_WEAPON_STATIC_ITEMS 170 +#define IDC_IGUI_WEAPON_GPS_PLAYER 171 +#define IDC_IGUI_WEAPON_GPS_TARGET 172 +#define IDC_IGUI_WEAPON_ARTI_DIST 173 +#define IDC_IGUI_WEAPON_ARTI_TIME 174 +#define IDC_IGUI_WEAPON_ARTI_ELEV 175 +#define IDC_IGUI_WEAPON_ARTI_ELEV_NEED 176 +#define IDC_IGUI_WEAPON_ARTI_OUT_RANGE 177 +#define IDC_IGUI_WEAPON_ARTI_AUTO_ELEV 178 +#define IDC_IGUI_WEAPON_VISION_MODE2 179 +#define IDC_IGUI_WEAPON_OPTICS_ZOOM 180 +#define IDC_IGUI_WEAPON_TARGET_UNIT 181 +#define IDC_IGUI_WEAPON_OPTICS_PITCH 182 +#define IDC_IGUI_WEAPON_DISTANCE2 183 + +// unit info (to preserve order) - new A3 +#define IDC_IGUI_AMMOCOUNT 184 +#define IDC_IGUI_MAGCOUNT 185 + +#define IDC_IGUI_DEPTH 186 +#define IDC_IGUI_WEAPON_MODE_TEXTURE 187 +#define IDC_IGUI_WEAPON_SPEED 188 +#define IDC_IGUI_WEAPON_ALT 189 +#define IDC_IGUI_WEAPON_TIME 190 + +#define IDC_IGUI_WEAPON_CAM_TRACK_AREA 194 +#define IDC_IGUI_WEAPON_CAM_TRACK_TARGET 195 + +#define IDC_IGUI_WEAPON_JAVELIN_ATTACK_FROM_TOP 196 +#define IDC_IGUI_WEAPON_JAVELIN_ATTACK_DIRECT 197 + +#define IDC_IGUI_WEAPON_LASED_DISTANCE 198 +#define IDC_IGUI_WEAPON_LASED_SPEED 199 +#define IDC_IGUI_WEAPON_LASED_VALID 200 +#define IDC_IGUI_WEAPON_LASED_ERR_LEAD 201 +#define IDC_IGUI_WEAPON_LASED_ERR_ELEV 202 +#define IDC_IGUI_WEAPON_LASED_ERR_OBJECT 203 +#define IDC_IGUI_WEAPON_LASER_ZEROING_DELAY 204 + +#define IDC_IGUI_THROTTLE 205 +#define IDC_IGUI_VEHICLE_DIRECTION 206 +#define IDC_IGUI_VEHICLE_DIRECTION2 207 + + + + + +// helicopter unit info +#define IDC_IGUI_GMETER 501 +#define IDC_IGUI_RADARALTIMETER 505 +#define IDC_IGUI_RADARALTIMETER_BAR 506 +#define IDC_IGUI_RADARALTIMETER_VALUE 507 +#define IDC_IGUI_TORQUE 510 +#define IDC_IGUI_WINDINDICATOR 515 +#define IDC_IGUI_WINDINDICATOR_TEXT 516 +#define IDC_IGUI_WINDINDICATOR_IMAGE 517 +#define IDC_IGUI_STABILITYINDICATOR 520 +#define IDC_IGUI_STABILITYINDICATOR_AXIS 521 +#define IDC_IGUI_STABILITYINDICATOR_OFFSET 522 +#define IDC_IGUI_COLLECTIVE 525 +#define IDC_IGUI_AIRSPEEDINDICATOR 530 +#define IDC_IGUI_AIRSPEEDINDICATOR_AXIS 531 +#define IDC_IGUI_AIRSPEEDINDICATOR_VALUE 532 +#define IDC_IGUI_ALTIMETER 535 +#define IDC_IGUI_ALTIMETER_AXIS 536 +#define IDC_IGUI_ALTIMETER_VALUE 537 +#define IDC_IGUI_ATTITUDEINDICATOR 540 +#define IDC_IGUI_ATTITUDEINDICATOR_LITE 541 +#define IDC_IGUI_TRIMINDICATOR 545 +#define IDC_IGUI_AUTOHOVERNDICATOR 546 +#define IDC_IGUI_HELIHUD_MISCELLANEOUS 550 + +// helicopter Analogue unit info +#define IDC_IGUI_ANALOGUE_SPEED 601 +#define IDC_IGUI_ANALOGUE_SPEED_NEEDLE 602 +#define IDC_IGUI_ANALOGUE_SPEED_MIN 603 +#define IDC_IGUI_ANALOGUE_SPEED_MAX 604 +#define IDC_IGUI_ANALOGUE_SPEED_TEXT 605 +#define IDC_IGUI_ANALOGUE_SPEED_IMPERIAL 606 +#define IDC_IGUI_ANALOGUE_SPEED_METRIC 607 + +#define IDC_IGUI_ANALOGUE_ALTITUDE 611 +#define IDC_IGUI_ANALOGUE_ALTITUDE_NEEDLE 612 +#define IDC_IGUI_ANALOGUE_ALTITUDE_MIN 613 +#define IDC_IGUI_ANALOGUE_ALTITUDE_MAX 614 +#define IDC_IGUI_ANALOGUE_ALTITUDE_TEXT 615 +#define IDC_IGUI_ANALOGUE_ALTITUDE_IMPERIAL 616 +#define IDC_IGUI_ANALOGUE_ALTITUDE_METRIC 617 + +#define IDC_IGUI_ANALOGUE_ATTITUDE 621 +#define IDC_IGUI_ANALOGUE_ATTITUDE_HORIZON 622 +#define IDC_IGUI_ANALOGUE_ATTITUDE_VALUE 623 + +#define IDC_IGUI_ANALOGUE_COMPASS 631 +#define IDC_IGUI_ANALOGUE_COMPASS_DIR 632 +#define IDC_IGUI_ANALOGUE_COMPASS_WIND 633 +#define IDC_IGUI_ANALOGUE_COMPASS_WAYPOINT 634 +#define IDC_IGUI_ANALOGUE_COMPASS_MIN 635 +#define IDC_IGUI_ANALOGUE_COMPASS_MAX 636 +#define IDC_IGUI_ANALOGUE_COMPASS_TEXT 637 +#define IDC_IGUI_ANALOGUE_COMPASS_WIND_TEXT 638 + +#define IDC_IGUI_ANALOGUE_STABILITY 641 +#define IDC_IGUI_ANALOGUE_STABILITY_SPEED 642 +#define IDC_IGUI_ANALOGUE_STABILITY_TEXT 643 +#define IDC_IGUI_ANALOGUE_STABILITY_VSPEED_NEEDLE 644 +#define IDC_IGUI_ANALOGUE_STABILITY_COLLECTIVE 645 +#define IDC_IGUI_ANALOGUE_STABILITY_VSPEED 646 +#define IDC_IGUI_ANALOGUE_STABILITY_IMPERIAL 647 +#define IDC_IGUI_ANALOGUE_STABILITY_METRIC 648 + +//damage +#define IDC_IGUI_DAMAGE_GROUP 660 +#define IDC_IGUI_DAMAGE_ENGINESRPM 662 +#define IDC_IGUI_DAMAGE_ENGINESDAMAGE 663 +#define IDC_IGUI_DAMAGE_TORQUE 664 +#define IDC_IGUI_DAMAGE_ELECTRICITY 665 +#define IDC_IGUI_DAMAGE_FUEL 666 +#define IDC_IGUI_DAMAGE_HYDRAULICS 667 +#define IDC_IGUI_DAMAGE_MAINROTOR 668 +#define IDC_IGUI_DAMAGE_TAILROTOR 669 +#define IDC_IGUI_DAMAGE_AUTOHOVER 670 +#define IDC_IGUI_DAMAGE_INSTALLATIONS 671 +#define IDC_IGUI_DAMAGE_HULL 672 +#define IDC_IGUI_DAMAGE_WHEELBRAKE 673 +#define IDC_IGUI_DAMAGE_ROTORBRAKE 674 +#define IDC_IGUI_DAMAGE_WINCH 675 +#define IDC_IGUI_DAMAGE_GEAR 676 + +// - hint +#define IDC_IGHINT_BG 101 +#define IDC_IGHINT_HINT 102 + +// - task hint +#define IDC_IGTASKHINT_BG 103 +#define IDC_IGTASKHINT_HINT 104 + +// - load mission progress bar +#define IDC_LOAD_MISSION_NAME 101 +#define IDC_LOAD_MISSION_DATE 102 +#define IDC_PROGRESS_TIME 103 +#define IDC_PROGRESS_PROGRESS 104 +#define IDC_LOAD_MISSION_PICTURE 105 +#define IDC_LOAD_MISSION_TEXT 106 + +// - dedicated server dialog +#define IDC_DS_REPORT 101 +#define IDC_DS_PLAYERS 102 +#define IDC_DS_FRIENDS 103 + +// - friend's missions dialog +#define IDC_FRIEND_MISSIONS_LIST 101 + +// - live statistics dialogs +#define IDC_LIVE_STATS_BOARDS 101 + +#define IDC_LIVE_STATS_LIST 101 +#define IDC_LIVE_STATS_COUNT 102 +#define IDC_LIVE_STATS_TITLE 103 +#define IDC_LIVE_STATS_PLAYER 104 +#define IDC_LIVE_STATS_BEGIN 105 +#define IDC_LIVE_STATS_END 106 +#define IDC_LIVE_STATS_PREV 107 +#define IDC_LIVE_STATS_NEXT 108 +#define IDC_LIVE_STATS_FRIENDS 109 +#define IDC_LIVE_STATS_GAMER_CARD 110 + +#define IDC_RECEIVING_TEXT 101 +#define IDC_RECEIVING_TIME 102 + +#define IDC_MSG_BOX_MESSAGE 101 + +#define IDC_EDITOR_OBJECTS 201 +#define IDC_EDITOR_ATTRIBUTES 202 +#define IDC_EDITOR_BACKGROUND 203 +#define IDC_EDITOR_MENU 204 +#define IDC_EDITOR_SAVE 205 +#define IDC_EDITOR_LOAD 206 +#define IDC_EDITOR_RESTART 207 +#define IDC_EDITOR_PREVIEW 208 +#define IDC_EDITOR_MAP 209 +#define IDC_EDITOR_CLEAR 210 +#define IDC_EDITOR_TYPE_LIST 211 + +// editor menu system +#define IDC_EDITOR_FILE 212 +#define IDC_EDITOR_VIEW 213 +#define IDC_EDITOR_USER 214 +#define IDC_EDITOR_MENU_FILE 216 +#define IDC_EDITOR_MENU_VIEW 217 +#define IDC_EDITOR_MENU_USER 218 + +#define IDC_EDITOR_CONTROLS_HELP 220 +#define IDC_EDITOR_LOAD_AAR 221 + +#define IDC_EDITOR_ADDOBJ_TYPES 222 +#define IDC_EDITOR_ADDOBJ_CATEGORIES 223 +#define IDC_EDITOR_ADDOBJ_LISTING 224 + +#define IDC_MINI_MAP 225 + +// editor tree filtering +#define IDC_EDITOR_OBJECTS_FILTER 236 +#define IDC_EDITOR_TREE_EXPAND_ALL 237 +#define IDC_EDITOR_TREE_EXPAND_ALL_BACK 238 +#define IDC_EDITOR_TREE_COLLAPSE_ALL 239 +#define IDC_EDITOR_TREE_COLLAPSE_ALL_BACK 240 + +#define IDC_EDIT_OBJECT_CONTROLS 101 +#define IDC_EDIT_OBJECT_TOGGLE_BUTTON 102 + +#define IDC_NEW_OBJECT_TYPE 101 +#define IDC_NEW_OBJECT_PARENT 102 + +#define IDC_MISSION_LOAD_ISLAND 101 +#define IDC_MISSION_LOAD_MISSION 102 + +#define IDC_MISSION_SAVE_MISSION 101 +#define IDC_MISSION_SAVE_TITLE 102 +#define IDC_MISSION_SAVE_DESCRIPTION 103 +#define IDC_MISSION_SAVE_PLACEMENT 104 + +#define IDC_OVERLAY_CREATE_NAME 101 +#define IDC_OVERLAY_LOAD_NAME 101 +#define IDC_OVERLAY_LOAD_MISSION 102 + +#define IDC_EDIT_DIARY_RECORD 101 +#define IDC_EDIT_DIARY_TITLE 102 + +#define IDC_LOAD_AAR_NAME 101 + +#define IDC_EDITOR_EB_PLAN 101 +#define IDC_EDITOR_EB_NOTES 102 +#define IDC_EDITOR_EB_SIDE 103 +#define IDC_EDITOR_EB_OBJECTIVES 104 +#define IDC_EDITOR_EB_NEW_OBJECTIVE 105 +#define IDC_EDITOR_EB_ADD_OBJECTIVE 106 +#define IDC_EDITOR_EB_DEL_OBJECTIVE 107 + +// - team switch display + +#define IDC_TEAM_SWITCH_ROLES 101 + +// - configure action display + +#define IDC_CONFIGURE_ACTION_TITLE 101 +#define IDC_CONFIGURE_ACTION_KEYS 102 +#define IDC_CONFIGURE_ACTION_SPECIAL 103 +#define IDC_CONFIGURE_ACTION_DELETE 104 +#define IDC_CONFIGURE_ACTION_DEFAULT 105 +#define IDC_CONFIGURE_ACTION_CLEAR 106 +#define IDC_CONFIGURE_ACTION_CANCEL 107 +#define IDC_CONFIGURE_ACTION_PREV 108 +#define IDC_CONFIGURE_ACTION_NEXT 109 + +// - controls display +#define IDC_CONTROLS_TYPE 101 +#define IDC_CONTROLS_CONFIGURE 102 + +// - miniMap display + +#define IDC_MINIMAP 101 +#define IDC_MINIMAP_VIEWPORT 102 +#define IDC_MINIMAP_GRID 197 +#define IDC_MINIMAP_HEADING 198 +#define IDC_MINIMAP_TIME 199 + + +// - scripting help display +#define IDC_SCRITING_HELP 101 +#define IDC_SCRITING_HELP_BACK 102 +#define IDC_SCRITING_HELP_FORWARD 103 +#define IDC_SCRITING_HELP_EXAMPLE 104 + +// - performance display +#define IDC_PERF_INDEX 101 +#define IDC_PERF_ENABLE 102 +#define IDC_PERF_GRAPH 103 +#define IDC_PERF_GRAPH_TITLE 104 +#define IDC_PERF_MAXTIME 105 + +// - capture display +#define IDC_CAPTURE_INDEX 101 +#define IDC_CAPTURE_TIMELINES 102 +#define IDC_CAPTURE_ZOOMIN 103 +#define IDC_CAPTURE_ZOOMOUT 104 +#define IDC_CAPTURE_EXPORT 105 +#define IDC_CAPTURE_INFO 106 +#define IDC_CAPTURE_EXPORT_ALL 107 +#define IDC_CAPTURE_IMPORT_ALL 108 +#define IDC_CAPTURE_PREVIOUS_DATA 109 +#define IDC_CAPTURE_AVERAGES 110 +#define IDC_CAPTURE_SAVE_ARCHIVE 111 +#define IDC_CAPTURE_SEARCH 112 + + +// - joysticks configuration display +#define IDC_CONTROLLER_CUSTOMIZE 101 +#define IDC_CONTROLLER_ENABLE 102 +#define IDC_CONTROLLER_XINPUT_LIST 103 +#define IDC_CONTROLLER_LIST 104 +#define IDC_CONTROLLER_REFRESH 105 + +// - customize controllers +#define IDC_CUSTOMIZE_CTRL_SENSITIVITIES 101 +#define IDC_CUSTOMIZE_CTRL_UNMAP 102 +#define IDC_CUSTOMIZE_CTRL_DEFAULT 103 +#define IDC_CUSTOMIZE_CTRL_TITLE 104 +#define IDC_CUSTOMIZE_CTRL_DEFAULT_BINDING 105 +#define IDC_CUSTOMIZE_CTRL_ADVANCED 106 +#define IDC_SENSITIVITY_SLIDER 120 +#define IDC_DEADZONE_SLIDER 220 +#define IDC_CUSTOMIZE_CTRL_ACTIVE_AXIS_ICON 320 +#define IDC_CUSTOMIZE_CTRL_STEEPNESS 420 +#define IDC_CUSTOMIZE_CTRL_VALUE 520 + +// - joystick schemes +#define IDC_JOY_SCHEMES_TITLE 101 +#define IDC_JOY_SCHEMES_LIST 102 +#define IDC_JOY_SCHEMES_MAP 103 + +// - helper IDC for DisplayCampaignLoadLight +#define IDC_MP_CAMPAIGN_RESTART 150 +#define IDC_MP_CAMPAIGN_REPLAY 151 +#define IDC_MP_CAMPAIGN_LOAD 152 + +// - addon actions display +#define IDC_ADDON_ACTIONS 101 +#define IDC_ADDON_ACTIONS_NEW_MOD 102 + +// - mod launcher +#define IDC_MOD_LAUNCHER_MODS 101 +#define IDC_MOD_LAUNCHER_PICTURE 102 +#define IDC_MOD_LAUNCHER_UP 103 +#define IDC_MOD_LAUNCHER_DOWN 104 +#define IDC_MOD_LAUNCHER_DISABLE 105 +#define IDC_MOD_LAUNCHER_ACTION 106 +#define IDC_MOD_LAUNCHER_PURCHASE 107 +#define IDC_MOD_LAUNCHER_DESCRIPTION 108 + +// - create new mod +#define IDC_MOD_NAME 101 +#define IDC_MOD_DIR 102 + + +//A3 credits +#define ONBUTTONCLICK_START_CREDITS "0 = _this spawn (uinamespace getvariable 'bis_fnc_credits');" + + +// Hitzone types +#define HZ_AIRPLANE_HULL 0 +#define HZ_AIRPLANE_ENG 22 +#define HZ_AIRPLANE_FUEL 23 +#define HZ_AIRPLANE_GEAR 24 +#define HZ_AIRPLANE_WINGS 25 +#define HZ_AIRPLANE_INST 26 + +#define HZ_HELICOPTER_HULL 1 +#define HZ_HELICOPTER_ENG 2 +#define HZ_HELICOPTER_INST 3 +#define HZ_HELICOPTER_ATRQ 4 +#define HZ_HELICOPTER_MROT 5 +#define HZ_HELICOPTER_WINCH 6 + +#define HZ_CAR_HULL 7 +#define HZ_CAR_ENG 8 +#define HZ_CAR_FUEL 9 +#define HZ_CAR_WHL 10 + +#define HZ_MOTORCYCLE_HULL 11 +#define HZ_MOTORCYCLE_ENG 12 +#define HZ_MOTORCYCLE_FUEL 13 +#define HZ_MOTORCYCLE_WHL 14 + +#define HZ_TANK_HULL 15 +#define HZ_TANK_ENG 16 +#define HZ_TANK_GUN 17 +#define HZ_TANK_LTR 18 +#define HZ_TANK_RTR 19 +#define HZ_TANK_TRRT 20 + +#define HZ_VEH_GUN HZ_TANK_GUN +#define HZ_VEH_TRRT HZ_TANK_TRRT + +#define HZ_SHIP_ENG 21 + +#define HZ_VEH_TOTAL 27 + +#define HZ_TANK_CMDGUN 28 +#define HZ_TANK_CMDTRRT 29 +#define HZ_VEH_CMDGUN HZ_TANK_CMDGUN +#define HZ_VEH_CMDTRRT HZ_TANK_CMDTRRT + +#define HZ_VEH_TRRT_TOTAL 30 +#define HZ_VEH_CMDTRRT_TOTAL 31 + +#define HZ_TANK_BOTH_TRACKS 32 + + +#endif \ No newline at end of file diff --git a/include/a3/ui_f/hpp/defineResinclDesign.inc b/include/a3/ui_f/hpp/defineResinclDesign.inc new file mode 100644 index 0000000..0c66937 --- /dev/null +++ b/include/a3/ui_f/hpp/defineResinclDesign.inc @@ -0,0 +1,1063 @@ +#define IDC_SEARCH 645 +#define IDC_SEARCH_BUTTON 646 + +//--- RscDisplayMain +#define IDC_MAIN_GAMEMODES 201 +#define IDC_MAIN_MP_SCENARIOS 202 +#define IDC_MAIN_ARSENAL 203 +#define IDC_MAIN_COMMUNITYGUIDES 204 +#define IDC_MAIN_PROFILE 205 +#define IDC_MAIN_CAMPAIGN_MP 206 + +#define IDC_MAIN_MOUSEAREA 999 +#define IDC_MAIN_BACKGROUND_PICTURE 998 +#define IDC_MAIN_BACKGROUND_BLACK 997 + +#define IDC_MAIN_GROUP_SINGLEPLAYER 1001 +#define IDC_MAIN_GROUP_MULTIPLAYER 1002 +#define IDC_MAIN_GROUP_TUTORIALS 1003 +#define IDC_MAIN_GROUP_OPTIONS 1004 +#define IDC_MAIN_GROUP_SESSION 1005 + +#define IDC_MAIN_TITLE_SINGLEPLAYER 1011 +#define IDC_MAIN_TITLE_MULTIPLAYER 1012 +#define IDC_MAIN_TITLE_TUTORIALS 1013 +#define IDC_MAIN_TITLE_OPTIONS 1014 +#define IDC_MAIN_TITLE_SESSION 1015 + +#define IDC_MAIN_TITLEICON_SINGLEPLAYER 1111 +#define IDC_MAIN_TITLEICON_MULTIPLAYER 1112 +#define IDC_MAIN_TITLEICON_TUTORIALS 1113 +#define IDC_MAIN_TITLEICON_OPTIONS 1114 +#define IDC_MAIN_TITLEICON_SESSION 1115 + +#define IDC_MAIN_SPOTLIGHT_GROUP_1 1020 +#define IDC_MAIN_SPOTLIGHT_GROUP_2 1021 +#define IDC_MAIN_SPOTLIGHT_GROUP_3 1022 +#define IDC_MAIN_SPOTLIGHT_PICTURE 1023 +#define IDC_MAIN_SPOTLIGHT_VIDEO 1024 +#define IDC_MAIN_SPOTLIGHT_HOVER 1025 +#define IDC_MAIN_SPOTLIGHT_BUTTON 1026 +#define IDC_MAIN_SPOTLIGHT_ACTION 1027 +#define IDC_MAIN_SPOTLIGHT_TEXT 1028 +#define IDC_MAIN_SPOTLIGHT_TEXTBCG 1029 + +#define IDC_MAIN_SPOTLIGHT_PREV 1060 +#define IDC_MAIN_SPOTLIGHT_NEXT 1061 + +#define IDC_MAIN_INFO_MODS 1030 +#define IDC_MAIN_INFO_DLCS 1031 +#define IDC_MAIN_INFO_DLCSOWNED 10311 +#define IDC_MAIN_INFO_NEWS 1032 +#define IDC_MAIN_INFO_VERSION 1033 + +#define IDC_MAIN_INFO_BACKGROUND 1034 +#define IDC_MAIN_INFO_BACKGROUND_ICON 1035 +#define IDC_MAIN_INFO_ICON 1036 +#define IDC_MAIN_INFO_BUTTON 1037 +#define IDC_MAIN_INFO_BUTTON_DEV 1038 +#define IDC_MAIN_INFO_NOTIFICATION 1039 + +#define IDC_MAIN_VERSION_DEV 1050 + +#define BARCOLOR 0, 0, 0, 0.75 +#define INFO_BACKGROUND_COLOR BARCOLOR +#define INFO_ICON_COLOR 1, 1, 1, 0.5 + +//--- RscDisplayDebug +#define IDC_RSCDISPLAYDEBUG_DESIGNHTML 11735 +#define IDC_RSCDISPLAYDEBUG_TEXTEXPRESSION 11736 +#define IDC_RSCDISPLAYDEBUG_TEXTVAR1 11737 +#define IDC_RSCDISPLAYDEBUG_TEXTVAR2 11738 +#define IDC_RSCDISPLAYDEBUG_TEXTVAR3 11739 +#define IDC_RSCDISPLAYDEBUG_TEXTVAR4 11740 +#define IDC_RSCDISPLAYDEBUG_TEXTWATCH 11741 +#define IDC_RSCDISPLAYDEBUG_DIAGTEXT 11747 +#define IDC_RSCDISPLAYDEBUG_DRAWTEXT 11748 +#define IDC_RSCDISPLAYDEBUG_CA_TITLE 11838 +#define IDC_RSCDISPLAYDEBUG_CA_PLAYER 12145 +#define IDC_RSCDISPLAYDEBUG_CA_VERSION 12146 +#define IDC_RSCDISPLAYDEBUG_DIAGLIST 12236 +#define IDC_RSCDISPLAYDEBUG_DIAGLIST_SEARCH 12238 +#define IDC_RSCDISPLAYDEBUG_DRAWLIST 12237 +#define IDC_RSCDISPLAYDEBUG_DIAGFRAME 12535 +#define IDC_RSCDISPLAYDEBUG_DRAWFRAME 12536 +#define IDC_RSCDISPLAYDEBUG_FRAMELOG 12537 +#define IDC_RSCDISPLAYDEBUG_G_EXPRESSION 13035 +#define IDC_RSCDISPLAYDEBUG_G_DIAG 13036 +#define IDC_RSCDISPLAYDEBUG_G_DESIGN 13037 +#define IDC_RSCDISPLAYDEBUG_G_WATCH 13038 +#define IDC_RSCDISPLAYDEBUG_G_DRAW 13039 +#define IDC_RSCDISPLAYDEBUG_DIAGBUTTON 13138 +#define IDC_RSCDISPLAYDEBUG_DRAWBUTTON 13139 +#define IDC_RSCDISPLAYDEBUG_DEBUGFLOW 13140 +#define IDC_RSCDISPLAYDEBUG_DEBUGANIM 13141 +#define IDC_RSCDISPLAYDEBUG_B_CAMERANEW 13142 +#define IDC_RSCDISPLAYDEBUG_CREATEJIRAISSUE 13143 +#define IDC_RSCDISPLAYDEBUG_DEBUGGUI 13144 +#define IDC_RSCDISPLAYDEBUG_DEBUGFUNCTIONS 13145 +#define IDC_RSCDISPLAYDEBUG_DEBUGCONFIG 13154 +#define IDC_RSCDISPLAYDEBUG_B_CAMERA 13155 +#define IDC_RSCDISPLAYDEBUG_BUTTONSCRIPT1 13157 +#define IDC_RSCDISPLAYDEBUG_BUTTONSCRIPT2 13158 +#define IDC_RSCDISPLAYDEBUG_BUTTONSCRIPT3 13159 +#define IDC_RSCDISPLAYDEBUG_BUTTONSCRIPT4 13160 +#define IDC_RSCDISPLAYDEBUG_BUTTONSCRIPT5 13161 +#define IDC_RSCDISPLAYDEBUG_BUTTONSCRIPT6 13163 +#define IDC_RSCDISPLAYDEBUG_DEBUGCAPTURE 13164 + +//--- RscDisplayAnimViewer +#define IDC_RSCDISPLAYANIMVIEWER_TITLE 1000 +#define IDC_RSCDISPLAYANIMVIEWER_BACKGROUND 1001 +#define IDC_RSCDISPLAYANIMVIEWER_TEXTACTION 1002 +#define IDC_RSCDISPLAYANIMVIEWER_TEXTPOSE 1003 +#define IDC_RSCDISPLAYANIMVIEWER_TEXTMOVEMENT 1004 +#define IDC_RSCDISPLAYANIMVIEWER_TEXTSTANCE 1005 +#define IDC_RSCDISPLAYANIMVIEWER_TEXTITEM 1006 +#define IDC_RSCDISPLAYANIMVIEWER_DESCRIPTION 1100 +#define IDC_RSCDISPLAYANIMVIEWER_MISC 1500 +#define IDC_RSCDISPLAYANIMVIEWER_ACTION 2100 +#define IDC_RSCDISPLAYANIMVIEWER_POSE 2101 +#define IDC_RSCDISPLAYANIMVIEWER_MOVEMENT 2102 +#define IDC_RSCDISPLAYANIMVIEWER_STANCE 2103 +#define IDC_RSCDISPLAYANIMVIEWER_ITEM 2104 +#define IDC_RSCDISPLAYANIMVIEWER_SOLDIER 2106 +#define IDC_RSCDISPLAYANIMVIEWER_BUTTONCLOSE 2700 + +#define IDC_RSCDISPLAYANIMVIEWER_MOUSEAREA 999 +#define IDC_RSCDISPLAYANIMVIEWER 1320 + +//--- RscDisplayFunctionsViewer +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_TITLEBACKGROUND 1000 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_BACKGROUNDLEFT 1001 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_BACKGROUNDRIGHT 1002 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_BACKGROUNDMETA 1003 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_TITLETEXT 1004 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_AUTHOR 1005 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_CODESTRUCTURED 1100 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_TITLEICON 1200 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_CODE 1400 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_NAME 1401 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_FUNCTIONS 1500 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_SOURCES 2100 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_TAGS 2101 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_CATEGORIES 2102 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_PREVIEW 2300 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_BUTTONRECOMPILE_ALL 2400 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_BUTTONRECOMPILE_SELECTED 2401 +#define IDC_RSCDISPLAYFUNCTIONSVIEWER_BUTTONCLOSE 2700 + +#define IDC_RSCDISPLAYFUNCTIONSVIEWER 1321 + +//--- Loading +#define IDC_LOADING_MAPBACKTOP 1000 +#define IDC_LOADING_MAPNAME 1001 +#define IDC_LOADING_MAPAUTHOR 1002 +#define IDC_LOADING_MAPBACKBOTTOM 1003 +#define IDC_LOADING_MISSIONBACKGROUNDTOP 1005 +#define IDC_LOADING_MISSIONNAME 1006 +#define IDC_LOADING_MISSIONAUTHOR 1007 +#define IDC_LOADING_PROGRESSMAP 1008 +#define IDC_LOADING_DISCLAIMERNAME 1009 +#define IDC_LOADING_MISSIONPICTUREBACK 1010 +#define IDC_LOADING_MISSIONGAMETYPE 1012 +#define IDC_LOADING_PROGRESSMISSION 1013 +#define IDC_LOADING_MISSIONDESCRIPTION 1100 +#define IDC_LOADING_DISCLAIMERDESCRIPTION 1101 +#define IDC_LOADING_MAPDESCRIPTION 1102 +#define IDC_LOADING_MISSION 2300 +#define IDC_LOADING_DISCLAIMER 2301 +//--- Loading - DLC part +#define IDC_LOADING_DLCNAME 3207 +#define IDC_LOADING_DLCAUTHOR 3208 +#define IDC_LOADING_DLCPICTUREBACK 3209 +#define IDC_LOADING_DLCDESCRIPTION 3296 +#define IDC_LOADING_DLCPICTURE 3393 +#define IDC_LOADING_DLCSTRIPE 3395 +#define IDC_LOADING_DLCICON 3396 + +#define IDC_LOADING_MAP 999 + +//--- LoadingStart +#define IDC_LOADINGSTART_BLACK 1000 +#define IDC_LOADINGSTART_LOGO 1200 +#define IDC_LOADINGSTART_NOISE 1201 +#define IDC_LOADINGSTART_LOADINGSTART 2310 + +//--- RscDisplayDebriefing +#define IDC_RSCDISPLAYDEBRIEFING_LISTGROUP 21903 //Defined manually +#define IDC_RSCDISPLAYDEBRIEFING_LOACTEMPLATE 21904 +#define IDC_RSCDISPLAYDEBRIEFING_TIMEBACKGROUND 20594 +#define IDC_RSCDISPLAYDEBRIEFING_MAINBACKGROUND 20595 +#define IDC_RSCDISPLAYDEBRIEFING_RATINGBACKGROUND 20596 +#define IDC_RSCDISPLAYDEBRIEFING_PLAYERNAME 20599 +#define IDC_RSCDISPLAYDEBRIEFING_TITLE 20600 +#define IDC_RSCDISPLAYDEBRIEFING_SUBTITLE 20601 +#define IDC_RSCDISPLAYDEBRIEFING_OBJECTIVESBACKGROUND 20602 +#define IDC_RSCDISPLAYDEBRIEFING_STATBACKGROUND 20603 +#define IDC_RSCDISPLAYDEBRIEFING_DESCRIPTIONBACKGROUND 20604 +#define IDC_RSCDISPLAYDEBRIEFING_LOADSBACKGROUND 20605 +#define IDC_RSCDISPLAYDEBRIEFING_RATINGTEXT 20606 +#define IDC_RSCDISPLAYDEBRIEFING_RATING 20607 +#define IDC_RSCDISPLAYDEBRIEFING_RATINGBEST 20608 +#define IDC_RSCDISPLAYDEBRIEFING_TIMETEXT 20609 +#define IDC_RSCDISPLAYDEBRIEFING_TIME 20610 +#define IDC_RSCDISPLAYDEBRIEFING_TIMEBEST 20611 +#define IDC_RSCDISPLAYDEBRIEFING_LOADSTEXT 20612 +#define IDC_RSCDISPLAYDEBRIEFING_LOADS 20613 +#define IDC_RSCDISPLAYDEBRIEFING_LOADSBEST 20614 +#define IDC_RSCDISPLAYDEBRIEFING_DLCOVERVIEWBACKGROUND 20615 +#define IDC_RSCDISPLAYDEBRIEFING_DLCOVERVIEWTEXT 20616 +#define IDC_RSCDISPLAYDEBRIEFING_DLCCOUNTDOWN 20617 +#define IDC_RSCDISPLAYDEBRIEFING_TABSBACKGROUND 20618 +#define IDC_RSCDISPLAYDEBRIEFING_DLCBAR 20619 +#define IDC_RSCDISPLAYDEBRIEFING_DESCRIPTIONTEXT 20693 +#define IDC_RSCDISPLAYDEBRIEFING_CUSTOMTEXT 20694 +#define IDC_RSCDISPLAYDEBRIEFING_SIDE1 20696 +#define IDC_RSCDISPLAYDEBRIEFING_SIDE2 20697 +#define IDC_RSCDISPLAYDEBRIEFING_SIDE3 20698 +#define IDC_RSCDISPLAYDEBRIEFING_SIDE4 20699 +#define IDC_RSCDISPLAYDEBRIEFING_SIDE5 20700 +#define IDC_RSCDISPLAYDEBRIEFING_PICTURE 20793 +#define IDC_RSCDISPLAYDEBRIEFING_MISSIONPICTURE 20794 +#define IDC_RSCDISPLAYDEBRIEFING_DLCOVERVIEWPICTURE 20795 +#define IDC_RSCDISPLAYDEBRIEFING_DLCLOCKICON 20798 +#define IDC_RSCDISPLAYDEBRIEFING_SECTION 21093 +#define IDC_RSCDISPLAYDEBRIEFING_SUMMARY 21893 +#define IDC_RSCDISPLAYDEBRIEFING_DESCRIPTION 21894 +#define IDC_RSCDISPLAYDEBRIEFING_OBJECTIVES 21895 +#define IDC_RSCDISPLAYDEBRIEFING_STAT 21896 +#define IDC_RSCDISPLAYDEBRIEFING_CUSTOM 21897 +#define IDC_RSCDISPLAYDEBRIEFING_DATA 21898 +#define IDC_RSCDISPLAYDEBRIEFING_SIDES 21899 +#define IDC_RSCDISPLAYDEBRIEFING_DLCGENERALGROUP 21900 +#define IDC_RSCDISPLAYDEBRIEFING_LOAC 21901 +#define IDC_RSCDISPLAYDEBRIEFING_DLCBUTTONALLASSETS 21995 +#define IDC_RSCDISPLAYDEBRIEFING_DLCBUTTONKARTS 21996 +#define IDC_RSCDISPLAYDEBRIEFING_DLCBUTTONHELI 21997 +#define IDC_RSCDISPLAYDEBRIEFING_DLCBUTTONMARKSMEN 21998 +#define IDC_RSCDISPLAYDEBRIEFING_DLCBUTTONAPEX 22000 + +//--- RscDisplayDebriefing - DLC item template +#define IDC_RSCDISPLAYDEBRIEFING_ITEMBACKGROUND 20623 +#define IDC_RSCDISPLAYDEBRIEFING_ITEMBACKGROUNDBLACK 20624 +#define IDC_RSCDISPLAYDEBRIEFING_ITEMNAME 20625 +#define IDC_RSCDISPLAYDEBRIEFING_ITEMTEXTSESSIONTIME 20626 +#define IDC_RSCDISPLAYDEBRIEFING_ITEMSESSIONTIME 20627 +#define IDC_RSCDISPLAYDEBRIEFING_ITEMTEXTTOTALTIME 20628 +#define IDC_RSCDISPLAYDEBRIEFING_ITEMTOTALTIME 20629 +#define IDC_RSCDISPLAYDEBRIEFING_ITEMDESCRIPTION 20630 +#define IDC_RSCDISPLAYDEBRIEFING_ITEMPICTURE 20796 +#define IDC_RSCDISPLAYDEBRIEFING_ITEMDLCLOGO 20797 +#define IDC_RSCDISPLAYDEBRIEFING_RSCDISPLAYDEBRIEFING_ITEMTEMPLATE 21902 +#define IDC_RSCDISPLAYDEBRIEFING_BUTTONPURCHASE 21999 + +//--- RscDisplayDebriefing_LOACTemplate +#define IDC_RSCDISPLAYDEBRIEFING_LOACTEMPLATE_BACKGROUND 52605 +#define IDC_RSCDISPLAYDEBRIEFING_LOACTEMPLATE_TITLE 52705 +#define IDC_RSCDISPLAYDEBRIEFING_LOACTEMPLATE_TEXT 52706 +#define IDC_RSCDISPLAYDEBRIEFING_LOACTEMPLATE_PICTURE 52805 +#define IDC_RSCDISPLAYDEBRIEFING_LOACTEMPLATE_TEXTGROUP 53905 + + +//--- RscDebugConsole +#define IDC_RSCDEBUGCONSOLE_TITLE 11884 +#define IDC_RSCDEBUGCONSOLE_EXPRESSIONBACKGROUND 11885 +#define IDC_RSCDEBUGCONSOLE_WATCHBACKGROUND 11886 +#define IDC_RSCDEBUGCONSOLE_WATCHOUTPUTBACKGROUND1 11887 +#define IDC_RSCDEBUGCONSOLE_WATCHOUTPUTBACKGROUND2 11888 +#define IDC_RSCDEBUGCONSOLE_WATCHOUTPUTBACKGROUND3 11889 +#define IDC_RSCDEBUGCONSOLE_WATCHOUTPUTBACKGROUND4 11890 +#define IDC_RSCDEBUGCONSOLE_LINK 11891 +#define IDC_RSCDEBUGCONSOLE_EXPRESSIONTEXT 11892 +#define IDC_RSCDEBUGCONSOLE_WATCHTEXT 11893 +#define IDC_RSCDEBUGCONSOLE_EXPRESSION 12284 +#define IDC_RSCDEBUGCONSOLE_WATCHINPUT1 12285 +#define IDC_RSCDEBUGCONSOLE_WATCHOUTPUT1 12286 +#define IDC_RSCDEBUGCONSOLE_WATCHINPUT2 12287 +#define IDC_RSCDEBUGCONSOLE_WATCHOUTPUT2 12288 +#define IDC_RSCDEBUGCONSOLE_WATCHINPUT3 12289 +#define IDC_RSCDEBUGCONSOLE_WATCHOUTPUT3 12290 +#define IDC_RSCDEBUGCONSOLE_WATCHINPUT4 12291 +#define IDC_RSCDEBUGCONSOLE_WATCHOUTPUT4 12293 +#define IDC_RSCDEBUGCONSOLE_RSCDEBUGCONSOLE 13184 +#define IDC_RSCDEBUGCONSOLE_BUTTONCODEPERFORMANCE 13284 +#define IDC_RSCDEBUGCONSOLE_BUTTONEXECUTEALL 13285 +#define IDC_RSCDEBUGCONSOLE_BUTTONEXECUTESERVER 13286 +#define IDC_RSCDEBUGCONSOLE_BUTTONSPECTATORCAMERA 13287 +#define IDC_RSCDEBUGCONSOLE_BUTTONSPLENDIDCAMERA 13288 +#define IDC_RSCDEBUGCONSOLE_BUTTONFUNCTIONS 13289 +#define IDC_RSCDEBUGCONSOLE_BUTTONCONFIG 13290 +#define IDC_RSCDEBUGCONSOLE_BUTTONANIMATIONS 13291 +#define IDC_RSCDEBUGCONSOLE_BUTTONGUI 13292 +#define IDC_RSCDEBUGCONSOLE_BUTTONEXECUTELOCAL 13484 +#define IDC_RSCDEBUGCONSOLE_EXPRESSIONOUTPUT 13190 +#define IDC_RSCDEBUGCONSOLE_EXPRESSIONOUTPUTBACKGROUND 13191 + + + +//--- RscDisplayOptionsLayout +#define IDC_RSCDISPLAYOPTIONSLAYOUT_TITLE 1000 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_BACKGROUND 1001 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_TAGSTEXT 1002 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_PRESETSLABEL 1003 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_MOUSEAREA 1004 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_CENTERW 1005 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_CENTERH 1006 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_TOOLTIP 1100 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_TAGS 2100 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_PRESETS 2101 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_BUTTONSAVE 2400 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_BUTTONOK 2600 +#define IDC_RSCDISPLAYOPTIONSLAYOUT_BUTTONCANCEL 2700 + +//--- RscDisplayRespawn +#define IDC_RSCDISPLAYRESPAWN_TITLE 1000 +#define IDC_RSCDISPLAYRESPAWN_LISTBACKGROUND 1001 +#define IDC_RSCDISPLAYRESPAWN_SECTION 1002 +#define IDC_RSCDISPLAYRESPAWN_BLACK 1003 +#define IDC_RSCDISPLAYRESPAWN_CONTENTBACKGROUND 1004 +#define IDC_RSCDISPLAYRESPAWN_BLACKCONTENT 1005 +#define IDC_RSCDISPLAYRESPAWN_PLAYERSNAME 1006 +#define IDC_RSCDISPLAYRESPAWN_CONTENT 1100 +#define IDC_RSCDISPLAYRESPAWN_LIST 1500 +#define IDC_RSCDISPLAYRESPAWN_CONTENTGROUP 2300 +#define IDC_RSCDISPLAYRESPAWN_BUTTONOK 2600 +#define IDC_RSCDISPLAYRESPAWN_BUTTONCANCEL 2700 + +#define IDC_RSCDISPLAYRESPAWN_MAP 1050 + +//--- RscDisplaySelectIsland +#define IDC_RSCDISPLAYSELECTISLAND_TITLE 1000 +#define IDC_RSCDISPLAYSELECTISLAND_NAME 1002 +#define IDC_RSCDISPLAYSELECTISLAND_AUTHOR 1003 +#define IDC_RSCDISPLAYSELECTISLAND_NAMEBACKGROUND 1004 +#define IDC_RSCDISPLAYSELECTISLAND_ISLANDPANORAMA 1200 +#define IDC_RSCDISPLAYSELECTISLAND_INTERLACING 1201 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD1 1202 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD2 1203 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD3 1204 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD4 1205 +#define IDC_RSCDISPLAYSELECTISLAND_ISLANDGROUP 2300 +#define IDC_RSCDISPLAYSELECTISLAND_BUTTONCONTINUE 2600 +#define IDC_RSCDISPLAYSELECTISLAND_BUTTONCANCEL 2700 + +//--- RscSpectator +#define IDC_RSCSPECTATOR_PLAYERNAMEBACKGROUND 1000 +#define IDC_RSCSPECTATOR_PLAYERGROUP 1001 +#define IDC_RSCSPECTATOR_PLAYERNAME 1002 +#define IDC_RSCSPECTATOR_PLAYERDESCRIPTION 1100 +#define IDC_RSCSPECTATOR_PLAYERICON 1200 +#define IDC_RSCSPECTATOR_PLAYER 2300 + +//--- RscMissionEnd +#define IDC_RSCMISSIONEND_TITLE 8942 +#define IDC_RSCMISSIONEND_SUBTITLE 8943 +#define IDC_RSCMISSIONEND_SIDE1 9045 +#define IDC_RSCMISSIONEND_SIDE2 9046 +#define IDC_RSCMISSIONEND_SIDE3 9047 +#define IDC_RSCMISSIONEND_SIDE4 9048 +#define IDC_RSCMISSIONEND_SIDE5 9049 +#define IDC_RSCMISSIONEND_PICTURE 9142 +#define IDC_RSCMISSIONEND_SIDES 10248 + +//--- RscNotification +#define IDC_RSCNOTIFICATION_TITLE 12135 +#define IDC_RSCNOTIFICATION_PICTUREBACKGROUND 12136 +#define IDC_RSCNOTIFICATION_SCORE 12137 +#define IDC_RSCNOTIFICATION_DESCRIPTIONBACKGROUND 12138 +#define IDC_RSCNOTIFICATION_DESCRIPTION 12235 +#define IDC_RSCNOTIFICATION_PICTURE 12335 +#define IDC_RSCNOTIFICATION_NOTIFICATION 13435 + +#define IDC_RSCNOTIFICATION_NOTIFICATIONAREA 312 + +//--- RscCommMenuItems +#define IDC_RSCCOMMMENUITEMS_SLOT1BACKGROUND 1000 +#define IDC_RSCCOMMMENUITEMS_SLOT2BACKGROUND 1001 +#define IDC_RSCCOMMMENUITEMS_SLOT3BACKGROUND 1002 +#define IDC_RSCCOMMMENUITEMS_SLOT4BACKGROUND 1003 +#define IDC_RSCCOMMMENUITEMS_SLOT5BACKGROUND 1004 +#define IDC_RSCCOMMMENUITEMS_SLOT6BACKGROUND 1005 +#define IDC_RSCCOMMMENUITEMS_SLOT7BACKGROUND 1006 +#define IDC_RSCCOMMMENUITEMS_SLOT8BACKGROUND 1007 +#define IDC_RSCCOMMMENUITEMS_SLOT9BACKGROUND 1008 +#define IDC_RSCCOMMMENUITEMS_SLOT0BACKGROUND 1009 +#define IDC_RSCCOMMMENUITEMS_SLOT1TEXT 1010 +#define IDC_RSCCOMMMENUITEMS_SLOT1 1200 +#define IDC_RSCCOMMMENUITEMS_SLOT2 1201 +#define IDC_RSCCOMMMENUITEMS_SLOT3 1202 +#define IDC_RSCCOMMMENUITEMS_SLOT4 1203 +#define IDC_RSCCOMMMENUITEMS_SLOT5 1204 +#define IDC_RSCCOMMMENUITEMS_SLOT6 1205 +#define IDC_RSCCOMMMENUITEMS_SLOT7 1206 +#define IDC_RSCCOMMMENUITEMS_SLOT8 1207 +#define IDC_RSCCOMMMENUITEMS_SLOT9 1208 +#define IDC_RSCCOMMMENUITEMS_SLOT0 1209 +#define IDC_RSCCOMMMENUITEMS_SLOT2TEXT 1210 +#define IDC_RSCCOMMMENUITEMS_SLOT3TEXT 1211 +#define IDC_RSCCOMMMENUITEMS_SLOT4TEXT 1212 +#define IDC_RSCCOMMMENUITEMS_SLOT5TEXT 1213 +#define IDC_RSCCOMMMENUITEMS_SLOT6TEXT 1214 +#define IDC_RSCCOMMMENUITEMS_SLOT7TEXT 1215 +#define IDC_RSCCOMMMENUITEMS_SLOT8TEXT 1216 +#define IDC_RSCCOMMMENUITEMS_SLOT9TEXT 1217 +#define IDC_RSCCOMMMENUITEMS_SLOT0TEXT 1218 +#define IDC_RSCCOMMMENUITEMS_RSCCOMMMENUITEMS 2300 + +//--- RscRespawnCounter +#define IDC_RSCRESPAWNCOUNTER_MPTABLE 1000 +#define IDC_RSCRESPAWNCOUNTER_TITLE 1001 +#define IDC_RSCRESPAWNCOUNTER_TITLEBACKGROUND 1002 +#define IDC_RSCRESPAWNCOUNTER_PLAYERRESPAWNTIME 1003 +#define IDC_RSCRESPAWNCOUNTER_DESCRIPTION 1100 + +//--- RscFiringDrillTime +#define IDC_RSCFIRINGDRILLTIME_CURRENTBACKGROUND 1100 +#define IDC_RSCFIRINGDRILLTIME_BEST 1101 +#define IDC_RSCFIRINGDRILLTIME_PREVIOUS 1102 +#define IDC_RSCFIRINGDRILLTIME_BONUS 1103 +#define IDC_RSCFIRINGDRILLTIME_CURRENT 1104 +#define IDC_RSCFIRINGDRILLTIME_PENALTY 1105 +#define IDC_RSCFIRINGDRILLTIME_TIME 2300 + +//--- RscFiringDrillCheckpoint +#define IDC_RSCFIRINGDRILLCHECKPOINT_CHECKPOINTBACKGROUND 1000 +#define IDC_RSCFIRINGDRILLCHECKPOINT_TARGETBACKGROUND 1001 +#define IDC_RSCFIRINGDRILLCHECKPOINT_STANCEBACKGROUND 1002 +#define IDC_RSCFIRINGDRILLCHECKPOINT_WEAPONBACKGROUND 1003 +#define IDC_RSCFIRINGDRILLCHECKPOINT_CHECKPOINTTEXT 1004 +#define IDC_RSCFIRINGDRILLCHECKPOINT_TARGETTEXTTOTAL 1005 +#define IDC_RSCFIRINGDRILLCHECKPOINT_TARGETTEXTCURRENT 1006 +#define IDC_RSCFIRINGDRILLCHECKPOINT_CHECKPOINTPICTURE 1200 +#define IDC_RSCFIRINGDRILLCHECKPOINT_STANCEPICTURE 1201 +#define IDC_RSCFIRINGDRILLCHECKPOINT_WEAPONPICTURE 1202 +#define IDC_RSCFIRINGDRILLCHECKPOINT_TARGETPICTURE 1203 +#define IDC_RSCFIRINGDRILLCHECKPOINT_CHECKPOINT 2300 + +//--- RscAdvancedHint +#define IDC_RSCADVANCEDHINT_TITLE 11657 +#define IDC_RSCADVANCEDHINT_HINT 11757 +#define IDC_RSCADVANCEDHINT_HINTGROUP 12957 + +//--- RscSectorCapture +#define IDC_RSCSECTORCAPTURE_WEST 1001 +#define IDC_RSCSECTORCAPTURE_EAST 1002 +#define IDC_RSCSECTORCAPTURE_GUER 1003 +#define IDC_RSCSECTORCAPTURE_CIV 1004 +#define IDC_RSCSECTORCAPTURE_NAME 1005 +#define IDC_RSCSECTORCAPTURE_BACKGROUND 1200 +#define IDC_RSCSECTORCAPTURE_SECTORCAPTURE 2300 + +//--- RscMissionStatus +#define IDC_RSCMISSIONSTATUS_BARBRIDGE 13983 +#define IDC_RSCMISSIONSTATUS_BARWEST 13984 +#define IDC_RSCMISSIONSTATUS_BAREAST 13985 +#define IDC_RSCMISSIONSTATUS_BARGUER 13986 +#define IDC_RSCMISSIONSTATUS_BARCIV 13987 +#define IDC_RSCMISSIONSTATUS_BARUNKNOWN 13988 +#define IDC_RSCMISSIONSTATUS_SLOT1BACKGROUND 13989 +#define IDC_RSCMISSIONSTATUS_SLOT1PROGRESS 13990 +#define IDC_RSCMISSIONSTATUS_SLOT2BACKGROUND 13991 +#define IDC_RSCMISSIONSTATUS_SLOT2PROGRESS 13992 +#define IDC_RSCMISSIONSTATUS_SLOT3BACKGROUND 13993 +#define IDC_RSCMISSIONSTATUS_SLOT3PROGRESS 13994 +#define IDC_RSCMISSIONSTATUS_SLOT4BACKGROUND 13995 +#define IDC_RSCMISSIONSTATUS_SLOT4PROGRESS 13996 +#define IDC_RSCMISSIONSTATUS_SLOT5BACKGROUND 13997 +#define IDC_RSCMISSIONSTATUS_SLOT5PROGRESS 13998 +#define IDC_RSCMISSIONSTATUS_SLOT6BACKGROUND 13999 +#define IDC_RSCMISSIONSTATUS_SLOT6PROGRESS 14000 +#define IDC_RSCMISSIONSTATUS_SLOT7BACKGROUND 14001 +#define IDC_RSCMISSIONSTATUS_SLOT7PROGRESS 14002 +#define IDC_RSCMISSIONSTATUS_SLOT8BACKGROUND 14003 +#define IDC_RSCMISSIONSTATUS_SLOT8PROGRESS 14004 +#define IDC_RSCMISSIONSTATUS_SLOT9BACKGROUND 14005 +#define IDC_RSCMISSIONSTATUS_SLOT9PROGRESS 14006 +#define IDC_RSCMISSIONSTATUS_SLOT0BACKGROUND 14007 +#define IDC_RSCMISSIONSTATUS_SLOT0PROGRESS 14008 +#define IDC_RSCMISSIONSTATUS_SLOT1TEXT 14093 +#define IDC_RSCMISSIONSTATUS_SLOT2TEXT 14094 +#define IDC_RSCMISSIONSTATUS_SLOT3TEXT 14095 +#define IDC_RSCMISSIONSTATUS_SLOT4TEXT 14096 +#define IDC_RSCMISSIONSTATUS_SLOT5TEXT 14097 +#define IDC_RSCMISSIONSTATUS_SLOT6TEXT 14098 +#define IDC_RSCMISSIONSTATUS_SLOT7TEXT 14099 +#define IDC_RSCMISSIONSTATUS_SLOT8TEXT 14100 +#define IDC_RSCMISSIONSTATUS_SLOT9TEXT 14101 +#define IDC_RSCMISSIONSTATUS_SLOT0TEXT 14102 +#define IDC_RSCMISSIONSTATUS_SLOT1 14183 +#define IDC_RSCMISSIONSTATUS_SLOT2 14184 +#define IDC_RSCMISSIONSTATUS_SLOT3 14185 +#define IDC_RSCMISSIONSTATUS_SLOT4 14186 +#define IDC_RSCMISSIONSTATUS_SLOT5 14187 +#define IDC_RSCMISSIONSTATUS_SLOT6 14188 +#define IDC_RSCMISSIONSTATUS_SLOT7 14189 +#define IDC_RSCMISSIONSTATUS_SLOT8 14190 +#define IDC_RSCMISSIONSTATUS_SLOT9 14191 +#define IDC_RSCMISSIONSTATUS_SLOT0 14192 +#define IDC_RSCMISSIONSTATUS_RSCMISSIONSTATUS 15283 + +//--- RscFeedback +#define IDC_RSCFEEDBACK_RSCFEEDBACK 6455 + +//--- RscDisplayCommunityGuide +#define IDC_RSCDISPLAYCOMMUNITYGUIDE_TITLE 29956 +#define IDC_RSCDISPLAYCOMMUNITYGUIDE_PLAYERSNAME 29957 +#define IDC_RSCDISPLAYCOMMUNITYGUIDE_BRIEFINGNAME 29958 +#define IDC_RSCDISPLAYCOMMUNITYGUIDE_AUTHOR 29959 +#define IDC_RSCDISPLAYCOMMUNITYGUIDE_OVERVIEWTEXT 30056 +#define IDC_RSCDISPLAYCOMMUNITYGUIDE_OVERVIEWPICTURE 30156 +#define IDC_RSCDISPLAYCOMMUNITYGUIDE_GUIDELIST 30456 +#define IDC_RSCDISPLAYCOMMUNITYGUIDE_OVERVIEWCONTROLSGROUP 31256 +#define IDC_RSCDISPLAYCOMMUNITYGUIDE_BUTTONPLAY 31556 +#define IDC_RSCDISPLAYCOMMUNITYGUIDE_BUTTONCANCEL 31656 + +//--- RscDisplayArsenal +#define IDC_RSCDISPLAYARSENAL_MOUSEAREA 899 +#define IDC_RSCDISPLAYARSENAL_MOUSEBLOCK 898 +#define IDC_RSCDISPLAYARSENAL_TABS 1800 +#define IDC_RSCDISPLAYARSENAL_FRAMELEFT 1801 +#define IDC_RSCDISPLAYARSENAL_FRAMERIGHT 1802 +#define IDC_RSCDISPLAYARSENAL_LINEICON 1803 +#define IDC_RSCDISPLAYARSENAL_LINETABLEFT 1804 +#define IDC_RSCDISPLAYARSENAL_LINETABLEFTSELECTED 1805 +#define IDC_RSCDISPLAYARSENAL_LINETABRIGHT 1806 +#define IDC_RSCDISPLAYARSENAL_ICON 900 +#define IDC_RSCDISPLAYARSENAL_ICONBACKGROUND 830 +#define IDC_RSCDISPLAYARSENAL_TAB 930 +#define IDC_RSCDISPLAYARSENAL_LIST 960 +#define IDC_RSCDISPLAYARSENAL_SORT 800 +#define IDC_RSCDISPLAYARSENAL_LISTDISABLED 860 +#define IDC_RSCDISPLAYARSENAL_LOAD 990 +#define IDC_RSCDISPLAYARSENAL_LOADCARGO 991 +#define IDC_RSCDISPLAYARSENAL_ARROWLEFT 992 +#define IDC_RSCDISPLAYARSENAL_ARROWRIGHT 993 +#define IDC_RSCDISPLAYARSENAL_BACKGROUNDLEFT 994 +#define IDC_RSCDISPLAYARSENAL_BACKGROUNDRIGHT 995 +#define IDC_RSCDISPLAYARSENAL_MESSAGE 996 + +#define IDC_RSCDISPLAYARSENAL_TAB_PRIMARYWEAPON 0 +#define IDC_RSCDISPLAYARSENAL_TAB_SECONDARYWEAPON 1 +#define IDC_RSCDISPLAYARSENAL_TAB_HANDGUN 2 +#define IDC_RSCDISPLAYARSENAL_TAB_UNIFORM 3 +#define IDC_RSCDISPLAYARSENAL_TAB_VEST 4 +#define IDC_RSCDISPLAYARSENAL_TAB_BACKPACK 5 +#define IDC_RSCDISPLAYARSENAL_TAB_HEADGEAR 6 +#define IDC_RSCDISPLAYARSENAL_TAB_GOGGLES 7 +#define IDC_RSCDISPLAYARSENAL_TAB_NVGS 8 +#define IDC_RSCDISPLAYARSENAL_TAB_BINOCULARS 9 +#define IDC_RSCDISPLAYARSENAL_TAB_MAP 10 +#define IDC_RSCDISPLAYARSENAL_TAB_GPS 11 +#define IDC_RSCDISPLAYARSENAL_TAB_RADIO 12 +#define IDC_RSCDISPLAYARSENAL_TAB_COMPASS 13 +#define IDC_RSCDISPLAYARSENAL_TAB_WATCH 14 +#define IDC_RSCDISPLAYARSENAL_TAB_FACE 15 +#define IDC_RSCDISPLAYARSENAL_TAB_VOICE 16 +#define IDC_RSCDISPLAYARSENAL_TAB_INSIGNIA 17 +#define IDC_RSCDISPLAYARSENAL_TAB_ITEMOPTIC 18 +#define IDC_RSCDISPLAYARSENAL_TAB_ITEMACC 19 +#define IDC_RSCDISPLAYARSENAL_TAB_ITEMMUZZLE 20 +#define IDC_RSCDISPLAYARSENAL_TAB_ITEMBIPOD 25 +#define IDC_RSCDISPLAYARSENAL_TAB_CARGOMAG 21 +#define IDC_RSCDISPLAYARSENAL_TAB_CARGOTHROW 22 +#define IDC_RSCDISPLAYARSENAL_TAB_CARGOPUT 23 +#define IDC_RSCDISPLAYARSENAL_TAB_CARGOMISC 24 +#define IDC_RSCDISPLAYARSENAL_TAB_CARGOMAGALL 26 + +#define IDC_RSCDISPLAYARSENAL_WEAPON_WEAPONBACKGROUND 29489 +#define IDC_RSCDISPLAYARSENAL_WEAPON_WEAPONTEXT 29589 +#define IDC_RSCDISPLAYARSENAL_WEAPON_WEAPON 30789 + +#define IDC_RSCDISPLAYARSENAL_INFO_INFOBACKGROUND 24515 +#define IDC_RSCDISPLAYARSENAL_INFO_INFONAME 24516 +#define IDC_RSCDISPLAYARSENAL_INFO_INFOAUTHOR 24517 +#define IDC_RSCDISPLAYARSENAL_INFO_DLCBACKGROUND 24518 +#define IDC_RSCDISPLAYARSENAL_INFO_DLCICON 24715 +#define IDC_RSCDISPLAYARSENAL_INFO_INFO 25815 + +#define IDC_RSCDISPLAYARSENAL_STATS_STATSBACKGROUND 27347 +#define IDC_RSCDISPLAYARSENAL_STATS_STAT1 27348 +#define IDC_RSCDISPLAYARSENAL_STATS_STAT2 27349 +#define IDC_RSCDISPLAYARSENAL_STATS_STAT3 27350 +#define IDC_RSCDISPLAYARSENAL_STATS_STAT4 27351 +#define IDC_RSCDISPLAYARSENAL_STATS_STAT5 27352 +#define IDC_RSCDISPLAYARSENAL_STATS_STATTEXT1 27353 +#define IDC_RSCDISPLAYARSENAL_STATS_STATTEXT2 27354 +#define IDC_RSCDISPLAYARSENAL_STATS_STATTEXT3 27355 +#define IDC_RSCDISPLAYARSENAL_STATS_STATTEXT4 27356 +#define IDC_RSCDISPLAYARSENAL_STATS_STATTEXT5 27357 +#define IDC_RSCDISPLAYARSENAL_STATS_STATS 28644 + +#define IDC_RSCDISPLAYARSENAL_CONTROLSBAR_CONTROLBAR 44046 +#define IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONSAVE 44146 +#define IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONLOAD 44147 +#define IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONEXPORT 44148 +#define IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONIMPORT 44149 +#define IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONRANDOM 44150 +#define IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONINTERFACE 44151 +#define IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONOK 44346 +#define IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONTRY 44347 +#define IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONCLOSE 44448 + +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_TITLE 34619 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_COLUMN1 34620 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_TEXTNAME 34621 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_MAINBACKGROUND 34622 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_COLUMN2 34623 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_COLUMN3 34624 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_COLUMN4 34625 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_COLUMN5 34626 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_EDITNAME 35020 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_VALUENAME 35119 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_TEMPLATE 35919 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_BUTTONOK 36019 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_BUTTONCANCEL 36020 +#define IDC_RSCDISPLAYARSENAL_TEMPLATE_BUTTONDELETE 36021 + +#define IDC_RSCDISPLAYARSENAL_SPACE_SPACEARSENALBACKGROUND 26603 +#define IDC_RSCDISPLAYARSENAL_SPACE_SPACEGARAGEBACKGROUND 26604 +#define IDC_RSCDISPLAYARSENAL_SPACE_SPACEARSENAL 26803 +#define IDC_RSCDISPLAYARSENAL_SPACE_SPACEGARAGE 26804 +#define IDC_RSCDISPLAYARSENAL_SPACE_SPACE 27903 + +//--- RscDisplayGarage +#define IDC_RSCDISPLAYGARAGE_TAB_CAR 0 +#define IDC_RSCDISPLAYGARAGE_TAB_ARMOR 1 +#define IDC_RSCDISPLAYGARAGE_TAB_HELI 2 +#define IDC_RSCDISPLAYGARAGE_TAB_PLANE 3 +#define IDC_RSCDISPLAYGARAGE_TAB_NAVAL 4 +#define IDC_RSCDISPLAYGARAGE_TAB_STATIC 5 + +#define IDC_RSCDISPLAYGARAGE_TAB_SUBCREW 18 //--- Match he numbers with Arsenal right panel IDCs +#define IDC_RSCDISPLAYGARAGE_TAB_SUBANIMATION 19 +#define IDC_RSCDISPLAYGARAGE_TAB_SUBTEXTURE 20 + +#define IDC_RSCDISPLAYGARAGE3DEN_TAB_SUBANIMATION 0 +#define IDC_RSCDISPLAYGARAGE3DEN_TAB_SUBTEXTURE 1 + +//--- RscDisplayCreateJIRAIssue +#define IDC_RSCDISPLAYCREATEJIRAISSUE_BACKGROUND 29997 +#define IDC_RSCDISPLAYCREATEJIRAISSUE_SCREENSHOTPATHTITLE 29998 +#define IDC_RSCDISPLAYCREATEJIRAISSUE_TITLE 30097 +#define IDC_RSCDISPLAYCREATEJIRAISSUE_BUTTONMISSION 30098 +#define IDC_RSCDISPLAYCREATEJIRAISSUE_BUTTONMAP 30099 +#define IDC_RSCDISPLAYCREATEJIRAISSUE_BUTTONOBJECT 30100 +#define IDC_RSCDISPLAYCREATEJIRAISSUE_BUTTONEMPTY 30101 +#define IDC_RSCDISPLAYCREATEJIRAISSUE_SCREENSHOTPATH 30397 +#define IDC_RSCDISPLAYCREATEJIRAISSUE_BUTTONCANCEL 31697 + +//--- RscDisplayDLCContentBrowser - main display +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_TITLEBACKGROUND 37179 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_MAINBACKGROUND 37180 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_TITLE 37099 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_PLAYERSNAME 37100 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUTTONCANCEL 38799 //MUF - todo - was exported, but not added to config +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_LISTGROUP 38400 +//--- RscDisplayDLCContentBrowser - General +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_OVERVIEWBACKGROUND 37101 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_OVERVIEWTEXT 37102 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_TABSBACKGROUND 37106 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_OVERVIEWDLCNAME 37137 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_OVERVIEWPICTURE 37299 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_GENERALGROUP 38399 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUTTONASSETS 38499 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUTTONSINGLEPLAYER 38500 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUTTONMULTIPLAYER 38501 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUTTONFEATURES 38502 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUTTONPURCHASE 38503 +//--- RscDisplayDLCContentBrowser - item template +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_ITEMBACKGROUND 37129 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_ITEMBACKGROUNDBLACK 37130 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_ITEMNAME 37131 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_ITEMTEXTSESSIONTIME 37132 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_ITEMSESSIONTIME 37133 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_ITEMTEXTTOTALTIME 37134 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_ITEMTOTALTIME 37135 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_ITEMDESCRIPTION 37136 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_ITEMPICTURE 37300 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_ITEMPREMIUMICON 37311 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_RSCDISPLAYDLCCONTENTBROWSER_ITEMTEMPLATE 38401 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUTTONTRY 38504 +//--- RscDisplayDLCContentBrowser - dlc selection group +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_KARTSPURCHASED 37103 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_HELIPURCHASED 37104 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_MARKSMENPURCHASED 37105 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_KARTSBACKGROUND 37108 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_KARTSNAME 37109 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_HELIBACKGROUND 37110 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_HELINAME 37111 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_MARKSMENBACKGROUND 37112 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_MARKSMENNAME 37113 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUNDLEBACKGROUND 37114 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUNDLENAME 37115 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_KARTSLOGO 37301 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_HELILOGO 37302 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_MARKSMENLOGO 37303 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUNDLELOGO 37304 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_KARTSOVERLAY 37305 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_HELIOVERLAY 37306 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_MARKSMENOVERLAY 37307 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUNDLEOVERLAY 37308 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLCSELECTIONGROUP 38402 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_APEXBACKGROUND 37116 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_APEXNAME 37117 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_APEXPURCHASED 37118 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_APEXLOGO 37309 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_APEXOVERLAY 37310 + + +//--- GroundSupport_ProcedureVisualization +#define IDC_GROUNDSUPPORT_PROCEDUREVISUALIZATION_PROGRESS 68374 +#define IDC_GROUNDSUPPORT_PROCEDUREVISUALIZATION_TEXT 68375 + +//--- RscDisplaySelectIsland +#define IDC_RSCDISPLAYSELECTISLAND_TITLE 24691 +#define IDC_RSCDISPLAYSELECTISLAND_NAME 24693 +#define IDC_RSCDISPLAYSELECTISLAND_AUTHOR 24694 +#define IDC_RSCDISPLAYSELECTISLAND_NAMEBACKGROUND 24695 +#define IDC_RSCDISPLAYSELECTISLAND_ISLANDPANORAMA 24891 +#define IDC_RSCDISPLAYSELECTISLAND_INTERLACING 24892 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD1 24893 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD2 24894 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD3 24895 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD4 24896 +#define IDC_RSCDISPLAYSELECTISLAND_ISLANDGROUP 25991 +#define IDC_RSCDISPLAYSELECTISLAND_BUTTONCONTINUE3D 26091 +#define IDC_RSCDISPLAYSELECTISLAND_BUTTONCONTINUE 26291 +#define IDC_RSCDISPLAYSELECTISLAND_BUTTONCANCEL 26391 + +//--- RscDisplayPurchaseNotification +#define IDC_RSCDISPLAYPURCHASENOTIFICATION_TITLE 46662 +#define IDC_RSCDISPLAYPURCHASENOTIFICATION_TEXT 46663 +#define IDC_RSCDISPLAYPURCHASENOTIFICATION_DLCLIST 46762 +#define IDC_RSCDISPLAYPURCHASENOTIFICATION_PNPICTURE 46862 +#define IDC_RSCDISPLAYPURCHASENOTIFICATION_PNCONTROLSGROUP 47962 +#define IDC_RSCDISPLAYPURCHASENOTIFICATION_BUTTONOK 48262 + +//--- RscDiary +#define IDC_TASKTOOLTIP 47060 +#define IDC_TASKTOOLTIP_BACKGROUND 47061 +#define IDC_TASKTOOLTIP_TITLE 47062 +#define IDC_TASKTOOLTIP_SUBTITLE 47063 +#define IDC_TASKTOOLTIP_BUTTON 47064 +#define IDC_TASKTOOLTIP_ASSIGNEDICON 47065 +#define IDC_TASKTOOLTIP_ASSIGNEDCOUNTER 47066 + +//--- RscRespawnControlsGroup +#define IDC_RSCRESPAWNCONTROLS_RESPAWNCONTROLSGROUP 88800 +#define IDC_RSCRESPAWNCONTROLS_LOCBACKGROUND 88802 +#define IDC_RSCRESPAWNCONTROLS_ROLEBACKGROUND 88803 +#define IDC_RSCRESPAWNCONTROLS_GEARBACKGROUND 88804 +#define IDC_RSCRESPAWNCONTROLS_HEADERBACKGROUND 88801 +#define IDC_RSCRESPAWNCONTROLS_BUTTONSPECTATE 88811 +#define IDC_RSCRESPAWNCONTROLS_LOCLIST 88808 +#define IDC_RSCRESPAWNCONTROLS_ROLELIST 88809 +#define IDC_RSCRESPAWNCONTROLS_COUNTERTEXT 88826 +#define IDC_RSCRESPAWNCONTROLS_COUNTER 88806 +#define IDC_RSCRESPAWNCONTROLS_AUTORESPAWN 88830 +#define IDC_RSCRESPAWNCONTROLS_TEAMTEXT 88827 +#define IDC_RSCRESPAWNCONTROLS_TEAM 88805 +#define IDC_RSCRESPAWNCONTROLS_TICKETSTEXT 88828 +#define IDC_RSCRESPAWNCONTROLS_TICKETS 88807 +#define IDC_RSCRESPAWNCONTROLS_HEADERRESPAWNBUTTON 88829 +#define IDC_RSCRESPAWNCONTROLS_WARNING 88831 +#define IDC_RSCRESPAWNCONTROLS_COMBOLOADOUT 88813 +#define IDC_RSCRESPAWNCONTROLS_BUTTONDETAILS 88814 +#define IDC_RSCRESPAWNCONTROLS_BACKGROUNDPRIMARYWEAPON 88822 +#define IDC_RSCRESPAWNCONTROLS_BACKGROUNDSECONDARYWEAPON 88823 +#define IDC_RSCRESPAWNCONTROLS_BACKGROUNDOPTICS 88824 +#define IDC_RSCRESPAWNCONTROLS_BACKGROUNDITEM 88825 +#define IDC_RSCRESPAWNCONTROLS_PICTUREPRIMARYWEAPON 88815 +#define IDC_RSCRESPAWNCONTROLS_PICTURESECONDARYWEAPON 88816 +#define IDC_RSCRESPAWNCONTROLS_PICTUREOPTICS 88817 +#define IDC_RSCRESPAWNCONTROLS_PICTUREITEM 88818 +#define IDC_RSCRESPAWNCONTROLS_LOCTITLE 88819 +#define IDC_RSCRESPAWNCONTROLS_ROLETITLE 88820 +#define IDC_RSCRESPAWNCONTROLS_GEARTITLE 88821 +#define IDC_RSCRESPAWNCONTROLS_LOCDISABLED 88832 +#define IDC_RSCRESPAWNCONTROLS_ROLEDISABLED 88833 +#define IDC_RSCRESPAWNCONTROLS_LOADOUTDISABLED 88834 + +#define IDC_RSCRESPAWNCONTROLS_RESPAWNDETAILSCONTROLSGROUP 88850 +#define IDC_RSCRESPAWNCONTROLS_BACKGROUNDDETAILS 88851 +#define IDC_RSCRESPAWNCONTROLS_DETAILSTITLE 88852 +#define IDC_RSCRESPAWNCONTROLS_BUTTONDETAILSCLOSE 88853 + +#define IDC_RSCRESPAWNCONTROLS_RESPAWNDETAILSLISTCONTROLSGROUP 88860 +#define IDC_RSCRESPAWNCONTROLS_DETAILSLIST 88861 + +#define IDC_RSCRESPAWNCONTROLS_OVERHEADERBACKGROUND 88870 +#define IDC_RSCRESPAWNCONTROLS_OVERHEADERLEFT 88871 +#define IDC_RSCRESPAWNCONTROLS_OVERHEADERRIGHT 88872 + +#define IDC_RSCRESPAWNCONTROLS_REVIVEINFO 88874 +#define IDC_RSCRESPAWNCONTROLS_REVIVEINFO_TITLE 88875 +#define IDC_RSCRESPAWNCONTROLS_REVIVEINFO_OPTION 88876 + +#define IDC_RSCRESPAWNCONTROLS_RESPAWNINFO 88877 +#define IDC_RSCRESPAWNCONTROLS_RESPAWNINFO_TITLE 88878 +#define IDC_RSCRESPAWNCONTROLS_RESPAWNINFO_OPTION 88879 + +//--- RscRevive +#define IDC_RSCREVIVE_REVIVEPROGRESSBACKGROUND 4817 +#define IDC_RSCREVIVE_REVIVEPROGRESS 4818 +#define IDC_RSCREVIVE_REVIVEKEYPROGRESS 4819 +#define IDC_RSCREVIVE_REVIVEBAR 4820 +#define IDC_RSCREVIVE_REVIVETEXT 4917 +#define IDC_RSCREVIVE_REVIVECOUNTDOWN 4918 +#define IDC_RSCREVIVE_REVIVEINFO 4919 +#define IDC_RSCREVIVE_REVIVEKEYBACKGROUND 4920 +#define IDC_RSCREVIVE_REVIVEKEY 4921 +#define IDC_RSCREVIVE_REVIVEMEDIKIT 5017 +#define IDC_RSCREVIVE_REVIVEMEDIKITPROGRESS 5018 +#define IDC_RSCREVIVE_REVIVEDEATH 5019 +#define IDC_RSCREVIVE_REVIVERESPAWN 6117 +#define IDC_RSCREVIVE_REVIVETEXT2 6118 + +//--- DynamicGroups +#define IDC_DYNAMICGROUPS_HEADER 9377 +#define IDC_DYNAMICGROUPS_BACKGROUNDMANAGE 9379 +#define IDC_DYNAMICGROUPS_TEXTPLAYERNAME 9380 +#define IDC_DYNAMICGROUPS_BACKGROUNDGROUPNAME 9381 +#define IDC_DYNAMICGROUPS_BACKGROUNDPLAYERS 9382 +#define IDC_DYNAMICGROUPS_TEXTPLAYERSIDE 9383 +#define IDC_DYNAMICGROUPS_TEXTPLAYERCOUNT 9384 +#define IDC_DYNAMICGROUPS_TEXTPLAYERSCORE 9386 +#define IDC_DYNAMICGROUPS_TEXTPLAYERNAMEFILL 9387 +#define IDC_DYNAMICGROUPS_TEXTPLAYERSIDEFILL 9388 +#define IDC_DYNAMICGROUPS_TEXTPLAYERSCOREFILL 9389 +#define IDC_DYNAMICGROUPS_TEXTPRIVATE 9390 +#define IDC_DYNAMICGROUPS_GROUPICON 9577 +#define IDC_DYNAMICGROUPS_PICTURESIDE 9578 +#define IDC_DYNAMICGROUPS_EDITGROUPNAME 9777 +#define IDC_DYNAMICGROUPS_LISTBOXGROUPS 9877 +#define IDC_DYNAMICGROUPS_LISTBOXMANAGE 9878 +#define IDC_DYNAMICGROUPS_LISTBOXPLAYERS 9880 +#define IDC_DYNAMICGROUPS_BUTTONJOIN 9977 +#define IDC_DYNAMICGROUPS_BUTTONCREATELEAVEKICK 9978 +#define IDC_DYNAMICGROUPS_BUTTONPROMOTEDISBAND 9979 +#define IDC_DYNAMICGROUPS_BUTTONINVITE 9980 +#define IDC_DYNAMICGROUPS_TABBUTTONGROUPS 9981 +#define IDC_DYNAMICGROUPS_TABBUTTONPLAYERS 9983 +#define IDC_DYNAMICGROUPS_SECTIONMANAGE 10677 +#define IDC_DYNAMICGROUPS_SECTIONGROUPS 10679 +#define IDC_DYNAMICGROUPS_CHECKBOXPRIVATE 11177 + +//--- RscHvtPhase +#define IDC_RSCHVTPHASE_PERSISTENT 6610 +#define IDC_RSCHVTPHASE_DYNAMIC 6611 +#define IDC_RSCHVTPHASE_DOWNLOADTITLE 6612 +#define IDC_RSCHVTPHASE_DOWNLOADCONTENT 6613 +#define IDC_RSCHVTPHASE_MULTIPLIER 6614 +#define IDC_RSCHVTPHASE_RANGEBACKGROUND 6615 +#define IDC_RSCHVTPHASE_TIMER 6616 +#define IDC_RSCHVTPHASE_PROGRESSBAR 6620 +#define IDC_RSCHVTPHASE_DOWNLOADSPEED 6621 +#define IDC_RSCHVTPHASE_RANGE 6810 +#define IDC_RSCHVTPHASE_CARRIERPICTURE 6811 +#define IDC_RSCHVTPHASE_DOWNLOAD 7910 + +//--- RscPhaseRules +#define IDC_RSCPHASERULES_PHASE1NUMBER 9131 +#define IDC_RSCPHASERULES_PHASE1TEXT 9132 +#define IDC_RSCPHASERULES_PHASE2TEXT 9133 +#define IDC_RSCPHASERULES_PHASE2NUMBER 9134 +#define IDC_RSCPHASERULES_PHASE3TEXT 9135 +#define IDC_RSCPHASERULES_PHASE3NUMBER 9136 +#define IDC_RSCPHASERULES_PHASE1INFO 9137 +#define IDC_RSCPHASERULES_PHASE2INFO 9138 +#define IDC_RSCPHASERULES_PHASE3INFO 9139 +#define IDC_RSCPHASERULES_PHASERULES 10431 + +//--- RscDisplayEGSpectator +#define IDD_RSCDISPLAYEGSPECTATOR 60492 +#define IDC_RSCDISPLAYEGSPECTATOR_GAMETIMETEXT 42609 +#define IDC_RSCDISPLAYEGSPECTATOR_GAMEPHASETEXT 48610 +#define IDC_RSCDISPLAYEGSPECTATOR_SIDEBBACKGROUND 42611 +#define IDC_RSCDISPLAYEGSPECTATOR_SIDEATASK 42612 +#define IDC_RSCDISPLAYEGSPECTATOR_SIDEABACKGROUND 42613 +#define IDC_RSCDISPLAYEGSPECTATOR_SIDEBTASK 42614 +#define IDC_RSCDISPLAYEGSPECTATOR_SIDEACOLORBACKGROUND 42615 +#define IDC_RSCDISPLAYEGSPECTATOR_SIDEBCOLORBACKGROUND 42616 +#define IDC_RSCDISPLAYEGSPECTATOR_SIDEACOLOR 42617 +#define IDC_RSCDISPLAYEGSPECTATOR_SIDEBCOLOR 42618 +#define IDC_RSCDISPLAYEGSPECTATOR_SIDEAPROGRESSGROUP 48909 +#define IDC_RSCDISPLAYEGSPECTATOR_SIDEBPROGRESSGROUP 43910 +#define IDC_RSCDISPLAYEGSPECTATOR_MOUSEHANDLER 42989 +#define IDC_RSCDISPLAYEGSPECTATOR_TABS 43609 +#define IDC_RSCDISPLAYEGSPECTATOR_LIST 43109 +#define IDC_RSCDISPLAYEGSPECTATOR_LISTGROUP 43909 +#define IDC_RSCDISPLAYEGSPECTATOR_CAMERATYPESBACKGROUND 52610 +#define IDC_RSCDISPLAYEGSPECTATOR_FREE 52809 +#define IDC_RSCDISPLAYEGSPECTATOR_FOLLOW 52810 +#define IDC_RSCDISPLAYEGSPECTATOR_FPS 52811 +#define IDC_RSCDISPLAYEGSPECTATOR_CAMERATYPESGROUP 52909 +#define IDC_RSCDISPLAYEGSPECTATOR_MAP 62609 +#define IDC_RSCDISPLAYEGSPECTATOR_MAPHEADER 62610 +#define IDC_RSCDISPLAYEGSPECTATOR_MAPFOOTER 62611 +#define IDC_RSCDISPLAYEGSPECTATOR_MAPTITLE 62612 +#define IDC_RSCDISPLAYEGSPECTATOR_SPECTATORSCOUNT 62613 +#define IDC_RSCDISPLAYEGSPECTATOR_SPECTATORSICON 62809 +#define IDC_RSCDISPLAYEGSPECTATOR_MAPGROUP 63909 +#define IDC_RSCDISPLAYEGSPECTATOR_HELPBACKGROUND 72812 +#define IDC_RSCDISPLAYEGSPECTATOR_HELP 73189 +#define IDC_RSCDISPLAYEGSPECTATOR_UPPERBACKGROUND 82609 +#define IDC_RSCDISPLAYEGSPECTATOR_NAME 82610 +#define IDC_RSCDISPLAYEGSPECTATOR_LOWERLEFTBACKGROUND 82611 +#define IDC_RSCDISPLAYEGSPECTATOR_LOWERRIGHTBACKGROUND 82612 +#define IDC_RSCDISPLAYEGSPECTATOR_AVATARBACKGROUND 82613 +#define IDC_RSCDISPLAYEGSPECTATOR_KILLS_COUNT 82614 +#define IDC_RSCDISPLAYEGSPECTATOR_LANDKILLS_COUNT 82615 +#define IDC_RSCDISPLAYEGSPECTATOR_ARMOREDKILLS_COUNT 82616 +#define IDC_RSCDISPLAYEGSPECTATOR_AIRKILLS_COUNT 82617 +#define IDC_RSCDISPLAYEGSPECTATOR_DEATHS_COUNT 82618 +#define IDC_RSCDISPLAYEGSPECTATOR_TOTAL_COUNT 82619 +#define IDC_RSCDISPLAYEGSPECTATOR_AVATAR 82809 +#define IDC_RSCDISPLAYEGSPECTATOR_UNITTYPE 82810 +#define IDC_RSCDISPLAYEGSPECTATOR_KILLS 82811 +#define IDC_RSCDISPLAYEGSPECTATOR_LANDKILLS 82812 +#define IDC_RSCDISPLAYEGSPECTATOR_ARMOREDKILLS 82813 +#define IDC_RSCDISPLAYEGSPECTATOR_AIRKILLS 82814 +#define IDC_RSCDISPLAYEGSPECTATOR_DEATHS 82815 +#define IDC_RSCDISPLAYEGSPECTATOR_TOTAL 82816 +#define IDC_RSCDISPLAYEGSPECTATOR_WEAPONPICTURE 82817 +#define IDC_RSCDISPLAYEGSPECTATOR_VEHICLETYPE 82818 +#define IDC_RSCDISPLAYEGSPECTATOR_FOCUSINFO 83909 + +//--- RscEGProgress +#define IDC_RSCEGPROGRESS_DOWNLOADICONBACKGROUND 9170 +#define IDC_RSCEGPROGRESS_OBJECTIVELETTER 9171 +#define IDC_RSCEGPROGRESS_ACTIVITYBACKGROUND 9172 +#define IDC_RSCEGPROGRESS_PROGRESSBARBACKGROUND 9173 +#define IDC_RSCEGPROGRESS_TITLE 9174 +#define IDC_RSCEGPROGRESS_PROGRESSBAR 9180 +#define IDC_RSCEGPROGRESS_OBJECTIVEBACKGROUND 9370 +#define IDC_RSCEGPROGRESS_ACTIVITY 9372 +#define IDC_RSCEGPROGRESS_DOWNLOADICON 9374 +#define IDC_RSCEGPROGRESS_OBJECTIVEBACKGROUNDCOLOURED 9375 +#define IDC_RSCEGPROGRESS_DOWNLOAD 9376 + +//--- RscDisplayQuickPlay +#define IDC_RSCDISPLAYQUICKPLAY_TITLE 18702 +#define IDC_RSCDISPLAYQUICKPLAY_PLAYERSNAME 18703 +#define IDC_RSCDISPLAYQUICKPLAY_MODTEXT 18704 +#define IDC_RSCDISPLAYQUICKPLAY_CONTENTBACKGROUND 18705 +#define IDC_RSCDISPLAYQUICKPLAY_MAXPINGTEXT 18706 +#define IDC_RSCDISPLAYQUICKPLAY_BESTMATCHTEXT 18707 +#define IDC_RSCDISPLAYQUICKPLAY_MODBACKGROUND 18708 +#define IDC_RSCDISPLAYQUICKPLAY_GAMETYPEDESCRIPTION 18713 +#define IDC_RSCDISPLAYQUICKPLAY_GAMETYPETITLEBACKGROUND 18714 +#define IDC_RSCDISPLAYQUICKPLAY_GAMETYPETITLE 18715 +#define IDC_RSCDISPLAYQUICKPLAY_GAMETYPEOVERVIEW 18903 +#define IDC_RSCDISPLAYQUICKPLAY_GAMETYPEDESCRIPTIONBACKGROUND 18904 +#define IDC_RSCDISPLAYQUICKPLAY_MODICON 18905 +#define IDC_RSCDISPLAYQUICKPLAY_CONTENT 20002 +#define IDC_RSCDISPLAYQUICKPLAY_BUTTONBACK 20402 + +//--- RscDisplayCampaignLobby (Scripted campaign lobby) +#define IDD_CAMPAIGN_LOBBY 50000 +#define IDC_CAMPAIGN_LOBBY_BACKGROUND_FULL_GROUP 51000 +#define IDC_CAMPAIGN_LOBBY_BACKGROUND_GROUP 51100 +#define IDC_CAMPAIGN_LOBBY_BACKGROUND_LOADING_GROUP 51200 +#define IDC_CAMPAIGN_LOBBY_BACKGROUND_BORDER_GROUP 51300 +#define IDC_CAMPAIGN_LOBBY_TABLET_GROUP 52000 +#define IDC_CAMPAIGN_LOBBY_TABLET_BUTTON_GROUP 52100 +#define IDC_CAMPAIGN_LOBBY_TABLET_BUTTON_SEARCH_GROUP 52200 +#define IDC_CAMPAIGN_LOBBY_TABLET_BUTTON_SETTINGS_GROUP 52300 +#define IDC_CAMPAIGN_LOBBY_TABLET_BUTTON_RESPAWN_GROUP 52400 +#define IDC_CAMPAIGN_LOBBY_TABLET_BUTTON_REVIVE_GROUP 52500 +#define IDC_CAMPAIGN_LOBBY_TABLET_MILITARY_GROUP 52600 +#define IDC_CAMPAIGN_LOBBY_MAIN_GROUP 53000 +#define IDC_CAMPAIGN_LOBBY_CTRG_TREE_GROUP 53100 +#define IDC_CAMPAIGN_LOBBY_CTRG_TREE_HEADER_GROUP 53200 +#define IDC_CAMPAIGN_LOBBY_CTRG_TREE_STRUCTURE_GROUP 53300 +#define IDC_CAMPAIGN_LOBBY_CTRG_TREE_OPTION_CORE_GROUP 53400 +#define IDC_CAMPAIGN_LOBBY_CTRG_TREE_OPTION_GROUP 53500 +#define IDC_CAMPAIGN_LOBBY_LOGIN_GROUP 54100 +#define IDC_CAMPAIGN_LOBBY_ACCESS_KEY_GROUP 54200 +#define IDC_CAMPAIGN_LOBBY_MISSION_GROUP 54300 +#define IDC_CAMPAIGN_LOBBY_MISSION_VIDEO_GROUP 54400 +#define IDC_CAMPAIGN_LOBBY_MISSION_INTEL_GROUP 54500 +#define IDC_CAMPAIGN_LOBBY_MISSION_OVERLAY_GROUP 54600 +#define IDC_CAMPAIGN_LOBBY_MISSION_PLAYER_CORE_GROUP 55000 +#define IDC_CAMPAIGN_LOBBY_MISSION_PLAYER_GROUP 55100 +#define IDC_CAMPAIGN_LOBBY_PROGRESS_GROUP 56000 +#define IDC_CAMPAIGN_LOBBY_OVERLAY_GROUP 57000 + +// RscDisplayDLCContentBrowser +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_PICTUREBACKGROUND 2000 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_PICTURE 2001 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_VIDEOGROUP 2002 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_VIDEO 2003 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_ICON 2004 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_LINEL 2005 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_LINER 2006 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_LINET 2007 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_LINEB 2008 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_BUTTON 2009 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_TITLE 2010 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLC_HOVER 2011 + +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_MOUSEAREA 999 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLCGROUP 1001 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_DLCBACKGROUND 1002 +#define IDC_RSCDISPLAYDLCCONTENTBROWSER_BUTTONBACKGROUND 1003 + +//--- RscDisplayDLCPreview_List +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_BACKGROUND 31263 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_INFOTITLE 31264 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_BACKGROUNDBOTTOM 31266 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_INFO 31363 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_INFOSTATS 31364 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_PICTUREANIM 31463 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_PICTURE 31464 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_BROWSEPREV 31465 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_BROWSENEXT 31466 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_PICTUREANIMOVERLAY 31467 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_PICTUREOVERLAY 31468 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_PICTUREANIMOVERLAYICON 31469 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_PICTUREOVERLAYICON 31470 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_PICTUREBACKGROUND 31471 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_PICTUREANIMBACKGROUND 31472 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_PICTUREGROUP 32563 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_PICTURELISTGROUP 32564 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_INFOGROUP 32565 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_BUTTONTRY 32663 +#define IDC_RSCDISPLAYDLCPREVIEW_LIST_BUTTONPURCHASE 32664 + +//--- RscDisplayDLCPreview_ListItem +#define IDC_RSCDISPLAYDLCPREVIEW_LISTITEM_SELECT 41883 +#define IDC_RSCDISPLAYDLCPREVIEW_LISTITEM_HOVER 41884 +#define IDC_RSCDISPLAYDLCPREVIEW_LISTITEM_PICTURE 42083 +#define IDC_RSCDISPLAYDLCPREVIEW_LISTITEM_SESSIONNOTIFICATION 42084 +#define IDC_RSCDISPLAYDLCPREVIEW_LISTITEM_BACKGROUND 42085 +#define IDC_RSCDISPLAYDLCPREVIEW_LISTITEM_BUTTON 42483 +#define IDC_RSCDISPLAYDLCPREVIEW_LISTITEM_RSCDISPLAYDLCPREVIEW_LISTITEM 43183 + +//--- RscDisplayDLCPreview +#define IDC_RSCDISPLAYDLCPREVIEW_BACKGROUND 1001 +#define IDC_RSCDISPLAYDLCPREVIEW_LOGO 1002 +#define IDC_RSCDISPLAYDLCPREVIEW_OVERVIEW 1003 +#define IDC_RSCDISPLAYDLCPREVIEW_PREVIEWGROUP 1004 +#define IDC_RSCDISPLAYDLCPREVIEW_PREVIEWBACKGROUND 1005 +#define IDC_RSCDISPLAYDLCPREVIEW_BUTTONBACKGROUND 1006 +#define IDC_RSCDISPLAYDLCPREVIEW_BUTTONPURCHASE 1007 +#define IDC_RSCDISPLAYDLCPREVIEW_AUTHOR 1008 +#define IDC_RSCDISPLAYDLCPREVIEW_LISTGROUP 1009 +#define IDC_RSCDISPLAYDLCPREVIEW_BOHEMIA 1010 + +//--- RscDisplayTimeline +#define IDD_RSCDISPLAYTIMELINE 15000 + +//--- RscDisplayTimeline +#define IDC_RSCDISPLAYTIMELINE_BACKGROUND 16985 +#define IDC_RSCDISPLAYTIMELINE_TEXTTIME 17085 +#define IDC_RSCDISPLAYTIMELINE_TEXTPLAYRATE 17086 +#define IDC_RSCDISPLAYTIMELINE_BUTTONPLAYFORWARD 17585 +#define IDC_RSCDISPLAYTIMELINE_BUTTONPLAYBACKWARD 17586 +#define IDC_RSCDISPLAYTIMELINE_BUTTONPAUSE 17587 +#define IDC_RSCDISPLAYTIMELINE_BUTTONDECREASEPLAYRATE 17588 +#define IDC_RSCDISPLAYTIMELINE_BUTTONINCREASEPLAYRATE 17589 +#define IDC_RSCDISPLAYTIMELINE_LIST 18085 +#define IDC_RSCDISPLAYTIMELINE_TIMELINECONTROLS 18285 diff --git a/include/a3/ui_f_curator/$PBOPREFIX$ b/include/a3/ui_f_curator/$PBOPREFIX$ new file mode 100644 index 0000000..bd6ed88 --- /dev/null +++ b/include/a3/ui_f_curator/$PBOPREFIX$ @@ -0,0 +1 @@ +a3\ui_f_curator \ No newline at end of file diff --git a/include/a3/ui_f_curator/ui/defineResinclDesign.inc b/include/a3/ui_f_curator/ui/defineResinclDesign.inc new file mode 100644 index 0000000..75ab540 --- /dev/null +++ b/include/a3/ui_f_curator/ui/defineResinclDesign.inc @@ -0,0 +1,624 @@ +#include "\a3\ui_f\hpp\defineResincl.inc" + +//--- RscDisplayCurator +#define IDC_RSCDISPLAYCURATOR_CREATEBACKGROUND 15505 +#define IDC_RSCDISPLAYCURATOR_CLOCKDURATION 15506 +#define IDC_RSCDISPLAYCURATOR_ENTITIESBACKGROUND 15508 +#define IDC_RSCDISPLAYCURATOR_CLOCKDAYTIME 15509 +#define IDC_RSCDISPLAYCURATOR_CREATECLASSESBACKGROUND 15510 +#define IDC_RSCDISPLAYCURATOR_CLOCKCOUNTDOWN 15511 +#define IDC_RSCDISPLAYCURATOR_FEEDBACKMESSAGE 15512 +#define IDC_RSCDISPLAYCURATOR_POINTSBACKGROUND 15513 +#define IDC_RSCDISPLAYCURATOR_POINTS 15515 +#define IDC_RSCDISPLAYCURATOR_POINTSPREVIEW 15516 +#define IDC_RSCDISPLAYCURATOR_COMPASSBACKGROUND 15518 +#define IDC_RSCDISPLAYCURATOR_MODEUNITS 15704 +#define IDC_RSCDISPLAYCURATOR_MODEGROUPS 15705 +#define IDC_RSCDISPLAYCURATOR_MODEMODULES 15706 +#define IDC_RSCDISPLAYCURATOR_MODEMARKERS 15708 +#define IDC_RSCDISPLAYCURATOR_SIDEBLUFOR 15709 +#define IDC_RSCDISPLAYCURATOR_SIDEOPFOR 15710 +#define IDC_RSCDISPLAYCURATOR_SIDEINDEPENDENT 15711 +#define IDC_RSCDISPLAYCURATOR_SIDECIVILIAN 15712 +#define IDC_RSCDISPLAYCURATOR_SIDEEMPTY 15713 +#define IDC_RSCDISPLAYCURATOR_LOGO 15715 +#define IDC_RSCDISPLAYCURATOR_WATERMARK 15717 +#define IDC_RSCDISPLAYCURATOR_MISSIONBARTITLE 16104 +#define IDC_RSCDISPLAYCURATOR_ADDBARTITLE 16105 +#define IDC_RSCDISPLAYCURATOR_MODEFRAME 16304 +#define IDC_RSCDISPLAYCURATOR_SIDEFRAME 16305 +#define IDC_RSCDISPLAYCURATOR_POINTSFRAME 16306 +#define IDC_RSCDISPLAYCURATOR_CREATEFRAME 16307 +#define IDC_RSCDISPLAYCURATOR_ENTITIESFRAME 16308 +#define IDC_RSCDISPLAYCURATOR_ADDBARFRAME 16309 +#define IDC_RSCDISPLAYCURATOR_CLOCKFRAME 16310 +#define IDC_RSCDISPLAYCURATOR_MISSIONBARFRAME 16311 +#define IDC_RSCDISPLAYCURATOR_COMPASSFRAME 16312 +#define IDC_RSCDISPLAYCURATOR_COMPASSCARET 16314 +#define IDC_RSCDISPLAYCURATOR_MISSION 16804 +#define IDC_RSCDISPLAYCURATOR_ADDBAR 16805 +#define IDC_RSCDISPLAYCURATOR_MAIN 16806 +#define IDC_RSCDISPLAYCURATOR_ADD 16807 +#define IDC_RSCDISPLAYCURATOR_CLOCK 16808 +#define IDC_RSCDISPLAYCURATOR_MISSIONBAR 16809 +#define IDC_RSCDISPLAYCURATOR_COMPASS 16810 + +//--- Engine Curator +#define IDD_RSCDISPLAYCURATOR 312 +#define IDC_RSCDISPLAYCURATOR_SIDEBLUFOR 155 +#define IDC_RSCDISPLAYCURATOR_SIDEOPFOR 156 +#define IDC_RSCDISPLAYCURATOR_SIDEINDEPENDENT 157 +#define IDC_RSCDISPLAYCURATOR_SIDECIVILIAN 158 +#define IDC_RSCDISPLAYCURATOR_SIDEEMPTY 159 +#define IDC_RSCDISPLAYCURATOR_MODEUNITS 150 +#define IDC_RSCDISPLAYCURATOR_MODEGROUPS 151 +#define IDC_RSCDISPLAYCURATOR_MODEMODULES 152 +#define IDC_RSCDISPLAYCURATOR_MODEMARKERS 154 +#define IDC_RSCDISPLAYCURATOR_MODERECENT 170 +#define IDC_RSCDISPLAYCURATOR_ADD 450 +#define IDC_RSCDISPLAYCURATOR_MISSION 453 +#define IDC_RSCDISPLAYCURATOR_MAINMAP 50 +#define IDC_RSCDISPLAYCURATOR_MOUSEAREA 53 +#define IDC_RSCDISPLAYCURATOR_POINTS 111 +#define IDC_RSCDISPLAYCURATOR_POINTSPREVIEW 112 +#define IDC_RSCDISPLAYCURATOR_ENTITIES 251 +#define IDC_RSCDISPLAYCURATOR_CREATE_UNITS_WEST 270 +#define IDC_RSCDISPLAYCURATOR_CREATE_UNITS_EAST 271 +#define IDC_RSCDISPLAYCURATOR_CREATE_UNITS_GUER 272 +#define IDC_RSCDISPLAYCURATOR_CREATE_UNITS_CIV 273 +#define IDC_RSCDISPLAYCURATOR_CREATE_UNITS_EMPTY 274 +#define IDC_RSCDISPLAYCURATOR_CREATE_GROUPS_WEST 275 +#define IDC_RSCDISPLAYCURATOR_CREATE_GROUPS_EAST 276 +#define IDC_RSCDISPLAYCURATOR_CREATE_GROUPS_GUER 277 +#define IDC_RSCDISPLAYCURATOR_CREATE_GROUPS_CIV 278 +#define IDC_RSCDISPLAYCURATOR_CREATE_GROUPS_EMPTY 279 +#define IDC_RSCDISPLAYCURATOR_CREATE_MODULES 280 +#define IDC_RSCDISPLAYCURATOR_CREATE_MARKERS 281 +#define IDC_RSCDISPLAYCURATOR_CREATE_RECENT 282 +#define IDC_RSCDISPLAYCURATOR_CREATE_SEARCH 283 +//#define IDC_RSCDISPLAYCURATOR_FILTERPLAYERS 282 +//#define IDC_RSCDISPLAYCURATOR_FILTERAI 283 +//#define IDC_RSCDISPLAYCURATOR_FILTERCREW 284 +//#define IDC_RSCDISPLAYCURATOR_FILTERDEAD 285 +//#define IDC_RSCDISPLAYCURATOR_FILTEREMPTY 286 +//#define IDC_RSCDISPLAYCURATOR_FILTERMODULE 287 +#define IDC_RSCDISPLAYCURATOR_BLACK 999 + +//--- RscCuratorPing +#define IDC_RSCCURATORPING_ICON 10674 +#define IDC_RSCCURATORPING_PLAYER 10675 + +//--- RSCCURATORVISIONMODES +#define IDC_RSCCURATORVISIONMODES_VISIONMODE0 10463 +#define IDC_RSCCURATORVISIONMODES_VISIONMODE1 10464 +#define IDC_RSCCURATORVISIONMODES_VISIONMODE2 10465 +#define IDC_RSCCURATORVISIONMODES_VISIONMODE3 10466 +#define IDC_RSCCURATORVISIONMODES_VISIONMODE4 10467 +#define IDC_RSCCURATORVISIONMODES_VISIONMODE5 10468 +#define IDC_RSCCURATORVISIONMODES_VISIONMODE6 10469 +#define IDC_RSCCURATORVISIONMODES_VISIONMODE7 10470 +#define IDC_RSCCURATORVISIONMODES_VISIONMODE8 10471 +#define IDC_RSCCURATORVISIONMODES_VISIONMODE9 10472 +#define IDC_RSCCURATORVISIONMODES_FRAME 11263 +#define IDC_RSCCURATORVISIONMODES_VISIONMODES 11763 + +//--- RscDisplayModuleSkiptime +#define IDC_RSCDISPLAYMODULESKIPTIME_BACKGROUND 1000 +#define IDC_RSCDISPLAYMODULESKIPTIME_TITLE 1001 +#define IDC_RSCDISPLAYMODULESKIPTIME_DESCRIPTION 1100 +#define IDC_RSCDISPLAYMODULESKIPTIME_SLIDERVALUE 1003 +#define IDC_RSCDISPLAYMODULESKIPTIME_SLIDER 1900 +#define IDC_RSCDISPLAYMODULESKIPTIME_BUTTONOK 2600 +#define IDC_RSCDISPLAYMODULESKIPTIME_BUTTONCANCEL 2700 + +//--- RscDisplayAttributes +#define IDC_RSCDISPLAYATTRIBUTES_BACKGROUND 30001 +#define IDC_RSCDISPLAYATTRIBUTES_TITLE 30002 +#define IDC_RSCDISPLAYATTRIBUTES_CONTENT 30003 +#define IDC_RSCDISPLAYATTRIBUTES_BUTTONCUSTOM 30004 +#define IDC_RSCDISPLAYATTRIBUTES_BUTTONOK 30005 +#define IDC_RSCDISPLAYATTRIBUTES_BUTTONCANCEL 30006 + +#define IDC_RSCDISPLAYCURATORATTRIBUTES_TEXT 1000 +#define IDC_RSCDISPLAYCURATORATTRIBUTES_STRUCTUREDTEXT 1100 +#define IDC_RSCDISPLAYCURATORATTRIBUTES_PICTURE 1200 +#define IDC_RSCDISPLAYCURATORATTRIBUTES_ACTIVETEXT 1300 +#define IDC_RSCDISPLAYCURATORATTRIBUTES_EDIT 1400 +#define IDC_RSCDISPLAYCURATORATTRIBUTES_COMBO 2100 +#define IDC_RSCDISPLAYCURATORATTRIBUTES_LISTBOX 1500 +#define IDC_RSCDISPLAYCURATORATTRIBUTES_SLIDER 1900 + +//--- RscAttributeRank +#define IDC_RSCATTRIBUTERANK_BACKGROUND 13469 +#define IDC_RSCATTRIBUTERANK_TITLE 13471 +#define IDC_RSCATTRIBUTERANK_PRIVATE 13669 +#define IDC_RSCATTRIBUTERANK_CORPORAL 13670 +#define IDC_RSCATTRIBUTERANK_SERGEANT 13671 +#define IDC_RSCATTRIBUTERANK_LIEUTENANT 13672 +#define IDC_RSCATTRIBUTERANK_CAPTAIN 13673 +#define IDC_RSCATTRIBUTERANK_MAJOR 13674 +#define IDC_RSCATTRIBUTERANK_COLONEL 13675 +#define IDC_RSCATTRIBUTERANK_RSCATTRIBUTERANK 14769 + +//--- RscAttributeUnitPos +#define IDC_RSCATTRIBUTEUNITPOS_BACKGROUND 18976 +#define IDC_RSCATTRIBUTEUNITPOS_TITLE 18978 +#define IDC_RSCATTRIBUTEUNITPOS_DOWN 19176 +#define IDC_RSCATTRIBUTEUNITPOS_CROUCH 19177 +#define IDC_RSCATTRIBUTEUNITPOS_UP 19178 +#define IDC_RSCATTRIBUTEUNITPOS_AUTO 19179 +#define IDC_RSCATTRIBUTEUNITPOS_RSCATTRIBUTEUNITPOS 20276 + +//--- RscAttributeDamage +#define IDC_RSCATTRIBUTEDAMAGE_TITLE 16502 +#define IDC_RSCATTRIBUTEDAMAGE_VALUE 17402 +#define IDC_RSCATTRIBUTEDAMAGE_RSCATTRIBUTEDAMAGE 17802 + +//--- RscAttributeFuel +#define IDC_RSCATTRIBUTEFUEL_TITLE 13474 +#define IDC_RSCATTRIBUTEFUEL_VALUE 14374 +#define IDC_RSCATTRIBUTEFUEL_RSCATTRIBUTEFUEL 14774 + +//--- RscAttributeSide +#define IDC_RSCATTRIBUTESIDE_BACKGROUND 31000 +#define IDC_RSCATTRIBUTESIDE_TITLE 31002 +#define IDC_RSCATTRIBUTESIDE_BLUFOR 31200 +#define IDC_RSCATTRIBUTESIDE_OPFOR 31201 +#define IDC_RSCATTRIBUTESIDE_INDEPENDENT 31202 +#define IDC_RSCATTRIBUTESIDE_CIVILIAN 31203 +#define IDC_RSCATTRIBUTESIDE_RSCATTRIBUTESIDE 32300 + +//--- RscAttributeOwners +/* +#define IDC_RSCATTRIBUTEOWNERS_BACKGROUND 31000 +#define IDC_RSCATTRIBUTEOWNERS_TITLE 31002 +#define IDC_RSCATTRIBUTEOWNERS_BLUFOR 31200 +#define IDC_RSCATTRIBUTEOWNERS_OPFOR 31201 +#define IDC_RSCATTRIBUTEOWNERS_INDEPENDENT 31202 +#define IDC_RSCATTRIBUTEOWNERS_CIVILIAN 31203 +#define IDC_RSCATTRIBUTEOWNERS_RSCATTRIBUTEOWNERS 32300 +*/ +//--- RscAttributeOwners +#define IDC_RSCATTRIBUTEOWNERS_BACKGROUND 17408 +#define IDC_RSCATTRIBUTEOWNERS_TITLE 17410 +#define IDC_RSCATTRIBUTEOWNERS_BLUFOR 17608 +#define IDC_RSCATTRIBUTEOWNERS_OPFOR 17609 +#define IDC_RSCATTRIBUTEOWNERS_INDEPENDENT 17610 +#define IDC_RSCATTRIBUTEOWNERS_CIVILIAN 17611 +#define IDC_RSCATTRIBUTEOWNERS_TABSIDE 18010 +#define IDC_RSCATTRIBUTEOWNERS_TABGROUP 18011 +#define IDC_RSCATTRIBUTEOWNERS_TABUNIT 18012 +#define IDC_RSCATTRIBUTEOWNERS_GROUPLIST 18508 +#define IDC_RSCATTRIBUTEOWNERS_UNITLIST 18509 +#define IDC_RSCATTRIBUTEOWNERS_RSCATTRIBUTEOWNERS 18708 + + + +//--- RscAttributeOwners2 +#define IDC_RSCATTRIBUTEOWNERS2_BACKGROUND1 18308 +#define IDC_RSCATTRIBUTEOWNERS2_TITLE2 18309 +#define IDC_RSCATTRIBUTEOWNERS2_TITLE1 18310 +#define IDC_RSCATTRIBUTEOWNERS2_BACKGROUND2 18311 +#define IDC_RSCATTRIBUTEOWNERS2_BLUFOR1 18508 +#define IDC_RSCATTRIBUTEOWNERS2_OPFOR1 18509 +#define IDC_RSCATTRIBUTEOWNERS2_INDEPENDENT1 18510 +#define IDC_RSCATTRIBUTEOWNERS2_CIVILIAN1 18511 +#define IDC_RSCATTRIBUTEOWNERS2_BLUFOR2 18512 +#define IDC_RSCATTRIBUTEOWNERS2_OPFOR2 18513 +#define IDC_RSCATTRIBUTEOWNERS2_INDEPENDENT2 18514 +#define IDC_RSCATTRIBUTEOWNERS2_CIVILIAN2 18515 +#define IDC_RSCATTRIBUTEOWNERS2_RSCATTRIBUTEOWNERS2 19608 + +//--- RscAttributeTaskState +#define IDC_RSCATTRIBUTETASKSTATE_BACKGROUND 41000 +#define IDC_RSCATTRIBUTETASKSTATE_TITLE 41002 +#define IDC_RSCATTRIBUTETASKSTATE_ASSIGNED 41200 +#define IDC_RSCATTRIBUTETASKSTATE_CREATED 41201 +#define IDC_RSCATTRIBUTETASKSTATE_SUCCEEDED 41202 +#define IDC_RSCATTRIBUTETASKSTATE_FAILED 41203 +#define IDC_RSCATTRIBUTETASKSTATE_CANCELED 41204 +#define IDC_RSCATTRIBUTETASKSTATE_RSCATTRIBUTETASKSTATE 42300 + +//--- RscAttributeTaskDescription +#define IDC_RSCATTRIBUTETASKDESCRIPTION_TITLEMARKER 38091 +#define IDC_RSCATTRIBUTETASKDESCRIPTION_TITLEDESCRIPTION 38092 +#define IDC_RSCATTRIBUTETASKDESCRIPTION_TITLETITLE 38093 +#define IDC_RSCATTRIBUTETASKDESCRIPTION_TITLETEMPLATE 38094 +#define IDC_RSCATTRIBUTETASKDESCRIPTION_EDITTITLE 38491 +#define IDC_RSCATTRIBUTETASKDESCRIPTION_EDITMARKER 38492 +#define IDC_RSCATTRIBUTETASKDESCRIPTION_EDITDESCRIPTION 38493 +#define IDC_RSCATTRIBUTETASKDESCRIPTION_EDITTEMPLATE 39191 +#define IDC_RSCATTRIBUTETASKDESCRIPTION_RSCATTRIBUTETASKDESCRIPTION 39391 + +//--- RscAttributeSkiptime +#define IDC_RSCATTRIBUTESKIPTIME_TITLE 21138 +#define IDC_RSCATTRIBUTESKIPTIME_TIME 21139 +#define IDC_RSCATTRIBUTESKIPTIME_BACKGROUND 21140 +#define IDC_RSCATTRIBUTESKIPTIME_SKIPTIME 21141 +#define IDC_RSCATTRIBUTESKIPTIME_VALUE 22038 +#define IDC_RSCATTRIBUTESKIPTIME_RSCATTRIBUTESKIPTIME 22438 + +//--- RscAttributeSound +#define IDC_RSCATTRIBUTESOUND_TITLE 15406 +#define IDC_RSCATTRIBUTESOUND_VALUE 16506 +#define IDC_RSCATTRIBUTESOUND_RSCATTRIBUTESOUND 16706 + +//--- RscAttributeMusic +#define IDC_RSCATTRIBUTEMUSIC_TITLE 15293 +#define IDC_RSCATTRIBUTEMUSIC_VALUE 16393 +#define IDC_RSCATTRIBUTEMUSIC_RSCATTRIBUTEMUSIC 16593 + +//--- RscAttributeMusicVolume +#define IDC_RSCATTRIBUTEMUSICVOLUME_TITLE 27656 +#define IDC_RSCATTRIBUTEMUSICVOLUME_VALUE 28556 +#define IDC_RSCATTRIBUTEMUSICVOLUME_RSCATTRIBUTEMUSICVOLUME 28956 + +//--- RscAttributeGenericRadio +#define IDC_RSCATTRIBUTEGENERICRADIO_TITLE 29151 +#define IDC_RSCATTRIBUTEGENERICRADIO_VALUE 29651 +#define IDC_RSCATTRIBUTEGENERICRADIO_RSCATTRIBUTEGENERICRADIO 30451 + +//--- RscAttributeDiaryRecord +#define IDC_RSCATTRIBUTEDIARYRECORD_IMAGETITLE 27171 +#define IDC_RSCATTRIBUTEDIARYRECORD_DESCRIPTIONTITLE 27172 +#define IDC_RSCATTRIBUTEDIARYRECORD_TITLETITLE 27173 +#define IDC_RSCATTRIBUTEDIARYRECORD_IMAGETREE 27174 +#define IDC_RSCATTRIBUTEDIARYRECORD_TEMPLATETITLE 27175 +#define IDC_RSCATTRIBUTEDIARYRECORD_IMAGEPREVIEW 27371 +#define IDC_RSCATTRIBUTEDIARYRECORD_TITLEEDIT 27571 +#define IDC_RSCATTRIBUTEDIARYRECORD_DESCRIPTIONEDIT 27573 +#define IDC_RSCATTRIBUTEDIARYRECORD_TEMPLATELIST 28271 +#define IDC_RSCATTRIBUTEDIARYRECORD_RSCATTRIBUTEDIARYRECORD 28471 + +//--- RscAttributeOvercast +#define IDC_RSCATTRIBUTEOVERCAST_BACKGROUND 21192 +#define IDC_RSCATTRIBUTEOVERCAST_TITLE 21194 +#define IDC_RSCATTRIBUTEOVERCAST_VALUE000 21392 +#define IDC_RSCATTRIBUTEOVERCAST_VALUE025 21393 +#define IDC_RSCATTRIBUTEOVERCAST_VALUE050 21394 +#define IDC_RSCATTRIBUTEOVERCAST_VALUE075 21395 +#define IDC_RSCATTRIBUTEOVERCAST_VALUE100 21396 +#define IDC_RSCATTRIBUTEOVERCAST_RSCATTRIBUTEOVERCAST 22492 + +//--- RscAttributeFog +#define IDC_RSCATTRIBUTEFOG_TITLE 11804 +#define IDC_RSCATTRIBUTEFOG_ALTTITLE 11805 +#define IDC_RSCATTRIBUTEFOG_VALUE 12704 +#define IDC_RSCATTRIBUTEFOG_ALTVALUE 12705 +#define IDC_RSCATTRIBUTEFOG_RSCATTRIBUTEFOG 13104 + +//--- RscAttributePostprocess +#define IDC_RSCATTRIBUTEPOSTPROCESS_TITLE 28406 +#define IDC_RSCATTRIBUTEPOSTPROCESS_VALUE 28906 +#define IDC_RSCATTRIBUTEPOSTPROCESS_RSCATTRIBUTEPOSTPROCESS 29706 + +//--- RscAttributeGroupID +#define IDC_RSCATTRIBUTEGROUPID_TITLE 17979 +#define IDC_RSCATTRIBUTEGROUPID_VALUE 18379 +#define IDC_RSCATTRIBUTEGROUPID_RSCATTRIBUTEGROUPID 19279 + +//--- RscAttributeFormation +#define IDC_RSCATTRIBUTEFORMATION_BACKGROUND 23316 +#define IDC_RSCATTRIBUTEFORMATION_TITLE 23318 +#define IDC_RSCATTRIBUTEFORMATION_COLUMN 23516 +#define IDC_RSCATTRIBUTEFORMATION_STAG_COLUMN 23517 +#define IDC_RSCATTRIBUTEFORMATION_WEDGE 23518 +#define IDC_RSCATTRIBUTEFORMATION_ECH_LEFT 23519 +#define IDC_RSCATTRIBUTEFORMATION_ECH_RIGHT 23520 +#define IDC_RSCATTRIBUTEFORMATION_VEE 23521 +#define IDC_RSCATTRIBUTEFORMATION_LINE 23522 +#define IDC_RSCATTRIBUTEFORMATION_FILE 23523 +#define IDC_RSCATTRIBUTEFORMATION_DIAMOND 23524 +#define IDC_RSCATTRIBUTEFORMATION_DEFAULT 23525 +#define IDC_RSCATTRIBUTEFORMATION_RSCATTRIBUTEFORMATION 24616 + +//--- RscAttributeBehaviour +#define IDC_RSCATTRIBUTEBEHAVIOUR_BACKGROUND 23269 +#define IDC_RSCATTRIBUTEBEHAVIOUR_TITLE 23271 +#define IDC_RSCATTRIBUTEBEHAVIOUR_STEALTH 23469 +#define IDC_RSCATTRIBUTEBEHAVIOUR_DEFAULT 23470 +#define IDC_RSCATTRIBUTEBEHAVIOUR_SAFE 23471 +#define IDC_RSCATTRIBUTEBEHAVIOUR_AWARE 23474 +#define IDC_RSCATTRIBUTEBEHAVIOUR_COMBAT 23475 +#define IDC_RSCATTRIBUTEBEHAVIOUR_RSCATTRIBUTEBEHAVIOUR 24569 + +//--- RscAttributeLock +#define IDC_RSCATTRIBUTELOCK_BACKGROUND 13425 +#define IDC_RSCATTRIBUTELOCK_TITLE 13427 +#define IDC_RSCATTRIBUTELOCK_LOCKED 13627 +#define IDC_RSCATTRIBUTELOCK_UNLOCKED 13630 +#define IDC_RSCATTRIBUTELOCK_RSCATTRIBUTELOCK 14725 + +//--- RscAttributeMarkerText +#define IDC_RSCATTRIBUTEMARKERTEXT_TITLE 25286 +#define IDC_RSCATTRIBUTEMARKERTEXT_VALUE 25686 +#define IDC_RSCATTRIBUTEMARKERTEXT_RSCATTRIBUTEMARKERTEXT 26586 + +//--- RscAttributeMarkerColor +#define IDC_RSCATTRIBUTEMARKERCOLOR_BACKGROUND 27333 +#define IDC_RSCATTRIBUTEMARKERCOLOR_TITLE 27335 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR3 27533 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR4 27534 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR1 27535 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR5 27536 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR6 27537 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR2 27538 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR7 27539 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR8 27540 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR9 27541 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR10 27542 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR11 27543 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR12 27544 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR13 27545 +#define IDC_RSCATTRIBUTEMARKERCOLOR_COLOR14 27546 +#define IDC_RSCATTRIBUTEMARKERCOLOR_RSCATTRIBUTEMARKERCOLOR 28633 + +//--- RscAttributeRespawnVehicle +#define IDC_RSCATTRIBUTERESPAWNVEHICLE_BACKGROUND 34763 +#define IDC_RSCATTRIBUTERESPAWNVEHICLE_TITLE 34765 +#define IDC_RSCATTRIBUTERESPAWNVEHICLE_START 34963 +#define IDC_RSCATTRIBUTERESPAWNVEHICLE_WEST 34964 +#define IDC_RSCATTRIBUTERESPAWNVEHICLE_EAST 34965 +#define IDC_RSCATTRIBUTERESPAWNVEHICLE_GUER 34966 +#define IDC_RSCATTRIBUTERESPAWNVEHICLE_CIV 34967 +#define IDC_RSCATTRIBUTERESPAWNVEHICLE_DISABLED 34968 +#define IDC_RSCATTRIBUTERESPAWNVEHICLE_RSCATTRIBUTERESPAWNVEHICLE 36063 + +//--- RscAttributeSkill +#define IDC_RSCATTRIBUTESKILL_TITLE 15284 +#define IDC_RSCATTRIBUTESKILL_VALUE 16184 +#define IDC_RSCATTRIBUTESKILL_RSCATTRIBUTESKILL 16584 + +//--- RscAttributeRespawnPosition +#define IDC_RSCATTRIBUTERESPAWNPOSITION_BACKGROUND 38509 +#define IDC_RSCATTRIBUTERESPAWNPOSITION_TITLE 38511 +#define IDC_RSCATTRIBUTERESPAWNPOSITION_WEST 38710 +#define IDC_RSCATTRIBUTERESPAWNPOSITION_EAST 38711 +#define IDC_RSCATTRIBUTERESPAWNPOSITION_GUER 38712 +#define IDC_RSCATTRIBUTERESPAWNPOSITION_CIV 38713 +#define IDC_RSCATTRIBUTERESPAWNPOSITION_DISABLED 38714 +#define IDC_RSCATTRIBUTERESPAWNPOSITION_RSCATTRIBUTERESPAWNPOSITION 39809 + +//--- RscAttributeText +#define IDC_RSCATTRIBUTETEXT_TITLE 13920 +#define IDC_RSCATTRIBUTETEXT_RSCATTRIBUTETEXT 15120 + +//--- RscAttributeAreaSize +#define IDC_RSCATTRIBUTEAREASIZE_TITLE 20438 +#define IDC_RSCATTRIBUTEAREASIZE_VALUE 20439 +#define IDC_RSCATTRIBUTEAREASIZE_RSCATTRIBUTEAREASIZE 21738 + +//--- RscAttributeRespawnTickets +#define IDC_RSCATTRIBUTERESPAWNTICKETS_BACKGROUND 35332 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_WESTTEXT 35333 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_EASTTEXT 35334 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_GUERTEXT 35335 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_CIVTEXT 35336 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_TITLE 35337 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_VALUE 35338 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_WEST 35532 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_EAST 35533 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_GUER 35534 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_CIV 35535 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_WESTVALUE 36232 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_EASTVALUE 36233 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_GUERVALUE 36234 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_CIVVALUE 36235 +#define IDC_RSCATTRIBUTERESPAWNTICKETS_RSCATTRIBUTERESPAWNTICKETS 36632 + +//--- RscAttributeCountdown +#define IDC_RSCATTRIBUTECOUNTDOWN_TITLE 23629 +#define IDC_RSCATTRIBUTECOUNTDOWN_TIME 23630 +#define IDC_RSCATTRIBUTECOUNTDOWN_BACKGROUND 23631 +#define IDC_RSCATTRIBUTECOUNTDOWN_VALUE 24529 +#define IDC_RSCATTRIBUTECOUNTDOWN_RSCATTRIBUTECOUNTDOWN 24929 + +//--- RscAttributeEndMission +#define IDC_RSCATTRIBUTEENDMISSION_TITLE 25122 +#define IDC_RSCATTRIBUTEENDMISSION_TITLEDEBRIEFING 25123 +#define IDC_RSCATTRIBUTEENDMISSION_DEBRIEFING 25522 +#define IDC_RSCATTRIBUTEENDMISSION_VALUE 25622 +#define IDC_RSCATTRIBUTEENDMISSION_RSCATTRIBUTEENDMISSION 26422 + +//--- RscAttributeName +#define IDC_RSCATTRIBUTENAME_TITLE 13317 +#define IDC_RSCATTRIBUTENAME_VALUE 13717 +#define IDC_RSCATTRIBUTENAME_RSCATTRIBUTENAME 14617 + +//--- RscAttributeInventory +#define IDC_RSCATTRIBUTEINVENTORY_LOAD 23868 +#define IDC_RSCATTRIBUTEINVENTORY_LISTBACKGROUND 23869 +#define IDC_RSCATTRIBUTEINVENTORY_FILTERBACKGROUND 23870 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER0 24068 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER1 24069 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER2 24070 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER3 24071 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER4 24072 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER5 24073 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER6 24074 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER7 24075 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER8 24076 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER9 24077 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER10 24078 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER11 24079 +#define IDC_RSCATTRIBUTEINVENTORY_FILTER12 24080 +#define IDC_RSCATTRIBUTEINVENTORY_LIST 24368 +#define IDC_RSCATTRIBUTEINVENTORY_ARROWLEFT 24468 +#define IDC_RSCATTRIBUTEINVENTORY_ARROWRIGHT 24469 +#define IDC_RSCATTRIBUTEINVENTORY_RSCATTRIBUTEINVENTORY 25168 + +//--- RscAttributeRespawnInventory +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_LISTBACKGROUND 41829 +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_FILTERBACKGROUND 41830 +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_FILTER0 42028 +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_FILTER1 42029 +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_FILTER2 42030 +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_FILTER3 42031 +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_TREEWEST 42328 +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_TREEEAST 42329 +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_TREEGUER 42330 +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_TREECIV 42331 +#define IDC_RSCATTRIBUTERESPAWNINVENTORY_RSCATTRIBUTERESPAWNINVENTORY 43128 + +//--- RscAttributeCAS +#define IDC_RSCATTRIBUTECAS_TITLE 10890 +#define IDC_RSCATTRIBUTECAS_VALUE 11390 +#define IDC_RSCATTRIBUTECAS_RSCATTRIBUTECAS 12190 + +//--- RscAttributeExec +#define IDC_RSCATTRIBUTEEXEC_TITLE 13366 +#define IDC_RSCATTRIBUTEEXEC_VALUE 13766 +#define IDC_RSCATTRIBUTEEXEC_VALUETEMPLATE 14466 +#define IDC_RSCATTRIBUTEEXEC_RSCATTRIBUTEEXEC 14666 + +//--- RSCATTRIBUTEMISSIONNAME +#define IDC_RSCATTRIBUTEMISSIONNAME_TITLE 20175 +#define IDC_RSCATTRIBUTEMISSIONNAME_PREVIEWTITLE 20176 +#define IDC_RSCATTRIBUTEMISSIONNAME_PREVIEW 20275 +#define IDC_RSCATTRIBUTEMISSIONNAME_VALUE 20575 +#define IDC_RSCATTRIBUTEMISSIONNAME_RSCATTRIBUTEMISSIONNAME 21475 + +//--- RscAttributeSpeedMode +#define IDC_RSCATTRIBUTESPEEDMODE_BACKGROUND 22287 +#define IDC_RSCATTRIBUTESPEEDMODE_TITLE 22289 +#define IDC_RSCATTRIBUTESPEEDMODE_DEFAULT 22488 +#define IDC_RSCATTRIBUTESPEEDMODE_LIMITED 22489 +#define IDC_RSCATTRIBUTESPEEDMODE_NORMAL 22492 +#define IDC_RSCATTRIBUTESPEEDMODE_FULL 22493 +#define IDC_RSCATTRIBUTESPEEDMODE_RSCATTRIBUTESPEEDMODE 23587 + +//--- RscAttributeTaskDestination +#define IDC_RSCATTRIBUTETASKDESTINATION_BACKGROUND 38009 +#define IDC_RSCATTRIBUTETASKDESTINATION_VALUE 38010 +#define IDC_RSCATTRIBUTETASKDESTINATION_TITLE 38011 +#define IDC_RSCATTRIBUTETASKDESTINATION_RSCATTRIBUTETASKDESTINATION 39309 + +//--- RscAttributeWaypointType +#define IDC_RSCATTRIBUTEWAYPOINTTYPE_BACKGROUND 30511 +#define IDC_RSCATTRIBUTEWAYPOINTTYPE_TITLE 30513 +#define IDC_RSCATTRIBUTEWAYPOINTTYPE_VALUE 31011 +#define IDC_RSCATTRIBUTEWAYPOINTTYPE_RSCATTRIBUTEWAYPOINTTYPE 31811 + +//--- RscAttributeWaypointTimeout +#define IDC_RSCATTRIBUTEWAYPOINTTIMEOUT_TITLE 38714 +#define IDC_RSCATTRIBUTEWAYPOINTTIMEOUT_BUTTONTIME00 39314 +#define IDC_RSCATTRIBUTEWAYPOINTTIMEOUT_BUTTONTIME05 39316 +#define IDC_RSCATTRIBUTEWAYPOINTTIMEOUT_BUTTONTIME10 39317 +#define IDC_RSCATTRIBUTEWAYPOINTTIMEOUT_BUTTONTIME15 39318 +#define IDC_RSCATTRIBUTEWAYPOINTTIMEOUT_BUTTONTIME20 39319 +#define IDC_RSCATTRIBUTEWAYPOINTTIMEOUT_BUTTONTIME25 39320 +#define IDC_RSCATTRIBUTEWAYPOINTTIMEOUT_BUTTONTIME30 39321 +#define IDC_RSCATTRIBUTEWAYPOINTTIMEOUT_RSCATTRIBUTEWAYPOINTTIMEOUT 40014 + +//--- RscAttributeTimeMultiplier +#define IDC_RSCATTRIBUTETIMEMULTIPLIER_TITLE 35379 +#define IDC_RSCATTRIBUTETIMEMULTIPLIER_MULTIPLIER 35380 +#define IDC_RSCATTRIBUTETIMEMULTIPLIER_BACKGROUND 35381 +#define IDC_RSCATTRIBUTETIMEMULTIPLIER_EXAMPLE 35382 +#define IDC_RSCATTRIBUTETIMEMULTIPLIER_VALUE 36279 +#define IDC_RSCATTRIBUTETIMEMULTIPLIER_RSCATTRIBUTETIMEMULTIPLIER 36679 + +//--- RscAttributeHintTopics +#define IDC_RSCATTRIBUTEHINTTOPICS_TITLE 25225 +#define IDC_RSCATTRIBUTEHINTTOPICS_VALUE 25725 +#define IDC_RSCATTRIBUTEHINTTOPICS_RSCATTRIBUTEHINTTOPICS 26525 + +//--- RscAttributeBootcampStage +#define IDC_RSCATTRIBUTEBOOTCAMPSTAGE_BACKGROUND 31954 +#define IDC_RSCATTRIBUTEBOOTCAMPSTAGE_TITLE 31956 +#define IDC_RSCATTRIBUTEBOOTCAMPSTAGE_INFANTRY 32154 +#define IDC_RSCATTRIBUTEBOOTCAMPSTAGE_MOTORIZEDVEHICLES 32155 +#define IDC_RSCATTRIBUTEBOOTCAMPSTAGE_RSCATTRIBUTEBOOTCAMPSTAGE 33254 + +//--- RscAttributeHintCustom +#define IDC_RSCATTRIBUTEHINTCUSTOM_TITLETITLE 25434 +#define IDC_RSCATTRIBUTEHINTCUSTOM_EDITTITLE 25832 +#define IDC_RSCATTRIBUTEHINTCUSTOM_RSCATTRIBUTEHINTCUSTOM 26732 + +//--- RscAttributePunishmentAnimation +#define IDC_RSCATTRIBUTEPUNISHMENTANIMATION_BACKGROUND 50118 +#define IDC_RSCATTRIBUTEPUNISHMENTANIMATION_TITLE 50120 +#define IDC_RSCATTRIBUTEPUNISHMENTANIMATION_PUSHUPS 50318 +#define IDC_RSCATTRIBUTEPUNISHMENTANIMATION_LEGPUSHUPS 50319 +#define IDC_RSCATTRIBUTEPUNISHMENTANIMATION_RSCATTRIBUTEPUNISHMENTANIMATION 51418 + +//--- RscAttributeTargetPopup +#define IDC_RSCATTRIBUTETARGETPOPUP_BACKGROUND 27787 +#define IDC_RSCATTRIBUTETARGETPOPUP_VALUE 27788 +#define IDC_RSCATTRIBUTETARGETPOPUP_TITLE 27789 +#define IDC_RSCATTRIBUTETARGETPOPUP_RSCATTRIBUTETARGETPOPUP 29087 + +//--- RscAttributeTargetPopupDelay +#define IDC_RSCATTRIBUTETARGETPOPUPDELAY_TITLE 40264 +#define IDC_RSCATTRIBUTETARGETPOPUPDELAY_VALUE 41164 +#define IDC_RSCATTRIBUTETARGETPOPUPDELAY_RSCATTRIBUTETARGETPOPUPDELAY 41564 + +//--- RscAttributeTargetData +#define IDC_RSCATTRIBUTETARGETDATA_VALUE 25001 +#define IDC_RSCATTRIBUTETARGETDATA_RSCATTRIBUTETARGETDATA 25801 + +//--- RscAttributeTargetDataStore +#define IDC_RSCATTRIBUTETARGETDATASTORE_BACKGROUND 37135 +#define IDC_RSCATTRIBUTETARGETDATASTORE_VALUE 37136 +#define IDC_RSCATTRIBUTETARGETDATASTORE_TITLE 37137 +#define IDC_RSCATTRIBUTETARGETDATASTORE_RSCATTRIBUTETARGETDATASTORE 38435 + +//--- RscAttributeTargetTexture +#define IDC_RSCATTRIBUTETARGETTEXTURE_BACKGROUND 32964 +#define IDC_RSCATTRIBUTETARGETTEXTURE_TITLE 32966 +#define IDC_RSCATTRIBUTETARGETTEXTURE_PREVIEW 33167 +#define IDC_RSCATTRIBUTETARGETTEXTURE_TEXTURELIST 33464 +#define IDC_RSCATTRIBUTETARGETTEXTURE_RSCATTRIBUTETARGETTEXTURE 34264 +#define IDC_RSCATTRIBUTETARGETTEXTURE_OVERLAP 34265 + +//--- RscAttributeTargetState +#define IDC_RSCATTRIBUTETARGETSTATE_BACKGROUND 27373 +#define IDC_RSCATTRIBUTETARGETSTATE_VALUE 27374 +#define IDC_RSCATTRIBUTETARGETSTATE_TITLE 27375 +#define IDC_RSCATTRIBUTETARGETSTATE_RSCATTRIBUTETARGETSTATE 28673 + +//--- RscDisplayTargetBoard +#define IDC_RSCDISPLAYTARGETBOARD_TABLE 22928 +#define IDC_RSCDISPLAYTARGETBOARD_BACKGROUNDTITLE 23628 +#define IDC_RSCDISPLAYTARGETBOARD_BACKGROUND 23629 +#define IDC_RSCDISPLAYTARGETBOARD_BUTTONOK 24028 + +//--- RscDisplayFiringRangeBoard +#define IDC_RSCDISPLAYFIRINGRANGEBOARD_TABLE 34191 +#define IDC_RSCDISPLAYFIRINGRANGEBOARD_BACKGROUNDTITLE 34891 +#define IDC_RSCDISPLAYFIRINGRANGEBOARD_BUTTONOK 35291 + +//--- RscDisplayTimeTrialBoard +#define IDC_RSCDISPLAYTIMETRIALBOARD_TABLE 29399 +#define IDC_RSCDISPLAYTIMETRIALBOARD_BACKGROUNDTITLE 30099 +#define IDC_RSCDISPLAYTIMETRIALBOARD_BUTTONOK 30499 + +//--- RscRecruitStatus +#define IDC_RSCRECRUITSTATUS_PROGRESSBAR 13986 +#define IDC_RSCRECRUITSTATUS_TITLE 14086 +#define IDC_RSCRECRUITSTATUS_DESCRIPTION 14087 +#define IDC_RSCRECRUITSTATUS_LIST 14486 +#define IDC_RSCRECRUITSTATUS_BACKGROUND 15186 + +#define IDC_RSCMISSIONTEXT 20145 +#define IDC_RSCMISSIONTEXT_TEXT 20146 + +//--- RscVRMeta +#define IDC_RSCVRMETA_BACKGROUNDFATIGUE 4478 +#define IDC_RSCVRMETA_BACKGROUNDSPEED 4479 +#define IDC_RSCVRMETA_BACKGROUNDLOAD 4480 +#define IDC_RSCVRMETA_BACKGROUNDTGT 4481 +#define IDC_RSCVRMETA_PROGRESSLOAD 4482 +#define IDC_RSCVRMETA_PROGRESSFATIGUE 4483 +#define IDC_RSCVRMETA_PROGRESSSPEED 4484 +#define IDC_RSCVRMETA_TEXTLOAD 4485 +#define IDC_RSCVRMETA_TEXTFATIGUE 4486 +#define IDC_RSCVRMETA_TEXTSPEED 4487 +#define IDC_RSCVRMETA_VALUELOAD 4488 +#define IDC_RSCVRMETA_VALUEFATIGUE 4489 +#define IDC_RSCVRMETA_VALUESPEED 4490 +#define IDC_RSCVRMETA_TEXTTGT 4491 +#define IDC_RSCVRMETA_PROGRESSTGT 4492 +#define IDC_RSCVRMETA_VALUETGT 4494 +#define IDC_RSCVRMETA_VALUETGTDMG 4495 +#define IDC_RSCVRMETA_VRMETA 5778 diff --git a/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf b/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf new file mode 100644 index 0000000..be5a9ad --- /dev/null +++ b/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf @@ -0,0 +1,140 @@ +#include "\a3\ui_f_curator\ui\defineResinclDesign.inc" + +_mode = _this select 0; +_params = _this select 1; +_class = _this select 2; + +switch _mode do { + case "onLoad": { + + _display = _params select 0; + _displayConfig = configfile >> _class; + + _ctrlBackground = _display displayctrl IDC_RSCDISPLAYATTRIBUTES_BACKGROUND; + _ctrlTitle = _display displayctrl IDC_RSCDISPLAYATTRIBUTES_TITLE; + _ctrlContent = _display displayctrl IDC_RSCDISPLAYATTRIBUTES_CONTENT; + _ctrlButtonOK = _display displayctrl IDC_OK; + _ctrlButtonCancel = _display displayctrl IDC_CANCEL; + _ctrlButtonCustom = _display displayctrl IDC_RSCDISPLAYATTRIBUTES_BUTTONCUSTOM; + + _ctrlBackgroundPos = ctrlposition _ctrlBackground; + _ctrlTitlePos = ctrlposition _ctrlTitle; + _ctrlContentPos = ctrlposition _ctrlContent; + _ctrlButtonOKPos = ctrlposition _ctrlButtonOK; + _ctrlButtonCancelPos = ctrlposition _ctrlButtonCancel; + _ctrlButtonCustomPos = ctrlposition _ctrlButtonCustom; + + _ctrlTitleOffsetY = (_ctrlBackgroundPos select 1) - (_ctrlTitlePos select 1) - (_ctrlTitlePos select 3); + _ctrlContentOffsetY = (_ctrlContentPos select 1) - (_ctrlBackgroundPos select 1); + + //--- Show fake map in the background + _ctrlMap = _display displayctrl IDC_RSCDISPLAYCURATOR_MAINMAP; + _ctrlMap ctrlenable false; + if (visiblemap) then { + _ctrlCuratorMap = (finddisplay IDD_RSCDISPLAYCURATOR) displayctrl IDC_RSCDISPLAYCURATOR_MAINMAP; + _ctrlMap ctrlmapanimadd [0,ctrlmapscale _ctrlCuratorMap,_ctrlCuratorMap ctrlmapscreentoworld [0.5,0.5]]; + ctrlmapanimcommit _ctrlMap; + } else { + _ctrlMap ctrlshow false; + }; + + //--- Load default attributes + _attributes = if (getnumber (_displayConfig >> "filterAttributes") > 0) then {missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_attributes",[]]} else {["%ALL"]}; + _allAttributes = "%ALL" in _attributes; + + //--- Initialize attributes + _posY = _ctrlContentOffsetY; + _contentControls = _displayConfig >> "Controls" >> "Content" >> "Controls"; + _enableDebugConsole = ["DebugConsole",getnumber (missionconfigfile >> "enableDebugConsole")] call bis_fnc_getParamValue; + _enableAdmin = (_enableDebugConsole == 1 && (isserver || serverCommandAvailable "#shutdown")) || _enableDebugConsole == 2; + for "_i" from 0 to (count _contentControls - 1) do { + _cfgControl = _contentControls select _i; + if (isclass _cfgControl) then { + _idc = getnumber (_cfgControl >> "idc"); + _control = _display displayctrl _idc; + + //--- Admin specific attribute + _show = if (getnumber (_cfgControl >> "adminOnly") > 0) then {_enableAdmin} else {true}; + + if ((_allAttributes || {_x == configname _cfgControl} count _attributes > 0) && _show) then { + _controlPos = ctrlposition _control; + _controlPos set [0,0]; + _controlPos set [1,_posY]; + _control ctrlsetposition _controlPos; + _control ctrlcommit 0; + _posY = _posY + (_controlPos select 3) + 0.005; + ctrlsetfocus _control; + } else { + _control ctrlsetposition [0,0,0,0]; + _control ctrlcommit 0; + _control ctrlshow false; + }; + }; + }; + _posH = ((_posY + _ctrlContentOffsetY) min 0.9) * 0.5; + + _target = missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target",objnull]; + _name = switch (typename _target) do { + case (typename objnull): {gettext (configfile >> "cfgvehicles" >> typeof _target >> "displayname")}; + case (typename grpnull): {groupid _target}; + case (typename []): {format ["%1: %3 #%2",groupid (_target select 0),_target select 1,localize "str_a3_cfgmarkers_waypoint_0"]}; + case (typename ""): {markertext _target}; + }; + _ctrlTitle ctrlsettext format [ctrltext _ctrlTitle,toupper _name]; + + _ctrlTitlePos set [1,(0.5 - _posH) - (_ctrlTitlePos select 3) - _ctrlTitleOffsetY]; + _ctrlTitle ctrlsetposition _ctrlTitlePos; + _ctrlTitle ctrlcommit 0; + + _ctrlContentPos set [1,0.5 - _posH]; + _ctrlContentPos set [3,_posH * 2]; + _ctrlContent ctrlsetposition _ctrlContentPos; + _ctrlContent ctrlcommit 0; + + _ctrlBackgroundPos set [1,0.5 - _posH]; + _ctrlBackgroundPos set [3,_posH * 2]; + _ctrlBackground ctrlsetposition _ctrlBackgroundPos; + _ctrlBackground ctrlcommit 0; + + _ctrlButtonOKPos set [1,0.5 + _posH + _ctrlTitleOffsetY]; + _ctrlButtonOK ctrlsetposition _ctrlButtonOKPos; + _ctrlButtonOK ctrlcommit 0; + ctrlsetfocus _ctrlButtonOK; + + _ctrlButtonCancelPos set [1,0.5 + _posH + _ctrlTitleOffsetY]; + _ctrlButtonCancel ctrlsetposition _ctrlButtonCancelPos; + _ctrlButtonCancel ctrlcommit 0; + + _ctrlButtonCustomPos set [1,0.5 + _posH + _ctrlTitleOffsetY]; + _ctrlButtonCustom ctrlsetposition _ctrlButtonCustomPos; + _ctrlButtonCustom ctrlcommit 0; + + //--- Close the display when entity is altered + [_display] spawn { + disableserialization; + _display = _this select 0; + _target = missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target",objnull]; + switch (typename _target) do { + case (typename objnull): { + _isAlive = alive _target; + waituntil {isnull _display || (_isAlive && !alive _target)}; + }; + case (typename grpnull): { + waituntil {isnull _display || isnull _target}; + }; + case (typename []): { + _grp = _target select 0; + _wpCount = count waypoints _grp; + waituntil {isnull _display || (count waypoints _grp != _wpCount)}; + }; + case (typename ""): { + waituntil {isnull _display || markertype _target == ""}; + }; + }; + _display closedisplay 2; + }; + }; + case "onUnload": { + + }; +}; diff --git a/include/x/cba/addons/main/$PBOPREFIX$ b/include/x/cba/addons/main/$PBOPREFIX$ new file mode 100644 index 0000000..2ac6048 --- /dev/null +++ b/include/x/cba/addons/main/$PBOPREFIX$ @@ -0,0 +1 @@ +x\cba\addons\main diff --git a/include/x/cba/addons/main/script_component.hpp b/include/x/cba/addons/main/script_component.hpp new file mode 100644 index 0000000..761bf42 --- /dev/null +++ b/include/x/cba/addons/main/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT main +#include "script_mod.hpp" + +#ifdef DEBUG_ENABLED_MAIN + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MAIN + #define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN +#endif + +#include "script_macros.hpp" diff --git a/include/x/cba/addons/main/script_macros.hpp b/include/x/cba/addons/main/script_macros.hpp new file mode 100644 index 0000000..6f9b78c --- /dev/null +++ b/include/x/cba/addons/main/script_macros.hpp @@ -0,0 +1 @@ +#include "script_macros_common.hpp" diff --git a/include/x/cba/addons/main/script_macros_common.hpp b/include/x/cba/addons/main/script_macros_common.hpp new file mode 100644 index 0000000..2683f3b --- /dev/null +++ b/include/x/cba/addons/main/script_macros_common.hpp @@ -0,0 +1,1835 @@ +/* + Header: script_macros_common.hpp + + Description: + A general set of useful macro functions for use by CBA itself or by any module that uses CBA. + + Authors: + Sickboy and Spooner +*/ + +/* **************************************************** + New - Should be exported to general addon + Aim: + - Simplify (shorten) the amount of characters required for repetitive tasks + - Provide a solid structure that can be dynamic and easy editable (Which sometimes means we cannot adhere to Aim #1 ;-) + An example is the path that is built from defines. Some available in this file, others in mods and addons. + + Follows Standard: + Object variables: PREFIX_COMPONENT + Main-object variables: PREFIX_main + Paths: MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SCRIPTNAME.sqf + e.g: x\six\addons\sys_menu\fDate.sqf + + Usage: + define PREFIX and COMPONENT, then include this file + (Note, you could have a main addon for your mod, define the PREFIX in a macros.hpp, + and include this script_macros_common.hpp file. + Then in your addons, add a component.hpp, define the COMPONENT, + and include your mod's script_macros.hpp + In your scripts you can then include the addon's component.hpp with relative path) + + use in subcomponents (subconfigs) + define SUBCOMPONENT and include parent component's script_component.hpp + currently only supported by SUBADDON, additional macros may be added in the future + + TODO: + - Try only to use 1 string type " vs ' + - Evaluate double functions, and simplification + - Evaluate naming scheme; current = prototype + - Evaluate "Debug" features.. + - Evaluate "create mini function per precompiled script, that will load the script on first usage, rather than on init" + - Also saw "Namespace" typeName, evaluate which we need :P + - Single/Multi player gamelogics? (Incase of MP, you would want only 1 gamelogic per component, which is pv'ed from server, etc) + */ + +#ifndef MAINPREFIX + #define MAINPREFIX x +#endif + +#ifndef SUBPREFIX + #define SUBPREFIX addons +#endif + +#ifndef MAINLOGIC + #define MAINLOGIC main +#endif + +#define ADDON DOUBLES(PREFIX,COMPONENT) +#define MAIN_ADDON DOUBLES(PREFIX,main) + +#ifdef SUBCOMPONENT + #define SUBADDON DOUBLES(ADDON,SUBCOMPONENT) +#endif + +/* ------------------------------------------- +Macro: VERSION_CONFIG + Define CBA Versioning System config entries. + + VERSION should be a floating-point number (1 separator). + VERSION_STR is a string representation of the version. + VERSION_AR is an array representation of the version. + + VERSION must always be defined, otherwise it is 0. + VERSION_STR and VERSION_AR default to VERSION if undefined. + +Parameters: + None + +Example: + (begin example) + #define VERSION 1.0 + #define VERSION_STR 1.0.1 + #define VERSION_AR 1,0,1 + + class CfgPatches { + class MyMod_main { + VERSION_CONFIG; + }; + }; + (end) + +Author: + ?, Jonpas +------------------------------------------- */ +#ifndef VERSION + #define VERSION 0 +#endif + +#ifndef VERSION_STR + #define VERSION_STR VERSION +#endif + +#ifndef VERSION_AR + #define VERSION_AR VERSION +#endif + +#ifndef VERSION_CONFIG + #define VERSION_CONFIG version = VERSION; versionStr = QUOTE(VERSION_STR); versionAr[] = {VERSION_AR} +#endif + +/* ------------------------------------------- +Group: Debugging +------------------------------------------- */ + +/* ------------------------------------------- +Macros: DEBUG_MODE_x + Managing debugging based on debug level. + + According to the *highest* level of debugging that has been defined *before* script_macros_common.hpp is included, + only the appropriate debugging commands will be functional. With no level explicitely defined, assume DEBUG_MODE_NORMAL. + + DEBUG_MODE_FULL - Full debugging output. + DEBUG_MODE_NORMAL - All debugging except and (Default setting if none specified). + DEBUG_MODE_MINIMAL - Only and enabled. + +Examples: + In order to turn on full debugging for a single file, + (begin example) + // Top of individual script file. + #define DEBUG_MODE_FULL + #include "script_component.hpp" + (end) + + In order to force minimal debugging for a single component, + (begin example) + // Top of addons\\script_component.hpp + // Ensure that any FULL and NORMAL setting from the individual files are undefined and MINIMAL is set. + #ifdef DEBUG_MODE_FULL + #undef DEBUG_MODE_FULL + #endif + #ifdef DEBUG_MODE_NORMAL + #undef DEBUG_MODE_NORMAL + #endif + #ifndef DEBUG_MODE_MINIMAL + #define DEBUG_MODE_MINIMAL + #endif + #include "script_macros.hpp" + (end) + + In order to turn on full debugging for a whole addon, + (begin example) + // Top of addons\main\script_macros.hpp + #ifndef DEBUG_MODE_FULL + #define DEBUG_MODE_FULL + #endif + #include "\x\cba\addons\main\script_macros_common.hpp" + (end) + +Author: + Spooner +------------------------------------------- */ + +// If DEBUG_MODE_FULL, then also enable DEBUG_MODE_NORMAL. +#ifdef DEBUG_MODE_FULL +#define DEBUG_MODE_NORMAL +#endif + +// If DEBUG_MODE_NORMAL, then also enable DEBUG_MODE_MINIMAL. +#ifdef DEBUG_MODE_NORMAL +#define DEBUG_MODE_MINIMAL +#endif + +// If no debug modes specified, use DEBUG_MODE_NORMAL (+ DEBUG_MODE_MINIMAL). +#ifndef DEBUG_MODE_MINIMAL +#define DEBUG_MODE_NORMAL +#define DEBUG_MODE_MINIMAL +#endif + +#define LOG_SYS_FORMAT(LEVEL,MESSAGE) format ['[%1] (%2) %3: %4', toUpper 'PREFIX', 'COMPONENT', LEVEL, MESSAGE] + +#ifdef DEBUG_SYNCHRONOUS +#define LOG_SYS(LEVEL,MESSAGE) diag_log text LOG_SYS_FORMAT(LEVEL,MESSAGE) +#else +#define LOG_SYS(LEVEL,MESSAGE) LOG_SYS_FORMAT(LEVEL,MESSAGE) call CBA_fnc_log +#endif + +#define LOG_SYS_FILELINENUMBERS(LEVEL,MESSAGE) LOG_SYS(LEVEL,format [ARR_4('%1 %2:%3',MESSAGE,__FILE__,__LINE__ + 1)]) + +/* ------------------------------------------- +Macro: LOG() + Log a debug message into the RPT log. + + Only run if is defined. + +Parameters: + MESSAGE - Message to record + +Example: + (begin example) + LOG("Initiated clog-dancing simulator."); + (end) + +Author: + Spooner +------------------------------------------- */ +#ifdef DEBUG_MODE_FULL + +#define LOG(MESSAGE) LOG_SYS('LOG',MESSAGE) +#define LOG_1(MESSAGE,ARG1) LOG(FORMAT_1(MESSAGE,ARG1)) +#define LOG_2(MESSAGE,ARG1,ARG2) LOG(FORMAT_2(MESSAGE,ARG1,ARG2)) +#define LOG_3(MESSAGE,ARG1,ARG2,ARG3) LOG(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define LOG_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) LOG(FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define LOG_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) LOG(FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define LOG_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) LOG(FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define LOG_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) LOG(FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define LOG_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) LOG(FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +#else + +#define LOG(MESSAGE) /* disabled */ +#define LOG_1(MESSAGE,ARG1) /* disabled */ +#define LOG_2(MESSAGE,ARG1,ARG2) /* disabled */ +#define LOG_3(MESSAGE,ARG1,ARG2,ARG3) /* disabled */ +#define LOG_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) /* disabled */ +#define LOG_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) /* disabled */ +#define LOG_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) /* disabled */ +#define LOG_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) /* disabled */ +#define LOG_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) /* disabled */ + +#endif + +/* ------------------------------------------- +Macro: INFO() + Record a message without file and line number in the RPT log. + +Parameters: + MESSAGE - Message to record + +Example: + (begin example) + INFO("Mod X is loaded, do Y"); + (end) + +Author: + commy2 +------------------------------------------- */ +#define INFO(MESSAGE) LOG_SYS('INFO',MESSAGE) +#define INFO_1(MESSAGE,ARG1) INFO(FORMAT_1(MESSAGE,ARG1)) +#define INFO_2(MESSAGE,ARG1,ARG2) INFO(FORMAT_2(MESSAGE,ARG1,ARG2)) +#define INFO_3(MESSAGE,ARG1,ARG2,ARG3) INFO(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define INFO_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) INFO(FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define INFO_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) INFO(FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define INFO_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) INFO(FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define INFO_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) INFO(FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define INFO_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) INFO(FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +/* ------------------------------------------- +Macro: WARNING() + Record a non-critical error in the RPT log. + + Only run if or higher is defined. + +Parameters: + MESSAGE - Message to record + +Example: + (begin example) + WARNING("This function has been deprecated. Please don't use it in future!"); + (end) + +Author: + Spooner +------------------------------------------- */ +#ifdef DEBUG_MODE_NORMAL + +#define WARNING(MESSAGE) LOG_SYS('WARNING',MESSAGE) +#define WARNING_1(MESSAGE,ARG1) WARNING(FORMAT_1(MESSAGE,ARG1)) +#define WARNING_2(MESSAGE,ARG1,ARG2) WARNING(FORMAT_2(MESSAGE,ARG1,ARG2)) +#define WARNING_3(MESSAGE,ARG1,ARG2,ARG3) WARNING(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define WARNING_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) WARNING(FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define WARNING_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) WARNING(FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define WARNING_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) WARNING(FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define WARNING_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) WARNING(FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define WARNING_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) WARNING(FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +#else + +#define WARNING(MESSAGE) /* disabled */ +#define WARNING_1(MESSAGE,ARG1) /* disabled */ +#define WARNING_2(MESSAGE,ARG1,ARG2) /* disabled */ +#define WARNING_3(MESSAGE,ARG1,ARG2,ARG3) /* disabled */ +#define WARNING_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) /* disabled */ +#define WARNING_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) /* disabled */ +#define WARNING_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) /* disabled */ +#define WARNING_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) /* disabled */ +#define WARNING_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) /* disabled */ + +#endif + +/* ------------------------------------------- +Macro: ERROR() + Record a critical error in the RPT log. + +Parameters: + MESSAGE - Message to record + +Example: + (begin example) + ERROR("value of frog not found in config ...yada...yada..."); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ERROR(MESSAGE) LOG_SYS('ERROR',MESSAGE) +#define ERROR_1(MESSAGE,ARG1) ERROR(FORMAT_1(MESSAGE,ARG1)) +#define ERROR_2(MESSAGE,ARG1,ARG2) ERROR(FORMAT_2(MESSAGE,ARG1,ARG2)) +#define ERROR_3(MESSAGE,ARG1,ARG2,ARG3) ERROR(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define ERROR_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) ERROR(FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define ERROR_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) ERROR(FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define ERROR_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) ERROR(FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define ERROR_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) ERROR(FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define ERROR_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) ERROR(FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +/* ------------------------------------------- +Macro: ERROR_MSG() + Record a critical error in the RPT log and display on screen error message. + + Newlines (\n) in the MESSAGE will be put on separate lines. + +Parameters: + MESSAGE - Message to record + +Example: + (begin example) + ERROR_MSG("value of frog not found in config ...yada...yada..."); + (end) + +Author: + commy2 +------------------------------------------- */ +#define ERROR_MSG(MESSAGE) ['PREFIX', 'COMPONENT', nil, MESSAGE, __FILE__, __LINE__ + 1] call CBA_fnc_error +#define ERROR_MSG_1(MESSAGE,ARG1) ERROR_MSG(FORMAT_1(MESSAGE,ARG1)) +#define ERROR_MSG_2(MESSAGE,ARG1,ARG2) ERROR_MSG(FORMAT_2(MESSAGE,ARG1,ARG2)) +#define ERROR_MSG_3(MESSAGE,ARG1,ARG2,ARG3) ERROR_MSG(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define ERROR_MSG_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) ERROR_MSG(FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define ERROR_MSG_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) ERROR_MSG(FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define ERROR_MSG_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) ERROR_MSG(FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define ERROR_MSG_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) ERROR_MSG(FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define ERROR_MSG_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) ERROR_MSG(FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +/* ------------------------------------------- +Macro: ERROR_WITH_TITLE() + Record a critical error in the RPT log. + + The title can be specified (in the heading is always just "ERROR") + Newlines (\n) in the MESSAGE will be put on separate lines. + +Parameters: + TITLE - Title of error message + MESSAGE - Body of error message + +Example: + (begin example) + ERROR_WITH_TITLE("Value not found","Value of frog not found in config ...yada...yada..."); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ERROR_WITH_TITLE(TITLE,MESSAGE) ['PREFIX', 'COMPONENT', TITLE, MESSAGE, __FILE__, __LINE__ + 1] call CBA_fnc_error +#define ERROR_WITH_TITLE_1(TITLE,MESSAGE,ARG1) ERROR_WITH_TITLE(TITLE,FORMAT_1(MESSAGE,ARG1)) +#define ERROR_WITH_TITLE_2(TITLE,MESSAGE,ARG1,ARG2) ERROR_WITH_TITLE(TITLE,FORMAT_2(MESSAGE,ARG1,ARG2)) +#define ERROR_WITH_TITLE_3(TITLE,MESSAGE,ARG1,ARG2,ARG3) ERROR_WITH_TITLE(TITLE,FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define ERROR_WITH_TITLE_4(TITLE,MESSAGE,ARG1,ARG2,ARG3,ARG4) ERROR_WITH_TITLE(TITLE,FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define ERROR_WITH_TITLE_5(TITLE,MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) ERROR_WITH_TITLE(TITLE,FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define ERROR_WITH_TITLE_6(TITLE,MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) ERROR_WITH_TITLE(TITLE,FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define ERROR_WITH_TITLE_7(TITLE,MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) ERROR_WITH_TITLE(TITLE,FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define ERROR_WITH_TITLE_8(TITLE,MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) ERROR_WITH_TITLE(TITLE,FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +/* ------------------------------------------- +Macro: MESSAGE_WITH_TITLE() + Record a single line in the RPT log. + +Parameters: + TITLE - Title of log message + MESSAGE - Body of message + +Example: + (begin example) + MESSAGE_WITH_TITLE("Value found","Value of frog found in config "); + (end) + +Author: + Killswitch +------------------------------------------- */ +#define MESSAGE_WITH_TITLE(TITLE,MESSAGE) LOG_SYS_FILELINENUMBERS(TITLE,MESSAGE) + +/* ------------------------------------------- +Macro: RETDEF() + If a variable is undefined, return the default value. Otherwise, return the + variable itself. + +Parameters: + VARIABLE - the variable to check + DEFAULT_VALUE - the default value to use if variable is undefined + +Example: + (begin example) + // _var is undefined + hintSilent format ["_var=%1", RETDEF(_var,5)]; // "_var=5" + _var = 7; + hintSilent format ["_var=%1", RETDEF(_var,5)]; // "_var=7" + (end example) +Author: + 654wak654 +------------------------------------------- */ +#define RETDEF(VARIABLE,DEFAULT_VALUE) (if (isNil {VARIABLE}) then [{DEFAULT_VALUE}, {VARIABLE}]) + +/* ------------------------------------------- +Macro: RETNIL() + If a variable is undefined, return the value nil. Otherwise, return the + variable itself. + +Parameters: + VARIABLE - the variable to check + +Example: + (begin example) + // _var is undefined + hintSilent format ["_var=%1", RETNIL(_var)]; // "_var=any" + (end example) + +Author: + Alef (see CBA issue #8514) +------------------------------------------- */ +#define RETNIL(VARIABLE) RETDEF(VARIABLE,nil) + +/* ------------------------------------------- +Macros: TRACE_n() + Log a message and 1-8 variables to the RPT log. + + Only run if is defined. + + TRACE_1(MESSAGE,A) - Log 1 variable. + TRACE_2(MESSAGE,A,B) - Log 2 variables. + TRACE_3(MESSAGE,A,B,C) - Log 3 variables. + TRACE_4(MESSAGE,A,B,C,D) - Log 4 variables. + TRACE_5(MESSAGE,A,B,C,D,E) - Log 5 variables. + TRACE_6(MESSAGE,A,B,C,D,E,F) - Log 6 variables. + TRACE_7(MESSAGE,A,B,C,D,E,F,G) - Log 7 variables. + TRACE_8(MESSAGE,A,B,C,D,E,F,G,H) - Log 8 variables. + TRACE_9(MESSAGE,A,B,C,D,E,F,G,H,I) - Log 9 variables. + +Parameters: + MESSAGE - Message to add to the trace [String] + A..H - Variable names to log values of [Any] + +Example: + (begin example) + TRACE_3("After takeoff",_vehicle player,getPos (_vehicle player), getPosASL (_vehicle player)); + (end) + +Author: + Spooner +------------------------------------------- */ +#define PFORMAT_1(MESSAGE,A) \ + format ['%1: A=%2', MESSAGE, RETNIL(A)] + +#define PFORMAT_2(MESSAGE,A,B) \ + format ['%1: A=%2, B=%3', MESSAGE, RETNIL(A), RETNIL(B)] + +#define PFORMAT_3(MESSAGE,A,B,C) \ + format ['%1: A=%2, B=%3, C=%4', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C)] + +#define PFORMAT_4(MESSAGE,A,B,C,D) \ + format ['%1: A=%2, B=%3, C=%4, D=%5', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D)] + +#define PFORMAT_5(MESSAGE,A,B,C,D,E) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E)] + +#define PFORMAT_6(MESSAGE,A,B,C,D,E,F) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F)] + +#define PFORMAT_7(MESSAGE,A,B,C,D,E,F,G) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7, G=%8', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F), RETNIL(G)] + +#define PFORMAT_8(MESSAGE,A,B,C,D,E,F,G,H) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7, G=%8, H=%9', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F), RETNIL(G), RETNIL(H)] + +#define PFORMAT_9(MESSAGE,A,B,C,D,E,F,G,H,I) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7, G=%8, H=%9, I=%10', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F), RETNIL(G), RETNIL(H), RETNIL(I)] + + +#ifdef DEBUG_MODE_FULL +#define TRACE_1(MESSAGE,A) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_1(str diag_frameNo + ' ' + (MESSAGE),A)) +#define TRACE_2(MESSAGE,A,B) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_2(str diag_frameNo + ' ' + (MESSAGE),A,B)) +#define TRACE_3(MESSAGE,A,B,C) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_3(str diag_frameNo + ' ' + (MESSAGE),A,B,C)) +#define TRACE_4(MESSAGE,A,B,C,D) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_4(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D)) +#define TRACE_5(MESSAGE,A,B,C,D,E) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_5(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E)) +#define TRACE_6(MESSAGE,A,B,C,D,E,F) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_6(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E,F)) +#define TRACE_7(MESSAGE,A,B,C,D,E,F,G) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_7(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E,F,G)) +#define TRACE_8(MESSAGE,A,B,C,D,E,F,G,H) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_8(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E,F,G,H)) +#define TRACE_9(MESSAGE,A,B,C,D,E,F,G,H,I) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_9(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E,F,G,H,I)) +#else +#define TRACE_1(MESSAGE,A) /* disabled */ +#define TRACE_2(MESSAGE,A,B) /* disabled */ +#define TRACE_3(MESSAGE,A,B,C) /* disabled */ +#define TRACE_4(MESSAGE,A,B,C,D) /* disabled */ +#define TRACE_5(MESSAGE,A,B,C,D,E) /* disabled */ +#define TRACE_6(MESSAGE,A,B,C,D,E,F) /* disabled */ +#define TRACE_7(MESSAGE,A,B,C,D,E,F,G) /* disabled */ +#define TRACE_8(MESSAGE,A,B,C,D,E,F,G,H) /* disabled */ +#define TRACE_9(MESSAGE,A,B,C,D,E,F,G,H,I) /* disabled */ +#endif + +/* ------------------------------------------- +Group: General +------------------------------------------- */ + +// ************************************* +// Internal Functions +#define DOUBLES(var1,var2) var1##_##var2 +#define TRIPLES(var1,var2,var3) var1##_##var2##_##var3 +#define QUOTE(var1) #var1 + +#ifdef MODULAR + #define COMPONENT_T DOUBLES(t,COMPONENT) + #define COMPONENT_M DOUBLES(m,COMPONENT) + #define COMPONENT_S DOUBLES(s,COMPONENT) + #define COMPONENT_C DOUBLES(c,COMPONENT) + #define COMPONENT_F COMPONENT_C +#else + #define COMPONENT_T COMPONENT + #define COMPONENT_M COMPONENT + #define COMPONENT_S COMPONENT + #define COMPONENT_F COMPONENT + #define COMPONENT_C COMPONENT +#endif + +/* ------------------------------------------- +Macro: INC() + +Description: + Increase a number by one. + +Parameters: + VAR - Variable to increment [Number] + +Example: + (begin example) + _counter = 0; + INC(_counter); + // _counter => 1 + (end) + +Author: + Spooner +------------------------------------------- */ +#define INC(var) var = (var) + 1 + +/* ------------------------------------------- +Macro: DEC() + +Description: + Decrease a number by one. + +Parameters: + VAR - Variable to decrement [Number] + +Example: + (begin example) + _counter = 99; + DEC(_counter); + // _counter => 98 + (end) + +Author: + Spooner +------------------------------------------- */ +#define DEC(var) var = (var) - 1 + +/* ------------------------------------------- +Macro: ADD() + +Description: + Add a value to a variable. Variable and value should be both Numbers or both Strings. + +Parameters: + VAR - Variable to add to [Number or String] + VALUE - Value to add [Number or String] + +Examples: + (begin example) + _counter = 2; + ADD(_counter,3); + // _counter => 5 + (end) + (begin example) + _str = "hello"; + ADD(_str," "); + ADD(_str,"Fred"); + // _str => "hello Fred" + (end) + +Author: + Sickboy +------------------------------------------- */ +#define ADD(var1,var2) var1 = (var1) + (var2) + +/* ------------------------------------------- +Macro: SUB() + +Description: + Subtract a value from a number variable. VAR and VALUE should both be Numbers. + +Parameters: + VAR - Variable to subtract from [Number] + VALUE - Value to subtract [Number] + +Examples: + (begin example) + _numChickens = 2; + SUB(_numChickens,3); + // _numChickens => -1 + (end) +------------------------------------------- */ +#define SUB(var1,var2) var1 = (var1) - (var2) + +/* ------------------------------------------- +Macro: REM() + +Description: + Remove an element from an array each time it occurs. + + This recreates the entire array, so use BIS_fnc_removeIndex if modification of the original array is required + or if only one of the elements that matches ELEMENT needs to be removed. + +Parameters: + ARRAY - Array to modify [Array] + ELEMENT - Element to remove [Any] + +Examples: + (begin example) + _array = [1, 2, 3, 4, 3, 8]; + REM(_array,3); + // _array = [1, 2, 4, 8]; + (end) + +Author: + Spooner +------------------------------------------- */ +#define REM(var1,var2) SUB(var1,[var2]) + +/* ------------------------------------------- +Macro: PUSH() + +Description: + Appends a single value onto the end of an ARRAY. Change is made to the ARRAY itself, not creating a new array. + +Parameters: + ARRAY - Array to push element onto [Array] + ELEMENT - Element to push [Any] + +Examples: + (begin example) + _fish = ["blue", "green", "smelly"]; + PUSH(_fish,"monkey-flavoured"); + // _fish => ["blue", "green", "smelly", "monkey-flavoured"] + (end) + +Author: + Spooner +------------------------------------------- */ +#define PUSH(var1,var2) (var1) pushBack (var2) + +/* ------------------------------------------- +Macro: MAP() +Description: + Applies given code to each element of the array, then assigns the + resulting array to the original +Parameters: + ARRAY - Array to be modified + CODE - Code that'll be applied to each element of the array. +Example: + (begin example) + _array = [1, 2, 3, 4, 3, 8]; + MAP(_array,_x + 1); + // _array is now [2, 3, 4, 5, 4, 9]; + (end) +Author: + 654wak654 +------------------------------------------- */ +#define MAP(ARR,CODE) ARR = ARR apply {CODE} + +/* ------------------------------------------- +Macro: FILTER() +Description: + Filters an array based on given code, then assigns the resulting array + to the original +Parameters: + ARRAY - Array to be filtered + CODE - Condition to pick elements +Example: + (begin example) + _array = [1, 2, 3, 4, 3, 8]; + FILTER(_array,_x % 2 == 0) + // _array is now [2, 4, 8]; + (end) +Author: + Commy2 +------------------------------------------- */ +#define FILTER(ARR,CODE) ARR = ARR select {CODE} + +/* ------------------------------------------- +Macro: UNIQUE() +Description: + Removes duplicate values in given array +Parameters: + ARRAY - The array to be modified +Example: + (begin example) + _someArray = [4, 4, 5, 5, 5, 2]; + UNIQUE(_someArray); + // _someArray is now [4, 5, 2] + (end) +Author: + Commy2 +------------------------------------------- */ +#define UNIQUE(ARR) ARR = ARR arrayIntersect ARR + +/* ------------------------------------------- +Macro: INTERSECTION() +Description: + Finds unique common elements between two arrays and assigns them + to the first array +Parameters: + ARRAY0 - The array to be modified + ARRAY1 - The array to find intersections with +Example: + (begin example) + _someArray = [1, 2, 3, 4, 5, 5]; + _anotherArray = [4, 5, 6, 7]; + INTERSECTION(_someArray,_anotherArray); + // _someArray is now [4, 5] + (end) +Author: + 654wak654 +------------------------------------------- */ +#define INTERSECTION(ARG0,ARG1) ARG0 = ARG0 arrayIntersect (ARG1) + +/* ------------------------------------------- +Macro: ISNILS() + +Description: + Sets a variable with a value, but only if it is undefined. + +Parameters: + VARIABLE - Variable to set [Any, not nil] + DEFAULT_VALUE - Value to set VARIABLE to if it is undefined [Any, not nil] + +Examples: + (begin example) + // _fish is undefined + ISNILS(_fish,0); + // _fish => 0 + (end) + (begin example) + _fish = 12; + // ...later... + ISNILS(_fish,0); + // _fish => 12 + (end) + +Author: + Sickboy +------------------------------------------- */ +#define ISNILS(VARIABLE,DEFAULT_VALUE) if (isNil #VARIABLE) then { VARIABLE = DEFAULT_VALUE } +#define ISNILS2(var1,var2,var3,var4) ISNILS(TRIPLES(var1,var2,var3),var4) +#define ISNILS3(var1,var2,var3) ISNILS(DOUBLES(var1,var2),var3) +#define ISNIL(var1,var2) ISNILS2(PREFIX,COMPONENT,var1,var2) +#define ISNILMAIN(var1,var2) ISNILS3(PREFIX,var1,var2) + +#define CREATELOGICS(var1,var2) var1##_##var2 = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["LOGIC", [0, 0, 0], [], 0, "NONE"] +#define CREATELOGICLOCALS(var1,var2) var1##_##var2 = "LOGIC" createVehicleLocal [0, 0, 0] +#define CREATELOGICGLOBALS(var1,var2) var1##_##var2 = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["LOGIC", [0, 0, 0], [], 0, "NONE"]; publicVariable QUOTE(DOUBLES(var1,var2)) +#define CREATELOGICGLOBALTESTS(var1,var2) var1##_##var2 = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit [QUOTE(DOUBLES(ADDON,logic)), [0, 0, 0], [], 0, "NONE"] + +#define GETVARS(var1,var2,var3) (var1##_##var2 getVariable #var3) +#define GETVARMAINS(var1,var2) GETVARS(var1,MAINLOGIC,var2) + +#ifndef PATHTO_SYS + #define PATHTO_SYS(var1,var2,var3) \MAINPREFIX\var1\SUBPREFIX\var2\var3.sqf +#endif +#ifndef PATHTOF_SYS + #define PATHTOF_SYS(var1,var2,var3) \MAINPREFIX\var1\SUBPREFIX\var2\var3 +#endif + +#ifndef PATHTOF2_SYS + #define PATHTOF2_SYS(var1,var2,var3) MAINPREFIX\var1\SUBPREFIX\var2\var3 +#endif + +#define PATHTO_R(var1) PATHTOF2_SYS(PREFIX,COMPONENT_C,var1) +#define PATHTO_T(var1) PATHTOF_SYS(PREFIX,COMPONENT_T,var1) +#define PATHTO_M(var1) PATHTOF_SYS(PREFIX,COMPONENT_M,var1) +#define PATHTO_S(var1) PATHTOF_SYS(PREFIX,COMPONENT_S,var1) +#define PATHTO_C(var1) PATHTOF_SYS(PREFIX,COMPONENT_C,var1) +#define PATHTO_F(var1) PATHTO_SYS(PREFIX,COMPONENT_F,var1) + +// Already quoted "" +#define QPATHTO_R(var1) QUOTE(PATHTO_R(var1)) +#define QPATHTO_T(var1) QUOTE(PATHTO_T(var1)) +#define QPATHTO_M(var1) QUOTE(PATHTO_M(var1)) +#define QPATHTO_S(var1) QUOTE(PATHTO_S(var1)) +#define QPATHTO_C(var1) QUOTE(PATHTO_C(var1)) +#define QPATHTO_F(var1) QUOTE(PATHTO_F(var1)) + +// This only works for binarized configs after recompiling the pbos +// TODO: Reduce amount of calls / code.. +#define COMPILE_FILE2_CFG_SYS(var1) compile preprocessFileLineNumbers var1 +#define COMPILE_FILE2_SYS(var1) COMPILE_FILE2_CFG_SYS(var1) + +#define COMPILE_FILE_SYS(var1,var2,var3) COMPILE_FILE2_SYS('PATHTO_SYS(var1,var2,var3)') +#define COMPILE_FILE_CFG_SYS(var1,var2,var3) COMPILE_FILE2_CFG_SYS('PATHTO_SYS(var1,var2,var3)') + +#define SETVARS(var1,var2) var1##_##var2 setVariable +#define SETVARMAINS(var1) SETVARS(var1,MAINLOGIC) +#define GVARMAINS(var1,var2) var1##_##var2 +#define CFGSETTINGSS(var1,var2) configFile >> "CfgSettings" >> #var1 >> #var2 +//#define SETGVARS(var1,var2,var3) var1##_##var2##_##var3 = +//#define SETGVARMAINS(var1,var2) var1##_##var2 = + +// Compile-Once, JIT: On first use. +// #define PREPMAIN_SYS(var1,var2,var3) var1##_fnc_##var3 = { var1##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3)); if (isNil "_this") then { call var1##_fnc_##var3 } else { _this call var1##_fnc_##var3 } } +// #define PREP_SYS(var1,var2,var3) var1##_##var2##_fnc_##var3 = { var1##_##var2##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3)); if (isNil "_this") then { call var1##_##var2##_fnc_##var3 } else { _this call var1##_##var2##_fnc_##var3 } } +// #define PREP_SYS2(var1,var2,var3,var4) var1##_##var2##_fnc_##var4 = { var1##_##var2##_fnc_##var4 = COMPILE_FILE_SYS(var1,var3,DOUBLES(fnc,var4)); if (isNil "_this") then { call var1##_##var2##_fnc_##var4 } else { _this call var1##_##var2##_fnc_##var4 } } + +// Compile-Once, at Macro. As opposed to Compile-Once, on first use. +#define PREPMAIN_SYS(var1,var2,var3) var1##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3)) +#define PREP_SYS(var1,var2,var3) var1##_##var2##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3)) +#define PREP_SYS2(var1,var2,var3,var4) var1##_##var2##_fnc_##var4 = COMPILE_FILE_SYS(var1,var3,DOUBLES(fnc,var4)) + +#define LSTR(var1) TRIPLES(ADDON,STR,var1) + +#ifndef DEBUG_SETTINGS + #define DEBUG_SETTINGS [false, true, false] +#endif + +#define MSG_INIT QUOTE(Initializing: ADDON version: VERSION) + +// ************************************* +// User Functions +#define CFGSETTINGS CFGSETTINGSS(PREFIX,COMPONENT) +#define PATHTO(var1) PATHTO_SYS(PREFIX,COMPONENT_F,var1) +#define PATHTOF(var1) PATHTOF_SYS(PREFIX,COMPONENT,var1) +#define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2) +#define QPATHTOF(var1) QUOTE(PATHTOF(var1)) +#define QPATHTOEF(var1,var2) QUOTE(PATHTOEF(var1,var2)) + +#define COMPILE_FILE(var1) COMPILE_FILE_SYS(PREFIX,COMPONENT_F,var1) +#define COMPILE_FILE_CFG(var1) COMPILE_FILE_CFG_SYS(PREFIX,COMPONENT_F,var1) +#define COMPILE_FILE2(var1) COMPILE_FILE2_SYS('var1') +#define COMPILE_FILE2_CFG(var1) COMPILE_FILE2_CFG_SYS('var1') + +#define COMPILE_SCRIPT(var1) compileScript ['PATHTO_SYS(PREFIX,COMPONENT_F,var1)'] + + +#define VERSIONING_SYS(var1) class CfgSettings { \ + class CBA { \ + class Versioning { \ + class var1 {}; \ + }; \ + }; \ +}; + +#define VERSIONING VERSIONING_SYS(PREFIX) + +/* ------------------------------------------- +Macro: GVAR() + Get full variable identifier for a global variable owned by this component. + +Parameters: + VARIABLE - Partial name of global variable owned by this component [Any]. + +Example: + (begin example) + GVAR(frog) = 12; + // In SPON_FrogDancing component, equivalent to SPON_FrogDancing_frog = 12 + (end) + +Author: + Sickboy +------------------------------------------- */ +#define GVAR(var1) DOUBLES(ADDON,var1) +#define EGVAR(var1,var2) TRIPLES(PREFIX,var1,var2) +#define QGVAR(var1) QUOTE(GVAR(var1)) +#define QEGVAR(var1,var2) QUOTE(EGVAR(var1,var2)) +#define QQGVAR(var1) QUOTE(QGVAR(var1)) +#define QQEGVAR(var1,var2) QUOTE(QEGVAR(var1,var2)) + +/* ------------------------------------------- +Macro: GVARMAIN() + Get full variable identifier for a global variable owned by this addon. + +Parameters: + VARIABLE - Partial name of global variable owned by this addon [Any]. + +Example: + (begin example) + GVARMAIN(frog) = 12; + // In SPON_FrogDancing component, equivalent to SPON_frog = 12 + (end) + +Author: + Sickboy +------------------------------------------- */ +#define GVARMAIN(var1) GVARMAINS(PREFIX,var1) +#define QGVARMAIN(var1) QUOTE(GVARMAIN(var1)) +#define QQGVARMAIN(var1) QUOTE(QGVARMAIN(var1)) +// TODO: What's this? +#define SETTINGS DOUBLES(PREFIX,settings) +#define CREATELOGIC CREATELOGICS(PREFIX,COMPONENT) +#define CREATELOGICGLOBAL CREATELOGICGLOBALS(PREFIX,COMPONENT) +#define CREATELOGICGLOBALTEST CREATELOGICGLOBALTESTS(PREFIX,COMPONENT) +#define CREATELOGICLOCAL CREATELOGICLOCALS(PREFIX,COMPONENT) +#define CREATELOGICMAIN CREATELOGICS(PREFIX,MAINLOGIC) +#define GETVAR(var1) GETVARS(PREFIX,COMPONENT,var1) +#define SETVAR SETVARS(PREFIX,COMPONENT) +#define SETVARMAIN SETVARMAINS(PREFIX) +#define IFCOUNT(var1,var2,var3) if (count var1 > var2) then { var3 = var1 select var2 }; + +/* ------------------------------------------- +Macro: PREP() + +Description: + Defines a function. + + Full file path: + '\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\fnc_.sqf' + + Resulting function name: + 'PREFIX_COMPONENT_' + + The PREP macro should be placed in a script run by a XEH preStart and XEH preInit event. + + The PREP macro allows for CBA function caching, which drastically speeds up load times. + Beware though that function caching is enabled by default and as such to disable it, you need to + #define DISABLE_COMPILE_CACHE above your #include "script_components.hpp" include! + + The function will be defined in ui and mission namespace. It can not be overwritten without + a mission restart. + +Parameters: + FUNCTION NAME - Name of the function, unquoted + +Examples: + (begin example) + PREP(banana); + call FUNC(banana); + (end) + +Author: + dixon13 + ------------------------------------------- */ +//#define PREP(var1) PREP_SYS(PREFIX,COMPONENT_F,var1) + +#ifdef DISABLE_COMPILE_CACHE + #define PREP(var1) TRIPLES(ADDON,fnc,var1) = compile preProcessFileLineNumbers 'PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))' + #define PREPMAIN(var1) TRIPLES(PREFIX,fnc,var1) = compile preProcessFileLineNumbers 'PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))' +#else + #define PREP(var1) ['PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))', 'TRIPLES(ADDON,fnc,var1)'] call SLX_XEH_COMPILE_NEW + #define PREPMAIN(var1) ['PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))', 'TRIPLES(PREFIX,fnc,var1)'] call SLX_XEH_COMPILE_NEW +#endif + +/* ------------------------------------------- +Macro: PATHTO_FNC() + +Description: + Defines a function inside CfgFunctions. + + Full file path in addons: + '\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\fnc_.sqf' + Define 'RECOMPILE' to enable recompiling. + Define 'SKIP_FUNCTION_HEADER' to skip adding function header. + +Parameters: + FUNCTION NAME - Name of the function, unquoted + +Examples: + (begin example) + // file name: fnc_addPerFrameHandler.sqf + class CfgFunctions { + class CBA { + class Misc { + PATHTO_FNC(addPerFrameHandler); + }; + }; + }; + // -> CBA_fnc_addPerFrameHandler + (end) + +Author: + dixon13, commy2 + ------------------------------------------- */ +#ifdef RECOMPILE + #undef RECOMPILE + #define RECOMPILE recompile = 1 +#else + #define RECOMPILE recompile = 0 +#endif +// Set function header type: -1 - no header; 0 - default header; 1 - system header. +#ifdef SKIP_FUNCTION_HEADER + #define CFGFUNCTION_HEADER headerType = -1 +#else + #define CFGFUNCTION_HEADER headerType = 0 +#endif + +#define PATHTO_FNC(func) class func {\ + file = QPATHTOF(DOUBLES(fnc,func).sqf);\ + CFGFUNCTION_HEADER;\ + RECOMPILE;\ +} + +#define FUNC(var1) TRIPLES(ADDON,fnc,var1) +#define FUNCMAIN(var1) TRIPLES(PREFIX,fnc,var1) +#define FUNC_INNER(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2) +#define EFUNC(var1,var2) FUNC_INNER(var1,var2) +#define QFUNC(var1) QUOTE(FUNC(var1)) +#define QFUNCMAIN(var1) QUOTE(FUNCMAIN(var1)) +#define QFUNC_INNER(var1,var2) QUOTE(FUNC_INNER(var1,var2)) +#define QEFUNC(var1,var2) QUOTE(EFUNC(var1,var2)) +#define QQFUNC(var1) QUOTE(QFUNC(var1)) +#define QQFUNCMAIN(var1) QUOTE(QFUNCMAIN(var1)) +#define QQFUNC_INNER(var1,var2) QUOTE(QFUNC_INNER(var1,var2)) +#define QQEFUNC(var1,var2) QUOTE(QEFUNC(var1,var2)) + +#ifndef PRELOAD_ADDONS + #define PRELOAD_ADDONS class CfgAddons { \ + class PreloadAddons { \ + class ADDON { \ + list[]={ QUOTE(ADDON) }; \ + }; \ + }; \ +} +#endif + +/* ------------------------------------------- +Macros: ARG_#() + Select from list of array arguments + +Parameters: + VARIABLE(1-8) - elements for the list + +Author: + Rommel +------------------------------------------- */ +#define ARG_1(A,B) ((A) select (B)) +#define ARG_2(A,B,C) (ARG_1(ARG_1(A,B),C)) +#define ARG_3(A,B,C,D) (ARG_1(ARG_2(A,B,C),D)) +#define ARG_4(A,B,C,D,E) (ARG_1(ARG_3(A,B,C,D),E)) +#define ARG_5(A,B,C,D,E,F) (ARG_1(ARG_4(A,B,C,D,E),F)) +#define ARG_6(A,B,C,D,E,F,G) (ARG_1(ARG_5(A,B,C,D,E,F),G)) +#define ARG_7(A,B,C,D,E,F,G,H) (ARG_1(ARG_6(A,B,C,D,E,E,F,G),H)) +#define ARG_8(A,B,C,D,E,F,G,H,I) (ARG_1(ARG_7(A,B,C,D,E,E,F,G,H),I)) + +/* ------------------------------------------- +Macros: ARR_#() + Create list from arguments. Useful for working around , in macro parameters. + 1-8 arguments possible. + +Parameters: + VARIABLE(1-8) - elements for the list + +Author: + Nou +------------------------------------------- */ +#define ARR_1(ARG1) ARG1 +#define ARR_2(ARG1,ARG2) ARG1, ARG2 +#define ARR_3(ARG1,ARG2,ARG3) ARG1, ARG2, ARG3 +#define ARR_4(ARG1,ARG2,ARG3,ARG4) ARG1, ARG2, ARG3, ARG4 +#define ARR_5(ARG1,ARG2,ARG3,ARG4,ARG5) ARG1, ARG2, ARG3, ARG4, ARG5 +#define ARR_6(ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) ARG1, ARG2, ARG3, ARG4, ARG5, ARG6 +#define ARR_7(ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7 +#define ARR_8(ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8 + +/* ------------------------------------------- +Macros: FORMAT_#(STR, ARG1) + Format - Useful for working around , in macro parameters. + 1-8 arguments possible. + +Parameters: + STRING - string used by format + VARIABLE(1-8) - elements for usage in format + +Author: + Nou & Sickboy +------------------------------------------- */ +#define FORMAT_1(STR,ARG1) format[STR, ARG1] +#define FORMAT_2(STR,ARG1,ARG2) format[STR, ARG1, ARG2] +#define FORMAT_3(STR,ARG1,ARG2,ARG3) format[STR, ARG1, ARG2, ARG3] +#define FORMAT_4(STR,ARG1,ARG2,ARG3,ARG4) format[STR, ARG1, ARG2, ARG3, ARG4] +#define FORMAT_5(STR,ARG1,ARG2,ARG3,ARG4,ARG5) format[STR, ARG1, ARG2, ARG3, ARG4, ARG5] +#define FORMAT_6(STR,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) format[STR, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6] +#define FORMAT_7(STR,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) format[STR, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7] +#define FORMAT_8(STR,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) format[STR, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8] + +// CONTROL(46) 12 +#define DISPLAY(A) (findDisplay A) +#define CONTROL(A) DISPLAY(A) displayCtrl + +/* ------------------------------------------- +Macros: IS_x() + Checking the data types of variables. + + IS_ARRAY() - Array + IS_BOOL() - Boolean + IS_BOOLEAN() - UI display handle(synonym for ) + IS_CODE() - Code block (i.e a compiled function) + IS_CONFIG() - Configuration + IS_CONTROL() - UI control handle. + IS_DISPLAY() - UI display handle. + IS_FUNCTION() - A compiled function (synonym for ) + IS_GROUP() - Group. + IS_INTEGER() - Is a number a whole number? + IS_LOCATION() - World location. + IS_NUMBER() - A floating point number (synonym for ) + IS_OBJECT() - World object. + IS_SCALAR() - Floating point number. + IS_SCRIPT() - A script handle (as returned by execVM and spawn commands). + IS_SIDE() - Game side. + IS_STRING() - World object. + IS_TEXT() - Structured text. + +Parameters: + VARIABLE - Variable to check if it is of a particular type [Any, not nil] + +Author: + Spooner +------------------------------------------- */ +#define IS_META_SYS(VAR,TYPE) (if (isNil {VAR}) then {false} else {(VAR) isEqualType TYPE}) +#define IS_ARRAY(VAR) IS_META_SYS(VAR,[]) +#define IS_BOOL(VAR) IS_META_SYS(VAR,false) +#define IS_CODE(VAR) IS_META_SYS(VAR,{}) +#define IS_CONFIG(VAR) IS_META_SYS(VAR,configNull) +#define IS_CONTROL(VAR) IS_META_SYS(VAR,controlNull) +#define IS_DISPLAY(VAR) IS_META_SYS(VAR,displayNull) +#define IS_GROUP(VAR) IS_META_SYS(VAR,grpNull) +#define IS_OBJECT(VAR) IS_META_SYS(VAR,objNull) +#define IS_SCALAR(VAR) IS_META_SYS(VAR,0) +#define IS_SCRIPT(VAR) IS_META_SYS(VAR,scriptNull) +#define IS_SIDE(VAR) IS_META_SYS(VAR,west) +#define IS_STRING(VAR) IS_META_SYS(VAR,"STRING") +#define IS_TEXT(VAR) IS_META_SYS(VAR,text "") +#define IS_LOCATION(VAR) IS_META_SYS(VAR,locationNull) + +#define IS_BOOLEAN(VAR) IS_BOOL(VAR) +#define IS_FUNCTION(VAR) IS_CODE(VAR) +#define IS_INTEGER(VAR) (if (IS_SCALAR(VAR)) then {floor (VAR) == (VAR)} else {false}) +#define IS_NUMBER(VAR) IS_SCALAR(VAR) + +#define FLOAT_TO_STRING(num) (if (_this == 0) then {"0"} else {str parseNumber (str (_this % _this) + str floor abs _this) + "." + (str (abs _this - floor abs _this) select [2]) + "0"}) + +/* ------------------------------------------- +Macro: SCRIPT() + Sets name of script (relies on PREFIX and COMPONENT values being #defined). + Define 'SKIP_SCRIPT_NAME' to skip adding scriptName. + +Parameters: + NAME - Name of script [Indentifier] + +Example: + (begin example) + SCRIPT(eradicateMuppets); + (end) + +Author: + Spooner +------------------------------------------- */ +#ifndef SKIP_SCRIPT_NAME + #define SCRIPT(NAME) scriptName 'PREFIX\COMPONENT\NAME' +#else + #define SCRIPT(NAME) /* nope */ +#endif + +/* ------------------------------------------- +Macros: EXPLODE_n() + DEPRECATED - Use param/params commands added in Arma 3 1.48 + + Splitting an ARRAY into a number of variables (A, B, C, etc). + + Note that this NOT does make the created variables private. + _PVT variants do. + + EXPLODE_1(ARRAY,A,B) - Split a 1-element array into separate variable. + EXPLODE_2(ARRAY,A,B) - Split a 2-element array into separate variables. + EXPLODE_3(ARRAY,A,B,C) - Split a 3-element array into separate variables. + EXPLODE_4(ARRAY,A,B,C,D) - Split a 4-element array into separate variables. + EXPLODE_5(ARRAY,A,B,C,D,E) - Split a 5-element array into separate variables. + EXPLODE_6(ARRAY,A,B,C,D,E,F) - Split a 6-element array into separate variables. + EXPLODE_7(ARRAY,A,B,C,D,E,F,G) - Split a 7-element array into separate variables. + EXPLODE_8(ARRAY,A,B,C,D,E,F,G,H) - Split a 8-element array into separate variables. + EXPLODE_9(ARRAY,A,B,C,D,E,F,G,H,I) - Split a 9-element array into separate variables. + +Parameters: + ARRAY - Array to read from [Array] + A..H - Names of variables to set from array [Identifier] + +Example: + (begin example) + _array = ["fred", 156.8, 120.9]; + EXPLODE_3(_array,_name,_height,_weight); + (end) + +Author: + Spooner +------------------------------------------- */ +#define EXPLODE_1_SYS(ARRAY,A) A = ARRAY param [0] +#define EXPLODE_1(ARRAY,A) EXPLODE_1_SYS(ARRAY,A); TRACE_1("EXPLODE_1, " + QUOTE(ARRAY),A) +#define EXPLODE_1_PVT(ARRAY,A) ARRAY params [#A]; TRACE_1("EXPLODE_1, " + QUOTE(ARRAY),A) + +#define EXPLODE_2_SYS(ARRAY,A,B) EXPLODE_1_SYS(ARRAY,A); B = ARRAY param [1] +#define EXPLODE_2(ARRAY,A,B) EXPLODE_2_SYS(ARRAY,A,B); TRACE_2("EXPLODE_2, " + QUOTE(ARRAY),A,B) +#define EXPLODE_2_PVT(ARRAY,A,B) ARRAY params [#A,#B]; TRACE_2("EXPLODE_2, " + QUOTE(ARRAY),A,B) + +#define EXPLODE_3_SYS(ARRAY,A,B,C) EXPLODE_2_SYS(ARRAY,A,B); C = ARRAY param [2] +#define EXPLODE_3(ARRAY,A,B,C) EXPLODE_3_SYS(ARRAY,A,B,C); TRACE_3("EXPLODE_3, " + QUOTE(ARRAY),A,B,C) +#define EXPLODE_3_PVT(ARRAY,A,B,C) ARRAY params [#A,#B,#C]; TRACE_3("EXPLODE_3, " + QUOTE(ARRAY),A,B,C) + +#define EXPLODE_4_SYS(ARRAY,A,B,C,D) EXPLODE_3_SYS(ARRAY,A,B,C); D = ARRAY param [3] +#define EXPLODE_4(ARRAY,A,B,C,D) EXPLODE_4_SYS(ARRAY,A,B,C,D); TRACE_4("EXPLODE_4, " + QUOTE(ARRAY),A,B,C,D) +#define EXPLODE_4_PVT(ARRAY,A,B,C,D) ARRAY params [#A,#B,#C,#D]; TRACE_4("EXPLODE_4, " + QUOTE(ARRAY),A,B,C,D) + +#define EXPLODE_5_SYS(ARRAY,A,B,C,D,E) EXPLODE_4_SYS(ARRAY,A,B,C,D); E = ARRAY param [4] +#define EXPLODE_5(ARRAY,A,B,C,D,E) EXPLODE_5_SYS(ARRAY,A,B,C,D,E); TRACE_5("EXPLODE_5, " + QUOTE(ARRAY),A,B,C,D,E) +#define EXPLODE_5_PVT(ARRAY,A,B,C,D,E) ARRAY params [#A,#B,#C,#D,#E]; TRACE_5("EXPLODE_5, " + QUOTE(ARRAY),A,B,C,D,E) + +#define EXPLODE_6_SYS(ARRAY,A,B,C,D,E,F) EXPLODE_5_SYS(ARRAY,A,B,C,D,E); F = ARRAY param [5] +#define EXPLODE_6(ARRAY,A,B,C,D,E,F) EXPLODE_6_SYS(ARRAY,A,B,C,D,E,F); TRACE_6("EXPLODE_6, " + QUOTE(ARRAY),A,B,C,D,E,F) +#define EXPLODE_6_PVT(ARRAY,A,B,C,D,E,F) ARRAY params [#A,#B,#C,#D,#E,#F]; TRACE_6("EXPLODE_6, " + QUOTE(ARRAY),A,B,C,D,E,F) + +#define EXPLODE_7_SYS(ARRAY,A,B,C,D,E,F,G) EXPLODE_6_SYS(ARRAY,A,B,C,D,E,F); G = ARRAY param [6] +#define EXPLODE_7(ARRAY,A,B,C,D,E,F,G) EXPLODE_7_SYS(ARRAY,A,B,C,D,E,F,G); TRACE_7("EXPLODE_7, " + QUOTE(ARRAY),A,B,C,D,E,F,G) +#define EXPLODE_7_PVT(ARRAY,A,B,C,D,E,F,G) ARRAY params [#A,#B,#C,#D,#E,#F,#G]; TRACE_7("EXPLODE_7, " + QUOTE(ARRAY),A,B,C,D,E,F,G) + +#define EXPLODE_8_SYS(ARRAY,A,B,C,D,E,F,G,H) EXPLODE_7_SYS(ARRAY,A,B,C,D,E,F,G); H = ARRAY param [7] +#define EXPLODE_8(ARRAY,A,B,C,D,E,F,G,H) EXPLODE_8_SYS(ARRAY,A,B,C,D,E,F,G,H); TRACE_8("EXPLODE_8, " + QUOTE(ARRAY),A,B,C,D,E,F,G,H) +#define EXPLODE_8_PVT(ARRAY,A,B,C,D,E,F,G,H) ARRAY params [#A,#B,#C,#D,#E,#F,#G,#H]; TRACE_8("EXPLODE_8, " + QUOTE(ARRAY),A,B,C,D,E,F,G,H) + +#define EXPLODE_9_SYS(ARRAY,A,B,C,D,E,F,G,H,I) EXPLODE_8_SYS(ARRAY,A,B,C,D,E,F,G,H); I = ARRAY param [8] +#define EXPLODE_9(ARRAY,A,B,C,D,E,F,G,H,I) EXPLODE_9_SYS(ARRAY,A,B,C,D,E,F,G,H,I); TRACE_9("EXPLODE_9, " + QUOTE(ARRAY),A,B,C,D,E,F,G,H,I) +#define EXPLODE_9_PVT(ARRAY,A,B,C,D,E,F,G,H,I) ARRAY params [#A,#B,#C,#D,#E,#F,#G,#H,#I]; TRACE_9("EXPLODE_9, " + QUOTE(ARRAY),A,B,C,D,E,F,G,H,I) + +/* ------------------------------------------- +Macro: xSTRING() + Get full string identifier from a stringtable owned by this component. + +Parameters: + VARIABLE - Partial name of global variable owned by this component [Any]. + +Example: + ADDON is CBA_Balls. + (begin example) + // Localized String (localize command must still be used with it) + LSTRING(Example); // STR_CBA_Balls_Example; + // Config String (note the $) + CSTRING(Example); // $STR_CBA_Balls_Example; + (end) + +Author: + Jonpas +------------------------------------------- */ +#ifndef STRING_MACROS_GUARD +#define STRING_MACROS_GUARD + #define LSTRING(var1) QUOTE(TRIPLES(STR,ADDON,var1)) + #define ELSTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) + #define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) + #define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) + #define SUBCSTRING(var1) QUOTE(TRIPLES($STR,SUBADDON,var1)) + + #define LLSTRING(var1) localize QUOTE(TRIPLES(STR,ADDON,var1)) + #define LELSTRING(var1,var2) localize QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) + #define LSUBLSTRING(var1) localize QUOTE(TRIPLES(STR,SUBADDON,var1)) +#endif + + +/* ------------------------------------------- +Group: Managing Function Parameters +------------------------------------------- */ + +/* ------------------------------------------- +Macros: PARAMS_n() + DEPRECATED - Use param/params commands added in Arma 3 1.48 + + Setting variables based on parameters passed to a function. + + Each parameter is defines as private and set to the appropriate value from _this. + + PARAMS_1(A) - Get 1 parameter from the _this array (or _this if it's not an array). + PARAMS_2(A,B) - Get 2 parameters from the _this array. + PARAMS_3(A,B,C) - Get 3 parameters from the _this array. + PARAMS_4(A,B,C,D) - Get 4 parameters from the _this array. + PARAMS_5(A,B,C,D,E) - Get 5 parameters from the _this array. + PARAMS_6(A,B,C,D,E,F) - Get 6 parameters from the _this array. + PARAMS_7(A,B,C,D,E,F,G) - Get 7 parameters from the _this array. + PARAMS_8(A,B,C,D,E,F,G,H) - Get 8 parameters from the _this array. + +Parameters: + A..H - Name of variable to read from _this [Identifier] + +Example: + A function called like this: + (begin example) + [_name,_address,_telephone] call recordPersonalDetails; + (end) + expects 3 parameters and those variables could be initialised at the start of the function definition with: + (begin example) + recordPersonalDetails = { + PARAMS_3(_name,_address,_telephone); + // Rest of function follows... + }; + (end) + +Author: + Spooner +------------------------------------------- */ +#define PARAMS_1(A) EXPLODE_1_PVT(_this,A) +#define PARAMS_2(A,B) EXPLODE_2_PVT(_this,A,B) +#define PARAMS_3(A,B,C) EXPLODE_3_PVT(_this,A,B,C) +#define PARAMS_4(A,B,C,D) EXPLODE_4_PVT(_this,A,B,C,D) +#define PARAMS_5(A,B,C,D,E) EXPLODE_5_PVT(_this,A,B,C,D,E) +#define PARAMS_6(A,B,C,D,E,F) EXPLODE_6_PVT(_this,A,B,C,D,E,F) +#define PARAMS_7(A,B,C,D,E,F,G) EXPLODE_7_PVT(_this,A,B,C,D,E,F,G) +#define PARAMS_8(A,B,C,D,E,F,G,H) EXPLODE_8_PVT(_this,A,B,C,D,E,F,G,H) +#define PARAMS_9(A,B,C,D,E,F,G,H,I) EXPLODE_9_PVT(_this,A,B,C,D,E,F,G,H,I) + +/* ------------------------------------------- +Macro: DEFAULT_PARAM() + DEPRECATED - Use param/params commands added in Arma 3 1.48 + + Getting a default function parameter. This may be used together with to have a mix of required and + optional parameters. + +Parameters: + INDEX - Index of parameter in _this [Integer, 0+] + NAME - Name of the variable to set [Identifier] + DEF_VALUE - Default value to use in case the array is too short or the value at INDEX is nil [Any] + +Example: + A function called with optional parameters: + (begin example) + [_name] call myFunction; + [_name, _numberOfLegs] call myFunction; + [_name, _numberOfLegs, _hasAHead] call myFunction; + (end) + 1 required parameter and 2 optional parameters. Those variables could be initialised at the start of the function + definition with: + (begin example) + myFunction = { + PARAMS_1(_name); + DEFAULT_PARAM(1,_numberOfLegs,2); + DEFAULT_PARAM(2,_hasAHead,true); + // Rest of function follows... + }; + (end) + +Author: + Spooner +------------------------------------------- */ +#define DEFAULT_PARAM(INDEX,NAME,DEF_VALUE) \ + private [#NAME,"_this"]; \ + ISNILS(_this,[]); \ + NAME = _this param [INDEX, DEF_VALUE]; \ + TRACE_3("DEFAULT_PARAM",INDEX,NAME,DEF_VALUE) + +/* ------------------------------------------- +Macro: KEY_PARAM() + Get value from key in _this list, return default when key is not included in list. + +Parameters: + KEY - Key name [String] + NAME - Name of the variable to set [Identifier] + DEF_VALUE - Default value to use in case key not found [ANY] + +Example: + + +Author: + Muzzleflash +------------------------------------------- */ +#define KEY_PARAM(KEY,NAME,DEF_VALUE) \ + private #NAME; \ + NAME = [toLower KEY, toUpper KEY, DEF_VALUE, RETNIL(_this)] call CBA_fnc_getArg; \ + TRACE_3("KEY_PARAM",KEY,NAME,DEF_VALUE) + +/* ------------------------------------------- +Group: Assertions +------------------------------------------- */ + +#define ASSERTION_ERROR(MESSAGE) ERROR_WITH_TITLE("Assertion failed!",MESSAGE) + +/* ------------------------------------------- +Macro: ASSERT_TRUE() + Asserts that a CONDITION is true. When an assertion fails, an error is raised with the given MESSAGE. + +Parameters: + CONDITION - Condition to assert as true [Boolean] + MESSSAGE - Message to display if (A OPERATOR B) is false [String] + +Example: + (begin example) + ASSERT_TRUE(_frogIsDead,"The frog is alive"); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ASSERT_TRUE(CONDITION,MESSAGE) \ + if (not (CONDITION)) then \ + { \ + ASSERTION_ERROR('Assertion (CONDITION) failed!\n\n' + (MESSAGE)); \ + } + +/* ------------------------------------------- +Macro: ASSERT_FALSE() + Asserts that a CONDITION is false. When an assertion fails, an error is raised with the given MESSAGE. + +Parameters: + CONDITION - Condition to assert as false [Boolean] + MESSSAGE - Message to display if (A OPERATOR B) is true [String] + +Example: + (begin example) + ASSERT_FALSE(_frogIsDead,"The frog died"); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ASSERT_FALSE(CONDITION,MESSAGE) \ + if (CONDITION) then \ + { \ + ASSERTION_ERROR('Assertion (not (CONDITION)) failed!\n\n' + (MESSAGE)) \ + } + +/* ------------------------------------------- +Macro: ASSERT_OP() + Asserts that (A OPERATOR B) is true. When an assertion fails, an error is raised with the given MESSAGE. + +Parameters: + A - First value [Any] + OPERATOR - Binary operator to use [Operator] + B - Second value [Any] + MESSSAGE - Message to display if (A OPERATOR B) is false. [String] + +Example: + (begin example) + ASSERT_OP(_fish,>,5,"Too few fish!"); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ASSERT_OP(A,OPERATOR,B,MESSAGE) \ + if (not ((A) OPERATOR (B))) then \ + { \ + ASSERTION_ERROR('Assertion (A OPERATOR B) failed!\n' + 'A: ' + (str (A)) + '\n' + 'B: ' + (str (B)) + "\n\n" + (MESSAGE)); \ + } + +/* ------------------------------------------- +Macro: ASSERT_DEFINED() + Asserts that a VARIABLE is defined. When an assertion fails, an error is raised with the given MESSAGE.. + +Parameters: + VARIABLE - Variable to test if defined [String or Function]. + MESSAGE - Message to display if variable is undefined [String]. + +Examples: + (begin example) + ASSERT_DEFINED("_anUndefinedVar","Too few fish!"); + ASSERT_DEFINED({ obj getVariable "anUndefinedVar" },"Too many fish!"); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ASSERT_DEFINED(VARIABLE,MESSAGE) \ + if (isNil VARIABLE) then \ + { \ + ASSERTION_ERROR('Assertion (VARIABLE is defined) failed!\n\n' + (MESSAGE)); \ + } + +/* ------------------------------------------- +Group: Unit tests +------------------------------------------- */ +#define TEST_SUCCESS(MESSAGE) MESSAGE_WITH_TITLE("Test OK",MESSAGE) +#define TEST_FAIL(MESSAGE) ERROR_WITH_TITLE("Test FAIL",MESSAGE) + +/* ------------------------------------------- +Macro: TEST_TRUE() + Tests that a CONDITION is true. + If the condition is not true, an error is raised with the given MESSAGE. + +Parameters: + CONDITION - Condition to assert as true [Boolean] + MESSSAGE - Message to display if (A OPERATOR B) is false [String] + +Example: + (begin example) + TEST_TRUE(_frogIsDead,"The frog is alive"); + (end) + +Author: + Killswitch +------------------------------------------- */ +#define TEST_TRUE(CONDITION, MESSAGE) \ + if (CONDITION) then \ + { \ + TEST_SUCCESS('(CONDITION)'); \ + } \ + else \ + { \ + TEST_FAIL('(CONDITION) ' + (MESSAGE)); \ + } + +/* ------------------------------------------- +Macro: TEST_FALSE() + Tests that a CONDITION is false. + If the condition is not false, an error is raised with the given MESSAGE. + +Parameters: + CONDITION - Condition to test as false [Boolean] + MESSSAGE - Message to display if (A OPERATOR B) is true [String] + +Example: + (begin example) + TEST_FALSE(_frogIsDead,"The frog died"); + (end) + +Author: + Killswitch +------------------------------------------- */ +#define TEST_FALSE(CONDITION, MESSAGE) \ + if (not (CONDITION)) then \ + { \ + TEST_SUCCESS('(not (CONDITION))'); \ + } \ + else \ + { \ + TEST_FAIL('(not (CONDITION)) ' + (MESSAGE)); \ + } + +/* ------------------------------------------- +Macro: TEST_OP() + Tests that (A OPERATOR B) is true. + If the test fails, an error is raised with the given MESSAGE. + +Parameters: + A - First value [Any] + OPERATOR - Binary operator to use [Operator] + B - Second value [Any] + MESSSAGE - Message to display if (A OPERATOR B) is false. [String] + +Example: + (begin example) + TEST_OP(_fish,>,5,"Too few fish!"); + (end) + +Author: + Killswitch +------------------------------------------- */ +#define TEST_OP(A,OPERATOR,B,MESSAGE) \ + if ((A) OPERATOR (B)) then \ + { \ + TEST_SUCCESS('(A OPERATOR B)') \ + } \ + else \ + { \ + TEST_FAIL('(A OPERATOR B)') \ + }; + +/* ------------------------------------------- +Macro: TEST_DEFINED_AND_OP() + Tests that A and B are defined and (A OPERATOR B) is true. + If the test fails, an error is raised with the given MESSAGE. + +Parameters: + A - First value [Any] + OPERATOR - Binary operator to use [Operator] + B - Second value [Any] + MESSSAGE - Message to display [String] + +Example: + (begin example) + TEST_OP(_fish,>,5,"Too few fish!"); + (end) + +Author: + Killswitch, PabstMirror +------------------------------------------- */ +#define TEST_DEFINED_AND_OP(A,OPERATOR,B,MESSAGE) \ + if (isNil #A) then { \ + TEST_FAIL('(A is not defined) ' + (MESSAGE)); \ + } else { \ + if (isNil #B) then { \ + TEST_FAIL('(B is not defined) ' + (MESSAGE)); \ + } else { \ + if ((A) OPERATOR (B)) then { \ + TEST_SUCCESS('(A OPERATOR B) ' + (MESSAGE)) \ + } else { \ + TEST_FAIL('(A OPERATOR B) ' + (MESSAGE)) \ + }; }; }; + + +/* ------------------------------------------- +Macro: TEST_DEFINED() + Tests that a VARIABLE is defined. + +Parameters: + VARIABLE - Variable to test if defined [String or Function]. + MESSAGE - Message to display if variable is undefined [String]. + +Examples: + (begin example) + TEST_DEFINED("_anUndefinedVar","Too few fish!"); + TEST_DEFINED({ obj getVariable "anUndefinedVar" },"Too many fish!"); + (end) + +Author: + Killswitch +------------------------------------------- */ +#define TEST_DEFINED(VARIABLE,MESSAGE) \ + if (not isNil VARIABLE) then \ + { \ + TEST_SUCCESS('(' + VARIABLE + ' is defined)'); \ + } \ + else \ + { \ + TEST_FAIL('(' + VARIABLE + ' is not defined)' + (MESSAGE)); \ + } + +/* ------------------------------------------- +Group: Managing Deprecation +------------------------------------------- */ + +/* ------------------------------------------- +Macro: DEPRECATE_SYS() + Allow deprecation of a function that has been renamed. + + Replaces an old OLD_FUNCTION (which will have PREFIX_ prepended) with a NEW_FUNCTION + (PREFIX_ prepended) with the intention that the old function will be disabled in the future. + + Shows a warning in RPT each time the deprecated function is used, but runs the new function. + +Parameters: + OLD_FUNCTION - Full name of old function [Identifier for function that does not exist any more] + NEW_FUNCTION - Full name of new function [Function] + +Example: + (begin example) + // After renaming CBA_fnc_frog as CBA_fnc_fish + DEPRECATE_SYS(CBA_fnc_frog,CBA_fnc_fish); + (end) + +Author: + Sickboy +------------------------------------------- */ +#define DEPRECATE_SYS(OLD_FUNCTION,NEW_FUNCTION) \ + OLD_FUNCTION = { \ + WARNING('Deprecated function used: OLD_FUNCTION (new: NEW_FUNCTION) in ADDON'); \ + if (isNil "_this") then { call NEW_FUNCTION } else { _this call NEW_FUNCTION }; \ + } + +/* ------------------------------------------- +Macro: DEPRECATE() + Allow deprecation of a function, in the current component, that has been renamed. + + Replaces an OLD_FUNCTION (which will have PREFIX_ prepended) with a NEW_FUNCTION + (PREFIX_ prepended) with the intention that the old function will be disabled in the future. + + Shows a warning in RPT each time the deprecated function is used, but runs the new function. + +Parameters: + OLD_FUNCTION - Name of old function, assuming PREFIX [Identifier for function that does not exist any more] + NEW_FUNCTION - Name of new function, assuming PREFIX [Function] + +Example: + (begin example) + // After renaming CBA_fnc_frog as CBA_fnc_fish + DEPRECATE(fnc_frog,fnc_fish); + (end) + +Author: + Sickboy +------------------------------------------- */ +#define DEPRECATE(OLD_FUNCTION,NEW_FUNCTION) \ + DEPRECATE_SYS(DOUBLES(PREFIX,OLD_FUNCTION),DOUBLES(PREFIX,NEW_FUNCTION)) + +/* ------------------------------------------- +Macro: OBSOLETE_SYS() + Replace a function that has become obsolete. + + Replace an obsolete OLD_FUNCTION with a simple COMMAND_FUNCTION, with the intention that anyone + using the function should replace it with the simple command, since the function will be disabled in the future. + + Shows a warning in RPT each time the deprecated function is used, and runs the command function. + +Parameters: + OLD_FUNCTION - Full name of old function [Identifier for function that does not exist any more] + COMMAND_CODE - Code to replace the old function [Function] + +Example: + (begin example) + // In Arma2, currentWeapon command made the CBA_fMyWeapon function obsolete: + OBSOLETE_SYS(CBA_fMyWeapon,{ currentWeapon player }); + (end) + +Author: + Spooner +------------------------------------------- */ +#define OBSOLETE_SYS(OLD_FUNCTION,COMMAND_CODE) \ + OLD_FUNCTION = { \ + WARNING('Obsolete function used: (use: OLD_FUNCTION) in ADDON'); \ + if (isNil "_this") then { call COMMAND_CODE } else { _this call COMMAND_CODE }; \ + } + +/* ------------------------------------------- +Macro: OBSOLETE() + Replace a function, in the current component, that has become obsolete. + + Replace an obsolete OLD_FUNCTION (which will have PREFIX_ prepended) with a simple + COMMAND_CODE, with the intention that anyone using the function should replace it with the simple + command. + + Shows a warning in RPT each time the deprecated function is used. + +Parameters: + OLD_FUNCTION - Name of old function, assuming PREFIX [Identifier for function that does not exist any more] + COMMAND_CODE - Code to replace the old function [Function] + +Example: + (begin example) + // In Arma2, currentWeapon command made the CBA_fMyWeapon function obsolete: + OBSOLETE(fMyWeapon,{ currentWeapon player }); + (end) + +Author: + Spooner +------------------------------------------- */ +#define OBSOLETE(OLD_FUNCTION,COMMAND_CODE) \ + OBSOLETE_SYS(DOUBLES(PREFIX,OLD_FUNCTION),COMMAND_CODE) + +#define BWC_CONFIG(NAME) class NAME { \ + units[] = {}; \ + weapons[] = {}; \ + requiredVersion = REQUIRED_VERSION; \ + requiredAddons[] = {}; \ + version = VERSION; \ +} + +// XEH Specific +#define XEH_CLASS CBA_Extended_EventHandlers +#define XEH_CLASS_BASE DOUBLES(XEH_CLASS,base) +#define XEH_DISABLED class EventHandlers { class XEH_CLASS {}; }; SLX_XEH_DISABLED = 1 +#define XEH_ENABLED class EventHandlers { class XEH_CLASS { EXTENDED_EVENTHANDLERS }; }; SLX_XEH_DISABLED = 0 + +// TODO: These are actually outdated; _Once ? +#define XEH_PRE_INIT QUOTE(call COMPILE_FILE(XEH_PreInit_Once)) +#define XEH_PRE_CINIT QUOTE(call COMPILE_FILE(XEH_PreClientInit_Once)) +#define XEH_PRE_SINIT QUOTE(call COMPILE_FILE(XEH_PreServerInit_Once)) + +#define XEH_POST_INIT QUOTE(call COMPILE_FILE(XEH_PostInit_Once)) +#define XEH_POST_CINIT QUOTE(call COMPILE_FILE(XEH_PostClientInit_Once)) +#define XEH_POST_SINIT QUOTE(call COMPILE_FILE(XEH_PostServerInit_Once)) + +/* ------------------------------------------- +Macro: IS_ADMIN + Check if the local machine is an admin in the multiplayer environment. + + Reports 'true' for logged and voted in admins. + +Parameters: + None + +Example: + (begin example) + // print "true" if player is admin + systemChat str IS_ADMIN; + (end) + +Author: + commy2 +------------------------------------------- */ +#define IS_ADMIN_SYS(x) x##kick +#define IS_ADMIN serverCommandAvailable 'IS_ADMIN_SYS(#)' + +/* ------------------------------------------- +Macro: IS_ADMIN_LOGGED + Check if the local machine is a logged in admin in the multiplayer environment. + + Reports 'false' if the player was voted to be the admin. + +Parameters: + None + +Example: + (begin example) + // print "true" if player is admin and entered in the server password + systemChat str IS_ADMIN_LOGGED; + (end) + +Author: + commy2 +------------------------------------------- */ +#define IS_ADMIN_LOGGED_SYS(x) x##shutdown +#define IS_ADMIN_LOGGED serverCommandAvailable 'IS_ADMIN_LOGGED_SYS(#)' + +/* ------------------------------------------- +Macro: FILE_EXISTS + Check if a file exists + + Reports "false" if the file does not exist. + +Parameters: + FILE - Path to the file + +Example: + (begin example) + // print "true" if file exists + systemChat str FILE_EXISTS("\A3\ui_f\data\igui\cfg\cursors\weapon_ca.paa"); + (end) + +Author: + commy2 +------------------------------------------- */ +#define FILE_EXISTS(FILE) (fileExists (FILE)) diff --git a/include/x/cba/addons/main/script_macros_config.hpp b/include/x/cba/addons/main/script_macros_config.hpp new file mode 100644 index 0000000..6edf5a0 --- /dev/null +++ b/include/x/cba/addons/main/script_macros_config.hpp @@ -0,0 +1,5 @@ +#define false 0 +#define true 1 + +#define private 0 +#define public 2 diff --git a/include/x/cba/addons/main/script_macros_mission.hpp b/include/x/cba/addons/main/script_macros_mission.hpp new file mode 100644 index 0000000..1d59bf0 --- /dev/null +++ b/include/x/cba/addons/main/script_macros_mission.hpp @@ -0,0 +1,85 @@ +#include "\x\cba\addons\main\script_macros_common.hpp" + +/* + Header: script_macros_mission.hpp + + Description: + Modifies script_common_macros.hpp for compatiblity with missions. + Some addon specific functionality might be lost. + + Authors: + Muzzleflash + + Changes from script_macros_mission.hpp: + Follows Standard: + Object variables: PREFIX_COMPONENT + Main-object variables: PREFIX_main + Paths: PREFIX\COMPONENT\SCRIPTNAME.sqf + Or if CUSTOM_FOLDER is defined: + CUSTOM_FOLDER\SCRIPTNAME.sqf + eg. six\sys_menu\fDate.sqf + + Usage: + Define PREFIX and COMPONENT, then include this file: + #include "\x\cba\addons\main\script_macros_mission.hpp" + +*/ + +/* + CUSTOM_FOLDER + + Custom folder to search for files in. Will not change variable names. + Default is PREFIX\COMPONENT + + Example: + (begin example) + #define CUSTOM_FOLDER MyPackage\ScriptA + (end) + + (begin example) + #define CUSTOM_FOLDER COMPONENT\functions + (end) + + +*/ + +#undef PATHTO_SYS +#undef PATHTOF_SYS +#undef PATHTOF2_SYS +#ifdef CUSTOM_FOLDER + #define PATHTO_SYS(var1,var2,var3) ##CUSTOM_FOLDER\##var3.sqf + #define PATHTOF_SYS(var1,var2,var3) ##CUSTOM_FOLDER\##var3 + #define PATHTOF2_SYS(var1,var2,var3) ##CUSTOM_FOLDER\##var3 +#else + #define PATHTO_SYS(var1,var2,var3) ##var1\##var2\##var3.sqf + #define PATHTOF_SYS(var1,var2,var3) ##var1\##var2\##var3 + #define PATHTOF2_SYS(var1,var2,var3) ##var1\##var2\##var3 +#endif + +/************************** REMOVAL OF MACROS ***********************/ + +#undef MAINPREFIX +#undef SUBPREFIX +#undef VERSION_AR +#undef VERSION_CONFIG + +#undef VERSIONING_SYS +#undef VERSIONING + +#undef PRELOAD_ADDONS + +#undef BWC_CONFIG + +#undef XEH_DISABLED +#undef XEH_PRE_INIT +#undef XEH_PRE_CINIT +#undef XEH_PRE_SINIT +#undef XEH_POST_INIT +#undef XEH_POST_CINIT +#undef XEH_POST_SINIT + +#undef PATHTO_FNC +#define PATHTO_FNC(func) class func {\ + file = QUOTE(DOUBLES(fnc,func).sqf);\ + RECOMPILE;\ +} diff --git a/include/x/cba/addons/xeh/$PBOPREFIX$ b/include/x/cba/addons/xeh/$PBOPREFIX$ new file mode 100644 index 0000000..3f514c9 --- /dev/null +++ b/include/x/cba/addons/xeh/$PBOPREFIX$ @@ -0,0 +1 @@ +x\cba\addons\xeh diff --git a/include/x/cba/addons/xeh/script_component.hpp b/include/x/cba/addons/xeh/script_component.hpp new file mode 100644 index 0000000..b938db0 --- /dev/null +++ b/include/x/cba/addons/xeh/script_component.hpp @@ -0,0 +1,103 @@ +#define COMPONENT xeh +#include "\x\cba\addons\main\script_mod.hpp" + +//#define DEBUG_ENABLED_XEH + +#ifdef DEBUG_ENABLED_XEH + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_XEH + #define DEBUG_SETTINGS DEBUG_SETTINGS_XEH +#endif + +#define DEBUG_SYNCHRONOUS +#include "\x\cba\addons\main\script_macros.hpp" + +#define XEH_LOG(msg) if (!SLX_XEH_DisableLogging) then { INFO_2("%1 %2",[ARR_3(diag_frameNo,diag_tickTime,time)],msg); } + +#define SYS_EVENTHANDLERS(type,class) format [QGVAR(%1:%2), type, class] +#define EVENTHANDLERS(type,class) (missionNamespace getVariable [SYS_EVENTHANDLERS(type,class), []]) +#define SETEVENTHANDLERS(type,class,events) (missionNamespace setVariable [SYS_EVENTHANDLERS(type,class), events]) + +// For any class that does not comply with XEH or has at least one incompatible descendant. +#define ISINCOMP(class) !isNil {GVAR(incompatible) getVariable class} +#define SETINCOMP(class) GVAR(incompatible) setVariable [class, true] + +// Event handler variables set. +#define ISPROCESSED(obj) (obj getVariable [QGVAR(isProcessed), false]) +#define SETPROCESSED(obj) obj setVariable [QGVAR(isProcessed), true] + +// Init and InitPost events done. +#define ISINITIALIZED(obj) (obj getVariable [QGVAR(isInitialized), false]) +#define SETINITIALIZED(obj) obj setVariable [QGVAR(isInitialized), true] + +#define XEH_FORMAT_CONFIG_NAME(name) format ["Extended_%1_EventHandlers", name] + +#define ISKINDOF(object,classname,allowInherit,excluded) ((allowInherit || {typeOf object == classname}) && {{object isKindOf _x} count (excluded) == 0}) + +#include "script_xeh.hpp" + +#undef XEH_ENABLED +#define XEH_ENABLED class EventHandlers {class XEH_CLASS: XEH_CLASS_BASE {};}; SLX_XEH_DISABLED = 0 + +#define XEH_EVENTS \ + "AnimChanged", \ + "AnimDone", \ + "AnimStateChanged", \ + "CargoLoaded", \ + "CargoUnloaded", \ + "ContainerClosed", \ + "ContainerOpened", \ + "ControlsShifted", \ + "Dammaged", \ + "Deleted", \ + "Disassembled", \ + "Engine", \ + "EpeContact", \ + "EpeContactEnd", \ + "EpeContactStart", \ + "Explosion", \ + "Fired", \ + "FiredBis", \ + "FiredMan", \ + "FiredNear", \ + "Fuel", \ + "Gear", \ + "GestureChanged", \ + "GestureDone", \ + "GetIn", \ + "GetInMan", \ + "GetOut", \ + "GetOutMan", \ + "Hit", \ + "HitPart", \ + "IncomingMissile", \ + "Init", \ + "InitPost", \ + "InventoryClosed", \ + "InventoryOpened", \ + "Killed", \ + "LandedTouchDown", \ + "LandedStopped", \ + "Local", \ + "OpticsModeChanged", \ + "OpticsSwitch", \ + "Put", \ + "Reloaded", \ + "Respawn", \ + "RopeAttach", \ + "RopeBreak", \ + "SeatSwitched", \ + "SeatSwitchedMan", \ + "SlotItemChanged", \ + "SoundPlayed", \ + "Suppressed", \ + "Take", \ + "TurnIn", \ + "TurnOut", \ + "VisionModeChanged", \ + "WeaponAssembled", \ + "WeaponDisassembled", \ + "WeaponDeployed", \ + "WeaponRested" diff --git a/include/x/cba/addons/xeh/script_macros_common.hpp b/include/x/cba/addons/xeh/script_macros_common.hpp new file mode 100644 index 0000000..b4b116e --- /dev/null +++ b/include/x/cba/addons/xeh/script_macros_common.hpp @@ -0,0 +1,2 @@ +// deprecated - use x\CBA\addons\main\script_macros_common.hpp instead +#include "\x\cba\addons\main\script_macros_common.hpp" diff --git a/include/x/cba/addons/xeh/script_xeh.hpp b/include/x/cba/addons/xeh/script_xeh.hpp new file mode 100644 index 0000000..9b483e8 --- /dev/null +++ b/include/x/cba/addons/xeh/script_xeh.hpp @@ -0,0 +1,132 @@ +/* + Header: script_xeh.hpp + + Description: + Used internally. +*/ +///////////////////////////////////////////////////////////////////////////////// +// MACRO: EXTENDED_EVENTHANDLERS +// Add all XEH event handlers +///////////////////////////////////////////////////////////////////////////////// + +#define EXTENDED_EVENTHANDLERS init = "call cba_xeh_fnc_init"; \ +fired = "call cba_xeh_fnc_fired"; \ +animChanged = "call cba_xeh_fnc_animChanged"; \ +animDone = "call cba_xeh_fnc_animDone"; \ +animStateChanged = "call cba_xeh_fnc_animStateChanged"; \ +cargoLoaded = "call cba_xeh_fnc_cargoLoaded"; \ +cargoUnloaded = "call cba_xeh_fnc_cargoUnloaded"; \ +containerClosed = "call cba_xeh_fnc_containerClosed"; \ +containerOpened = "call cba_xeh_fnc_containerOpened"; \ +controlsShifted = "call cba_xeh_fnc_controlsShifted"; \ +dammaged = "call cba_xeh_fnc_dammaged"; \ +deleted = "call cba_xeh_fnc_deleted"; \ +disassembled = "call cba_xeh_fnc_disassembled"; \ +engine = "call cba_xeh_fnc_engine"; \ +epeContact = "call cba_xeh_fnc_epeContact"; \ +epeContactEnd = "call cba_xeh_fnc_epeContactEnd"; \ +epeContactStart = "call cba_xeh_fnc_epeContactStart"; \ +explosion = "call cba_xeh_fnc_explosion"; \ +firedMan = "call cba_xeh_fnc_firedMan"; \ +firedNear = "call cba_xeh_fnc_firedNear"; \ +fuel = "call cba_xeh_fnc_cba_xeh_fuel"; \ +gear = "call cba_xeh_fnc_gear"; \ +gestureChanged = "call cba_xeh_fnc_gestureChanged"; \ +gestureDone = "call cba_xeh_fnc_gestureDone"; \ +getIn = "call cba_xeh_fnc_getIn"; \ +getInMan = "call cba_xeh_fnc_getInMan"; \ +getOut = "call cba_xeh_fnc_getOut"; \ +getOutMan = "call cba_xeh_fnc_getOutMan"; \ +hit = "call cba_xeh_fnc_hit"; \ +hitPart = "call cba_xeh_fnc_hitPart"; \ +incomingMissile = "call cba_xeh_fnc_incomingMissile"; \ +inventoryClosed = "call cba_xeh_fnc_inventoryClosed"; \ +inventoryOpened = "call cba_xeh_fnc_inventoryOpened"; \ +killed = "call cba_xeh_fnc_killed"; \ +landedTouchDown = "call cba_xeh_fnc_landedTouchDown"; \ +landedStopped = "call cba_xeh_fnc_landedStopped"; \ +local = "call cba_xeh_fnc_local"; \ +opticsModeChanged = "call cba_xeh_fnc_opticsModeChanged"; \ +opticsSwitch = "call cba_xeh_fnc_opticsSwitch"; \ +put = "call cba_xeh_fnc_put"; \ +reloaded = "call cba_xeh_fnc_reloaded"; \ +respawn = "call cba_xeh_fnc_respawn"; \ +ropeAttach = "call cba_xeh_fnc_ropeAttach"; \ +ropeBreak = "call cba_xeh_fnc_ropeBreak"; \ +seatSwitched = "call cba_xeh_fnc_seatSwitched"; \ +seatSwitchedMan = "call cba_xeh_fnc_seatSwitchedMan"; \ +slotItemChanged = "call cba_xeh_fnc_slotItemChanged"; \ +suppressed = "call cba_xeh_fnc_suppressed"; \ +soundPlayed = "call cba_xeh_fnc_soundPlayed"; \ +take = "call cba_xeh_fnc_take"; \ +turnIn = "call cba_xeh_fnc_turnIn"; \ +turnOut = "call cba_xeh_fnc_turnOut"; \ +visionModeChanged = "call cba_xeh_fnc_visionModeChanged"; \ +weaponAssembled = "call cba_xeh_fnc_weaponAssembled"; \ +weaponDisassembled = "call cba_xeh_fnc_weaponDisassembled"; \ +weaponDeployed = "call cba_xeh_fnc_weaponDeployed"; \ +weaponRested = "call cba_xeh_fnc_weaponRested"; + + +/* + MACRO: DELETE_EVENTHANDLERS + + Removes all event handlers. +*/ + +#define DELETE_EVENTHANDLERS init = ""; \ +fired = ""; \ +animChanged = ""; \ +animDone = ""; \ +animStateChanged = ""; \ +cargoLoaded = ""; \ +cargoUnloaded = ""; \ +containerClosed = ""; \ +containerOpened = ""; \ +controlsShifted = ""; \ +dammaged = ""; \ +deleted = ""; \ +disassembled = ""; \ +engine = ""; \ +epeContact = ""; \ +epeContactEnd = ""; \ +epeContactStart = ""; \ +explosion = ""; \ +firedMan = ""; \ +firedNear = ""; \ +fuel = ""; \ +gear = ""; \ +gestureChanged = ""; \ +gestureDone = "" \ +getIn = ""; \ +getInMan = ""; \ +getOut = ""; \ +getOutMan = ""; \ +hit = ""; \ +hitPart = ""; \ +incomingMissile = ""; \ +inventoryClosed = ""; \ +inventoryOpened = ""; \ +killed = ""; \ +landedTouchDown = ""; \ +landedStopped = ""; \ +local = ""; \ +opticsModeChanged = ""; \ +opticsSwitch = ""; \ +put = ""; \ +reloaded = ""; \ +respawn = ""; \ +ropeAttach = ""; \ +ropeBreak = ""; \ +seatSwitched = ""; \ +seatSwitchedMan = ""; \ +soundPlayed = ""; \ +suppressed = ""; \ +take = ""; \ +turnIn = ""; \ +turnOut = ""; \ +visionModeChanged = ""; \ +weaponAssembled = ""; \ +weaponDisassembled = ""; \ +weaponDeployed = ""; \ +weaponRested = ""; diff --git a/include/z/ace/addons/common/$PBOPREFIX$ b/include/z/ace/addons/common/$PBOPREFIX$ new file mode 100644 index 0000000..a119c03 --- /dev/null +++ b/include/z/ace/addons/common/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\common \ No newline at end of file diff --git a/include/z/ace/addons/common/script_component.hpp b/include/z/ace/addons/common/script_component.hpp new file mode 100644 index 0000000..a5c9744 --- /dev/null +++ b/include/z/ace/addons/common/script_component.hpp @@ -0,0 +1,32 @@ +#define COMPONENT common +#define COMPONENT_BEAUTIFIED Common +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_COMMON + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_COMMON + #define DEBUG_SETTINGS DEBUG_SETTINGS_COMMON +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +// just kept for BWC, canDig now uses GVAR(canDigSurfaces) +#define DIG_SURFACE_BLACKLIST [ \ + "concrete", "concrete_exp", "concrete_int", "int_concrete", "int_concrete_exp", \ + "pavement_exp", "int_pavement_exp", \ + "tiling", "tiles_int", "int_tiles", \ + "roof_tin", "roof_tiles", "rooftiles_exp", \ + "tarmac", "asphalt_exp", \ + "stones_exp", "rock", "stony", \ + "metal", "gridmetal_exp", "metalplate_exp", "int_metalplate_exp", "metal_int", "wavymetal", "wavymetal_exp", "int_metal", "steel_exp", \ + "lino_exp", "int_lino_exp", "int_mat_exp", \ + "wood", "wood_int", "int_wood", "softwood_exp", "int_softwood_exp", "int_solidwood_exp" \ +] + +#define DIG_SURFACE_WHITELIST ["grass", "grasstall_exp", "forest_exp", "snow"] diff --git a/include/z/ace/addons/main/$PBOPREFIX$ b/include/z/ace/addons/main/$PBOPREFIX$ new file mode 100644 index 0000000..f19bbb9 --- /dev/null +++ b/include/z/ace/addons/main/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\main \ No newline at end of file diff --git a/include/z/ace/addons/main/script_component.hpp b/include/z/ace/addons/main/script_component.hpp new file mode 100644 index 0000000..c88928f --- /dev/null +++ b/include/z/ace/addons/main/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT main +#define COMPONENT_BEAUTIFIED Main +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_MAIN + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MAIN + #define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/include/z/ace/addons/main/script_debug.hpp b/include/z/ace/addons/main/script_debug.hpp new file mode 100644 index 0000000..72b6657 --- /dev/null +++ b/include/z/ace/addons/main/script_debug.hpp @@ -0,0 +1,58 @@ +/** +Fast Recompiling via function +**/ +// #define DISABLE_COMPILE_CACHE +// To Use: [] call ACE_PREP_RECOMPILE; + +#ifdef DISABLE_COMPILE_CACHE + #define LINKFUNC(x) {_this call FUNC(x)} + #define PREP_RECOMPILE_START if (isNil "ACE_PREP_RECOMPILE") then {ACE_RECOMPILES = []; ACE_PREP_RECOMPILE = {{call _x} forEach ACE_RECOMPILES;}}; private _recomp = { + #define PREP_RECOMPILE_END }; call _recomp; ACE_RECOMPILES pushBack _recomp; +#else + #define LINKFUNC(x) FUNC(x) + #define PREP_RECOMPILE_START ; /* disabled */ + #define PREP_RECOMPILE_END ; /* disabled */ +#endif + + +/** +STACK TRACING +**/ +//#define ENABLE_CALLSTACK +//#define ENABLE_PERFORMANCE_COUNTERS +//#define DEBUG_EVENTS + +#ifdef ENABLE_CALLSTACK + #define CALLSTACK(function) {if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'ANON', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'ANON'; private _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} + #define CALLSTACK_NAMED(function, functionName) {if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, functionName, _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = functionName; private _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} + #define DUMPSTACK ([__FILE__, __LINE__] call ACE_DUMPSTACK_FNC) + + #define FUNC(var1) {if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(ADDON,fnc,var1)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(ADDON,fnc,var1)'; private _ret = _this call TRIPLES(ADDON,fnc,var1); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} + #define EFUNC(var1,var2) {if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)'; private _ret = _this call TRIPLES(DOUBLES(PREFIX,var1),fnc,var2); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} +#else + #define CALLSTACK(function) function + #define CALLSTACK_NAMED(function, functionName) function + #define DUMPSTACK ; /* disabled */ +#endif + + +/** +PERFORMANCE COUNTERS SECTION +**/ +//#define ENABLE_PERFORMANCE_COUNTERS +// To Use: [] call ace_common_fnc_dumpPerformanceCounters; + +#ifdef ENABLE_PERFORMANCE_COUNTERS + #define CBA_fnc_addPerFrameHandler { _ret = [(_this select 0), (_this select 1), (_this select 2), #function] call CBA_fnc_addPerFrameHandler; if(isNil "ACE_PFH_COUNTER" ) then { ACE_PFH_COUNTER=[]; }; ACE_PFH_COUNTER pushBack [[_ret, __FILE__, __LINE__], [(_this select 0), (_this select 1), (_this select 2)]]; _ret } + + #define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter)); + #define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime]; + #define END_COUNTER(x) GVAR(DOUBLES(x,counter)) pushBack [(GVAR(DOUBLES(x,counter)) select 2), diag_tickTime]; + + #define DUMP_COUNTERS ([__FILE__, __LINE__] call ACE_DUMPCOUNTERS_FNC) +#else + #define CREATE_COUNTER(x) ; /* disabled */ + #define BEGIN_COUNTER(x) ; /* disabled */ + #define END_COUNTER(x) ; /* disabled */ + #define DUMP_COUNTERS ; /* disabled */ +#endif diff --git a/include/z/ace/addons/main/script_macros.hpp b/include/z/ace/addons/main/script_macros.hpp new file mode 100644 index 0000000..495d592 --- /dev/null +++ b/include/z/ace/addons/main/script_macros.hpp @@ -0,0 +1,179 @@ +#define DEBUG_SYNCHRONOUS +#include "\x\cba\addons\main\script_macros_common.hpp" +#include "\x\cba\addons\xeh\script_xeh.hpp" + +// Default versioning level +#define DEFAULT_VERSIONING_LEVEL 2 + +#define DGVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(GVAR(varName)) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(GVAR(varName))); }; GVAR(varName) +#define DVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(varName) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(varName)); }; varName +#define DFUNC(var1) TRIPLES(ADDON,fnc,var1) +#define DEFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2) + +#undef QFUNC +#undef QEFUNC +#define QFUNC(var1) QUOTE(DFUNC(var1)) +#define QEFUNC(var1,var2) QUOTE(DEFUNC(var1,var2)) + +#define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)] +#define SETVAR_SYS(var1,var2) setVariable [ARR_2(QUOTE(var1),var2)] +#define SETPVAR_SYS(var1,var2) setVariable [ARR_3(QUOTE(var1),var2,true)] + +#undef GETVAR +#define GETVAR(var1,var2,var3) (var1 GETVAR_SYS(var2,var3)) +#define GETMVAR(var1,var2) (missionNamespace GETVAR_SYS(var1,var2)) +#define GETUVAR(var1,var2) (uiNamespace GETVAR_SYS(var1,var2)) +#define GETPRVAR(var1,var2) (profileNamespace GETVAR_SYS(var1,var2)) +#define GETPAVAR(var1,var2) (parsingNamespace GETVAR_SYS(var1,var2)) + +#undef SETVAR +#define SETVAR(var1,var2,var3) var1 SETVAR_SYS(var2,var3) +#define SETPVAR(var1,var2,var3) var1 SETPVAR_SYS(var2,var3) +#define SETMVAR(var1,var2) missionNamespace SETVAR_SYS(var1,var2) +#define SETUVAR(var1,var2) uiNamespace SETVAR_SYS(var1,var2) +#define SETPRVAR(var1,var2) profileNamespace SETVAR_SYS(var1,var2) +#define SETPAVAR(var1,var2) parsingNamespace SETVAR_SYS(var1,var2) + +#define GETGVAR(var1,var2) GETMVAR(GVAR(var1),var2) +#define GETEGVAR(var1,var2,var3) GETMVAR(EGVAR(var1,var2),var3) + +#define ARR_SELECT(ARRAY,INDEX,DEFAULT) (if (count ARRAY > INDEX) then {ARRAY select INDEX} else {DEFAULT}) +#define ANY_OF(ARRAY,CONDITION) (ARRAY findIf {CONDITION} != -1) + +// ACEX Merge +#define ACEX_PREFIX acex +#define XADDON DOUBLES(ACEX_PREFIX,COMPONENT) +#define XGVAR(var) DOUBLES(XADDON,var) +#define EXGVAR(var1,var2) TRIPLES(ACEX_PREFIX,var1,var2) +#define QXGVAR(var) QUOTE(XGVAR(var)) +#define QEXGVAR(var1,var2) QUOTE(EXGVAR(var1,var2)) +#define QQXGVAR(var) QUOTE(QXGVAR(var)) +#define QQEXGVAR(var1,var2) QUOTE(QEXGVAR(var1,var2)) +#define ACEX_PREP(func) PREP(func); TRIPLES(XADDON,fnc,func) = DFUNC(func) + + +#define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \ + weapon = #WEAPON; \ + count = COUNT; \ +} + +#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \ + name = #ITEM; \ + count = COUNT; \ +} + +#define MACRO_ADDMAGAZINE(MAGAZINE,COUNT) class _xx_##MAGAZINE { \ + magazine = #MAGAZINE; \ + count = COUNT; \ +} + +#define MACRO_ADDBACKPACK(BACKPACK,COUNT) class _xx_##BACKPACK { \ + backpack = #BACKPACK; \ + count = COUNT; \ +} + +// weapon types +#define TYPE_WEAPON_PRIMARY 1 +#define TYPE_WEAPON_HANDGUN 2 +#define TYPE_WEAPON_SECONDARY 4 +// magazine types +#define TYPE_MAGAZINE_HANDGUN_AND_GL 16 // mainly +#define TYPE_MAGAZINE_PRIMARY_AND_THROW 256 +#define TYPE_MAGAZINE_SECONDARY_AND_PUT 512 // mainly +#define TYPE_MAGAZINE_MISSILE 768 +// more types +#define TYPE_BINOCULAR_AND_NVG 4096 +#define TYPE_WEAPON_VEHICLE 65536 +#define TYPE_ITEM 131072 +// item types +#define TYPE_DEFAULT 0 +#define TYPE_MUZZLE 101 +#define TYPE_OPTICS 201 +#define TYPE_FLASHLIGHT 301 +#define TYPE_BIPOD 302 +#define TYPE_FIRST_AID_KIT 401 +#define TYPE_FINS 501 // not implemented +#define TYPE_BREATHING_BOMB 601 // not implemented +#define TYPE_NVG 602 +#define TYPE_GOGGLE 603 +#define TYPE_SCUBA 604 // not implemented +#define TYPE_HEADGEAR 605 +#define TYPE_FACTOR 607 +#define TYPE_MAP 608 +#define TYPE_COMPASS 609 +#define TYPE_WATCH 610 +#define TYPE_RADIO 611 +#define TYPE_GPS 612 +#define TYPE_HMD 616 +#define TYPE_BINOCULAR 617 +#define TYPE_MEDIKIT 619 +#define TYPE_TOOLKIT 620 +#define TYPE_UAV_TERMINAL 621 +#define TYPE_VEST 701 +#define TYPE_UNIFORM 801 +#define TYPE_BACKPACK 901 + +#ifdef DISABLE_COMPILE_CACHE + #undef PREP + #define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,fncName).sqf) +#else + #undef PREP + #define PREP(fncName) [QPATHTOF(functions\DOUBLES(fnc,fncName).sqf), QFUNC(fncName)] call CBA_fnc_compileFunction +#endif + +#define PREP_MODULE(folder) [] call compile preprocessFileLineNumbers QPATHTOF(folder\__PREP__.sqf) + +#define ACE_isHC (!hasInterface && !isDedicated) + +#define IDC_STAMINA_BAR 193 + +#define ACE_DEPRECATED(arg1,arg2,arg3) WARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3",arg1,arg2,arg3) + +#define PFORMAT_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7, G=%8, H=%9, I=%10 J=%11', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F), RETNIL(G), RETNIL(H), RETNIL(I), RETNIL(J)] +#ifdef DEBUG_MODE_FULL +#define TRACE_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_10(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E,F,G,H,I,J)) +#else + #define TRACE_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) /* disabled */ +#endif + +#define GRAVITY 9.8066 + +#define SD_TO_MIN_MAX(d) ((d) * 3.371) // Standard deviation -> min / max of random [min, mid, max] + +// Angular unit conversion +// Conversion factor: 54 / (5 * PI) +#define MRAD_TO_MOA(d) ((d) * 3.43774677) +// Conversion factor: (5 * PI) / 54 +#define MOA_TO_MRAD(d) ((d) * 0.29088821) +// Conversion factor: 60 +#define DEG_TO_MOA(d) ((d) * 60) +// Conversion factor: 1 / 60 +#define MOA_TO_DEG(d) ((d) / 60) +// Conversion factor: (50 * PI) / 9 +#define DEG_TO_MRAD(d) ((d) * 17.45329252) +// Conversion factor: 9 / (50 * PI) +#define MRAD_TO_DEG(d) ((d) / 17.45329252) +// Conversion factor: PI / 10800 +#define MOA_TO_RAD(d) ((d) * 0.00029088) + +#define ZEUS_ACTION_CONDITION ([_target, {QUOTE(QUOTE(ADDON)) in curatorAddons _this}, missionNamespace, QUOTE(QGVAR(zeusCheck)), 1E11, 'ace_interactMenuClosed'] call EFUNC(common,cachedCall)) + +#define SUBSKILLS ["aimingAccuracy", "aimingShake", "aimingSpeed", "spotDistance", "spotTime", "courage", "reloadSpeed", "commanding", "general"] + +// macro add a dummy cfgPatch and notLoaded entry +#define ACE_PATCH_NOT_LOADED(NAME,CAUSE) \ +class CfgPatches { \ + class DOUBLES(NAME,notLoaded) { \ + units[] = {}; \ + weapons[] = {}; \ + requiredVersion = REQUIRED_VERSION; \ + requiredAddons[] = {"ace_main"}; \ + VERSION_CONFIG; \ + }; \ +}; \ +class ace_notLoaded { \ + NAME = CAUSE; \ +}; + +#include "script_debug.hpp" diff --git a/include/z/ace/addons/main/script_mod.hpp b/include/z/ace/addons/main/script_mod.hpp new file mode 100644 index 0000000..42d110f --- /dev/null +++ b/include/z/ace/addons/main/script_mod.hpp @@ -0,0 +1,23 @@ +// COMPONENT should be defined in the script_component.hpp and included BEFORE this hpp + +#define MAINPREFIX z +#define PREFIX ace + +#include "script_version.hpp" + +#define VERSION MAJOR.MINOR +#define VERSION_STR MAJOR.MINOR.PATCHLVL.BUILD +#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD + +// MINIMAL required version for the Mod. Components can specify others.. +#define REQUIRED_VERSION 2.18 +#define REQUIRED_CBA_VERSION {3,18,0} + +#ifndef COMPONENT_BEAUTIFIED + #define COMPONENT_BEAUTIFIED COMPONENT +#endif +#ifdef SUBCOMPONENT_BEAUTIFIED + #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED - SUBCOMPONENT_BEAUTIFIED) +#else + #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) +#endif diff --git a/include/z/ace/addons/main/script_version.hpp b/include/z/ace/addons/main/script_version.hpp new file mode 100644 index 0000000..6917de8 --- /dev/null +++ b/include/z/ace/addons/main/script_version.hpp @@ -0,0 +1,4 @@ +#define MAJOR 3 +#define MINOR 18 +#define PATCHLVL 1 +#define BUILD 91 diff --git a/main.go b/main.go new file mode 100644 index 0000000..ba76288 --- /dev/null +++ b/main.go @@ -0,0 +1,92 @@ +package main + +import ( + "encoding/json" + "fmt" + "log" + "os" + "path/filepath" + + "code.gitea.io/sdk/gitea" +) + +type VersionInfo struct { + Version string `json:"version"` +} + +func main() { + client, err := createGiteaClient() + if err != nil { + log.Fatalf("Error creating Gitea client: %v", err) + } + + version := os.Getenv("VERSION") + if version == "" { + log.Fatalf("VERSION environment variable is not set") + } + + if err := updateVersionFile(version); err != nil { + log.Fatalf("Error updating version file: %v", err) + } + + repoOwner := "IDSolutions" + repoName := "client" + + release, err := createRelease(client, repoOwner, repoName, version) + if err != nil { + log.Fatalf("Error creating release: %v", err) + } + + // Construct the filename using the version + artifactFilename := fmt.Sprintf("forge_client-%s.zip", version) + artifactPath := filepath.Join("releases", artifactFilename) + + if err := uploadArtifact(client, repoOwner, repoName, release.ID, artifactPath); err != nil { + log.Fatalf("Error uploading release asset: %v", err) + } + + fmt.Println("Release created, artifact uploaded, and version file updated successfully!") +} + +func updateVersionFile(version string) error { + versionInfo := VersionInfo{Version: version} + jsonData, err := json.MarshalIndent(versionInfo, "", " ") + if err != nil { + return fmt.Errorf("error marshaling version info: %w", err) + } + + err = os.WriteFile("forge_factions_version.json", jsonData, 0644) + if err != nil { + return fmt.Errorf("error writing version file: %w", err) + } + + return nil +} + +func createGiteaClient() (*gitea.Client, error) { + token := os.Getenv("GITHUB_TOKEN") + if token == "" { + return nil, fmt.Errorf("GITHUB_TOKEN environment variable is not set") + } + return gitea.NewClient("https://gitea.innovativedevsolutions.org", gitea.SetToken(token)) +} + +func createRelease(client *gitea.Client, owner, repo, version string) (*gitea.Release, error) { + release, _, err := client.CreateRelease(owner, repo, gitea.CreateReleaseOption{ + TagName: version, + Title: fmt.Sprintf("FORGE Client v%s", version), + Note: fmt.Sprintf("Release notes for version %s", version), + }) + return release, err +} + +func uploadArtifact(client *gitea.Client, owner, repo string, releaseID int64, artifactPath string) error { + file, err := os.Open(artifactPath) + if err != nil { + return fmt.Errorf("error opening artifact file: %w", err) + } + defer file.Close() + + _, _, err = client.CreateReleaseAttachment(owner, repo, releaseID, file, filepath.Base(artifactPath)) + return err +} diff --git a/mod.cpp b/mod.cpp new file mode 100644 index 0000000..874df33 --- /dev/null +++ b/mod.cpp @@ -0,0 +1,12 @@ +name = "FORGE Client"; +author = "IDSolutions"; +picture = "title_co.paa"; +logoSmall = "icon_64_ca.paa"; +logo = "icon_128_ca.paa"; +logoOver = "icon_128_highlight_ca.paa"; +tooltip = "IDS"; +tooltipOwned = "IDS Owned"; +overview = "FORGE Client - Official Modification"; +description = "IDS Client - Version 1.0.0"; +action = "https://innovativedevsolutions.org"; +actionName = "Website"; \ No newline at end of file diff --git a/title_co.paa b/title_co.paa new file mode 100644 index 0000000..98456d4 Binary files /dev/null and b/title_co.paa differ diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py new file mode 100644 index 0000000..2d67252 --- /dev/null +++ b/tools/sqf_validator.py @@ -0,0 +1,187 @@ +#!/usr/bin/env python3 + +import fnmatch +import os +import re +import sys + +def valid_keyword_after_code(content, index): + for word in ["for", "do", "count", "each", "forEach", "else", "and", "not", "isEqualTo", "isNotEqualTo", "in", "call", "spawn", "execVM", "catch", "param", "select", "apply", "findIf", "remoteExec"]: + if content.find(word, index, index + len(word)) != -1: + return True + + return False + +def check_sqf(filepath): + errors = [] + + with open(filepath, "r", encoding = "utf-8", errors = "ignore") as file: + content = file.read() + + # Store all brackets we find in this file, so we can validate everything on the end + brackets = [] + + # Used in case we are in a line comment (//) + ignore_till_eol = False + + # To check if we are in a comment block + in_comment_block = False + check_if_comment = False + + # Used in case we are in a comment block (/* */) + # This is true if we detect a * inside a comment block + # If the next character is a /, it means we end our comment block + check_if_closing = False + + # We ignore everything inside a string + in_string = False + + # Used to store the starting type of a string, so we can match that to the end of a string + string_type = "" + + # Used to check for semicolon after code blocks + last_is_curly_brace = False + check_for_semicolon = False + + # Extra information so we know what line we find errors at + line_number = 1 + + char_index = 0 + + for c in content: + if last_is_curly_brace: + last_is_curly_brace = False + + # Test generates false positives with binary commands that take CODE as 2nd arg (e.g. findIf) + check_for_semicolon = not re.search("findIf", content, re.IGNORECASE) + + # Keep track of current line number + if c == "\n": + line_number += 1 + + # While we are in a string, we can ignore everything else, except the end of the string + if in_string: + if c == string_type: + in_string = False + + # Look for the end of this comment block + elif in_comment_block: + if c == "*": + check_if_closing = True + elif check_if_closing: + if c == "/": + in_comment_block = False + elif c != "*": + check_if_closing = False + + # If we are not in a comment block, we will check if we are at the start of one or count the () {} and [] + else: + # This means we have encountered a /, so we are now checking if this is an inline comment or a comment block + if check_if_comment: + check_if_comment = False + + # If the next character after / is a *, we are at the start of a comment block + if c == "*": + in_comment_block = True + + # Otherwise, check if we are in an line comment, / followed by another / (//) + elif c == "/": + ignore_till_eol = True + + if not in_comment_block: + if ignore_till_eol: + # We are in a line comment, just continue going through the characters until we find an end of line + if c == "\n": + ignore_till_eol = False + else: + if c == '"' or c == "'": + in_string = True + string_type = c + elif c == "/": + check_if_comment = True + elif c == "\t": + errors.append(" ERROR: Found a tab on line {}.".format(line_number)) + elif c in ["(", "[", "{"]: + brackets.append(c) + elif c == ")": + if not brackets or brackets[-1] in ["[", "{"]: + errors.append(" ERROR: Missing parenthesis '(' on line {}.".format(line_number)) + brackets.append(c) + elif c == "]": + if not brackets or brackets[-1] in ["(", "{"]: + errors.append(" ERROR: Missing square bracket '[' on line {}.".format(line_number)) + brackets.append(c) + elif c == "}": + last_is_curly_brace = True + + if not brackets or brackets[-1] in ["(", "["]: + errors.append(" ERROR: Missing curly brace '{{' on line {}.".format(line_number)) + brackets.append(c) + + if check_for_semicolon: + # Keep reading until no white space or comments + if c not in [" ", "\t", "\n", "/"]: + check_for_semicolon = False + if c not in ["]", ")", "}", ";", ",", "&", "!", "|", "="] and not valid_keyword_after_code(content, char_index): + errors.append(" ERROR: Possible missing semicolon ';' on line {}.".format(line_number)) + + char_index += 1 + + # Compare opening and closing bracket counts + if brackets.count("(") != brackets.count(")"): + errors.append(" ERROR: Unequal number of parentheses, '(' = {}, ')' = {}.".format(brackets.count("("), brackets.count(")"))) + + if brackets.count("[") != brackets.count("]"): + errors.append(" ERROR: Unequal number of square brackets, '[' = {}, ']' = {}.".format(brackets.count("["), brackets.count("]"))) + + if brackets.count("{") != brackets.count("}"): + errors.append(" ERROR: Unequal number of curly braces, '{{' = {}, '}}' = {}.".format(brackets.count("{"), brackets.count("}"))) + + # Ensure includes are before block comments + if re.compile('\s*(/\*[\s\S]+?\*/)\s*#include').match(content): + errors.append(" ERROR: Found an #include after a block comment.") + + return errors + +def main(): + print("Validating SQF") + print("--------------") + + # Allow running from root directory and tools directory + root_dir = ".." + if os.path.exists("addons"): + root_dir = "." + + # Check all SQF files in the project directory + sqf_files = [] + + for root, _, files in os.walk(root_dir): + for file in fnmatch.filter(files, "*.sqf"): + sqf_files.append(os.path.join(root, file)) + + sqf_files.sort() + + bad_count = 0 + + for filepath in sqf_files: + errors = check_sqf(filepath) + + if errors: + print("\nFound {} error(s) in {}:".format(len(errors), os.path.relpath(filepath, root_dir))) + + for error in errors: + print(error) + + bad_count += 1 + + print("\nChecked {} files, found errors in {}.".format(len(sqf_files), bad_count)) + + if bad_count == 0: + print("SQF Validation PASSED") + else: + print("SQF Validation FAILED") + + return bad_count + +if __name__ == "__main__": + sys.exit(main()) \ No newline at end of file diff --git a/tools/version_bumper.py b/tools/version_bumper.py new file mode 100644 index 0000000..460b93d --- /dev/null +++ b/tools/version_bumper.py @@ -0,0 +1,146 @@ +# Based on Arma 3 make.py +# https://github.com/acemod/arma-project-template/blob/master/tools/make.py + +__version__ = "0.1" + +import re +import subprocess +import sys +import os + +# Check Python version +if sys.version_info[0] != 3: + print("Python 3 is required.") + sys.exit(1) + +# Globals +push_commit = False +framework_version = "0.0.0.0" + + +def bump_version(version_increments=[]): + if not version_increments: + print("No increment was given. Please provide one of the following:") + print("'increment_major', 'increment_minor', 'increment_patch', 'increment_build'") + sys.exit(1) + + global framework_version + version_stamp = framework_version + + try: + from pathlib import Path + + script_path = Path(__file__).parents[1] + script_version_path = os.path.join(script_path, "addons/main/script_version.hpp") + + if os.path.isfile(script_version_path): + file = open(script_version_path, "r") + hpp_text = file.read() + file.close() + + if hpp_text: + major_text = re.search(r"#define MAJOR (.*\b)", hpp_text).group(1) + minor_text = re.search(r"#define MINOR (.*\b)", hpp_text).group(1) + patch_text = re.search(r"#define PATCH (.*\b)", hpp_text).group(1) + build_text = re.search(r"#define BUILD (.*\b)", hpp_text).group(1) + + print("Current version: {}.{}.{}.{}".format(major_text, minor_text, patch_text, build_text)) + + if version_increments: + if "major" in version_increments: + major_text = int(major_text) + 1 + minor_text = 0 + patch_text = 0 + elif "minor" in version_increments: + minor_text = int(minor_text) + 1 + patch_text = 0 + elif "patch" in version_increments: + patch_text = int(patch_text) + 1 + + # Always increment build + build_text = int(build_text) + 1 + + version_stamp = "{}.{}.{}.{}".format(major_text, minor_text, patch_text, build_text) + print("Incrementing version to {}".format(version_stamp)) + + with open(script_version_path, "w", newline="\n") as file: + file.writelines([ + "#define MAJOR {}\n".format(major_text), + "#define MINOR {}\n".format(minor_text), + "#define PATCH {}\n".format(patch_text), + "#define BUILD {}\n".format(build_text) + ]) + + else: + print("Version file is missing or cannot be accessed.") + sys.exit(1) + + except Exception as e: + print("Error in get_version(): {}".format(e)) + print("Check the integrity of the file: {}".format(script_version_path)) + print("Resetting to the default version stamp: {}".format(version_stamp)) + sys.exit(1) + + framework_version = version_stamp + + # Set environment variable + subprocess.call("echo '::set-output name=VERSION::{}'".format(framework_version), shell=True) + + git_push() + + +def git_push(): + if not push_commit: + print("Skipping pushing commit...") + return + + print("Pushing to remote...") + + # Set up credentials + subprocess.call(["git", "config", "--local", "user.name", "github-actions"]) + subprocess.call(["git", "config", "--local", "user.email", "actions@no-reply.github.com"]) + + # Push commit + commit_msg = "v" + ".".join(framework_version.split(".")[0:3]) + " Build " + framework_version.split(".")[3] + + subprocess.call(["git", "add", "-A"]) + subprocess.call(["git", "commit", "-m", commit_msg]) + subprocess.call(["git", "push", "origin", "master"]) + + print("Pushed commit to master: {}".format(commit_msg)) + + +def main(argv): + print("This is version_bumper.py for MalFramework, based on the original make.py script by Ryan Schultz.") + + global push_commit + global framework_version + + # Which part of the version should be incremented + version_increments = [] + if "increment_build" in argv: + argv.remove("increment_build") + version_increments.append("build") + if "increment_patch" in argv: + argv.remove("increment_patch") + version_increments.append("patch") + if "increment_minor" in argv: + argv.remove("increment_minor") + version_increments.append("minor") + if "increment_major" in argv: + argv.remove("increment_major") + version_increments.append("major") + + # Should push a commit to master + if "push_commit" in argv: + argv.remove("push_commit") + push_commit = True + + bump_version(version_increments) + + +if __name__ == "__main__": + main(sys.argv) + + print("Building successful.") + sys.exit(0) \ No newline at end of file