(svn r25342) -Add: StoryPage data structures and GS API

This commit is contained in:
zuu
2013-06-09 12:19:09 +00:00
parent bea60988c6
commit 9aa1bf0264
24 changed files with 975 additions and 1 deletions

View File

@@ -46,6 +46,7 @@
#include "game/game.hpp"
#include "cargomonitor.h"
#include "goal_base.h"
#include "story_base.h"
#include "table/strings.h"
#include "table/pricebase.h"
@@ -509,7 +510,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
if (si->owner == old_owner) si->owner = new_owner == INVALID_OWNER ? OWNER_NONE : new_owner;
}
/* Remove Game Script created Goals and CargoMonitors. */
/* Remove Game Script created Goals, CargoMonitors and Story pages. */
Goal *g;
FOR_ALL_GOALS(g) {
if (g->company == old_owner) delete g;
@@ -518,6 +519,11 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
ClearCargoPickupMonitoring(old_owner);
ClearCargoDeliveryMonitoring(old_owner);
StoryPage *sp;
FOR_ALL_STORY_PAGES(sp) {
if (sp->company == old_owner) delete sp;
}
/* Change colour of existing windows */
if (new_owner != INVALID_OWNER) ChangeWindowOwner(old_owner, new_owner);