diff --git a/planet/Objects.ocd/HUD.ocd/Elements.ocd/ObjectSelector.ocd/Script.c b/planet/Objects.ocd/HUD.ocd/Elements.ocd/ObjectSelector.ocd/Script.c index b1b442389..c526f3fa7 100644 --- a/planet/Objects.ocd/HUD.ocd/Elements.ocd/ObjectSelector.ocd/Script.c +++ b/planet/Objects.ocd/HUD.ocd/Elements.ocd/ObjectSelector.ocd/Script.c @@ -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... diff --git a/planet/Objects.ocd/Structures.ocd/Chest.ocd/Script.c b/planet/Objects.ocd/Structures.ocd/Chest.ocd/Script.c index e6c537228..b7c9e2ecf 100644 --- a/planet/Objects.ocd/Structures.ocd/Chest.ocd/Script.c +++ b/planet/Objects.ocd/Structures.ocd/Chest.ocd/Script.c @@ -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) diff --git a/planet/Objects.ocd/Structures.ocd/Chest.ocd/StringTblDE.txt b/planet/Objects.ocd/Structures.ocd/Chest.ocd/StringTblDE.txt index fb693a512..d39bae79e 100644 --- a/planet/Objects.ocd/Structures.ocd/Chest.ocd/StringTblDE.txt +++ b/planet/Objects.ocd/Structures.ocd/Chest.ocd/StringTblDE.txt @@ -1,2 +1,4 @@ Name=Truhe -Description=Speicherplatz für allerhand Objekte. \ No newline at end of file +Description=Speicherplatz für allerhand Objekte. +MsgOpen=Truhe öffnen +MsgClose=Truhe schließen \ No newline at end of file diff --git a/planet/Objects.ocd/Structures.ocd/Chest.ocd/StringTblUS.txt b/planet/Objects.ocd/Structures.ocd/Chest.ocd/StringTblUS.txt index c028b792c..2407841d8 100644 --- a/planet/Objects.ocd/Structures.ocd/Chest.ocd/StringTblUS.txt +++ b/planet/Objects.ocd/Structures.ocd/Chest.ocd/StringTblUS.txt @@ -1,2 +1,4 @@ Name=Chest -Description=Storage location for all kinds of items. \ No newline at end of file +Description=Storage location for all kinds of items. +MsgOpen=Open chest +MsgClose=Close chest \ No newline at end of file