public override void Notify_QuestSignalReceived(Signal signal)
        {
            base.Notify_QuestSignalReceived(signal);
            if (signal.tag != inSignal)
            {
                return;
            }

            // fix for early versions saving ship as reference which results in it not loading
            if (requester == null && Find.CurrentMap != null)
            {
                requester = IncidentWorkerTraderShip.MakeTraderShip(Find.CurrentMap);
            }

            CompShip comp = requester.TryGetComp <CompShip>();

            if (comp != null)
            {
                comp.tradeRequest = this;
            }

            IncidentWorkerTraderShip.LandShip(map, requester);

            requester = null;
        }
 public override void AssignDebugData()
 {
     base.AssignDebugData();
     inSignal          = "DebugSignal" + Rand.Int;
     requester         = IncidentWorkerTraderShip.MakeTraderShip(Find.CurrentMap);
     requestedThingDef = ThingDefOf.Silver;
     requestedCount    = 100;
 }
        protected override void RunInt()
        {
            Slate slate = QuestGen.slate;
            Map   map   = QuestGen.slate.Get <Map>("map");

            Thing ship = IncidentWorkerTraderShip.MakeTraderShip(map);

            QuestGen.slate.Set(storeAs.GetValue(slate), ship, false);
            QuestGen.slate.Set(storeAs.GetValue(slate) + "_label", ship.LabelCap, false);
        }
示例#4
0
        protected override void RunInt()
        {
            Slate slate = QuestGen.slate;
            QuestPart_ShipsTradeRequest part = new QuestPart_ShipsTradeRequest();

            part.map       = slate.Get <Map>("map");
            part.requester = requester.GetValue(slate);
            if (part.requester == null)
            {
                part.requester = IncidentWorkerTraderShip.MakeTraderShip(part.map);
            }
            part.requestedThingDef = requestedThingDef.GetValue(slate);
            part.requestedCount    = requestedThingCount.GetValue(slate);
            part.inSignal          = slate.Get <string>("inSignal");
            QuestGen.quest.AddPart(part);
        }