fixed description of the chest interaction

stable-6.1
Maikel de Vries 2015-05-21 22:26:59 +02:00
parent 2dd4b50313
commit 9cf08594cf
4 changed files with 16 additions and 5 deletions

View File

@ -418,6 +418,7 @@ public func UpdateSelectionStatus()
// script...
else if(actiontype == ACTIONTYPE_SCRIPT)
{
this.Tooltip = nil;
var metainfo = myobject->~GetInteractionMetaInfo(crew, modus);
if(metainfo)
{
@ -425,7 +426,8 @@ public func UpdateSelectionStatus()
SetObjDrawTransform(IconSize(),0,-16000,0,IconSize(),20000, 2);
var desc = metainfo["Description"];
if(desc) this.Tooltip = desc;
if(desc)
this.Tooltip = desc;
if(metainfo["Selected"])
SetObjDrawTransform(1200,0,0,0,1200,0,1);
@ -449,8 +451,7 @@ public func UpdateSelectionStatus()
sel += 1;
if(1 == position)
sel += 2;
}
}
selected = sel;
// and set the icon...

View File

@ -28,6 +28,12 @@ private func MaxContentsCount()
return 50;
}
public func GetInteractionMetaInfo(object clonk, int num)
{
if (!is_open)
return { Description = "$MsgOpen$" };
return { Description = "$MsgClose$" };
}
// Open contentsmenu via interaction
public func Interact(object clonk, int mode)

View File

@ -1,2 +1,4 @@
Name=Truhe
Description=Speicherplatz für allerhand Objekte.
Description=Speicherplatz für allerhand Objekte.
MsgOpen=Truhe öffnen
MsgClose=Truhe schließen

View File

@ -1,2 +1,4 @@
Name=Chest
Description=Storage location for all kinds of items.
Description=Storage location for all kinds of items.
MsgOpen=Open chest
MsgClose=Close chest