diff --git a/config.cpp b/config.cpp index 458c020..40e4e34 100644 --- a/config.cpp +++ b/config.cpp @@ -68,15 +68,13 @@ class CfgMods // crate resolves to the YALootBoxes_Base script type. The old // "simulationModule" line did NOT do this and has been removed. // -// BASE CLASS: these inherit from vanilla "Container_Base" (a real -// lootable container base). "ContainerObject" used previously is -// not a vanilla class. >>> VERIFY against your SDK <<< and, if the -// crate spawns with no cargo space, add a Cargo grid definition -// (e.g. itemsCargoSize[] = {x,y};) to YALootBoxes_Base below - the -// wooden_crate model + Container_Base may need it to hold loot. -// -// MODEL: wooden_crate.p3d path is a placeholder; replace with a -// real p3d you have. >>> VERIFY model path against your SDK <<< +// BASE CLASS / MODEL / CARGO: inherits vanilla "Container_Base" and +// reuses the vanilla SeaChest model + a matching 10x10 cargo grid, so +// the crate is visible, has selection geometry (needed for the player +// to look at it and get the action), and can actually hold loot via +// CreateInInventory. Swap 'model' and the cargo size for your own p3d +// if you have one. (The earlier "wooden_crate.p3d" path did not exist, +// so boxes spawned invisible with no geometry -> no action.) // ------------------------------------------------------------ class CfgVehicles { @@ -88,7 +86,20 @@ class CfgVehicles { scope = 0; vehicleClass = "Containers"; - model = "\dz\structures\wood\wooden_crate.p3d"; + model = "\DZ\gear\camping\sea_chest.p3d"; + weight = 10000; + itemSize[] = {10, 10}; + itemBehaviour = 0; + carveNavmesh = 1; + hiddenSelections[] = { "camoGround" }; + hiddenSelectionsTextures[] = { "\dz\gear\camping\data\sea_chest_co.paa" }; + + class Cargo + { + itemsCargoSize[] = {10, 10}; + openable = 0; + allowOwnedCargoManipulation = 1; + }; }; class YALootBoxes_Crate_Military : YALootBoxes_Base