Commit Graph

249 Commits

Author SHA1 Message Date
leka1986 5f70e2d6b1 Add Italian locale support to CTLD
Added Italian Localization
2026-05-16 19:29:07 +02:00
leka1986 0d410f3e55 Update CTLD.lua
remove whitespace
2026-05-03 19:51:24 +02:00
leka1986 cbe6756330 Update CTLD.lua 2026-05-03 19:27:46 +02:00
leka1986 9272b1f18c Update CTLD.lua
### Summary
- Added an optional CTLD group locale resolver for group-targeted menus and messages.
- Routed CTLD group menu/message localization through group-aware lookup while preserving `self.locale` as the default fallback.
- Added an optional cargo display formatter with group context for missions that need custom cargo labels.
- Added `MENU_CRATE_SINGLE` localization so single-crate menu labels use the localization table, matching multi-crate labels.

### Compatibility
Default behavior is unchanged unless a mission calls `SetGroupLocaleResolver` or `SetCargoDisplayFormatter`.

### Motivation
This allows missions with per-player or per-group language settings to localize CTLD menus and group messages without changing the global CTLD locale, This can be used to persist localization choice using the player name.
2026-05-03 16:19:44 +02:00
leka1986 5e2218de38 Expand locale options in CTLD.lua
Updated language locale options to include Spanish and Russian.
2026-04-26 19:26:23 +02:00
leka1986 a72f7298d0 Update CTLD.lua
Added Russian locale, 

- my_ctld.locale = "ru"
2026-04-26 19:10:03 +02:00
leka1986 0b2f07ca6c Update CTLD.lua
- **Changed** the pack menu layout so pack actions now open into dedicated `Pack`, `Pack and Load`, and `Pack and Remove` submenus.
- **Added** scanning for nearby packable units within each pack submenu.
- **Added** direct selection of individual nearby packable units from the pack menus.
- **Changed** the pack menu order so detected nearby units appear first, followed by the nearby bulk action and the scan action.
- **Added** nearby bulk actions in each pack submenu (`Pack nearby`, `Pack and Load nearby`, `Pack and Remove nearby`).
- **Changed** pack menu refresh behavior so nearby packable units are rebuilt after major logistics actions and after build completion.
- **Fixed** selected `Pack and Load` so it only loads the crates created by the chosen packed unit.
- **Fixed** selected `Pack and Remove` so it only removes the crates created by the chosen packed unit.
- **Changed** pre-pack event handling so before-pack callbacks receive the specific group being packed.
- **Added** localization for the new pack menu wording in English, German, French, and Spanish.
2026-04-15 20:06:57 +02:00
smiki cace516e91 [FIXED] CTLD maxUnloadTroopsAllowed 2026-03-31 18:30:04 +02:00
smiki 1f0a154e4d CTLD. Set max disposition search radius for C-130J 2026-03-29 17:35:41 +02:00
smiki 02bfe9a253 [REMOVED] CTLD. Disposition for _C130GetUnits 2026-03-29 17:32:59 +02:00
smiki 36957dce85 [ADDED] CHIEF:AddLegionRecruitMinRange 2026-03-26 02:46:04 +01:00
smiki 3b4be5396e [ADDED] Unload Troops Restriction Options 2026-03-26 01:13:28 +01:00
smiki 685c7ac777 [ADDED] Unload Troops Restriction Options 2026-03-26 01:04:02 +01:00
leka1986 ff17d17e3e Update CTLD.lua
Fixed nil when unitVec2=unitcoord:GetVec2() returns nil.

Removed " self.UseC130LoadAndUnload and " when blocking the build if the cargo is inside  the frame. Now it will block the build with or without  UseC130LoadAndUnload set to true.
2026-03-22 23:37:08 +01:00
Applevangelist ab6d4cb9b9 #POINT Added Box Scan Method
#CTLD Added options for beacon frequency preset when adding a zone
2026-03-21 12:22:05 +01:00
Applevangelist 4367a91d4b #VARIOUS - Added Speaker options for HOUND 2026-03-07 18:17:23 +01:00
leka1986 2cedcff73c Update CTLD.lua
Removed C-130 from the Messaging Unloaded by ground crew.

Scheduler for batch building is now 0 to make each set build it's own  with it's engineer. He will despawn after 30 seconds after build.

Shorter message for C-130 airdrop buildstarted.
2026-03-06 20:16:21 +01:00
leka1986 d30377a7b1 Remove C-130J-30 specific notes from CTLD.lua
Removed notes specific to C-130J-30 workflow from CTLD.lua.
2026-03-04 21:47:27 +01:00
leka1986 750ad6b5b9 Update CTLD.lua
Fixed comments that looked weird in the website.
2026-03-04 21:44:46 +01:00
Thomas 2d4d4e3865 Merge branch 'develop' into master-ng 2026-03-04 12:01:31 +01:00
leka1986 85b582d6dd Update CTLD.lua
- Added C-130 DynamicCargo auto-build adapter inside CTLD core.
- New CTLD options:
  - `UseC130DynamicCargoAutoBuild = false` (default off)
  - `C130DynamicCargoAutoBuildMergeSeconds = 10`
- Hooked C-130 set registration into CTLD `Get Crates` flow (buildable cargo only: `VEHICLE` / `FOB`).
- Added CTLD internal set/entry tracking for C-130 crates:
  - map crate spawn -> dynamic cargo loaded/unloaded -> landed.
- Wired DynamicCargo event handling in CTLD:
  - on loaded: map to the correct CTLD set entry.
  - on unloaded: mark landed and create/rebind CTLD cargo proxy for build handoff.
  - on removed before landed: mark set failed and clean it.
- Added set completion logic:
  - build starts only when all crates in set are landed.
  - helper infantry is spawned and CTLD engineer build path is used.
- Added merge window batching by owner:
  - close drops from same C-130 can be processed together (one handoff window).
- Added scoped filtering in `_BuildCrates` for this path:
  - prevents counting unrelated nearby crates during engineer auto-build.
- Added cleanup paths for completed/failed/stale sets and stop lifecycle cleanup.
- Added/updated docs in section `2.2` for:
  - what the feature does,
  - required settings,
  - usage example,
  - and the important note that this applies to CTLD `Get Crates` cargo (not C-130 Loadsheet cargo).

**Behavior note**

- Default behavior is unchanged unless `UseC130DynamicCargoAutoBuild` is enabled.
2026-03-03 19:35:17 +01:00
Thomas 8968add126 Merge pull request #2528 from Rolln-dev/Rolln/ParamsCleanup
UPDATE: FUNCTIONAL, NAVIGATION, OPS, SOUND, UTILITIES and WRAPPER function params
2026-03-03 06:25:56 +01:00
Rolln-dev 4e910fcd7a UPDATE: OPS function params
- Added (Optional) to param descriptions for params that have default values
2026-03-02 20:48:54 -07:00
leka1986 c65d93dd73 Revert "Update CTLD.lua" 2026-03-02 22:23:48 +01:00
Thomas c346eb7acc Update CTLD.lua 2026-03-02 16:24:29 +01:00
Applevangelist 3d6bd4ea54 #Fix some missing localizations 2026-03-01 14:03:13 +01:00
Thomas fe0f0a0190 Update CTLD.lua 2026-02-28 18:33:35 +01:00
Thomas 180d861426 Update CTLD.lua 2026-02-28 17:36:48 +01:00
leka1986 052f055bbf Update CTLD.lua
Added:  function CTLD:AddStaticsCargoFromType(Name,TypeName,Mass,Stock,SubCategory,DontShowInMenu,Location,UnitTypes,Category,ShapeName,ResourceMap,DisplayName)
Added:  function CTLD:CanGetTroops, this is a final check for outside hooks, if player have conditions.


Reworked cargo placement in the case of none ship.
Cargo will be placed and sizes are depended on the cargo type, this can be further tweaked under the function GetCrates. This is applied to all types of cargo and all type of units.

Removed "Get" from the menu if the UseC130LoadAndUnload is true, player choose now the amount of cargo, then they will spawn. Same is for the Chinook if GCLoading is enabled.

Increased the UH-60L_DAP crate limit to 2 and the weight limit to 3500.

C130basetype is now independent of UseC130LoadAndUnload true / false. It will always be cds_crate for the C-130, and players can change it to whatever.
2026-02-22 13:25:42 +01:00
Thomas 843ef4d9d2 Update CTLD.lua 2026-02-15 13:32:57 +01:00
Applevangelist 1830b4c752 #CONTROLLABLE
- Added OptionAllowFormationSideSwap()
- Added OptionAIRunwayLineup()
2026-02-06 16:28:11 +01:00
smiki bd64d084e9 Optimizations 2026-02-05 10:49:48 +01:00
leka1986 41503ae625 Update CTLD.lua
fixed menu getting deleted.
2026-01-24 18:00:25 +01:00
leka1986 49332fafec Fixed bugs
Fixed bugs for load troops.

Added Mi-8 to the prevention method for ignoring what is inside when trying to build crates.

Removed return self if the player is trying to build stuff that is outside the helicopter or C-130, while he still have stuff inside. Cargo will be built but it will ignore what is inside.

Removed the menu "Others" if there is no sub category involved for that type. If user have crates subcat but not troops subcat, it won't show "others".
2026-01-22 18:45:23 +01:00
Applevangelist 7a3ea2918d #SEAD/#MANTIS - Adding functions for non-suppression of groups capable of HARM defense
#CTLD/#CSAR - Added data for A/M-H6J
2026-01-22 12:35:16 +01:00
leka1986 aed2f1d8a9 Enhance troop loading logic and messaging
noticed a bug, I could load troops outside the zone when choosing amount. I could also load without the door was even checked.

Combined the troop drop to one message instead of multiple messages for each dropped group.
2026-01-05 04:18:57 +01:00
leka1986 3504797147 Update CTLD.lua
Fixed so the Engineer can remove all the items when he is building from an airdrop.

Added a function that I use, CanGetCrates, it's a check before getting it if the conditions are met.

Added small fixes where calling FindCratesNearBy would remove the units when it's called by the function RemoveCratesNearBy when it was checking the surroundings and it should ignore what is inside. In the case of C-130 and the CH-47.

Added how many crates are dropped when getting statics.

Expanded OnAfterTroopsRTB to accept chunk, ie the number of units which is returned.
2026-01-05 03:43:28 +01:00
leka1986 448d668b44 Bug fixes and functions.
Fixed a bug where units could still get items all though not in load zone.

Added CanGetCrates, it's a function where user can hook custom conditions.

Added CanGetUnits, same as the above.

Added CanBuildCrates, same as the first one.
2025-12-24 00:00:30 +01:00
Applevangelist 8c0e021e82 #CTLD - Make FSM event CratesDropped useable for tasking 2025-12-23 17:16:57 +01:00
leka1986 6a13e593ec Update CTLD.lua
Added:
OnAfrerGetCrates, Only triggers when player uses "Get"

Added:
OnAfterRemoveCratedNearBy, Only triggers when player actively uses Remove crates near by or remove units near by.

Added: 
Partial load. currently, if a player land 3 crates (Farp) and want to partially load another farp, even though it can not fit, some want to load partially, this allows for it. 
Player will be able to see what actually fits in the menu, but if they want, they can open the menu again, select the item, then it will say "Get" "Crates limit reached" and "Partially load"

Added:
AddStaticsCargo can now accept a last parms, UnitType, this parm will make the cargo only visible in the menu to that passed unitType.

Removed Get and Load from CH-47 for the statics if enableChinookGCLoading is enabled. This will make it less confusing, as it didn't allow players do load anything except Ground crew for statics.
2025-12-19 18:44:13 +01:00
leka1986 795f58dc9b Update CTLD.lua
Fixing error when the savefile loads statics in the onafterLoad, it blows up.

attempt to call method 'GetStaticResourceMap' (a nil value)
2025-12-15 22:42:29 +01:00
leka1986 25daa67554 Update CTLD.lua
Fixed error when using Dynamic cargo 
"concatenate local 'gname'"

and the AddStaticCargo did not respect the template staticType.
2025-12-15 17:29:54 +01:00
leka1986 948158e85a Update CTLD.lua
Fixed bugs, 

Added RemoveStockUnits.

Tested and tested, works as intended.
2025-12-11 11:27:05 +01:00
leka1986 878eaf4301 Added Get Units and New stuff for the C-130J
Added

* UseC130LoadAndUnload toggle, false by default.
* C130basetype = "cds_crate" -- only for the C-130
* Extended AddCratesCargo & AddCratesCargoNoMove with another parms where we can force Typename for the static for the C-130, even though a parms passed before it with another shape. the last parms will still be forced only if the unit is C-130J. else, the last parms will not be used.

Example usage:
Foothold_ctld:AddCratesCargo("FARP",{"CTLD_TROOP_FOB"},CTLD_CARGO.Enum.FOB,3,1500,10, "FARP",nil,nil,nil,"Cargos","ammo_cargo",nil, "cds_crate")
Blocked the build of crates if still inside C-130J and CH-47F using 15 Meters for the C-130 and 5 meters for the CH-47.

ListCargo will now display what's inside besed on _GetUnitCapabilities / 2


** Manage Units, New menu only for the C-130J.

* New menu under CTLD. Get Units, Remove units nearby.
* Addunits function.
function CTLD:AddUnits(Name,Templates,Type,Stock,SubCategory,UnitTypes)
Example usage.

Foothold_ctld:AddUnits("Humvee",{"CTLD_CARGO_HMMWV"},CTLD_CARGO.Enum.VEHICLE,10, "ANTI TANK")

Those will be placed on a safe distance using same method as crates based on length and (idx-1)*2.5 + length.

* Added FSM, OnAfterUnitsSpawn. No internal, only Hook.

* Added 3 functions,
AddStockUnits
SetStockUnits
GetStockUnits

Added documents.
2025-12-09 19:45:56 +01:00
Applevangelist 049529ecf0 #CTLD Allow hover extracting Troop objects 2025-12-07 13:02:17 +01:00
leka1986 e873b097cf Convert cargo type to string for logging
Concatenate local 'type' Nil value
2025-12-06 10:10:18 +01:00
Applevangelist 30c6937910 #CTLD Fix find crates also looking into static cargos 2025-11-28 12:48:26 +01:00
Applevangelist 22097987dc #CTLD, #DYNAMICCARGO - C-130j-30 additions 2025-11-09 14:43:11 +01:00
leka1986 7b44e7a3f6 Update CTLD.lua
Removed quantity menu if there is only one set.
2025-11-09 02:16:02 +01:00
leka1986 aa4cf37aed Clean up comments in CTLD.lua
Removed unnecessary comment lines in CTLD.lua.
2025-11-08 02:52:23 +01:00