Tracerestrict: Add button to duplicate instruction/block

This commit is contained in:
Jonathan G Rennison
2023-05-05 23:34:30 +01:00
parent b089b561a5
commit 65cc6623dd
4 changed files with 142 additions and 35 deletions

View File

@@ -1036,6 +1036,7 @@ enum TraceRestrictDoCommandType {
TRDCT_REMOVE_ITEM, ///< remove instruction at offset field
TRDCT_SHALLOW_REMOVE_ITEM, ///< shallow remove instruction at offset field, does not delete contents of block
TRDCT_MOVE_ITEM, ///< move instruction or block at offset field
TRDCT_DUPLICATE_ITEM, ///< duplicate instruction/block at offset field
TRDCT_PROG_COPY, ///< copy program operation. Do not re-order this with respect to other values
TRDCT_PROG_COPY_APPEND, ///< copy and append program operation
@@ -1062,6 +1063,8 @@ CommandCost CmdProgramSignalTraceRestrictProgMgmt(TileIndex tile, DoCommandFlag
CommandCost TraceRestrictProgramRemoveItemAt(std::vector<TraceRestrictItem> &items, uint32 offset, bool shallow_mode);
CommandCost TraceRestrictProgramMoveItemAt(std::vector<TraceRestrictItem> &items, uint32 &offset, bool up, bool shallow_mode);
CommandCost TraceRestrictProgramDuplicateItemAt(std::vector<TraceRestrictItem> &items, uint32 offset);
bool TraceRestrictProgramDuplicateItemAtDryRun(const std::vector<TraceRestrictItem> &items, uint32 offset);
void ShowTraceRestrictProgramWindow(TileIndex tile, Track track);