Changeset - r23547:a927b79132d0
[Not reviewed]
master
0 2 0
Charles Pigott - 6 years ago 2019-03-26 00:17:33
charlespigott@googlemail.com
Change #5977: Use specific error message when attempting to create a circular group hierarchy (3298)
2 files changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/group_cmd.cpp
Show inline comments
 
@@ -449,7 +449,7 @@ CommandCost CmdAlterGroup(TileIndex tile
 

	
 
			/* Ensure request parent isn't child of group.
 
			 * This is the only place that infinite loops are prevented. */
 
			if (GroupIsInGroup(pg->index, g->index)) return CMD_ERROR;
 
			if (GroupIsInGroup(pg->index, g->index)) return_cmd_error(STR_ERROR_GROUP_CAN_T_SET_PARENT_RECURSION);
 
		}
 

	
 
		if (flags & DC_EXEC) {
src/lang/english.txt
Show inline comments
 
@@ -4473,6 +4473,7 @@ STR_ERROR_GROUP_CAN_T_CREATE            
 
STR_ERROR_GROUP_CAN_T_DELETE                                    :{WHITE}Can't delete this group...
 
STR_ERROR_GROUP_CAN_T_RENAME                                    :{WHITE}Can't rename group...
 
STR_ERROR_GROUP_CAN_T_SET_PARENT                                :{WHITE}Can't set parent group...
 
STR_ERROR_GROUP_CAN_T_SET_PARENT_RECURSION                      :{WHITE}... loops in the group hierarchy are not allowed
 
STR_ERROR_GROUP_CAN_T_REMOVE_ALL_VEHICLES                       :{WHITE}Can't remove all vehicles from this group...
 
STR_ERROR_GROUP_CAN_T_ADD_VEHICLE                               :{WHITE}Can't add the vehicle to this group...
 
STR_ERROR_GROUP_CAN_T_ADD_SHARED_VEHICLE                        :{WHITE}Can't add shared vehicles to group...
0 comments (0 inline, 0 general)