// Function from file: subsystem.dm public Tgui try_update_ui(dynamic user = null, Game_Data src_object = null, string ui_key = null, Tgui ui = null, bool?force_open = null) { force_open = force_open ?? false; ui = ui ?? this.get_open_ui(user, src_object, ui_key); ByTable data = null; if (!(ui == null)) { data = src_object.ui_data(user); if (!(force_open == true)) { ui.push_data(data); } else { ui.reinitialize(null, data); } return(ui); } else { return(null); } }
// Function from file: subsystem.dm public int update_uis(Game_Data src_object = null) { string src_object_key = null; int update_count = 0; dynamic ui_key = null; Tgui ui = null; src_object_key = new Txt().Ref(src_object).ToString(); if (this.open_uis[src_object_key] == null || !(this.open_uis[src_object_key] is ByTable)) { return(0); } update_count = 0; foreach (dynamic _b in Lang13.Enumerate(this.open_uis[src_object_key])) { ui_key = _b; foreach (dynamic _a in Lang13.Enumerate(this.open_uis[src_object_key][ui_key], typeof(Tgui))) { ui = _a; if (ui != null && ui.src_object != null && Lang13.Bool(ui.user) && ui.src_object.ui_host() != null) { ui.process(); update_count++; } } } return(update_count); }
// Function from file: twohanded.dm public override void CheckParts(Game_Data holder = null) { dynamic G = null; dynamic C4 = null; Obj_Item_Weapon_Grenade_C4 C42 = null; if (Lang13.Bool(this.explosive)) { this.explosive.loc = GlobalFuncs.get_turf(this.loc); this.explosive = null; } G = Lang13.FindIn(typeof(Obj_Item_Weapon_Grenade), this.contents); if (Lang13.Bool(G)) { this.explosive = G; this.name = "explosive lance"; this.desc = "A makeshift spear with " + G + " attached to it. Alt+click on the spear to set your war cry!"; return; } C4 = Lang13.FindIn(typeof(Obj_Item_Weapon_C4), this.contents); if (Lang13.Bool(C4)) { C42 = new Obj_Item_Weapon_Grenade_C4(this); GlobalFuncs.qdel(C4); this.explosive = C42; this.desc = "A makeshift spear with " + C42 + " attached to it. Alt+click on the spear to set your war cry!"; } this.update_icon(); return; }
// Function from file: nanotrasen.dm public HtmlInterface_Nanotrasen(Game_Data _ref = null, string title = null, int?width = null, int?height = null, string head = null) : base(_ref, title, width, height, head) { // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; this.head = this.head + "<link rel=\"stylesheet\" type=\"text/css\" href=\"hi-nanotrasen.css\" />"; this.updateLayout(""); return; }
// Function from file: browser.dm public Browser(dynamic nuser = null, string nwindow_id = null, dynamic ntitle = null, int?nwidth = null, int?nheight = null, Game_Data nref = null) { ntitle = ntitle ?? 0; nwidth = nwidth ?? 0; nheight = nheight ?? 0; this.user = nuser; this.window_id = nwindow_id; if (Lang13.Bool(ntitle)) { this.title = GlobalFuncs.format_text(ntitle); } if (Lang13.Bool(nwidth)) { this.width = nwidth; } if (Lang13.Bool(nheight)) { this.height = nheight; } if (nref != null) { this.v_ref = nref; } this.add_stylesheet("common", "html/browser/common.css"); return; }
// Function from file: cards.dm public HtmlInterface_Cards(Game_Data _ref = null, string title = null, int?width = null, int?height = null, string head = null) : base(_ref, title, width, height, head) { // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; this.head = this.head + "<link rel=\"stylesheet\" type=\"text/css\" href=\"cards.css\" />"; this.updateLayout("<div id=\"headbar\"></div><div class=\"wrapper\"><table><tr><td style=\"vertical-align: middle;\"><div id=\"hand\"></div></td></tr></table></div>"); return; }
// Function from file: photography.dm public void injectmasteralbum(Icon icon = null, Icon img = null, string desc = null, int pixel_x = 0, int pixel_y = 0, bool blueprintsinject = false) { int numberer = 0; Ent_Static C = null; Game_Data picture = null; Picture P = null; numberer = 1; C = this.loc; if (Lang13.Bool(((dynamic)C).connected_ai)) { foreach (dynamic _a in Lang13.Enumerate(((dynamic)C).connected_ai.aicamera.aipictures, typeof(Game_Data))) { picture = _a; numberer++; } P = new Picture(); P.fields["name"] = "Image " + numberer + " (taken by " + this.loc.name + ")"; P.fields["icon"] = icon; P.fields["img"] = img; P.fields["desc"] = desc; P.fields["pixel_x"] = pixel_x; P.fields["pixel_y"] = pixel_y; P.fields["blueprints"] = blueprintsinject; ((dynamic)C).connected_ai.aicamera.aipictures.Add(P); Task13.User.WriteMsg("<span class='unconscious'>Image recorded and saved to remote database</span>"); } else { this.injectaialbum(icon, img, desc, pixel_x, pixel_y, blueprintsinject); } return; }
// Function from file: photography.dm public void injectaialbum(Icon icon = null, Icon img = null, string desc = null, int pixel_x = 0, int pixel_y = 0, bool blueprintsinject = false) { int numberer = 0; Game_Data picture = null; Picture P = null; numberer = 1; foreach (dynamic _a in Lang13.Enumerate(this.aipictures, typeof(Game_Data))) { picture = _a; numberer++; } P = new Picture(); P.fields["name"] = "Image " + numberer + " (taken by " + this.loc.name + ")"; P.fields["icon"] = icon; P.fields["img"] = img; P.fields["desc"] = desc; P.fields["pixel_x"] = pixel_x; P.fields["pixel_y"] = pixel_y; P.fields["blueprints"] = blueprintsinject; this.aipictures.Add(P); Task13.User.WriteMsg("<span class='unconscious'>Image recorded</span>"); return; }
// Function from file: subsystem.dm public Tgui get_open_ui(dynamic user = null, Game_Data src_object = null, string ui_key = null) { string src_object_key = null; Tgui ui = null; src_object_key = new Txt().Ref(src_object).ToString(); if (this.open_uis[src_object_key] == null || !(this.open_uis[src_object_key] is ByTable)) { return(null); } else if (this.open_uis[src_object_key][ui_key] == null || !(this.open_uis[src_object_key][ui_key] is ByTable)) { return(null); } foreach (dynamic _a in Lang13.Enumerate(this.open_uis[src_object_key][ui_key], typeof(Tgui))) { ui = _a; if (ui.user == user) { return(ui); } } return(null); }
// Function from file: reagents.dm public override dynamic Destroy( ) { dynamic _default = null; _default = base.Destroy(); this.holder = null; return(_default); }
// Function from file: conscious.dm public override int can_use_topic(Game_Data src_object = null, dynamic user = null) { if (Lang13.Bool(user.stat) == false) { return(2); } return(-1); }
// Function from file: disposal-structures.dm public Obj_Structure_Disposalpipe_Sortjunction(dynamic loc = null, Game_Data make_from = null) : base((object)(loc), make_from) { // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; this.updatedir(); this.updatedesc(); this.update(); return; }
// Function from file: AI_modules.dm public override dynamic transmitInstructions(Game_Data law_datum = null, dynamic sender = null) { if (Lang13.Bool(base.transmitInstructions(law_datum, (object)(sender)))) { return("" + this.targetName + ", but the AI's existing law 0 cannot be overriden."); } return(this.targetName); }
// Function from file: deep_inventory.dm public override int can_use_topic(Game_Data src_object = null, dynamic user = null) { if (!((Ent_Static)user).contains(src_object)) { return(-1); } return(((Mob)user).shared_ui_interaction(src_object)); }
// Function from file: self.dm public override int can_use_topic(Game_Data src_object = null, dynamic user = null) { if (src_object != user) { return(-1); } return(((Mob)user).shared_ui_interaction(src_object)); }
// Function from file: admin.dm public override int can_use_topic(Game_Data src_object = null, dynamic user = null) { if (GlobalFuncs.check_rights_for(user.client, 2)) { return(2); } return(-1); }
// Function from file: AI_modules.dm public virtual dynamic transmitInstructions(Game_Data law_datum = null, dynamic sender = null) { if (Lang13.Bool(((dynamic)law_datum).owner)) { ((dynamic)law_datum).owner.WriteMsg("<span class='userdanger'>" + sender + " has uploaded a change to the laws you must follow using a " + this.name + ". From now on, these are your laws: </span>"); } return(null); }
// Function from file: inventory.dm public override int can_use_topic(Game_Data src_object = null, dynamic user = null) { if (!Lang13.Bool(user.Contains(src_object))) { return(-1); } return(((Mob)user).shared_ui_interaction(src_object)); }
// Function from file: flamethrower.dm public override void CheckParts(Game_Data holder = null) { this.weldtool = Lang13.FindIn(typeof(Obj_Item_Weapon_Weldingtool), this.contents); this.igniter = Lang13.FindIn(typeof(Obj_Item_Device_Assembly_Igniter), this.contents); this.weldtool.status = 0; this.igniter.secured = false; this.status = true; this.update_icon(); return; }
// Function from file: AI_modules.dm public override bool install(Game_Data law_datum = null, dynamic user = null) { if (this.laws[1] == "") { user.WriteMsg("No law detected on module, please create one."); return(false); } base.install(law_datum, (object)(user)); return(false); }
// Function from file: mecha_construction_paths.dm public override void spawn_result( ) { Game_Data const_holder = null; const_holder = this.holder; ((dynamic)const_holder).construct = new Construction_Mecha_Honker(const_holder); ((dynamic)const_holder).density = 1; GlobalFuncs.qdel(this); return; }
// Function from file: AI_modules.dm public override bool install(Game_Data law_datum = null, dynamic user = null) { if (!Lang13.Bool(this.targetName)) { user.WriteMsg("No name detected on module, please enter one."); return(false); } base.install(law_datum, (object)(user)); return(false); }
// Function from file: disposal-structures.dm public Obj_Structure_Disposalpipe(dynamic loc = null, Game_Data make_from = null) : base((object)(loc)) { // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; if (make_from != null && !Lang13.Bool(make_from.gc_destroyed)) { this.base_icon_state = ((dynamic)make_from).base_state; this.dir = Convert.ToInt32(((dynamic)make_from).dir); this.dpdir = Convert.ToInt32(((dynamic)make_from).dpdir); ((dynamic)make_from).loc = this; this.stored = make_from; } else { this.base_icon_state = this.icon_state; this.stored = new Obj_Structure_Disposalconstruct(this, null, this.dir); switch ((string)(this.base_icon_state)) { case "pipe-s": ((dynamic)this.stored).ptype = 0; break; case "pipe-c": ((dynamic)this.stored).ptype = 1; break; case "pipe-j1": ((dynamic)this.stored).ptype = 2; break; case "pipe-j2": ((dynamic)this.stored).ptype = 3; break; case "pipe-y": ((dynamic)this.stored).ptype = 4; break; case "pipe-t": ((dynamic)this.stored).ptype = 5; break; case "pipe-j1s": ((dynamic)this.stored).ptype = 9; break; case "pipe-j2s": ((dynamic)this.stored).ptype = 10; break; } } return; }
// Function from file: disposal-structures.dm public Obj_Structure_Disposalpipe_Trunk(dynamic loc = null, Game_Data make_from = null) : base((object)(loc), make_from) { // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; this.dpdir = this.dir; Task13.Schedule(1, (Task13.Closure)(() => { this.getlinked(); return; })); this.update(); return; }
// Function from file: notcontained.dm public override int can_use_topic(Game_Data src_object = null, dynamic user = null) { int _default = 0; _default = ((Mob)user).shared_ui_interaction(src_object); if (_default > -1) { return(Num13.MinInt(_default, ((Mob)user).notcontained_can_use_topic(src_object))); } return(_default); }
// Function from file: construction_datum.dm public Construction(Game_Data atom = null) { // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; this.holder = atom; if (!(this.holder != null)) { GlobalFuncs.qdel(this); } this.set_desc(this.steps.len); return; }
// Function from file: mecha_construction_paths.dm public override void spawn_result( ) { Game_Data const_holder = null; const_holder = this.holder; ((dynamic)const_holder).construct = new Construction_Reversible_Mecha_Firefighter(const_holder); ((dynamic)const_holder).icon = "icons/mecha/mech_construction.dmi"; ((dynamic)const_holder).icon_state = "fireripley0"; ((dynamic)const_holder).density = 1; GlobalFuncs.qdel(this); return; }
// Function from file: mecha_construction_paths.dm public override void spawn_result( ) { Game_Data const_holder = null; const_holder = this.holder; ((dynamic)const_holder).construct = new Construction_Reversible_Mecha_Durand(const_holder); ((dynamic)const_holder).icon = "icons/mecha/mech_construction.dmi"; ((dynamic)const_holder).icon_state = "durand0"; ((dynamic)const_holder).density = 1; Lang13.Delete(this); Task13.Source = null; return; }
// Function from file: garbage.dm public void HandleToBeQueued(int time_to_stop = 0) { Game_Data _ref = null; while (this.tobequeued.len != 0 && Game13.timeofday < time_to_stop) { _ref = this.tobequeued[1]; this.Queue(_ref); this.tobequeued.Cut(1, 2); } return; }
// Function from file: smartfridge.dm public override void construction(dynamic pipe_type = null, dynamic obj_color = null) { Game_Data A = null; foreach (dynamic _a in Lang13.Enumerate(this.contents, typeof(Game_Data))) { A = _a; GlobalFuncs.qdel(A); } return; }