1 /*-- Wooden Cabin --*/
2 
3 #include Library_Structure
4 #include Library_Ownable
5 #include Library_DoorControl
6 
Initialize()7 public func Initialize()
8 {
9 	SetAction("Idle");
10 	return _inherited(...);
11 }
12 
IsBuilt()13 protected func IsBuilt()
14 {
15 	return GetCon() >= 100;
16 }
17 
RejectCollect(id objid,object obj)18 protected func RejectCollect(id objid, object obj)
19 {
20 	return true;
21 }
22 
NoConstructionFlip()23 public func NoConstructionFlip() { return true; }
24 
25 local ActMap = {/*
26 Idle = {
27 	Prototype = Action,
28 	Name = "Idle",
29 	Procedure = DFA_NONE,
30 	Length = 1,
31 	Delay = 1,
32 	NextAction = "Idle",
33 	Animation = "Closed",
34 },*/
35 OpenDoor = {
36 	Prototype = Action,
37 	Name = "OpenDoor",
38 	Procedure = DFA_NONE,
39 	Length = 20,
40 	Delay = 1,
41 	NextAction = "DoorOpen",
42 	StartCall = "SoundOpenDoor",
43 	Animation = "OpenDoor",
44 },
45 DoorOpen = {
46 	Prototype = Action,
47 	Name = "DoorOpen",
48 	Procedure = DFA_NONE,
49 	Length = 1,
50 	Delay = 20,
51 	NextAction = "CloseDoor",
52 	StartCall = "OpenEntrance",
53 	EndCall = "CloseEntrance",
54 	Animation = "Open",
55 },
56 CloseDoor = {
57 	Prototype = Action,
58 	Name = "CloseDoor",
59 	Procedure = DFA_NONE,
60 	Length = 40,
61 	Delay = 1,
62 	NextAction = "Idle",
63 	StartCall = "SoundCloseDoor",
64 	Animation = "CloseDoor",
65 },
66 };
Definition(def)67 func Definition(def) {
68 	SetProperty("PictureTransformation", Trans_Mul(Trans_Translate(2000,0,7000),Trans_Rotate(-20,1,0,0),Trans_Rotate(30,0,1,0)), def);
69 	SetProperty("MeshTransformation", Trans_Rotate(-8,0,1,0));
70 	return _inherited(def, ...);
71 }
72 local ContainBlast = true;
73 local BlastIncinerate = 100;
74 local FireproofContainer = true;
75 local HitPoints = 70;
76 local Name = "$Name$";
77 local Description = "$Description$";
78 local Components = {Wood = 5, Rock = 4};