add stone sign object

Graphics made by Foaly.
master
Maikel de Vries 2018-03-03 12:22:19 +01:00
parent 65daa55156
commit e9f87ca028
7 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,7 @@
[DefCore]
id=StoneSign
Version=9,0
Category=C4D_StaticBack
Width=10
Height=8
Offset=-5,-4

View File

@ -0,0 +1,21 @@
material StoneSign
{
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.06589147448539734 0.06589147448539734 0.06589147448539734 1.0 31.5
emissive 0.0 0.0 0.0 1.0
texture_unit
{
texture StoneSignDiffuse.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}

View File

@ -0,0 +1,52 @@
/**
Stone Sign
Is attached to a wall and has an inscription.
@author Maikel
*/
local inscription = "";
// Players can read the sign via the interaction bar.
public func IsInteractable() { return inscription != ""; }
// Adapt appearance in the interaction bar.
public func GetInteractionMetaInfo(object clonk)
{
return { Description = "$MsgRead$", Selected = false };
}
// Called on player interaction.
public func Interact(object clonk)
{
if (!clonk)
return false;
Dialogue->MessageBox(GetTranslatedString(inscription), clonk, this, clonk->GetController(), true);
return true;
}
public func SetInscription(to_text)
{
inscription = to_text ?? "";
return true;
}
// Color for messages.
public func GetColor() { return 0xffb0b0b0; }
public func Definition(def)
{
// Inscription editor props.
if (!def.EditorProps)
def.EditorProps = {};
def.EditorProps.inscription = { Name="$Inscription$", Type="string", EditorHelp="$InscriptionHelp$", Set="SetInscription", Save="Inscription", Translatable=true };
}
/*-- Properties --*/
local Name = "$Name$";
local Description = "$Description$";
local MeshTransformation = [0, 0, 1000, -5600, 0, 1000, 0, -300, -1000, 0, 0, 0]; // Trans_Mul(Trans_Translate(-5600, -300), Trans_Rotate(90, 0, 1, 0))
local PictureTransformation = [0, 0, 1000, 0, 0, 1000, 0, 0, -1000, 0, 0, 0]; // Trans_Rotate(90, 0, 1, 0)

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -0,0 +1,5 @@
Name=Steintafel
Description=Behält wichtige Informationen.
MsgRead=Lesen
Inscription=Beschriftung
InscriptionHelp=Text der beim Lesen der Steintafel angezeigt wird.

View File

@ -0,0 +1,5 @@
Name=Stone Sign
Description=Contains important information.
MsgRead=Read
Inscription=Inscription
InscriptionHelp=Text that can be read by interacting with the stone sign.