From 40119ada0cd025c7b6f40157b4ae26c0b63f9b63 Mon Sep 17 00:00:00 2001 From: AndroidSFV Date: Fri, 28 Mar 2014 07:29:47 -0500 Subject: [PATCH 1/8] AI Photography Extention #2 Gives the ability to take and view photo to Cyborgs AI's share their photo album with connected Cyborgs, and connected Cyborgs have the pictures they take saved to the AI's album. If a Cyborg is not connected to an AI, photos are saved to the Cyborg's camera object. If a Cyborg has photos in it's album while not connected to an AI, but is subsequently connected to an AI, the photos are added to the AI's album. This is initiated by pulsing the appropriate wire on the borg. Cyborgs can attach images to newscaster feeds, from the active album available to it (the AI's, or its own if disconnected) Cyborgs cannot interact with photocopiers, but however have become a moving printer. They are every inefficent at printing, and thus can only print two color pictures before needing to be refilled with toner (simply click on them with toner in active hand). Added some span classes to the previous AI photography work. One minor bug fix to photocopier which could result in a photo object ending up in the 'hand' of an AI or cyborg. --- code/_onclick/cyborg.dm | 4 + code/datums/wires/robot.dm | 14 ++ code/game/machinery/newscaster.dm | 39 ++++- code/modules/mob/living/silicon/ai/ai.dm | 4 +- .../modules/mob/living/silicon/robot/robot.dm | 15 ++ code/modules/paperwork/photocopier.dm | 2 +- code/modules/paperwork/photography.dm | 147 +++++++++++++++--- 7 files changed, 199 insertions(+), 26 deletions(-) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 14291469c77..b0ad4f0ebb3 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -43,6 +43,10 @@ RestrainedClickOn(A) return */ + if(aicamera.in_camera_mode) //Cyborg picture taking + aicamera.camera_mode_off() + aicamera.captureimage(A, usr) + return var/obj/item/W = get_active_hand() diff --git a/code/datums/wires/robot.dm b/code/datums/wires/robot.dm index 56c9e53e905..8685e749234 100644 --- a/code/datums/wires/robot.dm +++ b/code/datums/wires/robot.dm @@ -56,6 +56,20 @@ var/const/BORG_WIRE_CAMERA = 16 if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI if(!R.emagged) R.connected_ai = select_active_ai() + var/numberer = 1 // Send images the Cyborg has taken to the AI's album upon sync. + for(var/datum/picture/z in R.aicamera.aipictures) + for(var/datum/picture/t in R.connected_ai.aicamera.aipictures) //Hopefully to prevent someone spamming images to silicons, by spamming this wire + if((z.fields["pixel_y"] != t.fields["pixel_y"]) && (z.fields["pixel_x"] != t.fields["pixel_x"])) //~2.26 out of 1000 chance this will stop something it shouldn't + var/datum/picture/p = new() + p = z + p.fields["name"] = "Uploaded Image [numberer] (synced from [R.name])" + R.connected_ai.aicamera.aipictures += p + else + continue + numberer++ + if(R.aicamera.aipictures.len > 0) + R << "Locally saved images synced with AI. Images were retained in local database in case of loss of connection with the AI." + if (BORG_WIRE_CAMERA) if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index ca98373bad7..aead22bf419 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -787,7 +787,10 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co /obj/machinery/newscaster/proc/AttachPhoto(mob/user as mob) if(photo) photo.loc = src.loc - user.put_in_inactive_hand(photo) + if(!issilicon(user)) + user.put_in_inactive_hand(photo) + else + qdel(photo) photo = null if(istype(user.get_active_hand(), /obj/item/weapon/photo)) photo = user.get_active_hand() @@ -799,7 +802,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co var/datum/picture/selection var/mob/living/silicon/ai/tempAI = user if(tempAI.aicamera.aipictures.len == 0) - usr << "No images saved" + usr << "No images saved" return for(var/datum/picture/t in tempAI.aicamera.aipictures) nametemp += t.fields["name"] @@ -813,6 +816,38 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co P.img = selection.fields["img"] P.desc = selection.fields["desc"] photo = P + if(istype(usr,/mob/living/silicon/robot)) + var/list/nametemp = list() + var/find + var/datum/picture/selection + var/mob/living/silicon/robot/R = user + if(R.connected_ai) + if(R.connected_ai.aicamera.aipictures.len == 0) + usr << "No images saved" + return + for(var/datum/picture/t in R.connected_ai.aicamera.aipictures) + nametemp += t.fields["name"] + find = input("Select image (numbered in order taken)") in nametemp + for(var/datum/picture/q in R.connected_ai.aicamera.aipictures) + if(q.fields["name"] == find) + selection = q + break // just in case some AI decides to take 10 thousand pictures in a round + else + if(R.aicamera.aipictures.len == 0) + usr << "No images saved" + return + for(var/datum/picture/t in R.aicamera.aipictures) + nametemp += t.fields["name"] + find = input("Select image (numbered in order taken)") in nametemp + for(var/datum/picture/q in R.aicamera.aipictures) + if(q.fields["name"] == find) + selection = q + break // just in case some AI decides to take 10 thousand pictures in a round + var/obj/item/weapon/photo/P = new/obj/item/weapon/photo() + P.icon = selection.fields["icon"] + P.img = selection.fields["img"] + P.desc = selection.fields["desc"] + photo = P diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index f078b822e3d..141c5047419 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -29,7 +29,7 @@ var/list/ai_list = list() var/icon/holo_icon//Default is assigned when AI is created. var/obj/item/device/pda/ai/aiPDA = null var/obj/item/device/multitool/aiMulti = null - var/obj/item/device/camera/ai_camera/aicamera = null + var/obj/item/device/camera/siliconcam/aicamera = null //MALFUNCTION var/datum/module_picker/malf_picker @@ -86,7 +86,7 @@ var/list/ai_list = list() aiPDA.name = name + " (" + aiPDA.ownjob + ")" aiMulti = new(src) - aicamera = new/obj/item/device/camera/ai_camera(src) + aicamera = new/obj/item/device/camera/siliconcam/ai_camera(src) if (istype(loc, /turf)) verbs.Add(/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \ diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 4a33a9a6d3e..81442ed4806 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -57,6 +57,9 @@ var/obj/item/weapon/tank/internal = null //Hatred. Used if a borg has a jetpack. var/obj/item/robot_parts/robot_suit/robot_suit = null //Used for deconstruction to remember what the borg was constructed out of.. + var/obj/item/device/camera/siliconcam/aicamera = null //photography + var/toner = 0 + var/tonermax = 40 @@ -112,6 +115,9 @@ mmi.brainmob.container = mmi mmi.contents += mmi.brainmob + aicamera = new/obj/item/device/camera/siliconcam/robot_camera(src) + toner = 40 + playsound(loc, 'sound/voice/liveagain.ogg', 75, 1) @@ -564,6 +570,15 @@ else usr << "Upgrade error!" + else if(istype(W, /obj/item/device/toner)) + if(toner >= tonermax) + usr << "The toner level of [src] is at it's highest level possible" + else + toner = 40 + usr.drop_item() + qdel(W) + usr << "You fill the toner level of [src] to it's max capacity" + else if(W.force) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index b002c91a8dc..1df8ee0aa83 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -188,7 +188,7 @@ var/datum/picture/selection var/mob/living/silicon/ai/tempAI = usr if(tempAI.aicamera.aipictures.len == 0) - usr << "No images saved" + usr << "No images saved" return for(var/datum/picture/t in tempAI.aicamera.aipictures) nametemp += t.fields["name"] diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index fb4741480ab..39b40b523fe 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -106,27 +106,54 @@ var/pictures_left = 10 var/on = 1 var/blueprints = 0 //are blueprints visible in the current photo being created? - var/list/aipictures = list() //Allows for storage of pictures taken by AI, in a similar manner the datacore stores info + var/list/aipictures = list() //Allows for storage of pictures taken by AI, in a similar manner the datacore stores info. Keeping this here allows us to share some procs w/ regualar camera -/obj/item/device/camera/ai_camera //camera AI can take pictures with - name = "AI photo camera" +/obj/item/device/camera/siliconcam + name = "silicon photo camera" var/in_camera_mode = 0 - verb/picture() +/obj/item/device/camera/siliconcam/ai_camera //camera AI can take pictures with + name = "AI photo camera" + + /obj/item/device/camera/siliconcam/ai_camera/verb/picture() set category ="AI Commands" set name = "Take Image" set src in usr toggle_camera_mode() - verb/viewpicture() + /obj/item/device/camera/siliconcam/ai_camera/verb/viewpicture() set category ="AI Commands" set name = "View Images" set src in usr viewpictures() +/obj/item/device/camera/siliconcam/robot_camera //camera cyborgs can take pictures with.. needs it's own because of verb CATEGORY >.> + name = "Cyborg photo camera" + + /obj/item/device/camera/siliconcam/robot_camera/verb/picture() + set category ="Robot Commands" + set name = "Take Image" + set src in usr + + toggle_camera_mode() + + /obj/item/device/camera/siliconcam/robot_camera/verb/viewpicture() + set category ="Robot Commands" + set name = "View Images" + set src in usr + + viewpictures(usr) + + /obj/item/device/camera/siliconcam/robot_camera/verb/borgprinting() + set category ="Robot Commands" + set name = "Print Image" + set src in usr + + borgprint() + /obj/item/device/camera/attack(mob/living/carbon/human/M, mob/user) return @@ -232,10 +259,10 @@ temp.Blend("#000", ICON_OVERLAY) temp.Blend(camera_get_icon(turfs, target), ICON_OVERLAY) - if(!isAi) + if(!issilicon(user)) printpicture(user, temp, mobs, flag) else - aipicture(user, temp, mobs, blueprints) + aipicture(user, temp, mobs, isAi, blueprints) @@ -258,7 +285,7 @@ blueprints = 0 -/obj/item/device/camera/proc/aipicture(mob/user, icon/temp, mobs) //instead of printing a picture like a regular camera would, we do this instead for the AI +/obj/item/device/camera/proc/aipicture(mob/user, icon/temp, mobs, isAi) //instead of printing a picture like a regular camera would, we do this instead for the AI var/icon/small_img = icon(temp) var/icon/ic = icon('icons/obj/items.dmi',"photo") @@ -275,7 +302,10 @@ injectblueprints = 1 blueprints = 0 - injectaialbum(icon, img, desc, pixel_x, pixel_y, injectblueprints) + if(isAi) + injectaialbum(icon, img, desc, pixel_x, pixel_y, injectblueprints) + else + injectmasteralbum(icon, img, desc, pixel_x, pixel_y, injectblueprints) /datum/picture @@ -288,7 +318,7 @@ for(var/datum/picture in src.aipictures) numberer++ var/datum/picture/P = new() - P.fields["name"] = "Image [numberer]" + P.fields["name"] = "Image [numberer] (taken by [src.loc.name])" P.fields["icon"] = icon P.fields["img"] = img P.fields["desc"] = desc @@ -297,21 +327,40 @@ P.fields["blueprints"] = blueprintsinject aipictures += P - usr << "Image recorded" //feedback to the AI player that the picture was taken + usr << "Image recorded" //feedback to the AI player that the picture was taken +/obj/item/device/camera/proc/injectmasteralbum(var/icon, var/img, var/desc, var/pixel_x, var/pixel_y, var/blueprintsinject) //stores image information to a list similar to that of the datacore + var/numberer = 1 + var/mob/living/silicon/robot/C = src.loc + if(C.connected_ai) + for(var/datum/picture in C.connected_ai.aicamera.aipictures) + numberer++ + var/datum/picture/P = new() + P.fields["name"] = "Image [numberer] (taken by [src.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 -/obj/item/device/camera/ai_camera/proc/viewpictures() //AI proc for viewing pictures they have taken + C.connected_ai.aicamera.aipictures += P + usr << "Image recorded and saved to remote database" //feedback to the Cyborg player that the picture was taken + else + injectaialbum(icon, img, desc, pixel_x, pixel_y, blueprintsinject) + +obj/item/device/camera/siliconcam/proc/viewpichelper(var/obj/item/device/camera/siliconcam/targetloc) var/list/nametemp = list() var/find var/datum/picture/selection - if(src.aipictures.len == 0) - usr << "No images saved" + if(targetloc.aipictures.len == 0) + usr << "No images saved" return - for(var/datum/picture/t in src.aipictures) + for(var/datum/picture/t in targetloc.aipictures) nametemp += t.fields["name"] find = input("Select image (numbered in order taken)") in nametemp var/obj/item/weapon/photo/P = new/obj/item/weapon/photo() - for(var/datum/picture/q in src.aipictures) + for(var/datum/picture/q in targetloc.aipictures) if(q.fields["name"] == find) selection = q break // just in case some AI decides to take 10 thousand pictures in a round @@ -323,7 +372,22 @@ P.show(usr) usr << P.desc - qdel(P) //so 10 thousdand pictures items are not left in memory should an AI take them and then view them all. + qdel(P) //so 10 thousand picture items are not left in memory should an AI take them and then view them all + +obj/item/device/camera/siliconcam/proc/viewpictures(user) + if(isrobot(user)) // Cyborg + var/mob/living/silicon/robot/C = src.loc + var/obj/item/device/camera/siliconcam/Cinfo + if(C.connected_ai) + Cinfo = C.connected_ai.aicamera + viewpichelper(Cinfo) + else + Cinfo = C.aicamera + viewpichelper(Cinfo) + else // AI + var/Ainfo = src + viewpichelper(Ainfo) + /obj/item/device/camera/afterattack(atom/target, mob/user, flag) if(!on || !pictures_left || ismob(target.loc)) return @@ -340,16 +404,57 @@ icon_state = "camera" on = 1 -/obj/item/device/camera/ai_camera/proc/toggle_camera_mode() +/obj/item/device/camera/siliconcam/proc/toggle_camera_mode() if(in_camera_mode) camera_mode_off() else camera_mode_on() -/obj/item/device/camera/ai_camera/proc/camera_mode_off() +/obj/item/device/camera/siliconcam/proc/camera_mode_off() src.in_camera_mode = 0 usr << "Camera Mode deactivated" -/obj/item/device/camera/ai_camera/proc/camera_mode_on() +/obj/item/device/camera/siliconcam/proc/camera_mode_on() src.in_camera_mode = 1 - usr << "Camera Mode activated" \ No newline at end of file + usr << "Camera Mode activated" + +obj/item/device/camera/siliconcam/robot_camera/proc/borgprint() + var/list/nametemp = list() + var/find + var/datum/picture/selection + var/mob/living/silicon/robot/C = src.loc + if(C.toner < 20) + usr << "Insufficent toner to print image." + return + if(C.connected_ai) + if(C.connected_ai.aicamera.aipictures.len == 0) + usr << "No images saved" + return + for(var/datum/picture/t in C.connected_ai.aicamera.aipictures) + nametemp += t.fields["name"] + find = input("Select image (numbered in order taken)") in nametemp + for(var/datum/picture/q in C.connected_ai.aicamera.aipictures) + if(q.fields["name"] == find) + selection = q + break + else + if(aipictures.len == 0) + usr << "No images saved" + return + for(var/datum/picture/t in aipictures) + nametemp += t.fields["name"] + find = input("Select image (numbered in order taken)") in nametemp + for(var/datum/picture/q in aipictures) + if(q.fields["name"] == find) + selection = q + break + var/obj/item/weapon/photo/p = new /obj/item/weapon/photo(C.loc) + var/icon/I = selection.fields["icon"] + var/icon/img = selection.fields["img"] + p.icon = I + p.img = img + p.desc = selection.fields["desc"] + p.blueprints = selection.fields["blueprints"] + p.pixel_x = rand(-10, 10) + p.pixel_y = rand(-10, 10) + C.toner -= 20 //Cyborgs are very ineffeicient at printing an image \ No newline at end of file From abf202f55ae75080630923e00123b3bfbc84079e Mon Sep 17 00:00:00 2001 From: AndroidSFV Date: Fri, 28 Mar 2014 08:07:06 -0500 Subject: [PATCH 2/8] Changelog --- html/changelog.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/html/changelog.html b/html/changelog.html index 474612e7494..d42e598b52d 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -53,6 +53,18 @@ should be listed in the changelog upon commit tho. Thanks. --> +
+

28 March 2014

+

AndroidSFV updated:

+
    +
  • Roboticists on another Nanotransen station have successfully intergrated digital cameras to all cyborg platforms. +
    Additionally, they've linked the Cyborg's data storage of images to that of a station's Artifical Intelligence, allowing for omni-directional sharing of recorded images between silicon platforms. +
    They have also intergrated a printing device into cyborg platforms, however it is very inefficient and requires a large amount of toner. +
    These modifications have been approved for implimentation across all NT stations, effective immeadiately. +
    P.S. They also made it so Cyborgs can attach images to newscaster feeds. The sigificance of this seems... dubious, but we've given your station's cyborgs that too. +
+
+

25 March 2014

Ikarrus updated:

From cd11d8725442ed1cb930a170eb25eeaee417c951 Mon Sep 17 00:00:00 2001 From: AndroidSFV Date: Sat, 29 Mar 2014 02:44:18 -0500 Subject: [PATCH 3/8] Added some feedback to cyborgs and others nearby when they print a picture. --- code/modules/paperwork/photography.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 39b40b523fe..db0cd193cf6 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -4,6 +4,7 @@ * Camera Film * Photos * Photo Albums + * AI Photography */ /* @@ -457,4 +458,6 @@ obj/item/device/camera/siliconcam/robot_camera/proc/borgprint() p.blueprints = selection.fields["blueprints"] p.pixel_x = rand(-10, 10) p.pixel_y = rand(-10, 10) - C.toner -= 20 //Cyborgs are very ineffeicient at printing an image \ No newline at end of file + C.toner -= 20 //Cyborgs are very ineffeicient at printing an image + visible_message("[C.name] spits out a photograph from a narrow slot on it's chassis.") + usr << "You print a photograph." \ No newline at end of file From c7c085ffeece9bba6687e2140224cdf69d449fa3 Mon Sep 17 00:00:00 2001 From: AndroidSFV Date: Sun, 6 Apr 2014 11:58:34 -0500 Subject: [PATCH 4/8] Reduces "much duplicate" code. --- code/game/machinery/newscaster.dm | 33 +++++++++++---------------- code/modules/paperwork/photography.dm | 33 +++++++++++---------------- 2 files changed, 26 insertions(+), 40 deletions(-) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index aead22bf419..b72f59988fd 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -821,28 +821,21 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co var/find var/datum/picture/selection var/mob/living/silicon/robot/R = user + var/obj/item/device/camera/siliconcam/targetcam = null if(R.connected_ai) - if(R.connected_ai.aicamera.aipictures.len == 0) - usr << "No images saved" - return - for(var/datum/picture/t in R.connected_ai.aicamera.aipictures) - nametemp += t.fields["name"] - find = input("Select image (numbered in order taken)") in nametemp - for(var/datum/picture/q in R.connected_ai.aicamera.aipictures) - if(q.fields["name"] == find) - selection = q - break // just in case some AI decides to take 10 thousand pictures in a round + targetcam = R.connected_ai.aicamera else - if(R.aicamera.aipictures.len == 0) - usr << "No images saved" - return - for(var/datum/picture/t in R.aicamera.aipictures) - nametemp += t.fields["name"] - find = input("Select image (numbered in order taken)") in nametemp - for(var/datum/picture/q in R.aicamera.aipictures) - if(q.fields["name"] == find) - selection = q - break // just in case some AI decides to take 10 thousand pictures in a round + targetcam = R.aicamera + if(targetcam.aipictures.len == 0) + usr << "No images saved" + return + for(var/datum/picture/t in targetcam.aipictures) + nametemp += t.fields["name"] + find = input("Select image (numbered in order taken)") in nametemp + for(var/datum/picture/q in targetcam.aipictures) + if(q.fields["name"] == find) + selection = q + break var/obj/item/weapon/photo/P = new/obj/item/weapon/photo() P.icon = selection.fields["icon"] P.img = selection.fields["img"] diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index db0cd193cf6..5f61ac1b7c1 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -424,31 +424,24 @@ obj/item/device/camera/siliconcam/robot_camera/proc/borgprint() var/find var/datum/picture/selection var/mob/living/silicon/robot/C = src.loc + var/obj/item/device/camera/siliconcam/targetcam = null if(C.toner < 20) usr << "Insufficent toner to print image." return if(C.connected_ai) - if(C.connected_ai.aicamera.aipictures.len == 0) - usr << "No images saved" - return - for(var/datum/picture/t in C.connected_ai.aicamera.aipictures) - nametemp += t.fields["name"] - find = input("Select image (numbered in order taken)") in nametemp - for(var/datum/picture/q in C.connected_ai.aicamera.aipictures) - if(q.fields["name"] == find) - selection = q - break + targetcam = C.connected_ai.aicamera else - if(aipictures.len == 0) - usr << "No images saved" - return - for(var/datum/picture/t in aipictures) - nametemp += t.fields["name"] - find = input("Select image (numbered in order taken)") in nametemp - for(var/datum/picture/q in aipictures) - if(q.fields["name"] == find) - selection = q - break + targetcam = C.aicamera + if(targetcam.aipictures.len == 0) + usr << "No images saved" + return + for(var/datum/picture/t in targetcam.aipictures) + nametemp += t.fields["name"] + find = input("Select image (numbered in order taken)") in nametemp + for(var/datum/picture/q in targetcam.aipictures) + if(q.fields["name"] == find) + selection = q + break var/obj/item/weapon/photo/p = new /obj/item/weapon/photo(C.loc) var/icon/I = selection.fields["icon"] var/icon/img = selection.fields["img"] From 333604152d50edd6c2109c91e41adf827b49fb05 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Mon, 7 Apr 2014 17:39:29 +0400 Subject: [PATCH 5/8] Fixed a bug where holy water had to be applied twice for blessing --- code/game/turfs/turf.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index c27b4893cc2..d0150d440d2 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -22,6 +22,8 @@ var/icon_old = null var/pathweight = 1 + flags = 0 + /turf/New() ..() for(var/atom/movable/AM as mob|obj in src) From 1521b488c41221d61631448ce201670c32cce03f Mon Sep 17 00:00:00 2001 From: AndroidSFV Date: Sat, 12 Apr 2014 12:54:33 -0500 Subject: [PATCH 6/8] Removed a thing because Miauw is right --- code/game/machinery/newscaster.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index cb03fde534c..b940a9ad480 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -791,8 +791,6 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co photo.loc = src.loc if(!issilicon(user)) user.put_in_inactive_hand(photo) - else - qdel(photo) photo = null if(istype(user.get_active_hand(), /obj/item/weapon/photo)) photo = user.get_active_hand() From 58b602a59e4e2be1130b6d43dc62f7f12d8361f4 Mon Sep 17 00:00:00 2001 From: AndroidSFV Date: Sat, 12 Apr 2014 14:00:51 -0500 Subject: [PATCH 7/8] Gia's Feedback. Thanks!! --- code/game/machinery/newscaster.dm | 8 ++-- code/modules/paperwork/photography.dm | 68 +++++++++++++-------------- 2 files changed, 36 insertions(+), 40 deletions(-) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index b940a9ad480..5f495df8b8c 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -796,7 +796,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co photo = user.get_active_hand() user.drop_item() photo.loc = src - if(istype(usr,/mob/living/silicon/ai)) + if(istype(user,/mob/living/silicon/ai)) var/list/nametemp = list() var/find var/datum/picture/selection @@ -816,7 +816,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co P.img = selection.fields["img"] P.desc = selection.fields["desc"] photo = P - if(istype(usr,/mob/living/silicon/robot)) + if(istype(user,/mob/living/silicon/robot)) var/list/nametemp = list() var/find var/datum/picture/selection @@ -837,9 +837,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co selection = q break var/obj/item/weapon/photo/P = new/obj/item/weapon/photo() - P.icon = selection.fields["icon"] - P.img = selection.fields["img"] - P.desc = selection.fields["desc"] + P.construct(selection.fields["icon"], selection.fields["img"], selection.fields["desc"]) photo = P diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index b1dd2e71fdb..fb9637ca84f 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -78,6 +78,11 @@ name = "photo[(n_name ? text("- '[n_name]'") : null)]" add_fingerprint(usr) +/obj/item/weapon/photo/proc/construct(var/inicon, var/inimg, var/indesc, var/inblueprints) + icon = inicon + img = inimg + desc = indesc + blueprints = inblueprints /* * Photo album @@ -117,43 +122,43 @@ /obj/item/device/camera/siliconcam/ai_camera //camera AI can take pictures with name = "AI photo camera" - /obj/item/device/camera/siliconcam/ai_camera/verb/picture() - set category ="AI Commands" - set name = "Take Image" - set src in usr +/obj/item/device/camera/siliconcam/ai_camera/verb/picture() + set category ="AI Commands" + set name = "Take Image" + set src in usr - toggle_camera_mode() + toggle_camera_mode() - /obj/item/device/camera/siliconcam/ai_camera/verb/viewpicture() - set category ="AI Commands" - set name = "View Images" - set src in usr +/obj/item/device/camera/siliconcam/ai_camera/verb/viewpicture() + set category ="AI Commands" + set name = "View Images" + set src in usr - viewpictures() + viewpictures() /obj/item/device/camera/siliconcam/robot_camera //camera cyborgs can take pictures with.. needs it's own because of verb CATEGORY >.> name = "Cyborg photo camera" - /obj/item/device/camera/siliconcam/robot_camera/verb/picture() - set category ="Robot Commands" - set name = "Take Image" - set src in usr +/obj/item/device/camera/siliconcam/robot_camera/verb/picture() + set category ="Robot Commands" + set name = "Take Image" + set src in usr - toggle_camera_mode() + toggle_camera_mode() - /obj/item/device/camera/siliconcam/robot_camera/verb/viewpicture() - set category ="Robot Commands" - set name = "View Images" - set src in usr +/obj/item/device/camera/siliconcam/robot_camera/verb/viewpicture() + set category ="Robot Commands" + set name = "View Images" + set src in usr - viewpictures(usr) + viewpictures(usr) - /obj/item/device/camera/siliconcam/robot_camera/verb/borgprinting() - set category ="Robot Commands" - set name = "Print Image" - set src in usr +/obj/item/device/camera/siliconcam/robot_camera/verb/borgprinting() + set category ="Robot Commands" + set name = "Print Image" + set src in usr - borgprint() + borgprint() /obj/item/device/camera/attack(mob/living/carbon/human/M, mob/user) @@ -365,9 +370,7 @@ obj/item/device/camera/siliconcam/proc/viewpichelper(var/obj/item/device/camera/ if(q.fields["name"] == find) selection = q break // just in case some AI decides to take 10 thousand pictures in a round - P.icon = selection.fields["icon"] - P.img = selection.fields["img"] - P.desc = selection.fields["desc"] + P.construct(selection.fields["icon"], selection.fields["img"], selection.fields["desc"]) P.pixel_x = selection.fields["pixel_x"] P.pixel_y = selection.fields["pixel_y"] @@ -443,14 +446,9 @@ obj/item/device/camera/siliconcam/robot_camera/proc/borgprint() selection = q break var/obj/item/weapon/photo/p = new /obj/item/weapon/photo(C.loc) - var/icon/I = selection.fields["icon"] - var/icon/img = selection.fields["img"] - p.icon = I - p.img = img - p.desc = selection.fields["desc"] - p.blueprints = selection.fields["blueprints"] + p.construct(selection.fields["icon"], selection.fields["img"], selection.fields["desc"], selection.fields["blueprints"]) p.pixel_x = rand(-10, 10) p.pixel_y = rand(-10, 10) C.toner -= 20 //Cyborgs are very ineffeicient at printing an image visible_message("[C.name] spits out a photograph from a narrow slot on it's chassis.") - usr << "You print a photograph." + usr << "You print a photograph." From 7c297c426285b215a02c1ecb32993b9c95ebc376 Mon Sep 17 00:00:00 2001 From: Giacomand Date: Sun, 20 Apr 2014 11:13:43 +0100 Subject: [PATCH 8/8] Ports Pandemic machine fix from https://github.com/NTStation/NTstation13/pull/469 --- code/modules/reagents/Chemistry-Machinery.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index a0f1b088155..cf33cbb7529 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -645,6 +645,7 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime) D = new type(0, null) if(!D) return + replicator_cooldown(50) var/list/data = list("viruses"=list(D)) var/name = sanitize(input(usr,"Name:","Name the culture",D.name)) if(!name || name == " ") name = D.name @@ -652,7 +653,6 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime) B.desc = "A small bottle. Contains [D.agent] culture in synthblood medium." B.reagents.add_reagent("blood",20,data) src.updateUsrDialog() - replicator_cooldown(50) else src.temp_html = "The replicator is not ready yet." src.updateUsrDialog()