Fix: Don't try to rename OWNER_DEITY signs in-game (#9716)

This commit is contained in:
Tyler Trahan
2021-11-28 07:16:42 -07:00
committed by GitHub
parent 6953df7b5e
commit 802ca4e722
4 changed files with 18 additions and 1 deletions

View File

@@ -79,7 +79,7 @@ CommandCost CmdRenameSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
{
Sign *si = Sign::GetIfValid(p1);
if (si == nullptr) return CMD_ERROR;
if (si->owner == OWNER_DEITY && _current_company != OWNER_DEITY && _game_mode != GM_EDITOR) return CMD_ERROR;
if (!CompanyCanRenameSign(si)) return CMD_ERROR;
/* Rename the signs when empty, otherwise remove it */
if (!text.empty()) {