(svn r26012) -Add: new goal type that show a story page when clicked
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "game/game.hpp"
|
||||
#include "command_func.h"
|
||||
#include "company_base.h"
|
||||
#include "story_base.h"
|
||||
#include "string_func.h"
|
||||
#include "gui.h"
|
||||
#include "network/network.h"
|
||||
@@ -72,6 +73,13 @@ CommandCost CmdCreateGoal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
if (!Company::IsValidID(p2)) return CMD_ERROR;
|
||||
break;
|
||||
|
||||
case GT_STORY_PAGE: {
|
||||
if (!StoryPage::IsValidID(p2)) return CMD_ERROR;
|
||||
CompanyByte story_company = StoryPage::Get(p2)->company;
|
||||
if (company == INVALID_COMPANY ? story_company != INVALID_COMPANY : story_company != INVALID_COMPANY && story_company != company) return CMD_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
default: return CMD_ERROR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user