Commit Graph
100 Commits
Author SHA1 Message Date
Asdow 622cffce82 Use #define instead of magic numbers 2026-01-03 17:27:43 +02:00
Asdow 5ed79c3edb Fix email sorting
* Simplify pSubject copying else ifs
* Formatting
2026-01-03 17:27:43 +02:00
Asdow fe69dba958 Add missing email 2026-01-03 17:27:43 +02:00
Asdow f8b6ee1672 Use externalized emails 2026-01-03 17:27:43 +02:00
Asdow 30070035cc Correct pSubject size 2026-01-03 17:27:43 +02:00
Asdow ff3079ff23 Formatting 2026-01-03 17:27:43 +02:00
Asdow aba3688b4b Add framework for adding externalized emails
Emails from new GameDir file TableData/Email/Emails.xml can be added via lua scripting using calls to AddEmailFromXML & AddPreReadEmailFromXML. The order of emails in Emails.xml acts as the index to be referenced and provided when calling lua  functions.

An error message  will be displayed if an email is added with an out-of-scope index but game will be able to continue.

Localization is supported and was tested on Chinese localization.
2026-01-03 17:27:43 +02:00
Asdow d6b30c6f43 Add #ifdef for cheats.h include 2025-12-09 00:35:18 +02:00
Asdow 4fcf03d31a Include cleanup Tactical/.*cpp 2025-12-09 00:35:18 +02:00
Asdow 03edc532e1 Clean up Strategic/*:cpp includes 2025-12-09 00:35:18 +02:00
Asdow 1db41f4c36 Fix helicopter airspace view when switching to travel mode
* Clicking destination column in teamlist for a squad in a helicopter will switch to first airspace view that shows safe / unsafe air sectors instead of the second sector.

* Clicking destination column in teamlist for a squad not in a helicopter while in either airspace view will now correctly turn it off
2025-12-04 23:06:08 +02:00
Asdow b226f2a21d set functions static 2025-12-03 23:52:05 +02:00
Asdow 6629562b34 Formatting 2025-12-03 23:52:05 +02:00
Asdow 91d7620c0b include cleanup 2025-12-03 23:52:05 +02:00
Asdow c341402fe1 set functions static 2025-12-03 23:52:05 +02:00
Asdow 80b1af930a include cleanup 2025-12-03 23:52:05 +02:00
Asdow 608eb8e4e6 set functions static 2025-12-03 23:52:05 +02:00
Asdow ec1c6fc112 include cleanup 2025-12-03 23:52:05 +02:00
Asdow 4fabab680f set functions static 2025-12-03 23:52:05 +02:00
Asdow def815988b include cleanup 2025-12-03 23:52:05 +02:00
Asdow 21df179941 Set function static 2025-12-03 23:52:05 +02:00
Asdow ff674e79b9 Set function static 2025-12-03 23:52:05 +02:00
Asdow 9efa5e1108 Include cleanup 2025-12-03 23:52:05 +02:00
Asdow c235345a22 formatting 2025-12-03 23:52:05 +02:00
Asdow 97791bfcc3 include cleanup 2025-12-03 23:52:05 +02:00
Asdow d49185c291 Move nullptr check to be checked first
Kinda defeats the purpose of checking for nullptr if we dereference it before the check, no?
2025-12-03 23:52:05 +02:00
Asdow 41eba8ff3a include cleanup 2025-12-03 23:52:05 +02:00
Asdow 2fd5e2c255 set functions static 2025-12-03 23:52:05 +02:00
Asdow a83bb00d52 include cleanup 2025-12-03 23:52:05 +02:00
Asdow cb27d0cd72 Set functions static 2025-12-03 23:52:05 +02:00
Asdow 020cd270c0 include cleanup 2025-12-03 23:52:05 +02:00
Asdow a6e1b93af0 Set functions static 2025-12-03 23:52:05 +02:00
Asdow 5dd4043f00 Formatting 2025-12-03 23:52:05 +02:00
Asdow 61f8efaac0 include cleanup 2025-12-03 23:52:05 +02:00
Asdow 3ee22bdb31 Set functions static 2025-12-03 23:52:05 +02:00
Asdow 032ac8e566 Remove forward declarations that are included already 2025-12-03 23:52:05 +02:00
Asdow 1e78fc68bc Formatting 2025-12-03 23:52:05 +02:00
Asdow a074dbf3ee include cleanup 2025-12-03 23:52:05 +02:00
Asdow 9cfcfac376 include cleanup 2025-12-03 23:52:05 +02:00
Asdow fb8feca896 include cleanup 2025-12-03 23:52:05 +02:00
Asdow be70cd18a2 Formatting 2025-12-03 23:52:05 +02:00
Asdow 6a1b84e53b include cleanup 2025-12-03 23:52:05 +02:00
Asdow 584e10d14f include cleanup 2025-12-03 23:52:05 +02:00
Asdow 4f0f6f9f23 set function static 2025-12-03 23:52:05 +02:00
Asdow 2f13ef79b6 Remove unused function declaration 2025-12-03 23:52:05 +02:00
Asdow f8f9c18cda Remove duplicate includes 2025-12-03 23:52:05 +02:00
Asdow 37c081f3db Formatting 2025-12-03 23:52:05 +02:00
Asdow e684f61f55 include cleanup 2025-12-03 23:52:05 +02:00
Asdow c2f4ca5da1 Set functions static 2025-12-03 23:52:05 +02:00
Asdow 5befb47881 Include cleanup 2025-12-03 23:52:05 +02:00
Asdow 780831611d Remove unused #defines 2025-12-03 23:52:05 +02:00
Asdow bb13225778 Include cleanup 2025-12-03 23:52:05 +02:00
Asdow 2f62d6fe44 Set functions static 2025-12-03 23:52:05 +02:00
Asdow 6e94ac144b formatting 2025-12-03 23:52:05 +02:00
Asdow 6e45ca9825 include cleanup 2025-12-03 23:52:05 +02:00
Asdow 142de9b02e Formatting 2025-12-03 23:52:05 +02:00
Asdow 7a024aecd7 include cleanup 2025-12-03 23:52:05 +02:00
Asdow c81d290957 Remove duplicate include 2025-12-03 23:52:05 +02:00
Asdow 3c498abe82 Set function static 2025-12-03 23:52:05 +02:00
Asdow fdf494c28a Remove unused LaserLock system 2025-12-03 23:52:05 +02:00
Asdow b903ead06a Formatting 2025-12-03 23:52:05 +02:00
Asdow 591a1a63c8 include cleanup 2025-12-03 23:52:05 +02:00
Asdow e60dcbc3e9 Remove unused function 2025-12-03 23:52:05 +02:00
Asdow d73d56d85a Formatting 2025-12-03 23:52:05 +02:00
Asdow d21293d4ad include cleanup 2025-12-03 23:52:05 +02:00
Asdow 297d052670 Formatting 2025-12-03 23:52:05 +02:00
Asdow f21508ad15 include cleanup 2025-12-03 23:52:05 +02:00
Asdow 4c53bb70f3 Formatting 2025-12-03 23:52:05 +02:00
Asdow 6c5f94c0cc Combine JA2UB ifdefs 2025-12-03 23:52:05 +02:00
Asdow 65e5c1768a include cleanup 2025-12-03 23:52:05 +02:00
Asdow 04f03fb2cc formatting 2025-12-03 23:52:05 +02:00
Asdow a8218462e1 include cleanup 2025-12-03 23:52:05 +02:00
Asdow 00c8bd0aa7 Remove duplicate include 2025-12-03 23:52:05 +02:00
Asdow d3cd51e7eb Formatting 2025-12-03 23:52:05 +02:00
Asdow 37795bb73c Remove unused and transitive includes 2025-12-03 23:52:05 +02:00
Asdow 5b4099a828 Set functions static 2025-12-03 23:52:05 +02:00
Asdow 977b7a5b2d Remove unused includes 2025-12-03 23:52:05 +02:00
Asdow e6824bf15d set function static 2025-12-03 23:52:05 +02:00
Asdow 63a58502d1 Remove duplicate includes 2025-12-03 23:52:05 +02:00
Asdow 173f786f55 Remove unused includes 2025-12-03 23:52:05 +02:00
Asdow ea1a3a9e9e Set functions static 2025-12-03 23:52:05 +02:00
Asdow c1b8309753 Expand UB_SetNumberJa25EnemiesInSurfaceSector
* Allow adding jeeps and robots to sectors now
* From Lua side, it is now possible to add differing amount of arguments to the function. Minimum required is 3 (sector x & y and amount of admins)
So all of the following examples will work correctly:

- UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins )

- UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins, ubNumTroops )

- - UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins, ubNumTroops,ubNumElites )

- UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins, ubNumTroops,ubNumElites, ubNumTanks )

- UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins, ubNumTroops,ubNumElites, ubNumTanks , ubNumJeeps )

- UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins, ubNumTroops,ubNumElites, ubNumTanks , ubNumJeeps, ubNumRobots )
2025-11-29 11:46:45 +02:00
Asdow d86dc39f9f Add enemies also on insane difficulty 2025-11-27 22:38:29 +02:00
Asdow b580459e57 Remove unused local variable 2025-11-27 22:38:29 +02:00
Asdow b562b45c00 Externalize tunnel sectors for adding enemies to 2025-11-27 22:38:29 +02:00
Asdow 4a43b7704e Set functions static 2025-11-23 18:28:17 +02:00
Asdow 4a813e567a Remove unused includes 2025-11-23 18:28:17 +02:00
Asdow ea4cea2231 Set functions static 2025-11-23 18:28:17 +02:00
Asdow f263c7270f Remouve unused function declarations 2025-11-23 18:28:17 +02:00
Asdow 4b38f56d1f Set functions static 2025-11-23 18:28:17 +02:00
Asdow 9bf289561b Move includes to top of file 2025-11-23 18:28:17 +02:00
Asdow 10fa5f37d6 Formatting 2025-11-23 18:28:17 +02:00
Asdow 0d8873d2c0 Remove unused includes 2025-11-23 18:28:17 +02:00
Asdow f2b88ef080 Remove duplicate include 2025-11-23 18:28:17 +02:00
Asdow 1e6586f187 Set functions static 2025-11-23 18:28:17 +02:00
Asdow dbb1c0a929 Formatting 2025-11-23 18:28:17 +02:00
Asdow 91ae6e1223 Remove unused includes 2025-11-23 18:28:17 +02:00
Asdow 04bf102614 Remove duplicate include 2025-11-23 18:28:17 +02:00
Asdow 677b320534 Set functions static 2025-11-23 18:28:17 +02:00
Asdow 265a7c0af7 Remove unused function declaration 2025-11-23 18:28:17 +02:00