Skip to content

Instantly share code, notes, and snippets.

@GeorgeDettmer
Created November 10, 2016 21:46
Show Gist options
  • Save GeorgeDettmer/959871fbbdc2302388a7c291f0972f9e to your computer and use it in GitHub Desktop.
Save GeorgeDettmer/959871fbbdc2302388a7c291f0972f9e to your computer and use it in GitHub Desktop.
class TentLarge_Pitched : FixedContainer {
scope = public;
displayName = "Big Military Tent";
descriptionShort = "Big military tent, can house a small unit including their equipment.";
model = "\DZ\gear\camping\large_tent.p3d";
inventoryCondition = "false";
openable = 0;
itemSize[] = {2, 6};
itemsCargoSize[] = {6, 42};
itemsCargo[] = {};
lootCategory = "Crafted";
overrideDrawArea = 3.0;
carveNavmesh = 1;
placement = "ForceSlopeOnTerrain";
class Damage {
tex[] = {};
mat[] = {"DZ\gear\camping\data\large_tent.rvmat", "DZ\gear\camping\data\large_tent_damage.rvmat", "DZ\gear\camping\data\large_tent_destruct.rvmat"};
};
class AnimationSources {
class OpenDoors {
source = "user";
initPhase = 1;
animPeriod = 0.001;
};
class HideEntrance {
source = "user";
initPhase = 0;
animPeriod = 0.001;
};
class xlights {
source = "user";
initPhase = 1;
animPeriod = 0.01;
};
class xlights_glass_r : xlights {};
class xlights_glass_g : xlights {};
class xlights_glass_b : xlights {};
class xlights_glass_y : xlights {};
class cord_folded : xlights {};
class cord_plugged : xlights {};
class camonet : xlights {};
class inventory : xlights {};
class OpenWindow1 : OpenDoors {};
class ClosedWindow1 : HideEntrance {};
class OpenWindow2 : OpenWindow1 {};
class ClosedWindow2 : ClosedWindow1 {};
class OpenWindow3 : OpenWindow1 {};
class ClosedWindow3 : ClosedWindow1 {};
class OpenWindow4 : OpenWindow1 {};
class ClosedWindow4 : ClosedWindow1 {};
class OpenWindow5 : OpenWindow1 {};
class ClosedWindow5 : ClosedWindow1 {};
class OpenWindow6 : OpenWindow1 {};
class ClosedWindow6 : ClosedWindow1 {};
class OpenWindow7 : OpenWindow1 {};
class ClosedWindow7 : ClosedWindow1 {};
};
class UserActions {
class PackTent {
displayNameDefault = "Pack the tent";
displayName = "Pack the tent";
showWindow = 1;
onlyForPlayer = 1;
hideOnUse = 1;
condition = "((magazines this + itemsCargo this + backpackCargo this + weaponCargo this) isEqualTo []) && damage this < 1 && player distance this < 2";
component = "pack_action";
radius = 2;
position = "action";
statement = "systemChat format ['TENT: %1 was packed at position %2', this, (getPos this)]; 'TentLarge_Backpack' createVehicle position player;";
};
class SHowCamo {
displayNameDefault = "camo net";
displayName = "Camo net";
showWindow = 1;
onlyForPlayer = 1;
hideOnUse = 1;
radius = 2;
position = "camonet";
condition = "this animationPhase ""camonet"" < 0.5 && damage this < 1";
statement = "this animate [""camonet"",1]; this animate [""camonet"",0]";
component = "camonet";
};
class OpenDoors {
displayNameDefault = "Open the tent";
displayName = "Open the tent";
position = "Doors1_action";
radius = 1;
onlyForPlayer = 0;
condition = "this animationPhase ""OpenDoors"" < 0.5 && damage this < 1";
statement = "this animate [""OpenDoors"",1]; this animate [""HideEntrance"",0]";
component = "door_closed";
};
class CloseDoors {
displayNameDefault = "Close the tent";
displayName = "Close the tent";
position = "Doors1_action";
radius = 1;
onlyForPlayer = 0;
condition = "this animationPhase ""OpenDoors"" >= 0.5 && damage this < 1";
statement = "this animate [""OpenDoors"",0]; this animate [""HideEntrance"",1]";
component = "door_open";
};
class OpenWindow1 {
displayNameDefault = "Open the window";
displayName = "Open the window";
position = "";
radius = 0.5;
onlyForPlayer = 0;
condition = "this animationPhase ""OpenWindow1"" < 0.5 && damage this < 1";
statement = "this animate [""OpenWindow1"",1]; this animate [""ClosedWindow1"",0]";
component = "window_1_closed";
};
class CloseWindow1 : OpenWindow1 {
displayNameDefault = "Close the window";
displayName = "Close the window";
condition = "this animationPhase ""OpenWindow1"" >= 0.5 && damage this < 1";
statement = "this animate [""OpenWindow1"",0]; this animate [""ClosedWindow1"",1]";
component = "window_1_open";
};
class OpenWindow2 : OpenWindow1 {
condition = "this animationPhase ""OpenWindow2"" < 0.5 && damage this < 1";
statement = "this animate [""OpenWindow2"",1]; this animate [""ClosedWindow2"",0]";
component = "window_2_closed";
};
class CloseWindow2 : CloseWindow1 {
condition = "this animationPhase ""OpenWindow2"" >= 0.5 && damage this < 1";
statement = "this animate [""OpenWindow2"",0]; this animate [""ClosedWindow2"",1]";
component = "window_2_open";
};
class OpenWindow3 : OpenWindow1 {
condition = "this animationPhase ""OpenWindow3"" < 0.5 && damage this < 1";
statement = "this animate [""OpenWindow3"",1]; this animate [""ClosedWindow3"",0]";
component = "window_3_closed";
};
class CloseWindow3 : CloseWindow1 {
condition = "this animationPhase ""OpenWindow3"" >= 0.5 && damage this < 1";
statement = "this animate [""OpenWindow3"",0]; this animate [""ClosedWindow3"",1]";
component = "window_3_open";
};
class OpenWindow4 : OpenWindow1 {
condition = "this animationPhase ""OpenWindow4"" < 0.5 && damage this < 1";
statement = "this animate [""OpenWindow4"",1]; this animate [""ClosedWindow4"",0]";
component = "window_4_closed";
};
class CloseWindow4 : CloseWindow1 {
condition = "this animationPhase ""OpenWindow4"" >= 0.5 && damage this < 1";
statement = "this animate [""OpenWindow4"",0]; this animate [""ClosedWindow4"",1]";
component = "window_4_open";
};
class OpenWindow5 : OpenWindow1 {
condition = "this animationPhase ""OpenWindow5"" < 0.5 && damage this < 1";
statement = "this animate [""OpenWindow5"",1]; this animate [""ClosedWindow5"",0]";
component = "window_5_closed";
};
class CloseWindow5 : CloseWindow1 {
condition = "this animationPhase ""OpenWindow5"" >= 0.5 && damage this < 1";
statement = "this animate [""OpenWindow5"",0]; this animate [""ClosedWindow5"",1]";
component = "window_5_open";
};
class OpenWindow6 : OpenWindow1 {
condition = "this animationPhase ""OpenWindow6"" < 0.5 && damage this < 1";
statement = "this animate [""OpenWindow6"",1]; this animate [""ClosedWindow6"",0]";
component = "window_6_closed";
};
class CloseWindow6 : CloseWindow1 {
condition = "this animationPhase ""OpenWindow6"" >= 0.5 && damage this < 1";
statement = "this animate [""OpenWindow6"",0]; this animate [""ClosedWindow6"",1]";
component = "window_6_open";
};
class OpenWindow7 : OpenWindow1 {
condition = "this animationPhase ""OpenWindow7"" < 0.5 && damage this < 1";
statement = "this animate [""OpenWindow7"",1]; this animate [""ClosedWindow7"",0]";
component = "window_7_closed";
};
class CloseWindow7 : CloseWindow1 {
condition = "this animationPhase ""OpenWindow7"" >= 0.5 && damage this < 1";
statement = "this animate [""OpenWindow7"",0]; this animate [""ClosedWindow7"",1]";
component = "window_7_open";
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment