You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//[property: LocoStructOffset(0xB96C), LocoArrayLength((int)Limits.kMaxCompanies)] Company[] Companies // this isn't actually part of the data chunk in a scenario!
146
146
)
147
147
:ILocoStruct
@@ -155,9 +155,9 @@ public record GameStateScenarioA(
//[property: LocoStructOffset(0x123480), LocoArrayLength((int)Limits.kMaxEntities)] Entity[] Entities // this isn't actually part of the data chunk in a scenario!
162
162
):ILocoStruct
163
163
{
@@ -167,11 +167,11 @@ public record GameStateScenarioB(
Copy file name to clipboardExpand all lines: Gui/Models/ObjectEditorModel.cs
+41-31Lines changed: 41 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -187,61 +187,65 @@ bool TryLoadOnlineFile(FileSystemItemBase filesystemItem, out UiDatLocoFile? loc
187
187
188
188
if(!OnlineCache.TryGetValue(uniqueObjectId,outvarcachedLocoObjDto))// issue - if an object doesn't download its full file, it's 'header' will remain in cache but unable to attempt redownload
189
189
{
190
+
Logger.Debug($"Didn't find object {filesystemItem.DisplayName} with unique id {uniqueObjectId} in cache - downloading it from {ObjectServiceClient.WebClient.BaseAddress}");
191
+
190
192
if(ObjectServiceClient==null)
191
193
{
192
194
Logger.Error("Object service client is null");
193
195
returnfalse;
194
196
}
195
197
196
-
Logger.Debug($"Didn't find object {filesystemItem.DisplayName} with unique id {uniqueObjectId} in cache - downloading it from {ObjectServiceClient.WebClient.BaseAddress}");
if(cachedLocoObjDto.ObjectSourceisObjectSource.LocomotionSteam or ObjectSource.LocomotionGoG)
207
212
{
208
-
Logger.Warning("This is a vanilla object. The DAT file cannot be downloaded due to copyright. Any available metadata will still be shown.");
213
+
Logger.Warning($"Unable to download object {filesystemItem.DisplayName} with unique id {uniqueObjectId} from online - requested object is a vanilla object and it is illegal to distribute copyright material. Any available metadata will still be shown");
214
+
continue;
209
215
}
210
216
211
-
Logger.Warning($"Unable to download object {filesystemItem.DisplayName} with unique id {uniqueObjectId} from online - received no DAT object data. Any available metadata will still be shown.");
212
-
}
213
-
elseif(cachedLocoObjDto.ObjectSourceisObjectSource.LocomotionSteam or ObjectSource.LocomotionGoG)
214
-
{
215
-
Logger.Warning($"Unable to download object {filesystemItem.DisplayName} with unique id {uniqueObjectId} from online - requested object is a vanilla object and it is illegal to distribute copyright material. Any available metadata will still be shown.");
216
-
}
217
-
218
-
Logger.Debug(cachedLocoObjDto.ToString());
217
+
if(string.IsNullOrEmpty(datObject.DatBytes))
218
+
{
219
+
Logger.Warning($"Unable to download object {filesystemItem.DisplayName} with unique id {uniqueObjectId} from online - received no DAT object data. Any available metadata will still be shown");
Logger.Warning($"Unable to download object {filesystemItem.DisplayName} with unique id {uniqueObjectId} from online - received no DAT object data. Any available metadata will still be shown.");
Logger.Info($"Saved the downloaded object {filesystemItem.DisplayName} with unique id {uniqueObjectId} as {filename}");
226
+
Logger.Warning($"Unable to download object {filesystemItem.DisplayName} with unique id {uniqueObjectId} from online - received DAT object data, but it was unable to be decoded. Any available metadata will still be shown");
0 commit comments