mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station.git
This commit is contained in:
@@ -46,6 +46,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()
|
||||
|
||||
|
||||
@@ -59,6 +59,20 @@ var/const/BORG_WIRE_CAMERA = 16
|
||||
if(new_ai && (new_ai != R.connected_ai))
|
||||
R.connected_ai = new_ai
|
||||
R.notify_ai(1)
|
||||
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 << "<span class='notice'>Locally saved images synced with AI. Images were retained in local database in case of loss of connection with the AI.</span>"
|
||||
|
||||
|
||||
if (BORG_WIRE_CAMERA)
|
||||
if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes)
|
||||
|
||||
+1053
-1029
File diff suppressed because it is too large
Load Diff
@@ -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)
|
||||
|
||||
@@ -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, \
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -579,6 +585,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)
|
||||
@@ -1103,4 +1118,4 @@
|
||||
if(2) //New Module
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.</span><br>"
|
||||
if(3) //New Name
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>"
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>"
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
var/datum/picture/selection
|
||||
var/mob/living/silicon/ai/tempAI = usr
|
||||
if(tempAI.aicamera.aipictures.len == 0)
|
||||
usr << "<FONT COLOR=red><B>No images saved<B>"
|
||||
usr << "<spanclass='userdanger'>No images saved</span>"
|
||||
return
|
||||
for(var/datum/picture/t in tempAI.aicamera.aipictures)
|
||||
nametemp += t.fields["name"]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Camera Film
|
||||
* Photos
|
||||
* Photo Albums
|
||||
* AI Photography
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -77,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
|
||||
@@ -106,26 +112,53 @@
|
||||
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()
|
||||
set category ="AI Commands"
|
||||
set name = "Take Image"
|
||||
set src in usr
|
||||
/obj/item/device/camera/siliconcam/ai_camera //camera AI can take pictures with
|
||||
name = "AI photo camera"
|
||||
|
||||
toggle_camera_mode()
|
||||
/obj/item/device/camera/siliconcam/ai_camera/verb/picture()
|
||||
set category ="AI Commands"
|
||||
set name = "Take Image"
|
||||
set src in usr
|
||||
|
||||
verb/viewpicture()
|
||||
set category ="AI Commands"
|
||||
set name = "View Images"
|
||||
set src in usr
|
||||
toggle_camera_mode()
|
||||
|
||||
viewpictures()
|
||||
/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)
|
||||
@@ -232,10 +265,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 +291,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 +308,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 +324,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,33 +333,65 @@
|
||||
P.fields["blueprints"] = blueprintsinject
|
||||
|
||||
aipictures += P
|
||||
usr << "<FONT COLOR=blue><B>Image recorded</B>" //feedback to the AI player that the picture was taken
|
||||
usr << "<span class='unconscious'>Image recorded</span>" //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 << "<span class='unconscious'>Image recorded and saved to remote database</span>" //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 << "<FONT COLOR=red><B>No images saved</B>"
|
||||
if(targetloc.aipictures.len == 0)
|
||||
usr << "<span class='userdanger'>No images saved</span>"
|
||||
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
|
||||
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"]
|
||||
|
||||
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 +408,47 @@
|
||||
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 << "<B>Camera Mode deactivated</B>"
|
||||
|
||||
/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 << "<B>Camera Mode activated</B>"
|
||||
usr << "<B>Camera Mode activated</B>"
|
||||
|
||||
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
|
||||
var/obj/item/device/camera/siliconcam/targetcam = null
|
||||
if(C.toner < 20)
|
||||
usr << "Insufficent toner to print image."
|
||||
return
|
||||
if(C.connected_ai)
|
||||
targetcam = C.connected_ai.aicamera
|
||||
else
|
||||
targetcam = C.aicamera
|
||||
if(targetcam.aipictures.len == 0)
|
||||
usr << "<span class='userdanger'>No images saved</span>"
|
||||
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)
|
||||
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."
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -104,6 +104,7 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
||||
</div>
|
||||
|
||||
<div class='commit sansserif'>
|
||||
|
||||
<h2 class='date'>3 April 2014</h2>
|
||||
<h3 class='author'>Ikarrus updated:</h3>
|
||||
<ul class='changes bgimages16'>
|
||||
|
||||
Reference in New Issue
Block a user