示例#1
0
        // Function from file: brand_intelligence.dm
        public override bool start(  )
        {
            Obj_Machinery_Vending V = null;


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


                if (V.z != 1)
                {
                    continue;
                }
                this.vendingMachines.Add(V);
            }

            if (!(this.vendingMachines.len != 0))
            {
                this.kill();
                return(false);
            }
            this.originMachine = Rand13.PickFromTable(this.vendingMachines);
            this.vendingMachines.Remove(this.originMachine);
            this.originMachine.shut_up         = 0;
            this.originMachine.shoot_inventory = true;
            return(false);
        }
示例#2
0
 // Function from file: vending.dm
 public Wires_Vending(Obj_Machinery_Vending holder = null) : base(holder)
 {
     this.wires = new ByTable(new object [] { "throw", "electrify", "speaker", "contraband", "idscan" });
     this.add_duds(1);
     // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
     return;
 }
示例#3
0
        // Function from file: brand_intelligence.dm
        public override void tick(  )
        {
            Obj_Machinery_Vending saved   = null;
            Obj_Machinery_Vending upriser = null;
            Mob_Living_SimpleAnimal_Hostile_Mimic_Copy M = null;
            dynamic rebel = null;


            if (!Lang13.Bool(this.originMachine) || Lang13.Bool(this.originMachine.gc_destroyed) || Lang13.Bool(this.originMachine.shut_up) || Lang13.Bool(((Wires)this.originMachine.wires).is_all_cut()))
            {
                foreach (dynamic _a in Lang13.Enumerate(this.infectedMachines, typeof(Obj_Machinery_Vending)))
                {
                    saved = _a;

                    saved.shoot_inventory = false;
                }

                if (Lang13.Bool(this.originMachine))
                {
                    ((Obj_Machinery_Vending)this.originMachine).speak("I am... vanquished. My people will remem...ber...meeee.");
                    ((Ent_Static)this.originMachine).visible_message("" + this.originMachine + " beeps and seems lifeless.");
                }
                this.kill();
                return;
            }
            this.vendingMachines = GlobalFuncs.removeNullsFromList(this.vendingMachines);

            if (!(this.vendingMachines.len != 0))
            {
                foreach (dynamic _b in Lang13.Enumerate(this.infectedMachines, typeof(Obj_Machinery_Vending)))
                {
                    upriser = _b;


                    if (Rand13.PercentChance(70) && !Lang13.Bool(upriser.gc_destroyed))
                    {
                        M              = new Mob_Living_SimpleAnimal_Hostile_Mimic_Copy(upriser.loc, upriser, null, true);
                        M.faction      = new ByTable(new object [] { "profit" });
                        M.speak        = this.rampant_speeches.Copy();
                        M.speak_chance = 7;
                    }
                    else
                    {
                        GlobalFuncs.explosion(upriser.loc, -1, 1, 2, 4, 0);
                        GlobalFuncs.qdel(upriser);
                    }
                }
                this.kill();
                return;
            }

            if (GlobalFuncs.IsMultiple(this.activeFor, 4))
            {
                rebel = Rand13.PickFromTable(this.vendingMachines);
                this.vendingMachines.Remove(rebel);
                this.infectedMachines.Add(rebel);
                rebel.shut_up         = 0;
                rebel.shoot_inventory = true;

                if (GlobalFuncs.IsMultiple(this.activeFor, 8))
                {
                    ((Obj_Machinery_Vending)this.originMachine).speak(Rand13.PickFromTable(this.rampant_speeches));
                }
            }
            return;
        }