// Function from file: photography.dm public void printpicture(dynamic user = null, Icon temp = null, string mobs = null, bool?flag = null) { Obj_Item_Weapon_Photo P = null; Icon small_img = null; Icon ic = null; P = new Obj_Item_Weapon_Photo(GlobalFuncs.get_turf(this)); if (this.Adjacent(user)) { ((Mob)user).put_in_hands(P); } small_img = new Icon(temp); ic = new Icon("icons/obj/items.dmi", "photo"); small_img.Scale(8, 8); ic.Blend(small_img, 3, 10, 13); P.icon = ic; P.img = temp; P.desc = mobs; P.pixel_x = Rand13.Int(-10, 10); P.pixel_y = Rand13.Int(-10, 10); if (this.blueprints) { P.blueprints = true; this.blueprints = false; } return; }
// Function from file: displaycase.dm public override bool update_icon(dynamic new_state = null, dynamic new_icon = null, int?new_px = null, int?new_py = null) { Icon I = null; Icon S = null; if (this.open) { I = new Icon("icons/obj/stationobjs.dmi", "glassbox_open"); } else { I = new Icon("icons/obj/stationobjs.dmi", "glassbox0"); } if (this.destroyed) { I = new Icon("icons/obj/stationobjs.dmi", "glassboxb0"); } if (Lang13.Bool(this.showpiece)) { S = this.get_flat_icon_directional(this.showpiece); S.Scale(17, 17); I.Blend(S, 6, 8, 8); } this.icon = I; return(false); }
// Function from file: photography.dm public void aipicture(dynamic user = null, Icon temp = null, string mobs = null, bool isAi = false) { Icon small_img = null; Icon ic = null; Icon icon = null; Icon img = null; string desc = null; int pixel_x = 0; int pixel_y = 0; bool injectblueprints = false; small_img = new Icon(temp); ic = new Icon("icons/obj/items.dmi", "photo"); small_img.Scale(8, 8); ic.Blend(small_img, 3, 10, 13); icon = ic; img = temp; desc = mobs; pixel_x = Rand13.Int(-10, 10); pixel_y = Rand13.Int(-10, 10); injectblueprints = true; if (this.blueprints) { injectblueprints = true; this.blueprints = false; } if (isAi) { this.injectaialbum(icon, img, desc, pixel_x, pixel_y, injectblueprints); } else { this.injectmasteralbum(icon, img, desc, pixel_x, pixel_y, injectblueprints); } 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; }
// Function from file: photocopier.dm public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null) { int?i = null; Obj_Item_Weapon_Paper c = null; dynamic copied = null; int? i2 = null; Obj_Item_Weapon_Photo p = null; Icon I = null; Icon img = null; int? i3 = null; Icon temp_img = null; Obj_Item_Weapon_Photo p2 = null; Icon small_img = null; Icon ic = null; ByTable nametemp = null; dynamic find = null; Picture selection = null; Mob tempAI = null; Picture t = null; Obj_Item_Weapon_Photo p3 = null; Picture q = null; dynamic I2 = null; dynamic img2 = null; if (Lang13.Bool(base.Topic(href, href_list, (object)(hsrc)))) { return(null); } if (Lang13.Bool(href_list["copy"])) { if (Lang13.Bool(this.copy)) { i = null; i = 0; while ((i ?? 0) < (this.copies ?? 0)) { if (this.toner > 0 && !this.busy && Lang13.Bool(this.copy)) { c = new Obj_Item_Weapon_Paper(this.loc); if (Lang13.Length(this.copy.info) > 0) { if (this.toner > 10) { c.info = "<font color = #101010>"; } else { c.info = "<font color = #808080>"; } copied = this.copy.info; copied = GlobalFuncs.replacetext(copied, "<font face=\"" + "Verdana" + "\" color=", "<font face=\"" + "Verdana" + "\" nocolor="); copied = GlobalFuncs.replacetext(copied, "<font face=\"" + "Comic Sans MS" + "\" color=", "<font face=\"" + "Comic Sans MS" + "\" nocolor="); c.info += copied; c.info += "</font>"; c.name = this.copy.name; c.fields = Lang13.DoubleNullable(this.copy.fields); c.updateinfolinks(); this.toner--; } this.busy = true; Task13.Sleep(15); this.busy = false; } else { break; } i++; } this.updateUsrDialog(); } else if (Lang13.Bool(this.photocopy)) { i2 = null; i2 = 0; while ((i2 ?? 0) < (this.copies ?? 0)) { if (this.toner >= 5 && !this.busy && Lang13.Bool(this.photocopy)) { p = new Obj_Item_Weapon_Photo(this.loc); I = new Icon(this.photocopy.icon, this.photocopy.icon_state); img = new Icon(this.photocopy.img); if (this.greytoggle == "Greyscale") { if (this.toner > 10) { I.MapColors("#4d4d4d", "#969696", "#1c1c1c", "#000000"); img.MapColors("#4d4d4d", "#969696", "#1c1c1c", "#000000"); } else { I.MapColors("#4d4d4d", "#969696", "#1c1c1c", "#646464"); img.MapColors("#4d4d4d", "#969696", "#1c1c1c", "#646464"); } this.toner -= 5; } else if (this.greytoggle == "Color") { if (this.toner >= 10) { this.toner -= 10; } else { i2++; continue; } } p.icon = I; p.img = img; p.name = this.photocopy.name; p.desc = this.photocopy.desc; p.scribble = this.photocopy.scribble; p.pixel_x = Rand13.Int(-10, 10); p.pixel_y = Rand13.Int(-10, 10); p.blueprints = Lang13.Bool(this.photocopy.blueprints); this.busy = true; Task13.Sleep(15); this.busy = false; } else { break; } i2++; } } else if (this.ass != null) { i3 = null; i3 = 0; while ((i3 ?? 0) < (this.copies ?? 0)) { temp_img = null; if (this.ass is Mob_Living_Carbon_Human && (Lang13.Bool(((Mob)this.ass).get_item_by_slot(14)) || Lang13.Bool(((Mob)this.ass).get_item_by_slot(13)))) { Task13.User.WriteMsg("<span class='notice'>You feel kind of silly, copying " + (this.ass == Task13.User ? ((dynamic)("your")) : ((dynamic)(this.ass))) + (this.ass == Task13.User ? "" : "'s") + " ass with " + (this.ass == Task13.User ? "your" : "their") + " clothes on.</span>"); break; } else if (this.toner >= 5 && !this.busy && this.check_ass()) { if (this.ass is Mob_Living_Carbon_Alien_Humanoid || this.ass is Mob_Living_SimpleAnimal_Hostile_Alien) { temp_img = new Icon("icons/ass/assalien.png"); } else if (this.ass is Mob_Living_Carbon_Human) { if (this.ass.gender == GlobalVars.MALE) { temp_img = new Icon("icons/ass/assmale.png"); } else if (this.ass.gender == GlobalVars.FEMALE) { temp_img = new Icon("icons/ass/assfemale.png"); } else { temp_img = new Icon("icons/ass/assmale.png"); } } else if (this.ass is Mob_Living_SimpleAnimal_Drone || this.ass is Mob_Living_SimpleAnimal_Drone) { temp_img = new Icon("icons/ass/assdrone.png"); } else { break; } p2 = new Obj_Item_Weapon_Photo(this.loc); p2.desc = "You see " + this.ass + "'s ass on the photo."; p2.pixel_x = Rand13.Int(-10, 10); p2.pixel_y = Rand13.Int(-10, 10); p2.img = temp_img; small_img = new Icon(temp_img); ic = new Icon("icons/obj/items.dmi", "photo"); small_img.Scale(8, 8); ic.Blend(small_img, 3, 10, 13); p2.icon = ic; this.toner -= 5; this.busy = true; Task13.Sleep(15); this.busy = false; } else { break; } i3++; } } this.updateUsrDialog(); } else if (Lang13.Bool(href_list["remove"])) { if (Lang13.Bool(this.copy)) { if (!(Task13.User is Mob_Living_Silicon_Ai)) { this.copy.loc = Task13.User.loc; Task13.User.put_in_hands(this.copy); } else { this.copy.loc = this.loc; } Task13.User.WriteMsg("<span class='notice'>You take " + this.copy + " out of " + this + ".</span>"); this.copy = null; this.updateUsrDialog(); } else if (Lang13.Bool(this.photocopy)) { if (!(Task13.User is Mob_Living_Silicon_Ai)) { this.photocopy.loc = Task13.User.loc; Task13.User.put_in_hands(this.photocopy); } else { this.photocopy.loc = this.loc; } Task13.User.WriteMsg("<span class='notice'>You take " + this.photocopy + " out of " + this + ".</span>"); this.photocopy = null; this.updateUsrDialog(); } else if (this.check_ass()) { ((dynamic)this.ass).WriteMsg("<span class='notice'>You feel a slight pressure on your ass.</span>"); } } else if (Lang13.Bool(href_list["min"])) { if ((this.copies ?? 0) > 1) { this.copies--; this.updateUsrDialog(); } } else if (Lang13.Bool(href_list["add"])) { if ((this.copies ?? 0) < (this.maxcopies ?? 0)) { this.copies++; this.updateUsrDialog(); } } else if (Lang13.Bool(href_list["aipic"])) { if (!(Task13.User is Mob_Living_Silicon_Ai)) { return(null); } if (this.toner >= 5 && !this.busy) { nametemp = new ByTable(); find = null; selection = null; tempAI = Task13.User; if (((dynamic)tempAI).aicamera.aipictures.len == 0) { Task13.User.WriteMsg("<span class='boldannounce'>No images saved</span>"); return(null); } foreach (dynamic _a in Lang13.Enumerate(((dynamic)tempAI).aicamera.aipictures, typeof(Picture))) { t = _a; nametemp.Add(t.fields["name"]); } find = Interface13.Input("Select image (numbered in order taken)", null, null, null, nametemp, InputType.Any); p3 = new Obj_Item_Weapon_Photo(this.loc); foreach (dynamic _b in Lang13.Enumerate(((dynamic)tempAI).aicamera.aipictures, typeof(Picture))) { q = _b; if (q.fields["name"] == find) { selection = q; break; } } I2 = selection.fields["icon"]; img2 = selection.fields["img"]; p3.icon = I2; p3.img = img2; p3.desc = selection.fields["desc"]; p3.blueprints = Lang13.Bool(selection.fields["blueprints"]); p3.pixel_x = Rand13.Int(-10, 10); p3.pixel_y = Rand13.Int(-10, 10); this.toner -= 5; this.busy = true; Task13.Sleep(15); this.busy = false; } this.updateUsrDialog(); } else if (Lang13.Bool(href_list["colortoggle"])) { if (this.greytoggle == "Greyscale") { this.greytoggle = "Color"; } else { this.greytoggle = "Greyscale"; } this.updateUsrDialog(); } return(null); }