File diff r20519:bac281e17d46 → r20520:d73c2abb61c0
src/script/api/script_town.cpp
Show inline comments
 
@@ -43,10 +43,9 @@
 
	CCountedPtr<Text> counter(text);
 

	
 
	EnforcePrecondition(false, text != NULL);
 
	const char *encoded_text = text->GetDecodedText();
 
	const char *encoded_text = text->GetEncodedText();
 
	EnforcePreconditionEncodedText(false, encoded_text);
 
	EnforcePrecondition(false, IsValidTown(town_id));
 
	EnforcePreconditionCustomError(false, ::Utf8StringLength(encoded_text) < MAX_LENGTH_TOWN_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG);
 

	
 
	return ScriptObject::DoCommand(::Town::Get(town_id)->xy, town_id, 0, CMD_TOWN_SET_TEXT, encoded_text);
 
}