// Function from file: photography.dm public Picture selectpicture(Obj_Item_Device_Camera_Siliconcam targetloc = null) { ByTable nametemp = null; dynamic find = null; Picture t = null; Picture q = null; nametemp = new ByTable(); if (targetloc.aipictures.len == 0) { Task13.User.WriteMsg("<span class='boldannounce'>No images saved</span>"); return(null); } foreach (dynamic _a in Lang13.Enumerate(targetloc.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); foreach (dynamic _b in Lang13.Enumerate(targetloc.aipictures, typeof(Picture))) { q = _b; if (q.fields["name"] == find) { return(q); } } return(null); }
// Function from file: photography.dm public void viewpictures(dynamic user = null) { Ent_Static C = null; Obj_Item_Device_Camera_Siliconcam Cinfo = null; Obj_Item_Device_Camera_Siliconcam Ainfo = null; if (user is Mob_Living_Silicon_Robot) { C = this.loc; if (Lang13.Bool(((dynamic)C).connected_ai)) { Cinfo = ((dynamic)C).connected_ai.aicamera; this.viewpichelper(Cinfo); } else { Cinfo = ((dynamic)C).aicamera; this.viewpichelper(Cinfo); } } else { Ainfo = this; this.viewpichelper(Ainfo); } return; }
// Function from file: photography.dm public void viewpichelper(Obj_Item_Device_Camera_Siliconcam targetloc = null) { Obj_Item_Weapon_Photo P = null; Picture selection = null; P = new Obj_Item_Weapon_Photo(); selection = this.selectpicture(targetloc); if (selection != null) { P.photocreate(selection.fields["icon"], selection.fields["img"], selection.fields["desc"]); P.pixel_x = Convert.ToInt32(selection.fields["pixel_x"]); P.pixel_y = Convert.ToInt32(selection.fields["pixel_y"]); P.show(Task13.User); Task13.User.WriteMsg(P.desc); } GlobalFuncs.qdel(P); return; }
// Function from file: photography.dm public void borgprint( ) { ByTable nametemp = null; dynamic find = null; Picture selection = null; Ent_Static C = null; Obj_Item_Device_Camera_Siliconcam targetcam = null; Picture t = null; Picture q = null; Obj_Item_Weapon_Photo p = null; nametemp = new ByTable(); C = this.loc; targetcam = null; if (Convert.ToDouble(((dynamic)C).toner) < 20) { Task13.User.WriteMsg("Insufficent toner to print image."); return; } if (Lang13.Bool(((dynamic)C).connected_ai)) { targetcam = ((dynamic)C).connected_ai.aicamera; } else { targetcam = ((dynamic)C).aicamera; } if (targetcam.aipictures.len == 0) { Task13.User.WriteMsg("<span class='userdanger'>No images saved</span>"); return; } foreach (dynamic _a in Lang13.Enumerate(targetcam.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); foreach (dynamic _b in Lang13.Enumerate(targetcam.aipictures, typeof(Picture))) { q = _b; if (q.fields["name"] == find) { selection = q; break; } } p = new Obj_Item_Weapon_Photo(C.loc); p.photocreate(selection.fields["icon"], selection.fields["img"], selection.fields["desc"], selection.fields["blueprints"]); p.pixel_x = Rand13.Int(-10, 10); p.pixel_y = Rand13.Int(-10, 10); ((dynamic)C).toner -= 20; this.visible_message("" + C.name + " spits out a photograph from a narrow slot on it's chassis."); Task13.User.WriteMsg("<span class='notice'>You print a photograph.</span>"); return; }