Skip to content

Commit

Permalink
added Items for a simple Plantingsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
legodev committed Aug 12, 2014
1 parent ca37210 commit 688c1f1
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 0 deletions.
11 changes: 11 additions & 0 deletions SQF/dayz_code/Configs/CfgMagazines.hpp
Expand Up @@ -1666,6 +1666,8 @@ class CfgMagazines {

#include "CfgMagazines\MeleeSwing.hpp"

#include "CfgMagazines\Planting.hpp"

class HandGrenade_Stone;
class ItemTrashToiletpaper : HandGrenade_Stone {
scope = public;
Expand Down Expand Up @@ -1707,6 +1709,15 @@ class CfgMagazines {
output[] = {{"ItemCanvas",1}};
input[] = {{"ItemKiloHemp",1}};
};
class Crafting1
{
text = "Craft Hemp Seeds";
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {""};
requiretools[] = {"ItemKnife"};
output[] = {{"ItemHempSeed",5}};
input[] = {{"ItemKiloHemp",1}};
};
};
};
};
12 changes: 12 additions & 0 deletions SQF/dayz_code/Configs/CfgMagazines/DZE/Food.hpp
Expand Up @@ -64,6 +64,18 @@ class FoodPumpkin : FoodEdible {
weight = 1;
model = "z\addons\dayz_communityassets\models\pistachio.p3d"; // TODO: model + icon
picture = "\z\addons\dayz_communityassets\pictures\equip_pistachios_CA.paa";
class ItemActions
{
class Crafting
{
text = "Craft Pumpkin Seeds";
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {""};
requiretools[] = {"ItemKnife"};
output[] = {{"ItemPumpkinSeed",5}};
input[] = {{"FoodPumpkin",1}};
};
};
};
class FoodSunFlowerSeed : FoodEdible {
scope = public;
Expand Down
93 changes: 93 additions & 0 deletions SQF/dayz_code/Configs/CfgMagazines/Planting.hpp
@@ -0,0 +1,93 @@
class ItemFertilizer: CA_Magazine {
scope = public;
count = 1;
displayName = "Fertilizer";
descriptionShort = "Fertilizer";
weight = 0.1;
model = "z\addons\dayz_communityassets\models\mre.p3d"; // TODO: model + icon
picture = "\z\addons\dayz_communityassets\pictures\equip_mre_CA.paa";
type = 256;
};

class ItemPumpkinSeed: CA_Magazine {
scope = public;
count = 1;
displayName = "A Pumpkin Seed";
descriptionShort = "A Pumpkin Seed";
weight = 0.1;
model = "\z\addons\dayz_epoch\models\doc_child1.p3d"; // TODO: model + icon
picture = "\z\addons\dayz_epoch\pictures\equip_child1_ca.paa";
type = 256;
class ItemActions {
class Crafting
{
text = "Craft Pumpkin Plant";
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {""};
requiretools[] = {"ItemKnife"};
output[] = {{"ItemPumpkinPlant",1},{"ItemWaterbottleUnfilled",1}};
input[] = {{"ItemPumpkinSeed",1},{"ItemFertilizer",1},{"ItemWaterbottle",1}};
};
};
};

class ItemPumpkinPlant: CA_Magazine {
scope = public;
count = 1;
displayName = "A Pumpkin Plant";
descriptionShort = "A Pumpkin Plant";
weight = 0.1;
model = "\z\addons\dayz_epoch\models\doc_child1.p3d"; // TODO: model + icon
picture = "\z\addons\dayz_epoch\pictures\equip_child1_ca.paa";
type = 256;
class ItemActions {
class Build {
text = "Plant Pumpkin";
script = "spawn player_build;";
require[] = {"ItemEtool"};
create = "Grave"; // TODO: model for Pumpkin Stage 1
};
};
};

class ItemHempSeed: CA_Magazine {
scope = public;
count = 1;
displayName = "A Hemp Seed";
descriptionShort = "A Hemp Seed";
weight = 0.1;
model = "\z\addons\dayz_epoch\models\doc_child2.p3d"; // TODO: model + icon
picture = "\z\addons\dayz_epoch\pictures\equip_child2_ca.paa";
type = 256;
class ItemActions {
class Crafting
{
text = "Craft Hemp Plant";
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {""};
requiretools[] = {"ItemKnife"};
output[] = {{"ItemHempPlant",1},{"ItemWaterbottleUnfilled",1}};
input[] = {{"ItemHempSeed",1},{"ItemFertilizer",1},{"ItemWaterbottle",1}};
};
};
};

class ItemHempPlant: CA_Magazine {
scope = public;
count = 1;
type = 256;
displayName = "A Hemp Plant";
descriptionShort = "A Hemp Plant";
weight = 0.1;
model = "\z\addons\dayz_epoch\models\doc_child2.p3d"; // TODO: model + icon
picture = "\z\addons\dayz_epoch\pictures\equip_child2_ca.paa";
type = 256;
class ItemActions {
class Build {
text = "Plant Hemp";
script = "spawn player_build;";
require[] = {"ItemEtool"};
create = "MAP_c_fern"; // TODO: model for Hemp Stage 1
};
};
};

0 comments on commit 688c1f1

Please sign in to comment.