Fix RCD errors (#40278)
This commit is contained in:
@@ -125,7 +125,7 @@ public sealed class RCDMenuBoundUserInterface : BoundUserInterface
|
|||||||
var name = Loc.GetString(proto.SetName);
|
var name = Loc.GetString(proto.SetName);
|
||||||
|
|
||||||
if (proto.Prototype != null &&
|
if (proto.Prototype != null &&
|
||||||
_prototypeManager.Resolve(proto.Prototype, out var entProto))
|
_prototypeManager.TryIndex(proto.Prototype, out var entProto)) // don't use Resolve because this can be a tile
|
||||||
{
|
{
|
||||||
name = entProto.Name;
|
name = entProto.Name;
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ public sealed class RCDMenuBoundUserInterface : BoundUserInterface
|
|||||||
|
|
||||||
if (proto.Mode is RcdMode.ConstructTile or RcdMode.ConstructObject
|
if (proto.Mode is RcdMode.ConstructTile or RcdMode.ConstructObject
|
||||||
&& proto.Prototype != null
|
&& proto.Prototype != null
|
||||||
&& _prototypeManager.Resolve(proto.Prototype, out var entProto))
|
&& _prototypeManager.TryIndex(proto.Prototype, out var entProto)) // don't use Resolve because this can be a tile
|
||||||
{
|
{
|
||||||
tooltip = Loc.GetString(entProto.Name);
|
tooltip = Loc.GetString(entProto.Name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public sealed class RCDSystem : EntitySystem
|
|||||||
var name = Loc.GetString(prototype.SetName);
|
var name = Loc.GetString(prototype.SetName);
|
||||||
|
|
||||||
if (prototype.Prototype != null &&
|
if (prototype.Prototype != null &&
|
||||||
_protoManager.Resolve(prototype.Prototype, out var proto))
|
_protoManager.TryIndex(prototype.Prototype, out var proto)) // don't use Resolve because this can be a tile
|
||||||
name = proto.Name;
|
name = proto.Name;
|
||||||
|
|
||||||
msg = Loc.GetString("rcd-component-examine-build-details", ("name", name));
|
msg = Loc.GetString("rcd-component-examine-build-details", ("name", name));
|
||||||
|
|||||||
Reference in New Issue
Block a user