Changeset - r20498:aad2dee6d212
[Not reviewed]
master
0 1 0
zuu - 11 years ago 2013-06-29 14:54:07
zuu@openttd.org
(svn r25519) -Fix [FS#5614] (r25342): Select page to update by its id and not the page id
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_story_page.cpp
Show inline comments
 
@@ -89,13 +89,13 @@
 
	EnforcePrecondition(false, (type != ::SPET_TEXT && type != ::SPET_LOCATION) || (text != NULL && !StrEmpty(text->GetEncodedText())));
 
	EnforcePrecondition(false, type != ::SPET_LOCATION || ::IsValidTile(reference));
 
	EnforcePrecondition(false, type != ::SPET_GOAL || ScriptGoal::IsValidGoal((ScriptGoal::GoalID)reference));
 
	EnforcePrecondition(false, type != ::SPET_GOAL || !(p->company == INVALID_COMPANY && Goal::Get(reference)->company != INVALID_COMPANY));
 

	
 
	return ScriptObject::DoCommand(type == ::SPET_LOCATION ? reference : 0,
 
			pe->page,
 
			story_page_element_id,
 
			type == ::SPET_GOAL ? reference : 0,
 
			CMD_UPDATE_STORY_PAGE_ELEMENT,
 
			type == ::SPET_TEXT || type == ::SPET_LOCATION ? text->GetEncodedText() : NULL,
 
			&ScriptInstance::DoCommandReturnStoryPageElementID);
 
}
 

	
0 comments (0 inline, 0 general)