mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +01:00
fix a runtime and some usr to user (#16849)
* fix a runtimg and some usr to user * . * . * more usr
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
|
||||
if(!camera)
|
||||
return
|
||||
var/obj/item/photo/selection = camera.selectpicture()
|
||||
var/obj/item/photo/selection = camera.selectpicture(ui.user)
|
||||
if (!selection)
|
||||
return
|
||||
|
||||
|
||||
@@ -21,29 +21,29 @@
|
||||
p.name = "Image [photos_taken][sufix]"
|
||||
aipictures += p
|
||||
|
||||
/obj/item/camera/siliconcam/proc/injectmasteralbum(obj/item/photo/p) //stores image information to a list similar to that of the datacore
|
||||
var/mob/living/silicon/robot/C = usr
|
||||
/obj/item/camera/siliconcam/proc/injectmasteralbum(mob/user, obj/item/photo/p) //stores image information to a list similar to that of the datacore
|
||||
var/mob/living/silicon/robot/C = user
|
||||
if(C.connected_ai)
|
||||
C.connected_ai.aiCamera.injectaialbum(p.copy(1), " (synced from [C.name])")
|
||||
to_chat(C.connected_ai, span_unconscious("Image uploaded by [C.name]"))
|
||||
to_chat(usr, span_unconscious("Image synced to remote database")) //feedback to the Cyborg player that the picture was taken
|
||||
to_chat(user, span_unconscious("Image synced to remote database")) //feedback to the Cyborg player that the picture was taken
|
||||
else
|
||||
to_chat(usr, span_unconscious("Image recorded"))
|
||||
to_chat(user, span_unconscious("Image recorded"))
|
||||
// Always save locally
|
||||
injectaialbum(p)
|
||||
|
||||
/obj/item/camera/siliconcam/proc/selectpicture(obj/item/camera/siliconcam/cam)
|
||||
/obj/item/camera/siliconcam/proc/selectpicture(mob/user, obj/item/camera/siliconcam/cam)
|
||||
if(!cam)
|
||||
cam = getsource()
|
||||
cam = getsource(user)
|
||||
|
||||
var/list/nametemp = list()
|
||||
var/find
|
||||
if(cam.aipictures.len == 0)
|
||||
to_chat(usr, span_userdanger("No images saved"))
|
||||
to_chat(user, span_userdanger("No images saved"))
|
||||
return
|
||||
for(var/obj/item/photo/t in cam.aipictures)
|
||||
nametemp += t.name
|
||||
find = tgui_input_list(usr, "Select image (numbered in order taken)", "Picture Choice", nametemp)
|
||||
find = tgui_input_list(user, "Select image (numbered in order taken)", "Picture Choice", nametemp)
|
||||
if(!find)
|
||||
return
|
||||
|
||||
@@ -51,48 +51,50 @@
|
||||
if(q.name == find)
|
||||
return q
|
||||
|
||||
/obj/item/camera/siliconcam/proc/viewpictures()
|
||||
var/obj/item/photo/selection = selectpicture()
|
||||
/obj/item/camera/siliconcam/proc/viewpictures(mob/user)
|
||||
var/obj/item/photo/selection = selectpicture(user)
|
||||
|
||||
if(!selection)
|
||||
return
|
||||
|
||||
selection.show(usr)
|
||||
to_chat(usr,selection.desc)
|
||||
selection.show(user)
|
||||
|
||||
/obj/item/camera/siliconcam/proc/deletepicture(obj/item/camera/siliconcam/cam)
|
||||
var/selection = selectpicture(cam)
|
||||
if(selection.desc)
|
||||
to_chat(user,selection.desc)
|
||||
|
||||
/obj/item/camera/siliconcam/proc/deletepicture(mob/user, obj/item/camera/siliconcam/cam)
|
||||
var/selection = selectpicture(user, cam)
|
||||
|
||||
if(!selection)
|
||||
return
|
||||
|
||||
aipictures -= selection
|
||||
to_chat(usr, span_unconscious("Local image deleted"))
|
||||
to_chat(user, span_unconscious("Local image deleted"))
|
||||
|
||||
/obj/item/camera/siliconcam/ai_camera/can_capture_turf(turf/T, mob/user)
|
||||
var/mob/living/silicon/ai = user
|
||||
return ai.TurfAdjacent(T)
|
||||
|
||||
/obj/item/camera/siliconcam/proc/toggle_camera_mode()
|
||||
/obj/item/camera/siliconcam/proc/toggle_camera_mode(mob/user)
|
||||
if(in_camera_mode)
|
||||
camera_mode_off()
|
||||
camera_mode_off(user)
|
||||
else
|
||||
camera_mode_on()
|
||||
camera_mode_on(user)
|
||||
|
||||
/obj/item/camera/siliconcam/proc/camera_mode_off()
|
||||
/obj/item/camera/siliconcam/proc/camera_mode_off(mob/user)
|
||||
src.in_camera_mode = 0
|
||||
to_chat(usr, span_infoplain(span_bold("Camera Mode deactivated")))
|
||||
to_chat(user, span_infoplain(span_bold("Camera Mode deactivated")))
|
||||
|
||||
/obj/item/camera/siliconcam/proc/camera_mode_on()
|
||||
/obj/item/camera/siliconcam/proc/camera_mode_on(mob/user)
|
||||
src.in_camera_mode = 1
|
||||
to_chat(usr, span_infoplain(span_bold("Camera Mode activated")))
|
||||
to_chat(user, span_infoplain(span_bold("Camera Mode activated")))
|
||||
|
||||
/obj/item/camera/siliconcam/ai_camera/printpicture(mob/user, obj/item/photo/p)
|
||||
injectaialbum(p)
|
||||
to_chat(usr, span_unconscious("Image recorded"))
|
||||
to_chat(user, span_unconscious("Image recorded"))
|
||||
|
||||
/obj/item/camera/siliconcam/robot_camera/printpicture(mob/user, obj/item/photo/p)
|
||||
injectmasteralbum(p)
|
||||
injectmasteralbum(user, p)
|
||||
|
||||
/mob/living/silicon/ai/proc/take_image()
|
||||
set category = "AI.Commands"
|
||||
@@ -100,7 +102,7 @@
|
||||
set desc = "Takes an image"
|
||||
|
||||
if(aiCamera)
|
||||
aiCamera.toggle_camera_mode()
|
||||
aiCamera.toggle_camera_mode(src)
|
||||
|
||||
/mob/living/silicon/ai/proc/view_images()
|
||||
set category = "AI.Commands"
|
||||
@@ -108,7 +110,7 @@
|
||||
set desc = "View images"
|
||||
|
||||
if(aiCamera)
|
||||
aiCamera.viewpictures()
|
||||
aiCamera.viewpictures(src)
|
||||
|
||||
/mob/living/silicon/ai/proc/delete_images()
|
||||
set category = "AI.Commands"
|
||||
@@ -116,7 +118,7 @@
|
||||
set desc = "Delete image"
|
||||
|
||||
if(aiCamera)
|
||||
aiCamera.deletepicture()
|
||||
aiCamera.deletepicture(src)
|
||||
|
||||
/mob/living/silicon/robot/proc/take_image()
|
||||
set category ="Abilities.Silicon"
|
||||
@@ -124,7 +126,7 @@
|
||||
set desc = "Takes an image"
|
||||
|
||||
if(aiCamera)
|
||||
aiCamera.toggle_camera_mode()
|
||||
aiCamera.toggle_camera_mode(src)
|
||||
|
||||
/mob/living/silicon/robot/proc/view_images()
|
||||
set category ="Abilities.Silicon"
|
||||
@@ -132,7 +134,7 @@
|
||||
set desc = "View images"
|
||||
|
||||
if(aiCamera)
|
||||
aiCamera.viewpictures()
|
||||
aiCamera.viewpictures(src)
|
||||
|
||||
/mob/living/silicon/robot/proc/delete_images()
|
||||
set category = "Abilities.Silicon"
|
||||
@@ -140,13 +142,13 @@
|
||||
set desc = "Delete a local image"
|
||||
|
||||
if(aiCamera)
|
||||
aiCamera.deletepicture()
|
||||
aiCamera.deletepicture(src)
|
||||
|
||||
/obj/item/camera/siliconcam/proc/getsource()
|
||||
/obj/item/camera/siliconcam/proc/getsource(mob/user)
|
||||
if(isAI(src.loc))
|
||||
return src
|
||||
|
||||
var/mob/living/silicon/robot/C = usr
|
||||
var/mob/living/silicon/robot/C = user
|
||||
var/obj/item/camera/siliconcam/Cinfo
|
||||
if(C.connected_ai)
|
||||
Cinfo = C.connected_ai.aiCamera
|
||||
@@ -157,4 +159,4 @@
|
||||
/mob/living/silicon/proc/GetPicture()
|
||||
if(!aiCamera)
|
||||
return
|
||||
return aiCamera.selectpicture()
|
||||
return aiCamera.selectpicture(src)
|
||||
|
||||
@@ -208,7 +208,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
if(c.d1 == UP || c.d2 == UP)
|
||||
qdel(c)
|
||||
|
||||
investigate_log("was cut by [key_name(usr, usr.client)] in [user.loc.loc]","wires")
|
||||
investigate_log("was cut by [key_name(user, user.client)] in [user.loc.loc]","wires")
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
@@ -245,7 +245,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if(usr.stunned)
|
||||
if(user.stunned)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -601,8 +601,8 @@ var/list/possible_cable_coil_colours = list(
|
||||
|
||||
/obj/item/stack/cable_coil/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
var/selected_type = tgui_input_list(usr, "Pick new colour.", "Cable Colour", possible_cable_coil_colours)
|
||||
set_cable_color(selected_type, usr)
|
||||
var/selected_type = tgui_input_list(user, "Pick new colour.", "Cable Colour", possible_cable_coil_colours)
|
||||
set_cable_color(selected_type, user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -981,7 +981,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
|
||||
/obj/item/stack/cable_coil/alien/attack_hand(mob/user as mob)
|
||||
if (user.get_inactive_hand() == src)
|
||||
var/N = tgui_input_number(usr, "How many units of wire do you want to take from [src]? You can only take up to [amount] at a time.", "Split stacks", 1, amount)
|
||||
var/N = tgui_input_number(user, "How many units of wire do you want to take from [src]? You can only take up to [amount] at a time.", "Split stacks", 1, amount)
|
||||
if(N && N <= amount)
|
||||
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
|
||||
CC.amount = N
|
||||
@@ -992,8 +992,8 @@ var/list/possible_cable_coil_colours = list(
|
||||
src.add_fingerprint(user)
|
||||
CC.add_fingerprint(user)
|
||||
spawn(0)
|
||||
if (src && usr.machine==src)
|
||||
src.interact(usr)
|
||||
if (src && user.machine==src)
|
||||
src.interact(user)
|
||||
else
|
||||
return
|
||||
else
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
return
|
||||
|
||||
if(W.has_tool_quality(TOOL_WIRECUTTER))
|
||||
to_chat(usr, span_blue("These cables are too tough to be cut with those [W.name]."))
|
||||
to_chat(user, span_blue("These cables are too tough to be cut with those [W.name]."))
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
to_chat(usr, span_blue("You will need heavier cables to connect to these."))
|
||||
to_chat(user, span_blue("You will need heavier cables to connect to these."))
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user