Add harvestable plants and compost barrels

- Add 8 harvestable plants with proper output - Server Admins can add them to the game
- Add 2 Compost barrels - an empty and a full version
- Re-work of player_harvestPlant to fix a few bugs when different types of harvestable plants are near
- Add harvestable plant output config
This commit is contained in:
A Man
2022-03-18 15:24:37 +01:00
parent 9384e0112c
commit 84064ec893
6 changed files with 248 additions and 59 deletions

View File

@@ -543,6 +543,31 @@ class CfgSurvival {
yield = 2;
rawfoodtype = "FoodrabbitRaw";
};
};
class Plants {
class Plant_Pumpkin_DZE {
qty = 4;
};
class Plant_Sunflower_DZE {
qty = 3;
};
class Plant_Potato_DZE {
qty = 7;
};
class Plant_Carrot_DZE {
qty = 7;
};
class Plant_Hemp_DZE {
qty = 2;
};
class Plant_Tea_DZE {
qty = 3;
};
class Plant_Tobacco_DZE {
qty = 2;
};
class Plant_Garlic_DZE {
qty = 7;
};
};
};

View File

@@ -1471,4 +1471,44 @@ class metal_container_2d_kit: CA_Magazine // 2x red
create = "MetalContainer2D_DZ";
};
};
};
class compost_barrel_empty_kit: CA_Magazine
{
scope = 2;
count = 1;
type = 256;
displayName = $STR_EPOCH_COMPOST_BARREL_EMTPY;
descriptionShort = $STR_EPOCH_COMPOST_BARREL_EMTPY_DESC;
model = "\z\addons\dayz_epoch\models\supply_crate.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_wooden_crate_ca.paa";
class ItemActions {
class Build {
text = $STR_EPOCH_BUILD_COMPOST_BARREL;
script = "spawn player_build;";
require[] = {};
create = "Compost_Barrel_Empty_DZE";
};
};
};
class compost_barrel_full_kit: CA_Magazine
{
scope = 2;
count = 1;
type = 256;
displayName = $STR_EPOCH_COMPOST_BARREL_FULL;
descriptionShort = $STR_EPOCH_COMPOST_BARREL_FULL_DESC;
model = "\z\addons\dayz_epoch\models\supply_crate.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_wooden_crate_ca.paa";
class ItemActions {
class Build {
text = $STR_EPOCH_BUILD_COMPOST_BARREL;
script = "spawn player_build;";
require[] = {"ItemShovel"};
create = "Compost_Barrel_Full_DZE";
};
};
};

View File

@@ -51,6 +51,26 @@ class Dayz_Plant1: Plant_Base {
};
};
class Compost_Barrel_Base_DZE : NonStrategic {
scope = 0;
icon = "\ca\data\data\Unknown_object.paa";
model = "\CA\Structures\Misc\Armory\Barels\barrel_empty.p3d";
armor = 100;
mapsize = 2;
vehicleClass = "DayZ Epoch Plants";
};
class Compost_Barrel_Empty_DZE : Compost_Barrel_Base_DZE {
scope = 2;
displayName = $STR_EPOCH_COMPOST_BARREL_EMTPY;
};
class Compost_Barrel_Full_DZE : Compost_Barrel_Base_DZE {
scope = 2;
displayName = $STR_EPOCH_COMPOST_BARREL_FULL;
model = "\CA\Structures\Misc\Armory\Barels\barrel_sand.p3d";
};
class Plant_Patch_Base_DZE : NonStrategic {
scope = 0;
model = "\z\addons\dayz_communityassets\models\stash_small.p3d";
@@ -93,4 +113,57 @@ class Plant_Patch_Tobacco_DZE : Plant_Patch_Base_DZE {
class Plant_Patch_Tea_DZE : Plant_Patch_Base_DZE {
scope = 2;
displayname = $STR_EPOCH_PLANT_PATCH_TEA;
};
class Plant_Patch_Garlic_DZE : Plant_Patch_Base_DZE {
scope = 2;
displayname = $STR_EPOCH_PLANT_PATCH_GARLIC;
};
class Plant_Pumpkin_DZE : Plant_Patch_Base_DZE {
scope = 2;
displayName = $STR_EPOCH_PLANT_PUMPKIN;
model = "\ca\plants2\plant\pumpkin.p3d";
};
class Plant_Sunflower_DZE : Plant_Patch_Base_DZE {
scope = 2;
displayName = $STR_EPOCH_PLANT_SUNFLOWER;
model = "\ca\plants2\plant\p_helianthus.p3d";
};
class Plant_Potato_DZE : Plant_Patch_Base_DZE {
scope = 2;
displayName = $STR_EPOCH_PLANT_POTATO;
model = "\ca\plants2\plant\p_urtica.p3d";
};
class Plant_Carrot_DZE : Plant_Patch_Base_DZE {
scope = 2;
displayName = $STR_EPOCH_PLANT_CARROT;
model = "\ca\plants2\plant\p_carduus.p3d";
};
class Plant_Hemp_DZE : Plant_Patch_Base_DZE {
scope = 2;
displayName = $STR_EPOCH_PLANT_HEMP;
model = "\ca\plants_e\plant\p_fiberplant_ep1.p3d";
};
class Plant_Tea_DZE : Plant_Patch_Base_DZE {
scope = 2;
displayName = $STR_EPOCH_PLANT_TEA;
model = "\ca\plants2\clutter\c_wideLeafPlant.p3d";
};
class Plant_Tobacco_DZE : Plant_Patch_Base_DZE {
scope = 2;
displayName = $STR_EPOCH_PLANT_TOBACCO;
model = "\ca\plants2\bush\b_betulaHumilis.p3d";
};
class Plant_Garlic_DZE : Plant_Patch_Base_DZE {
scope = 2;
displayName = $STR_EPOCH_PLANT_GARLIC;
model = "z\addons\dayz_communityassets\models\comfrey_up_small.p3d";
};