forked from Mirrors/openclonk
Add "flip" EditorAction to structures
parent
eee156b5ac
commit
16988e76f0
|
@ -421,3 +421,22 @@ public func OnRepairMenuHover(id symbol, string action, desc_menu_target, menu_i
|
|||
|
||||
GuiUpdateText(text, menu_id, 1, desc_menu_target);
|
||||
}
|
||||
|
||||
public func Flip()
|
||||
{
|
||||
// Mirror structure
|
||||
if (this->~NoConstructionFlip()) return false;
|
||||
return SetDir(1-GetDir());
|
||||
}
|
||||
|
||||
|
||||
public func Definition(def, ...)
|
||||
{
|
||||
if (!def.EditorProps) def.EditorProps = {};
|
||||
if (!def->~NoConstructionFlip())
|
||||
{
|
||||
if (!def.EditorActions) def.EditorActions = {};
|
||||
def.EditorActions.flip = { Name="$Flip$", EditorHelp="$FlipHelp$", Command="Flip()" };
|
||||
}
|
||||
return _inherited(def, ...);
|
||||
}
|
||||
|
|
|
@ -14,3 +14,6 @@ YouNeedAHammer=Es wird ein Hammer benötigt.
|
|||
YouNeedMaterials=Es werden Materialien benötigt.
|
||||
|
||||
MsgNotFullyConstructed=%s ist noch nicht fertig gebaut.|Im Moment sind keine Interaktionen möglich.
|
||||
|
||||
Flip=Umdrehen
|
||||
FlipHelp=Spiegelt das Gebaeude.
|
||||
|
|
|
@ -14,3 +14,6 @@ YouNeedAHammer=You need a hammer.
|
|||
YouNeedMaterials=You need some of the required materials to repair this structure.
|
||||
|
||||
MsgNotFullyConstructed=%s is not fully constructed yet.|There are no interactions possible at this point.
|
||||
|
||||
Flip=Flip
|
||||
FlipHelp=Mirrors the structure.
|
||||
|
|
Loading…
Reference in New Issue