Localization in es, zh, ja, ko, vi; map and events files end with a line break; no novel editor hub in docs
This commit is contained in:
1 parent
1d6904bb16
commit
1622a2fc51
9 files changed
+527
-5
No files matched your search
@@ -98,19 +98,19 @@ namespace Cthangover.Tools.RpgEditor
|
||||
/// <summary>Mod-relative path of the editor's events file of a map: <c>map_events/<id>/events.json</c>.</summary>
|
||||
public static string EventsPath(string mapId) => $"{RpgMapEventResolver.Directory}/{mapId}/events.json";
|
||||
|
||||
/// <summary>The map file text: cells written into rows, nulls left out, indented, LF line breaks on every OS.</summary>
|
||||
/// <summary>The map file text: cells written into rows, nulls left out, indented, LF line breaks on every OS, a final one.</summary>
|
||||
public string ToJson()
|
||||
{
|
||||
Grid.WriteTo(Map);
|
||||
var data = new FileData<RpgMap> { Kind = "rpg_map", Items = new List<RpgMap> { Map } };
|
||||
return JsonSerializer.Serialize(data, JsonOptionsProvider.WriteIndentedIgnoreNullOptions).Replace("\r\n", "\n");
|
||||
return JsonSerializer.Serialize(data, JsonOptionsProvider.WriteIndentedIgnoreNullOptions).Replace("\r\n", "\n") + "\n";
|
||||
}
|
||||
|
||||
/// <summary>The events file text (<see cref="EventsPath"/>): the own events, nulls left out, indented.</summary>
|
||||
public string EventsToJson()
|
||||
{
|
||||
var data = new RpgMapEventFile { Events = Events };
|
||||
return JsonSerializer.Serialize(data, JsonOptionsProvider.WriteIndentedIgnoreNullOptions).Replace("\r\n", "\n");
|
||||
return JsonSerializer.Serialize(data, JsonOptionsProvider.WriteIndentedIgnoreNullOptions).Replace("\r\n", "\n") + "\n";
|
||||
}
|
||||
|
||||
/// <summary>Remembers the current state as one undo step and forgets the redo branch.</summary>
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Cthangover.Tools.RpgEditor
|
||||
/// <summary>
|
||||
/// Registers the RPG map editor as a tool: the kernel's tool factory finds
|
||||
/// every <see cref="IToolProvider"/>, so the editor appears in the main
|
||||
/// menu's tool block, the novel editor hub and (with
|
||||
/// menu's tool block and (with
|
||||
/// <see cref="RpgMapEditorToolBoxButton"/>) the in-game toolbar.
|
||||
/// </summary>
|
||||
public class RpgMapEditorToolProvider : IToolProvider
|
||||
|
||||
Reference in new issue
Block a user