// Function from file: Hallucination.dm public void updateimage( ) { if (this.dir == GlobalVars.NORTH) { Lang13.Delete(this.currentimage); this.currentimage = null; this.currentimage = new Image(this.up, this); } else if (this.dir == GlobalVars.SOUTH) { Lang13.Delete(this.currentimage); this.currentimage = null; this.currentimage = new Image(this.down, this); } else if (this.dir == GlobalVars.EAST) { Lang13.Delete(this.currentimage); this.currentimage = null; this.currentimage = new Image(this.right, this); } else if (this.dir == GlobalVars.WEST) { Lang13.Delete(this.currentimage); this.currentimage = null; this.currentimage = new Image(this.left, this); } ((dynamic)this.my_target).WriteMsg(this.currentimage); return; }
// Function from file: garbage.dm public void HandleQueue(int time_to_stop = 0) { int? time_to_kill = null; dynamic refID = null; int? GCd_at_time = null; dynamic A = null; this.delslasttick = 0; this.gcedlasttick = 0; time_to_kill = Game13.time - this.collection_timeout; while (this.queue.len != 0 && Game13.timeofday < time_to_stop) { refID = this.queue[1]; if (!Lang13.Bool(refID)) { this.queue.Cut(1, 2); continue; } GCd_at_time = Lang13.IntNullable(this.queue[refID]); if ((GCd_at_time ?? 0) > (time_to_kill ?? 0)) { break; } A = null; if (!(refID is string)) { Lang13.Delete(A); A = null; } else { A = Lang13.FindObj(refID); if (Lang13.Bool(A) && A.gc_destroyed == GCd_at_time) { GlobalFuncs.testing(new Txt("GC: -- ").Ref(A).str(" | ").item(A.type).str(" was unable to be GC'd and was deleted --").ToString()); this.didntgc["" + A.type]++; Lang13.Delete(A); A = null; this.delslasttick++; this.totaldels++; } else { this.gcedlasttick++; this.totalgcs++; } } this.queue.Cut(1, 2); } return; }
// Function from file: mines.dm public override void mineEffect(Ent_Dynamic victim = null) { if (victim is Mob_Living && Lang13.Bool(((dynamic)victim).client)) { ((dynamic)victim).WriteMsg("<span class='userdanger'>You have been kicked FOR NO REISIN!</span>"); Lang13.Delete(((dynamic)victim).client); ((dynamic)victim).client = null; } 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: server_maintenance.dm public override void fire( ) { dynamic C = null; if (Convert.ToDouble(GlobalVars.config.kick_inactive) > 0) { foreach (dynamic _a in Lang13.Enumerate(GlobalVars.clients)) { C = _a; if (!Lang13.Bool(((dynamic)typeof(Client)).IsInstanceOfType(C))) { continue; } if (((Client)C).is_afk(6000) != 0) { if (!(C.mob is Mob_Dead)) { GlobalFuncs.log_access("AFK: " + GlobalFuncs.key_name(C)); C.WriteMsg("<span class='danger'>You have been inactive for more than 10 minutes and have been disconnected.</span>"); Lang13.Delete(C); C = null; } } } } if (GlobalVars.config.sql_enabled) { GlobalFuncs.sql_poll_players(); GlobalFuncs.sql_poll_admins(); } return; }
// Function from file: minimap.dm public void generate(dynamic z = null, int?x1 = null, int?y1 = null, int?x2 = null, int?y2 = null) { z = z ?? 1; x1 = x1 ?? 1; y1 = y1 ?? 1; x2 = x2 ?? Game13.map_size_x; y2 = y2 ?? Game13.map_size_y; Icon minimap = null; ByTable obj_icons = null; int counter = 0; dynamic T = null; dynamic tile = null; Icon tile_icon = null; dynamic obj = null; dynamic I = null; dynamic obj_icon = null; Icon flatten = null; Icon final = null; minimap = new Icon("icons/minimap.dmi"); minimap.Scale(GlobalVars.MINIMAP_SIZE, GlobalVars.MINIMAP_SIZE); obj_icons = new ByTable(); counter = 128; foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInBlock(Map13.GetTile(x1 ?? 0, y1 ?? 0, Convert.ToInt32(z)), Map13.GetTile(x2 ?? 0, y2 ?? 0, Convert.ToInt32(z))))) { T = _b; tile = T; tile_icon = null; obj = null; if (tile is Tile_Space) { obj = Lang13.FindIn(typeof(Obj_Structure_Lattice_Catwalk), tile); if (Lang13.Bool(obj)) { tile_icon = new Icon("icons/obj/smooth_structures/catwalk.dmi", "catwalk", GlobalVars.SOUTH); } obj = Lang13.FindIn(typeof(Obj_Structure_Lattice), tile); if (Lang13.Bool(obj)) { tile_icon = new Icon("icons/obj/smooth_structures/lattice.dmi", "lattice", GlobalVars.SOUTH); } obj = Lang13.FindIn(typeof(Obj_Structure_Grille), tile); if (Lang13.Bool(obj)) { tile_icon = new Icon("icons/obj/structures.dmi", "grille", GlobalVars.SOUTH); } obj = Lang13.FindIn(typeof(Obj_Structure_TransitTube), tile); if (Lang13.Bool(obj)) { tile_icon = new Icon("icons/obj/atmospherics/pipes/transit_tube.dmi", obj.icon_state, Lang13.DoubleNullable(obj.dir)); } } else { tile_icon = new Icon(tile.icon, tile.icon_state, Lang13.DoubleNullable(tile.dir)); obj_icons.Cut(); obj = Lang13.FindIn(typeof(Obj_Structure), tile); if (Lang13.Bool(obj)) { obj_icons.Add(GlobalFuncs.getFlatIcon(obj)); } obj = Lang13.FindIn(typeof(Obj_Machinery), tile); if (Lang13.Bool(obj)) { obj_icons.Add(new Icon(obj.icon, obj.icon_state, Lang13.DoubleNullable(obj.dir), 1, false)); } obj = Lang13.FindIn(typeof(Obj_Structure_Window), tile); if (Lang13.Bool(obj)) { obj_icons.Add(new Icon("icons/obj/smooth_structures/window.dmi", "window", GlobalVars.SOUTH)); } foreach (dynamic _a in Lang13.Enumerate(obj_icons)) { I = _a; obj_icon = I; tile_icon.Blend(obj_icon, 3); } } if (tile_icon != null) { tile_icon.Scale(GlobalVars.TILE_SIZE, GlobalVars.TILE_SIZE); minimap.Blend(tile_icon, 3, Lang13.DoubleNullable((tile.x - 1) * 8), Lang13.DoubleNullable((tile.y - 1) * 8)); Lang13.Delete(tile_icon); tile_icon = null; } counter--; if (counter <= 0) { counter = 128; flatten = new Icon(); flatten.Insert(minimap, "", GlobalVars.SOUTH, 1, false); Lang13.Delete(minimap); minimap = null; minimap = flatten; Task13.Sleep(-1); } } final = new Icon(); final.Insert(minimap, "", GlobalVars.SOUTH, 1, false); File13.Copy(final, this.map_path(z)); return; }