Пример #1
0
        // Function from file: newscaster.dm
        public void submitWanted(dynamic criminal = null, string body = null, string scanned_user = null, dynamic photo = null, bool?adminMsg = null, bool?newMessage = null)
        {
            adminMsg   = adminMsg ?? false;
            newMessage = newMessage ?? false;

            Obj_Machinery_Newscaster N = null;

            this.wanted_issue.active      = true;
            this.wanted_issue.criminal    = criminal;
            this.wanted_issue.body        = body;
            this.wanted_issue.scannedUser = scanned_user;
            this.wanted_issue.isAdminMsg  = adminMsg;

            if (Lang13.Bool(photo))
            {
                this.wanted_issue.img = photo.img;
            }

            if (newMessage == true)
            {
                foreach (dynamic _a in Lang13.Enumerate(GlobalVars.allCasters, typeof(Obj_Machinery_Newscaster)))
                {
                    N = _a;

                    N.newsAlert();
                    N.update_icon();
                }
            }
            return;
        }
Пример #2
0
        // Function from file: newscaster.dm
        public void deleteWanted(  )
        {
            Obj_Machinery_Newscaster NEWSCASTER = null;

            this.wanted_issue.active      = false;
            this.wanted_issue.criminal    = null;
            this.wanted_issue.body        = null;
            this.wanted_issue.scannedUser = null;
            this.wanted_issue.img         = null;

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.allCasters, typeof(Obj_Machinery_Newscaster)))
            {
                NEWSCASTER = _a;

                NEWSCASTER.update_icon();
            }
            return;
        }
Пример #3
0
        // Function from file: newscaster.dm
        public void SubmitArticle(dynamic msg = null, string author = null, dynamic channel_name = null, dynamic photo = null, bool?adminMessage = null, int?allow_comments = null)
        {
            adminMessage   = adminMessage ?? false;
            allow_comments = allow_comments ?? 1;

            Newscaster_FeedMessage   newMsg     = null;
            Newscaster_FeedChannel   FC         = null;
            Obj_Machinery_Newscaster NEWSCASTER = null;

            newMsg                  = new Newscaster_FeedMessage();
            newMsg.author           = author;
            newMsg.body             = msg;
            newMsg.time_stamp       = "" + GlobalFuncs.worldtime2text();
            newMsg.is_admin_message = adminMessage;
            newMsg.locked           = !Lang13.Bool(allow_comments);

            if (Lang13.Bool(photo))
            {
                newMsg.img     = photo.img;
                newMsg.caption = photo.scribble;
            }

            foreach (dynamic _a in Lang13.Enumerate(this.network_channels, typeof(Newscaster_FeedChannel)))
            {
                FC = _a;


                if (FC.channel_name == channel_name)
                {
                    FC.messages.Add(newMsg);
                    break;
                }
            }

            foreach (dynamic _b in Lang13.Enumerate(GlobalVars.allCasters, typeof(Obj_Machinery_Newscaster)))
            {
                NEWSCASTER = _b;

                NEWSCASTER.newsAlert(channel_name);
            }
            this.lastAction++;
            newMsg.creationTime = this.lastAction;
            return;
        }