mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Merge pull request #6359 from Fox-McCloud/advanced-camera-fixup
Advanced Camera Speedup, features, and sound.
This commit is contained in:
@@ -37,18 +37,19 @@
|
||||
off_action.Activate()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
if(current_user)
|
||||
to_chat(user, "The console is already in use!")
|
||||
return
|
||||
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
|
||||
if(!eyeobj)
|
||||
CreateEye()
|
||||
if(!eyeobj.initialized)
|
||||
|
||||
if(!eyeobj.eye_initialized)
|
||||
var/camera_location
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if(!C.can_use())
|
||||
@@ -57,7 +58,7 @@
|
||||
camera_location = get_turf(C)
|
||||
break
|
||||
if(camera_location)
|
||||
eyeobj.initialized = 1
|
||||
eyeobj.eye_initialized = 1
|
||||
give_eye_control(user)
|
||||
eyeobj.setLoc(camera_location)
|
||||
else
|
||||
@@ -66,6 +67,7 @@
|
||||
user.unset_machine()
|
||||
else
|
||||
give_eye_control(user)
|
||||
eyeobj.setLoc(eyeobj.loc)
|
||||
|
||||
|
||||
/obj/machinery/computer/camera_advanced/proc/give_eye_control(mob/user)
|
||||
@@ -77,7 +79,6 @@
|
||||
user.remote_view = 1
|
||||
user.remote_control = eyeobj
|
||||
user.reset_perspective(eyeobj)
|
||||
eyeobj.setLoc(eyeobj.loc)
|
||||
|
||||
/mob/camera/aiEye/remote
|
||||
name = "Inactive Camera Eye"
|
||||
@@ -86,10 +87,15 @@
|
||||
var/acceleration = 1
|
||||
var/mob/living/carbon/human/eye_user = null
|
||||
var/obj/machinery/computer/camera_advanced/origin
|
||||
var/initialized = 0
|
||||
var/eye_initialized = 0
|
||||
var/visible_icon = 0
|
||||
var/image/user_image = null
|
||||
|
||||
/mob/camera/aiEye/remote/Destroy()
|
||||
eye_user = null
|
||||
origin = null
|
||||
return ..()
|
||||
|
||||
/mob/camera/aiEye/remote/GetViewerClient()
|
||||
if(eye_user)
|
||||
return eye_user.client
|
||||
@@ -102,12 +108,11 @@
|
||||
T = get_turf(T)
|
||||
loc = T
|
||||
cameranet.visibility(src)
|
||||
if(eye_user.client)
|
||||
if(visible_icon)
|
||||
if(visible_icon)
|
||||
if(eye_user.client)
|
||||
eye_user.client.images -= user_image
|
||||
user_image = image(icon,loc,icon_state,FLY_LAYER)
|
||||
eye_user.client.images += user_image
|
||||
eye_user.client.eye = src
|
||||
|
||||
/mob/camera/aiEye/remote/relaymove(mob/user,direct)
|
||||
var/initial = initial(sprint)
|
||||
@@ -140,14 +145,16 @@
|
||||
remote_eye.origin.current_user = null
|
||||
remote_eye.origin.jump_action.Remove(C)
|
||||
remote_eye.eye_user = null
|
||||
C.reset_perspective(null)
|
||||
if(C.client)
|
||||
C.client.images -= remote_eye.user_image
|
||||
C.reset_perspective(null)
|
||||
if(remote_eye.visible_icon)
|
||||
C.client.images -= remote_eye.user_image
|
||||
for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks)
|
||||
C.client.images -= chunk.obscured
|
||||
C.remote_control = null
|
||||
C.unset_machine()
|
||||
src.Remove(C)
|
||||
playsound(remote_eye.origin, 'sound/machines/terminal_off.ogg', 25, 0)
|
||||
|
||||
/datum/action/innate/camera_jump
|
||||
name = "Jump To Camera"
|
||||
@@ -175,7 +182,14 @@
|
||||
T[text("[][]", netcam.c_tag, (netcam.can_use() ? null : " (Deactivated)"))] = netcam
|
||||
|
||||
|
||||
playsound(origin, 'sound/machines/terminal_prompt.ogg', 25, 0)
|
||||
var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in T
|
||||
var/obj/machinery/camera/final = T[camera]
|
||||
playsound(origin, "terminal_type", 25, 0)
|
||||
if(final)
|
||||
playsound(origin, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0)
|
||||
remote_eye.setLoc(get_turf(final))
|
||||
C.overlay_fullscreen("flash", /obj/screen/fullscreen/flash/noise)
|
||||
C.clear_fullscreen("flash", 3) //Shorter flash than normal since it's an ~~advanced~~ console!
|
||||
else
|
||||
playsound(origin, 'sound/machines/terminal_prompt_deny.ogg', 25, 0)
|
||||
|
||||
@@ -12,6 +12,9 @@ var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pagetur
|
||||
var/list/gun_sound = list('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg')
|
||||
var/list/computer_ambience = list('sound/goonstation/machines/ambicomp1.ogg', 'sound/goonstation/machines/ambicomp2.ogg', 'sound/goonstation/machines/ambicomp3.ogg')
|
||||
var/list/ricochet = list('sound/weapons/effects/ric1.ogg', 'sound/weapons/effects/ric2.ogg','sound/weapons/effects/ric3.ogg','sound/weapons/effects/ric4.ogg','sound/weapons/effects/ric5.ogg')
|
||||
var/list/terminal_type = list('sound/machines/terminal_button01.ogg', 'sound/machines/terminal_button02.ogg', 'sound/machines/terminal_button03.ogg',
|
||||
'sound/machines/terminal_button04.ogg', 'sound/machines/terminal_button05.ogg', 'sound/machines/terminal_button06.ogg',
|
||||
'sound/machines/terminal_button07.ogg', 'sound/machines/terminal_button08.ogg')
|
||||
|
||||
/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff, var/is_global, var/pitch)
|
||||
|
||||
@@ -137,4 +140,6 @@ var/list/ricochet = list('sound/weapons/effects/ric1.ogg', 'sound/weapons/effect
|
||||
soundin = pick(computer_ambience)
|
||||
if("ricochet")
|
||||
soundin = pick(ricochet)
|
||||
if("terminal_type")
|
||||
soundin = pick(terminal_type)
|
||||
return soundin
|
||||
|
||||
@@ -1218,13 +1218,6 @@
|
||||
user.drop_item()
|
||||
forceMove(get_turf(O))
|
||||
return Expand()
|
||||
if(istype(O, /obj/machinery/computer/camera_advanced/xenobio))
|
||||
var/obj/machinery/computer/camera_advanced/xenobio/X = O
|
||||
X.monkeys++
|
||||
to_chat(user, "<span class='notice'>You feed [src] to the [X]. It now has [X.monkeys] monkey cubes stored.</span>")
|
||||
user.drop_item()
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/water_act(volume, temperature)
|
||||
|
||||
@@ -67,6 +67,26 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/xenobio/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
|
||||
monkeys++
|
||||
to_chat(user, "<span class='notice'>You feed [O] to [src]. It now has [monkeys] monkey cubes stored.</span>")
|
||||
user.drop_item()
|
||||
qdel(O)
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon/storage/bag))
|
||||
var/obj/item/weapon/storage/P = O
|
||||
var/loaded = 0
|
||||
for(var/obj/G in P.contents)
|
||||
if(istype(G, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
|
||||
loaded = 1
|
||||
monkeys++
|
||||
qdel(G)
|
||||
if(loaded)
|
||||
to_chat(user, "<span class='notice'>You fill [src] with the monkey cubes stored in [O]. [src] now has [monkeys] monkey cubes stored.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/datum/action/innate/camera_off/xenobio/Activate()
|
||||
if(!target || !ishuman(target))
|
||||
return
|
||||
@@ -82,9 +102,8 @@
|
||||
origin.monkey_recycle_action.Remove(C)
|
||||
//All of this stuff below could probably be a proc for all advanced cameras, only the action removal needs to be camera specific
|
||||
remote_eye.eye_user = null
|
||||
C.reset_perspective(null)
|
||||
if(C.client)
|
||||
C.client.perspective = MOB_PERSPECTIVE
|
||||
C.client.eye = src
|
||||
C.client.images -= remote_eye.user_image
|
||||
for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks)
|
||||
C.client.images -= chunk.obscured
|
||||
@@ -109,6 +128,8 @@
|
||||
S.forceMove(remote_eye.loc)
|
||||
S.visible_message("[S] warps in!")
|
||||
X.stored_slimes -= S
|
||||
else
|
||||
to_chat(owner, "<span class='notice'>Target is not near a camera. Cannot proceed.</span>")
|
||||
|
||||
/datum/action/innate/slime_pick_up
|
||||
name = "Pick up Slime"
|
||||
@@ -132,7 +153,8 @@
|
||||
S.visible_message("[S] vanishes in a flash of light!")
|
||||
S.forceMove(X)
|
||||
X.stored_slimes += S
|
||||
|
||||
else
|
||||
to_chat(owner, "<span class='notice'>Target is not near a camera. Cannot proceed.</span>")
|
||||
|
||||
/datum/action/innate/feed_slime
|
||||
name = "Feed Slimes"
|
||||
@@ -151,7 +173,8 @@
|
||||
food.LAssailant = C
|
||||
X.monkeys --
|
||||
to_chat(owner, "[X] now has [X.monkeys] monkeys left.")
|
||||
|
||||
else
|
||||
to_chat(owner, "<span class='notice'>Target is not near a camera. Cannot proceed.</span>")
|
||||
|
||||
/datum/action/innate/monkey_recycle
|
||||
name = "Recycle Monkeys"
|
||||
@@ -168,5 +191,7 @@
|
||||
for(var/mob/living/carbon/human/M in remote_eye.loc)
|
||||
if(issmall(M) && M.stat)
|
||||
M.visible_message("[M] vanishes as they are reclaimed for recycling!")
|
||||
X.monkeys += 0.2
|
||||
X.monkeys = round(X.monkeys + 0.2,0.1)
|
||||
qdel(M)
|
||||
else
|
||||
to_chat(owner, "<span class='notice'>Target is not near a camera. Cannot proceed.</span>")
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user