Exemplo n.º 1
0
        // Function from file: gang.dm
        public override int?process(dynamic seconds = null)
        {
            ByTable winners = null;
            Gang    G       = null;
            Gang    G2      = null;

            winners = new ByTable();

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.ticker.mode.gangs, typeof(Gang)))
            {
                G = _a;


                if (Game13.time > this.next_point_time)
                {
                    G.income();
                }

                if (Lang13.Bool(Lang13.IsNumber(G.dom_timer)))
                {
                    G.dom_timer -= seconds / 10;

                    if (Convert.ToDouble(G.dom_timer) < 0)
                    {
                        winners.Add(G);
                    }
                }
            }

            if (Game13.time > this.next_point_time)
            {
                this.next_point_time = Game13.time + this.next_point_interval;
            }

            if (winners.len != 0)
            {
                if (winners.len > 1)
                {
                    foreach (dynamic _b in Lang13.Enumerate(winners, typeof(Gang)))
                    {
                        G2 = _b;

                        G2.domination(0.5);
                    }
                    GlobalFuncs.priority_announce("Multiple station takeover attempts have made simultaneously. Conflicting takeover attempts appears to have restarted.", "Network Alert");
                }
                else
                {
                    GlobalVars.ticker.mode.explosion_in_progress = true;
                    GlobalVars.ticker.station_explosion_cinematic(1);
                    GlobalVars.ticker.mode.explosion_in_progress = false;
                    GlobalVars.ticker.force_ending = Rand13.PickFromTable(winners);
                }
            }
            return(null);
        }