Switches reset_view to reset_perspective

This commit is contained in:
Crazylemon64
2016-11-03 15:34:38 -07:00
parent 6d3e66f41c
commit c0cd2c263f
30 changed files with 65 additions and 65 deletions
+1 -1
View File
@@ -643,7 +643,7 @@
//this is necessarily damaging
var/damage = rand(1,5)
to_chat(M, "<span class='danger'>The unloading machine grabs you with a hard metallic claw!</span>")
M.reset_view(master)
M.reset_perspective(master)
M.loc = master
master.types[M.type] = src
M.apply_damage(damage) // todo: ugly
+1 -1
View File
@@ -64,7 +64,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/mob/living/carbon/human/caster = user
if(caster.remoteview_target)
caster.remoteview_target = null
caster.reset_view(0)
caster.reset_perspective(0)
return 0
if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel
+1 -1
View File
@@ -156,7 +156,7 @@
unbuckle_mob(buckled_mob,force=1)
. = ..()
if(client)
reset_view(destination)
reset_perspective(destination)
update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
//called when src is thrown into hit_atom
+4 -4
View File
@@ -302,12 +302,12 @@
if(istype(user.l_hand, /obj/item/tk_grab) || istype(user.r_hand, /obj/item/tk_grab/))
to_chat(user, "<span class='warning'>Your mind is too busy with that telekinetic grab.</span>")
user.remoteview_target = null
user.reset_view(0)
user.reset_perspective(0)
return
if(user.client.eye != user.client.mob)
user.remoteview_target = null
user.reset_view(0)
user.reset_perspective(0)
return
for(var/mob/living/L in targets)
@@ -315,7 +315,7 @@
if(target)
user.remoteview_target = target
user.reset_view(target)
user.reset_perspective(target)
else
user.remoteview_target = null
user.reset_view(0)
user.reset_perspective(0)
@@ -77,7 +77,7 @@
origin.vest_disguise_action.Remove(C)
origin.set_droppoint_action.Remove(C)
remote_eye.eye_user = null
C.reset_view(null)
C.reset_perspective(null)
if(C.client)
C.client.images -= remote_eye.user_image
for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks)
@@ -446,7 +446,7 @@
controlling = 0
reset_view(null)
reset_perspective(null)
machine = null
host.verbs -= /mob/living/carbon/proc/release_control
@@ -562,10 +562,10 @@
src.forceMove(get_turf(host))
reset_view(null)
reset_perspective(null)
machine = null
host.reset_view(null)
host.reset_perspective(null)
host.machine = null
var/mob/living/H = host
+2 -2
View File
@@ -817,9 +817,9 @@ var/global/list/multiverse = list()
log_game("[user][user.key] made [target][target.key] say [wgw] with a voodoo doll.")
if("eyes")
user.set_machine(src)
user.reset_view(target)
user.reset_perspective(target)
spawn(100)
user.reset_view(null)
user.reset_perspective(null)
user.unset_machine()
if("r_leg","l_leg")
to_chat(user, "<span class='notice'>You move the doll's legs around.</span>")
+2 -2
View File
@@ -92,7 +92,7 @@
for(var/mob/O in mob_list)
if(O.client && O.client.eye == src)
O.unset_machine()
O.reset_view(null)
O.reset_perspective(null)
to_chat(O, "The screen bursts into static.")
..()
@@ -279,7 +279,7 @@
for(var/mob/O in player_list)
if(O.client && O.client.eye == src)
O.unset_machine()
O.reset_view(null)
O.reset_perspective(null)
to_chat(O, "The screen bursts into static.")
/obj/machinery/camera/proc/triggerCameraAlarm(var/duration = 0)
+1 -1
View File
@@ -45,7 +45,7 @@
/obj/machinery/computer/security/check_eye(var/mob/user as mob)
if((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded || !( current ) || !( current.status )) && (!istype(user, /mob/living/silicon)))
return null
user.reset_view(current)
user.reset_perspective(current)
return 1
// Network configuration
@@ -74,7 +74,7 @@
// This should be able to be excised once the full view refactor rolls out
user.remote_view = 1
user.remote_control = eyeobj
user.reset_view(eyeobj)
user.reset_perspective(eyeobj)
/mob/camera/aiEye/remote
name = "Inactive Camera Eye"
@@ -137,7 +137,7 @@
remote_eye.origin.current_user = null
remote_eye.origin.jump_action.Remove(C)
remote_eye.eye_user = null
C.reset_view(null)
C.reset_perspective(null)
if(C.client)
C.client.images -= remote_eye.user_image
for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks)
+1 -1
View File
@@ -297,7 +297,7 @@
O.loc = loc
for(var/mob/M in contents)
M.loc = loc
M.reset_view(null)
M.reset_perspective(null)
to_chat(M, "<span class='notice'>The machine turns off, and you fall out.</span>")
return
+3 -3
View File
@@ -1129,7 +1129,7 @@
occupant = H
H.stop_pulling()
H.forceMove(src)
H.reset_view(src)
H.reset_perspective(src)
add_fingerprint(H)
//GrantActions(H, human_occupant=1)
forceMove(loc)
@@ -1178,7 +1178,7 @@
to_chat(user, "<span class='notice'>\the [mmi_as_oc] is stuck to your hand, you cannot put it in \the [src]</span>")
return 0
var/mob/brainmob = mmi_as_oc.brainmob
brainmob.reset_view(src)
brainmob.reset_perspective(src)
occupant = brainmob
brainmob.forceMove(src) //should allow relaymove
brainmob.canmove = 1
@@ -1263,7 +1263,7 @@
var/obj/item/device/mmi/mmi = mob_container
if(mmi.brainmob)
L.loc = mmi
L.reset_view()
L.reset_perspective()
mmi.mecha = null
mmi.update_icon()
L.canmove = 0
@@ -64,7 +64,7 @@
if(T.z != current.z || !current.can_use())
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
current = null
user.reset_view(null)
user.reset_perspective(null)
user.unset_machine()
return null
@@ -184,7 +184,7 @@
/obj/item/device/camera_bug/Topic(var/href,var/list/href_list)
if(usr != loc)
usr.unset_machine()
usr.reset_view(null)
usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
usr.set_machine(src)
@@ -195,7 +195,7 @@
if(C)
track_mode = BUGMODE_MONITOR
current = C
usr.reset_view(null)
usr.reset_perspective(null)
interact()
if("track" in href_list)
var/atom/A = locate(href_list["track"])
@@ -214,7 +214,7 @@
interact()
return
if("close" in href_list)
usr.reset_view(null)
usr.reset_perspective(null)
usr.unset_machine()
current = null
return // I do not <- I do not remember what I was going to write in this comment -Sayu, sometime later
@@ -231,16 +231,16 @@
current = C
spawn(6)
if(src.check_eye(usr))
usr.reset_view(C)
usr.reset_perspective(C)
interact()
else
usr.unset_machine()
usr.reset_view(null)
usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
else
usr.unset_machine()
usr.reset_view(null)
usr.reset_perspective(null)
interact()
@@ -83,7 +83,7 @@
A.loc = active_dummy.loc
if(ismob(A))
var/mob/M = A
M.reset_view(null)
M.reset_perspective(null)
/obj/effect/dummy/chameleon
name = ""
@@ -55,7 +55,7 @@
for(var/mob/M in src) //Should only be one but whatever.
M.loc = src.loc
M.reset_view(null)
M.reset_perspective(null)
qdel(src)
@@ -62,7 +62,7 @@
/obj/structure/closet/proc/moveMob(var/mob/M, var/atom/destination)
loc.Exited(M)
M.loc = destination
M.reset_view(destination)
M.reset_perspective(destination)
if(isturf(loc))
loc.Entered(M, src, ignoreRest = 1)
else
@@ -147,7 +147,7 @@
if(!(locate(/obj/structure/transit_tube) in loc))
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_view(null)
mob.reset_perspective(null)
//if(moving && istype(loc, /turf/space))
// Todo: If you get out of a moving pod in space, you should move as well.
@@ -161,7 +161,7 @@
if(station.icon_state == "open")
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_view(null)
mob.reset_perspective(null)
else
station.open_animation()
+1 -1
View File
@@ -77,7 +77,7 @@
user.unset_machine()
return null
user.reset_view(S.current)
user.reset_perspective(S.current)
return 1
/*
+5 -5
View File
@@ -237,7 +237,7 @@
computer.update_icon()
for(var/mob/living/L in viewers(1))
if(!istype(L,/mob/living/silicon/ai) && L.machine == src)
L.reset_view(null)
L.reset_perspective(null)
Reset()
@@ -245,7 +245,7 @@
current = null
for(var/mob/living/L in viewers(1))
if(!istype(L,/mob/living/silicon/ai) && L.machine == src)
L.reset_view(null)
L.reset_perspective(null)
interact()
if(!interactable())
@@ -265,7 +265,7 @@
return
if(computer.camnet.verify_machine(current))
usr.reset_view(current)
usr.reset_perspective(current)
if(world.time - last_camera_refresh > 50 || !camera_list)
last_camera_refresh = world.time
@@ -302,13 +302,13 @@
var/obj/machinery/camera/C = locate(href_list["show"])
if(istype(C) && C.status)
current = C
usr.reset_view(C)
usr.reset_perspective(C)
interact()
return
if("keyselect" in href_list)
current = null
usr.reset_view(null)
usr.reset_perspective(null)
key = input(usr,"Select a camera network key:", "Key Select", null) as null|anything in computer.list_files(/datum/file/camnet_key)
camera_list = null
update_icon()
+1 -1
View File
@@ -22,7 +22,7 @@
var/atom/movable/mob_container
mob_container = M
mob_container.forceMove(get_turf(src))
M.reset_view()
M.reset_perspective()
qdel(src)
+2 -2
View File
@@ -894,7 +894,7 @@
/mob/living/carbon/human/handle_vision()
if(machine)
if(!machine.check_eye(src)) reset_view(null)
if(!machine.check_eye(src)) reset_perspective(null)
else
var/isRemoteObserve = 0
if((REMOTE_VIEW in mutations) && remoteview_target)
@@ -919,7 +919,7 @@
if(!isRemoteObserve && client && !client.adminobs)
remoteview_target = null
reset_view(null)
reset_perspective(null)
species.handle_vision(src)
+2 -2
View File
@@ -230,10 +230,10 @@
if(machine)
if(!machine.check_eye(src))
reset_view(null)
reset_perspective(null)
else
if(!remote_view && !client.adminobs)
reset_view(null)
reset_perspective(null)
/mob/living/proc/update_sight()
return
+3 -3
View File
@@ -427,7 +427,7 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/check_eye(var/mob/user as mob)
if(!current)
return null
user.reset_view(current)
user.reset_perspective(current)
return 1
/mob/living/silicon/ai/blob_act()
@@ -606,7 +606,7 @@ var/list/ai_verbs_default = list(
adjustBruteLoss(damage)
updatehealth()
/mob/living/silicon/ai/reset_view(atom/A)
/mob/living/silicon/ai/reset_perspective(atom/A)
if(current)
current.set_light(0)
if(istype(A,/obj/machinery/camera))
@@ -1165,7 +1165,7 @@ var/list/ai_verbs_default = list(
verbs += /mob/living/silicon/ai/proc/choose_modules
malf_picker = new /datum/module_picker
/mob/living/silicon/ai/reset_view(atom/A)
/mob/living/silicon/ai/reset_perspective(atom/A)
if(camera_light_on)
light_cameras()
if(istype(A, /obj/machinery/camera))
+1 -1
View File
@@ -11,7 +11,7 @@
var/turf/T = get_turf(src)
if(stat != CONSCIOUS) //ai's fucked
cameraFollow = null
reset_view(null)
reset_perspective(null)
unset_machine()
updatehealth()
+6 -6
View File
@@ -137,7 +137,7 @@
/mob/living/silicon/pai/check_eye(var/mob/user as mob)
if(!src.current)
return null
user.reset_view(src.current)
user.reset_perspective(src.current)
return 1
/mob/living/silicon/pai/blob_act()
@@ -261,7 +261,7 @@
usr:cameraFollow = null
if(!C)
src.unset_machine()
src.reset_view(null)
src.reset_perspective(null)
return 0
if(stat == 2 || !C.status || !(src.network in C.network)) return 0
@@ -269,7 +269,7 @@
src.set_machine(src)
src:current = C
src.reset_view(C)
src.reset_perspective(C)
return 1
/mob/living/silicon/pai/verb/reset_record_view()
@@ -288,7 +288,7 @@
/mob/living/silicon/pai/cancel_camera()
set category = "pAI Commands"
set name = "Cancel Camera View"
src.reset_view(null)
src.reset_perspective(null)
src.unset_machine()
src:cameraFollow = null
@@ -297,7 +297,7 @@
/mob/living/silicon/pai/proc/pai_network_change()
set category = "pAI Commands"
set name = "Change Camera Network"
src.reset_view(null)
src.reset_perspective(null)
src.unset_machine()
src:cameraFollow = null
var/cameralist[0]
@@ -484,7 +484,7 @@
visible_message("<span class=notice>[src] neatly folds inwards, compacting down to a rectangular card.</span>", "<span class=notice>You neatly fold inwards, compacting down to a rectangular card.</span>")
stop_pulling()
reset_view(card)
reset_perspective(card)
// If we are being held, handle removing our holder from their inv.
var/obj/item/weapon/holder/H = loc
@@ -394,7 +394,7 @@
load = M
can_buckle = FALSE
// Not sure why this is done
reset_view(src)
reset_perspective(src)
return TRUE
return FALSE
@@ -422,7 +422,7 @@
if(ismob(load))
var/mob/M = load
M.reset_view(null)
M.reset_perspective(null)
unbuckle_mob()
if(load)
@@ -449,7 +449,7 @@
AM.pixel_y = initial(AM.pixel_y)
if(ismob(AM))
var/mob/M = AM
M.reset_view(null)
M.reset_perspective(null)
/mob/living/simple_animal/bot/mulebot/call_bot()
..()
+1 -1
View File
@@ -43,7 +43,7 @@
sight |= SEE_SELF
..()
reset_view(loc)
reset_perspective(loc)
if(ckey in deadmins)
+4 -4
View File
@@ -488,7 +488,7 @@ var/list/slot_equipment_priority = list( \
//END HUMAN
// If you're looking for `reset_perspective`, that's a synonym for this proc.
/mob/proc/reset_view(atom/A)
/mob/proc/reset_perspective(atom/A)
if(client)
if(istype(A, /atom/movable))
client.perspective = EYE_PERSPECTIVE
@@ -502,7 +502,7 @@ var/list/slot_equipment_priority = list( \
client.eye = loc
return 1
/mob/living/reset_view(atom/A)
/mob/living/reset_perspective(atom/A)
. = ..()
if(.)
// Above check means the mob has a client
@@ -514,7 +514,7 @@ var/list/slot_equipment_priority = list( \
clear_fullscreen("remote_view", 0)
update_pipe_vision()
/mob/dead/reset_view(atom/A)
/mob/dead/reset_perspective(atom/A)
if(client)
if(ismob(client.eye) && (client.eye != src))
// Note to self: Use `client.eye` for ghost following in place
@@ -819,7 +819,7 @@ var/list/slot_equipment_priority = list( \
/mob/verb/cancel_camera()
set name = "Cancel Camera View"
set category = "OOC"
reset_view(null)
reset_perspective(null)
unset_machine()
if(istype(src, /mob/living))
if(src:cameraFollow)
+1 -1
View File
@@ -148,7 +148,7 @@
view = world.view //Reset the view
winset(src, "mapwindow.map", "icon-size=[src.reset_stretch]")
viewingCanvas = 0
mob.reset_view()
mob.reset_perspective()
if(mob.hud_used)
mob.hud_used.show_hud(HUD_STYLE_STANDARD)
+1 -1
View File
@@ -1347,7 +1347,7 @@
// check if mob has client, if so restore client view on eject
/mob/pipe_eject(var/direction)
reset_view(null)
reset_perspective(null)
/obj/effect/decal/cleanable/blood/gibs/pipe_eject(var/direction)
var/list/dirs