// Function from file: cart.dm public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null) { Ent_Static pda = null; Obj_Item_Radio_Integrated_Signal S = null; Obj_Item_Radio_Integrated_Signal S2 = null; double new_frequency = 0; Obj_Item_Radio_Integrated_Signal S3 = null; double?pnum = null; string pda_owner_name = null; string message = null; Newscaster_FeedChannel current = null; Newscaster_FeedChannel chan = null; base.Topic(href, href_list, (object)(hsrc)); if (!Task13.User.canmove || Task13.User.stat != 0 || Task13.User.restrained() || !(Map13.GetDistance(this.loc, Task13.User) <= 1)) { Task13.User.unset_machine(); Interface13.Browse(Task13.User, null, "window=pda"); return(null); } pda = this.loc; dynamic _c = href_list["choice"]; // Was a switch-case, sorry for the mess. if (_c == "Medical Records") { this.active1 = GlobalFuncs.find_record("id", href_list["target"], GlobalVars.data_core.general); if (this.active1 != null) { this.active2 = GlobalFuncs.find_record("id", href_list["target"], GlobalVars.data_core.medical); } ((dynamic)pda).mode = 441; this.mode = 441; if (!(this.active2 != null)) { this.active1 = null; } } else if (_c == "Security Records") { this.active1 = GlobalFuncs.find_record("id", href_list["target"], GlobalVars.data_core.general); if (this.active1 != null) { this.active3 = GlobalFuncs.find_record("id", href_list["target"], GlobalVars.data_core.security); } ((dynamic)pda).mode = 451; this.mode = 451; if (!(this.active3 != null)) { this.active1 = null; } } else if (_c == "Send Signal") { Task13.Schedule(0, (Task13.Closure)(() => { S = this.radio; S.send_signal("ACTIVATE"); return; return; })); } else if (_c == "Signal Frequency") { S2 = this.radio; new_frequency = GlobalFuncs.sanitize_frequency(S2.frequency + (String13.ParseNumber(href_list["sfreq"]) ?? 0)); S2.set_frequency(new_frequency); } else if (_c == "Signal Code") { S3 = this.radio; S3.code += String13.ParseNumber(href_list["scode"]) ?? 0; S3.code = Num13.Floor(S3.code); S3.code = Num13.MinInt(100, ((int)(S3.code))); S3.code = Num13.MaxInt(1, ((int)(S3.code))); } else if (_c == "Status") { dynamic _a = href_list["statdisp"]; // Was a switch-case, sorry for the mess. if (_a == "message") { this.post_status("message", this.message1, this.message2); } else if (_a == "alert") { this.post_status("alert", href_list["alert"]); } else if (_a == "setmsg1") { this.message1 = GlobalFuncs.reject_bad_text(Interface13.Input("Line 1", "Enter Message Text", this.message1, null, null, InputType.Str | InputType.Null), 40); this.updateSelfDialog(); } else if (_a == "setmsg2") { this.message2 = GlobalFuncs.reject_bad_text(Interface13.Input("Line 2", "Enter Message Text", this.message2, null, null, InputType.Str | InputType.Null), 40); this.updateSelfDialog(); } else { this.post_status(href_list["statdisp"]); } } else if (_c == "Power Select") { pnum = String13.ParseNumber(href_list["target"]); this.powmonitor = this.powermonitors[pnum]; ((dynamic)pda).mode = 433; this.mode = 433; } else if (_c == "Supply Orders") { ((dynamic)pda).mode = 47; this.mode = 47; } else if (_c == "Newscaster Access") { this.mode = 53; } else if (_c == "Newscaster Message") { pda_owner_name = (Lang13.Bool(((dynamic)pda).id) ? "" + ((dynamic)pda).id.registered_name + " (" + ((dynamic)pda).id.assignment + ")" : "Unknown"); message = ((Obj_Item_Device_Pda)pda).msg_input(); current = null; foreach (dynamic _b in Lang13.Enumerate(GlobalVars.news_network.network_channels, typeof(Newscaster_FeedChannel))) { chan = _b; if (chan.channel_name == this.current_channel) { current = chan; } } if (current.locked && current.author != pda_owner_name) { ((dynamic)pda).cart += "<h5> ERROR : NOT AUTHORIZED " + (Lang13.Bool(((dynamic)pda).id) ? "" : "- ID SLOT EMPTY") + " </h5>"; pda.Topic(null, new ByTable().Set("choice", "Refresh")); return(null); } GlobalVars.news_network.SubmitArticle(message, ((dynamic)pda).owner, this.current_channel); pda.Topic(null, new ByTable().Set("choice", String13.NumberToString(this.mode))); return(null); } else if (_c == "Newscaster Switch Channel") { this.current_channel = ((Obj_Item_Device_Pda)pda).msg_input(); pda.Topic(null, new ByTable().Set("choice", String13.NumberToString(this.mode))); return(null); } if (Lang13.Bool(href_list["op"])) { dynamic _d = href_list["op"]; // Was a switch-case, sorry for the mess. if (_d == "control") { this.active_bot = Lang13.FindObj(href_list["bot"]); } else if (_d == "botlist") { this.active_bot = null; } else if (_d == "summon") { ((Mob_Living_SimpleAnimal_Bot)this.active_bot).bot_control("summon", null, GlobalFuncs.get_turf(Task13.User), ((dynamic)pda).GetAccess()); } else { ((Mob_Living_SimpleAnimal_Bot)this.active_bot).bot_control(href_list["op"], Task13.User); } } if (Lang13.Bool(href_list["mule"])) { ((Mob_Living_SimpleAnimal_Bot)this.active_bot).bot_control(href_list["mule"], Task13.User); } this.generate_menu(Task13.User); this.print_to_host(this.menu); return(null); }