(svn r23632) -Add: GSCompanyMode, to change company in GameScripts

This commit is contained in:
truebrain
2011-12-19 21:05:25 +00:00
parent 403cd3acdb
commit cc3f42794d
46 changed files with 273 additions and 59 deletions

View File

@@ -19,12 +19,11 @@
#include "../../string_func.h"
#include "../../strings_func.h"
#include "../../tile_map.h"
#include "../../company_func.h"
/* static */ bool ScriptSign::IsValidSign(SignID sign_id)
{
const Sign *si = ::Sign::GetIfValid(sign_id);
return si != NULL && (si->owner == _current_company || si->owner == OWNER_DEITY);
return si != NULL && (si->owner == ScriptObject::GetCompany() || si->owner == OWNER_DEITY);
}
/* static */ ScriptCompany::CompanyID ScriptSign::GetOwner(SignID sign_id)