using Content.Shared.Mind;
using Content.Shared.Objectives;
using Content.Shared.Objectives.Components;
+using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared.Objectives.Systems;
public abstract class SharedObjectivesSystem : EntitySystem
{
[Dependency] private readonly SharedMindSystem _mind = default!;
+ [Dependency] private readonly IPrototypeManager _protoMan = default!;
private EntityQuery<MetaDataComponent> _metaQuery;
/// </summary>
public EntityUid? TryCreateObjective(EntityUid mindId, MindComponent mind, string proto)
{
+ if (!_protoMan.HasIndex<EntityPrototype>(proto))
+ return null;
+
var uid = Spawn(proto);
if (!TryComp<ObjectiveComponent>(uid, out var comp))
{
TechnologyDiskStealCollectionObjective: 1 #rnd
FigurineStealCollectionObjective: 0.3 #service
IDCardsStealCollectionObjective: 1
- CannabisStealCollectionObjective: 1
LAMPStealCollectionObjective: 2 #only for moth
- type: weightedRandom