Add single metal door and door frame

Models made by @Helion4
This commit is contained in:
AirwavesMan
2020-11-30 17:52:27 +01:00
parent b23ec2921c
commit 6cd9542659
7 changed files with 242 additions and 10 deletions

View File

@@ -1212,6 +1212,15 @@ class ItemWoodGateFrame: CA_Magazine
require[] = {"ItemToolbox"};
create = "WoodGateFrame_DZ";
};
class Crafting
{
text = $STR_EPOCH_PLAYER_239_1_1;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {};
output[] = {{"ItemWoodGate",1}};
input[] = {{"ItemWoodGateFrame",1},{"PartWoodPlywood",8},{"PartWoodLumber",2},{"equip_nails",1}};
};
};
};
@@ -1268,3 +1277,87 @@ class ItemWoodGateLocked: CA_Magazine
};
};
};
class door_frame_kit: CA_Magazine
{
scope = 2;
count = 1;
type = 256;
displayName = $STR_EPOCH_DOORWAY;
descriptionShort = $STR_EPOCH_DOORWAY_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_ACTIONS_BUILD;
script = "spawn player_build;";
require[] = {"ItemToolbox"};
create = "DoorFrame_DZ";
};
class Crafting
{
text = $STR_EPOCH_PLAYER_238;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"door_kit",1}};
input[] = {{"door_frame_kit",1},{"ItemPole",1},{"ItemTankTrap",1}};
};
};
};
class door_kit: CA_Magazine
{
scope = 2;
count = 1;
type = 256;
displayName = $STR_EPOCH_DOOR;
descriptionShort = $STR_EPOCH_DOOR_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_ACTIONS_BUILD;
script = "spawn player_build;";
require[] = {"ItemToolbox"};
create = "Door_DZ";
};
class Crafting
{
text = $STR_EPOCH_PLAYER_239;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {};
output[] = {{"door_locked_kit",1}};
input[] = {{"door_kit",1},{"ItemComboLock",1}};
};
};
};
class door_locked_kit: CA_Magazine
{
scope = 2;
count = 1;
type = 256;
displayName = $STR_EPOCH_DOORLOCKED;
descriptionShort = $STR_EPOCH_DOOR_LOCKED_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_ACTIONS_BUILD;
script = "spawn player_build;";
require[] = {"ItemToolbox"};
create = "DoorLocked_DZ";
};
};
};

View File

@@ -1079,6 +1079,103 @@ class CinderGarageOpenTopLocked_DZ: CinderWallDoorLocked_DZ_Base {
};
};
class Door_DZ: CinderWallDoor_DZ_Base {
scope = 2;
armor = 1200;
model = "\z\addons\dayz_epoch\models\Steel_door_single.p3d";
displayName = $STR_EPOCH_DOOR;
GhostPreview = "DoorFrame_Preview_DZ";
upgradeBuilding[] = {"DoorLocked_DZ",{},{{"ItemComboLock",1}}};
class AnimationSources {
class Open_door {
source = "user";
animPeriod = 4;
initPhase = 0;
};
};
class UserActions
{
class Open_Door
{
displayName = $STR_DN_OUT_O_DOOR;
onlyforplayer = true;
position = "Door_knopf";
radius = 3;
condition = "this animationPhase ""Open_door"" < 0.5";
statement = "this animate [""Open_door"", 1]";
};
class Close_Door : Open_Door
{
displayName = $STR_DN_OUT_C_DOOR;
condition = "this animationPhase ""Open_door"" >= 0.5";
statement = "this animate [""Open_door"", 0]";
};
};
class DestructionEffects {};
};
class DoorLocked_DZ: CinderWallDoorLocked_DZ_Base {
scope = 2;
armor = 1200;
model = "\z\addons\dayz_epoch\models\Steel_door_locked_single.p3d";
displayName = $STR_EPOCH_DOORLOCKED;
GhostPreview = "DoorFrame_Preview_DZ";
downgradeBuilding[] = {"Door_DZ",{{"ItemComboLock",1}}};
class AnimationSources {
class Open_door {
source = "user";
animPeriod = 4;
initPhase = 0;
};
class Open_latch {
source = "user";
animPeriod = 1;
initPhase = 0;
};
};
class UserActions
{
class Open_Door
{
displayName = $STR_DN_OUT_O_DOOR;
onlyforplayer = true;
position = "Door_knopf";
radius = 3;
condition = "(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 1)";
statement = "this animate [""Open_door"", 1]";
};
class Close_Door : Open_Door
{
displayName = $STR_DN_OUT_C_DOOR;
condition = "(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_latch"" == 1)";
statement = "this animate [""Open_door"", 0]";
};
class Lock_Door : Open_Door
{
displayName = $STR_EPOCH_DOORS_LOCK;
condition = "(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 1)";
statement = "PVDZE_handleSafeGear = [player,this,4];publicVariableServer ""PVDZE_handleSafeGear"";this animate [""Open_latch"", 0]";
};
class Unlock_Door : Open_Door
{
displayName = $STR_EPOCH_DOORS_UNLOCK;
condition = "(!keypadCancel and DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 0)";
statement = "this animate [""Open_latch"", 1];PVDZE_handleSafeGear = [player,this,5,DZE_Lock_Door];publicVariableServer ""PVDZE_handleSafeGear"";";
};
class Unlock_Door_Dialog : Open_Door
{
displayName = $STR_EPOCH_DOORS_UNLOCK;
condition = "!keypadCancel and DZE_Lock_Door != (this getvariable['CharacterID','0'])";
statement = "dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;if(DZE_doorManagement) then {createdialog ""DoorAccess"";} else {createdialog ""ComboLockUI"";};";
};
};
class DestructionEffects {};
};
/*
Vanilla DayZ buildables are defined in \dayz_buildings\configs\
Only included here to overwrite vanilla ItemPadlock with Epoch ItemComboLock

View File

@@ -107,7 +107,7 @@ class CinderGarageOpenTopFrame_DZ: ModularItems {
offset[] = {0,2,0};
model = "\z\addons\dayz_epoch_v\base_building\cinder\CinderGaragenotop\cindergarage_notop_frame.p3d";
armor = 3000;
displayName = $STR_EPOCH_CINDEROPENTOPGARAGEDOORWAY;
displayName = $STR_EPOCH_CINDEROPENTOPGARAGEFRAME;
maintainBuilding[] = {{"MortarBucket",1}};
upgradeBuilding[] = {"CinderGarageOpenTop_DZ",{"ItemToolbox"},{{"ItemPole",3},{"ItemTankTrap",3}}};
GhostPreview = "CinderGarageOpenTop_Preview_DZ";

View File

@@ -15,4 +15,16 @@ class MetalFloor_DZ: ModularItems {
lifeTime = 1;
};
};
};
};
class DoorFrame_DZ: ModularItems {
scope = 2;
offset[] = {0,2,0};
armor = 3000;
model = "\z\addons\dayz_epoch\models\Steel_door_frame_single.p3d";
displayName = $STR_EPOCH_DOORWAY;
GhostPreview = "DoorFrame_Preview_DZ";
maintainBuilding[] = {{"PartGeneric",1}};
upgradeBuilding[] = {"Door_DZ",{"ItemToolbox"},{{"ItemPole",1},{"ItemTankTrap",1}}};
};

View File

@@ -39,7 +39,6 @@ class CinderWall_Preview_DZ: DZE_Ghost_Previews {
model = "\z\addons\dayz_epoch\models\cinder_wall_full_ghost.p3d";
displayName = "Cinder Block Wall Preview";
};
class WoodFloorQuarter_Preview_DZ: DZE_Ghost_Previews {
scope = 2;
model = "\z\addons\dayz_epoch\models\quarter_floor_ghost.p3d";
@@ -138,12 +137,12 @@ class Drawbridge_Preview_DZ: DZE_Ghost_Previews {
class Wood_Triangle_Wall_Preview_DZ: DZE_Ghost_Previews {
scope = 2;
model = "\z\addons\dayz_epoch_v\base_building\wood\apex_tri\apex_tri.p3d";
displayName = "Wood Triangle wall";
displayName = "Wood Triangle wall Preview";
};
class Wood_Handrail_Preview_DZ: DZE_Ghost_Previews {
scope = 2;
model = "\z\addons\dayz_epoch_v\base_building\wood\railing\railing.p3d";
displayName = "Wood Handrail";
displayName = "Wood Handrail Preview";
};
class Wood_Floor_Stairs_Preview_DZ: DZE_Ghost_Previews {
scope = 2;
@@ -164,4 +163,9 @@ class CinderGarageOpenTop_Preview_DZ: DZE_Ghost_Previews {
scope = 2;
model = "z\addons\dayz_epoch_v\base_building\cinder\CinderGaragenotop\cindergarage_notop_ghost.p3d";
displayName = "Cinder Garage open top Preview";
};
class DoorFrame_Preview_DZ: DZE_Ghost_Previews {
scope = 2;
model = "\z\addons\dayz_epoch\models\Steel_door_frame_single_ghost.p3d";
displayName = "Door Frame Preview";
};