forked from Mirrors/openclonk
add room door to Decoration.ocd
This is a door which leads to nowhere, but they can be connected via script or serve other purposes. Graphics by Apfelclonk.directional-lights
parent
561651b715
commit
2505dc77f1
|
@ -0,0 +1,13 @@
|
|||
[DefCore]
|
||||
id=RoomDoor
|
||||
Version=8,0
|
||||
Category=C4D_None
|
||||
Width=16
|
||||
Height=24
|
||||
Offset=-8,-12
|
||||
Vertices=4
|
||||
VertexX=-8,8,-8,8
|
||||
VertexY=11,11,-11,-11
|
||||
VertexFriction=100,100,100,100
|
||||
Entrance=-8,-12,16,24
|
||||
ClosedContainer=2
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
|
@ -0,0 +1,38 @@
|
|||
material tod_door_main //: NormalMap
|
||||
{
|
||||
receive_shadows on
|
||||
technique
|
||||
{
|
||||
pass
|
||||
{
|
||||
ambient 0.800000011920929 0.800000011920929 0.800000011920929 1.0
|
||||
diffuse 0.6400000190734865 0.6400000190734865 0.6400000190734865 1.0
|
||||
specular 0.06493505090475082 0.06493505090475082 0.06493505090475082 1.0 6.25
|
||||
emissive 0.0 0.0 0.0 1.0
|
||||
|
||||
texture_unit
|
||||
{
|
||||
texture overlay.png
|
||||
tex_address_mode wrap
|
||||
filtering trilinear
|
||||
colour_op_ex modulate src_texture src_player_colour
|
||||
// take alpha from texture only, ignore player alpha
|
||||
alpha_op_ex source1 src_texture src_player_colour
|
||||
}
|
||||
|
||||
texture_unit base
|
||||
{
|
||||
texture tod_entrance_base.png
|
||||
tex_address_mode wrap
|
||||
filtering trilinear
|
||||
colour_op_ex blend_current_alpha src_current src_texture
|
||||
// Don't blend alpha, to make sure we have full intensity at the base/overlay border region
|
||||
alpha_op_ex add src_current src_texture
|
||||
}
|
||||
|
||||
//texture_unit normal
|
||||
//{
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/**
|
||||
Room Door
|
||||
A door which can be entered.
|
||||
|
||||
@author Apfelclonk, Maikel
|
||||
*/
|
||||
|
||||
|
||||
// Door opens and closes by use of the door library.
|
||||
#include Library_DoorControl
|
||||
|
||||
|
||||
/*-- Door Control --*/
|
||||
|
||||
private func OnOpenDoor()
|
||||
{
|
||||
PlayAnimation("proceed_door", 5, Anim_Linear(0, 0, GetAnimationLength("proceed_door"), this.ActMap.OpenDoor.Length, ANIM_Hold));
|
||||
SoundOpenDoor();
|
||||
return;
|
||||
}
|
||||
|
||||
private func OnCloseDoor()
|
||||
{
|
||||
PlayAnimation("proceed_door", 5, Anim_Linear(GetAnimationLength("proceed_door"), GetAnimationLength("proceed_door"), 0, this.ActMap.CloseDoor.Length, ANIM_Hold));
|
||||
SoundCloseDoor();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*-- ActMap --*/
|
||||
|
||||
local ActMap = {
|
||||
OpenDoor = {
|
||||
Prototype = Action,
|
||||
Name = "OpenDoor",
|
||||
Procedure = DFA_NONE,
|
||||
Length = 20,
|
||||
Delay = 1,
|
||||
NextAction = "DoorOpen",
|
||||
StartCall = "OnOpenDoor",
|
||||
},
|
||||
DoorOpen = {
|
||||
Prototype = Action,
|
||||
Name = "DoorOpen",
|
||||
Procedure = DFA_NONE,
|
||||
Length = 1,
|
||||
Delay = 20,
|
||||
NextAction = "CloseDoor",
|
||||
StartCall = "OpenEntrance",
|
||||
EndCall = "CloseEntrance",
|
||||
},
|
||||
CloseDoor = {
|
||||
Prototype = Action,
|
||||
Name = "CloseDoor",
|
||||
Procedure = DFA_NONE,
|
||||
Length = 20,
|
||||
Delay = 1,
|
||||
NextAction = "Idle",
|
||||
StartCall = "OnCloseDoor",
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*-- Properties --*/
|
||||
|
||||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
||||
local Plane = 200;
|
||||
local MeshTransformation = [1050, 0, 0, -550, 0, 1050, 0, -400, 0, 0, 1050, 0]; // Trans_Mul(Trans_Translate(-550, -400, 0), Trans_Scale(1050))
|
|
@ -0,0 +1,2 @@
|
|||
Name=Tür
|
||||
Description=Eine Tür wo man reingehen kann.
|
|
@ -0,0 +1,2 @@
|
|||
Name=Door
|
||||
Description=A door which can be entered.
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 306 KiB |
Loading…
Reference in New Issue