// Function from file: console.dm
        public void Initialize(  )
        {
            Obj_Machinery_Abductor_Pad        p = null;
            Obj_Machinery_Abductor_Experiment e = null;
            Obj_Machinery_Computer_CameraAdvanced_Abductor c = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Abductor_Pad)))
            {
                p = _a;


                if (p.team == this.team)
                {
                    this.pad = p;
                    break;
                }
            }

            foreach (dynamic _b in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Abductor_Experiment)))
            {
                e = _b;


                if (e.team == this.team)
                {
                    this.experiment = e;
                    e.console       = this;
                }
            }

            foreach (dynamic _c in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Computer_CameraAdvanced_Abductor)))
            {
                c = _c;


                if (c.team == this.team)
                {
                    this.camera = c;
                    c.console   = this;
                }
            }
            return;
        }
Ejemplo n.º 2
0
        // Function from file: abduction.dm
        public override int check_completion(  )
        {
            int?    ab_team = null;
            dynamic H       = null;
            dynamic S       = null;
            Obj_Machinery_Abductor_Experiment E = null;

            ab_team = this.team;

            if (Lang13.Bool(this.owner))
            {
                if (!Lang13.Bool(this.owner.current) || !(this.owner.current is Mob_Living_Carbon_Human))
                {
                    return(0);
                }
                H = this.owner.current;

                if (H.dna.species.id != "abductor")
                {
                    return(0);
                }
                S       = H.dna.species;
                ab_team = Lang13.IntNullable(S.team);
            }

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Abductor_Experiment)))
            {
                E = _a;


                if (E.team == ab_team)
                {
                    if ((E.points ?? 0) >= Convert.ToDouble(this.target_amount))
                    {
                        return(1);
                    }
                    else
                    {
                        return(0);
                    }
                }
            }
            return(0);
        }