mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
New Config Entry buildText
Allows a string to replace the vehicle display name that will be created which is typically displayed when building.
This commit is contained in:
@@ -43,6 +43,7 @@ class ItemPumpkinPlant: CA_Magazine {
|
|||||||
class ItemActions {
|
class ItemActions {
|
||||||
class Build {
|
class Build {
|
||||||
text = "Plant Pumpkin";
|
text = "Plant Pumpkin";
|
||||||
|
buildText = "pumpkin plant";
|
||||||
script = "spawn player_build;";
|
script = "spawn player_build;";
|
||||||
require[] = {"ItemEtool"};
|
require[] = {"ItemEtool"};
|
||||||
create = "Grave"; // TODO: model for Pumpkin Stage 1
|
create = "Grave"; // TODO: model for Pumpkin Stage 1
|
||||||
@@ -84,6 +85,7 @@ class ItemHempPlant: CA_Magazine {
|
|||||||
class ItemActions {
|
class ItemActions {
|
||||||
class Build {
|
class Build {
|
||||||
text = "Plant Hemp";
|
text = "Plant Hemp";
|
||||||
|
buildText = "hemp plant";
|
||||||
script = "spawn player_build;";
|
script = "spawn player_build;";
|
||||||
require[] = {"ItemEtool"};
|
require[] = {"ItemEtool"};
|
||||||
create = "MAP_c_fern"; // TODO: model for Hemp Stage 1
|
create = "MAP_c_fern"; // TODO: model for Hemp Stage 1
|
||||||
|
|||||||
@@ -92,7 +92,11 @@ _canBuild = [_pos, _this, true] call dze_buildChecks;
|
|||||||
if (_canBuild select 0) then {
|
if (_canBuild select 0) then {
|
||||||
_classname = getText (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActions" >> "Build" >> "create");
|
_classname = getText (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActions" >> "Build" >> "create");
|
||||||
_classnametmp = _classname;
|
_classnametmp = _classname;
|
||||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
if (isText (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActions" >> "Build" >> "buildText")) then {
|
||||||
|
_text = getText (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActions" >> "Build" >> "buildText");
|
||||||
|
} else {
|
||||||
|
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||||
|
};
|
||||||
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
|
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
|
||||||
|
|
||||||
_lockable = 0; //default define if lockable not found in config file below
|
_lockable = 0; //default define if lockable not found in config file below
|
||||||
|
|||||||
@@ -93,7 +93,11 @@ if (_canBuild select 0) then {
|
|||||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||||
_classnametmp = _classname;
|
_classnametmp = _classname;
|
||||||
_require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
|
_require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
|
||||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
if (isText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "buildText")) then {
|
||||||
|
_text = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "buildText");
|
||||||
|
} else {
|
||||||
|
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||||
|
};
|
||||||
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
|
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
|
||||||
|
|
||||||
_lockable = 0;
|
_lockable = 0;
|
||||||
@@ -303,7 +307,6 @@ if (_canBuild select 0) then {
|
|||||||
|
|
||||||
_tmpbuilt setPosATL _location;
|
_tmpbuilt setPosATL _location;
|
||||||
|
|
||||||
|
|
||||||
format[localize "str_epoch_player_138",_text] call dayz_rollingMessages;
|
format[localize "str_epoch_player_138",_text] call dayz_rollingMessages;
|
||||||
|
|
||||||
_limit = 3;
|
_limit = 3;
|
||||||
|
|||||||
Reference in New Issue
Block a user