static */
| 35 | } |
| 36 | |
| 37 | /* static */ bool ScriptSign::SetName(SignID sign_id, Text *name) |
| 38 | { |
| 39 | ScriptObjectRef counter(name); |
| 40 | |
| 41 | EnforceDeityOrCompanyModeValid(false); |
| 42 | EnforcePrecondition(false, IsValidSign(sign_id)); |
| 43 | EnforcePrecondition(false, name != nullptr); |
| 44 | const std::string &text = name->GetDecodedText(); |
| 45 | EnforcePreconditionEncodedText(false, text); |
| 46 | EnforcePreconditionCustomError(false, ::Utf8StringLength(text) < MAX_LENGTH_SIGN_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG); |
| 47 | |
| 48 | return ScriptObject::Command<CMD_RENAME_SIGN>::Do(sign_id, text); |
| 49 | } |
| 50 | |
| 51 | /* static */ std::optional<std::string> ScriptSign::GetName(SignID sign_id) |
| 52 | { |
nothing calls this directly
no test coverage detected