mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
Merge pull request #5840 from Crazylemon64/adds_reset_perspective
Polishes up `reset_view`
This commit is contained in:
@@ -61,8 +61,8 @@
|
||||
M.adjust_fire_stacks(1)
|
||||
M.IgniteMob()
|
||||
|
||||
/atom/movable/proc/unbuckle_mob()
|
||||
if(buckled_mob && buckled_mob.buckled == src && buckled_mob.can_unbuckle(usr))
|
||||
/atom/movable/proc/unbuckle_mob(force = FALSE)
|
||||
if(buckled_mob && buckled_mob.buckled == src && (buckled_mob.can_unbuckle(usr) || force))
|
||||
. = buckled_mob
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
@@ -72,7 +72,6 @@
|
||||
|
||||
post_buckle_mob(.)
|
||||
|
||||
|
||||
//Handle any extras after buckling/unbuckling
|
||||
//Called on buckle_mob() and unbuckle_mob()
|
||||
/atom/movable/proc/post_buckle_mob(mob/living/M)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
|
||||
if(user.stat || loc != user || !user.canmove || !user.has_vision() || !current)
|
||||
user.reset_view(null)
|
||||
user.reset_perspective(null)
|
||||
user.unset_machine()
|
||||
return null
|
||||
|
||||
@@ -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,9 +55,7 @@
|
||||
|
||||
for(var/mob/M in src) //Should only be one but whatever.
|
||||
M.loc = src.loc
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.reset_perspective(null)
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -94,10 +94,7 @@
|
||||
return
|
||||
if(M == occupant) // so that the guy inside can't eject himself -Agouri
|
||||
return
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
occupant.forceMove(loc)
|
||||
if(injecting)
|
||||
implant(src.occupant)
|
||||
injecting = 0
|
||||
@@ -113,11 +110,8 @@
|
||||
if(src.occupant)
|
||||
to_chat(usr, "<span class='warning'>The [src.name] is already occupied!</span>")
|
||||
return
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.stop_pulling()
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
src.occupant = M
|
||||
src.add_fingerprint(usr)
|
||||
icon_state = "implantchair_on"
|
||||
|
||||
@@ -58,13 +58,11 @@
|
||||
|
||||
for(var/mob/M in src)
|
||||
moveMob(M, loc)
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
/obj/structure/closet/proc/moveMob(var/mob/M, var/atom/destination)
|
||||
loc.Exited(M)
|
||||
M.loc = destination
|
||||
M.reset_perspective(destination)
|
||||
if(isturf(loc))
|
||||
loc.Entered(M, src, ignoreRest = 1)
|
||||
else
|
||||
@@ -122,10 +120,6 @@
|
||||
if(M.buckled)
|
||||
continue
|
||||
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
|
||||
moveMob(M, src)
|
||||
itemcount++
|
||||
|
||||
@@ -428,3 +422,7 @@
|
||||
..()
|
||||
visible_message("<span class='danger'>[src] is blown apart by the bolt of electricity!</span>", "<span class='danger'>You hear a metallic screeching sound.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
if(L.buckled)
|
||||
L.buckled = 0
|
||||
L.anchored = 0
|
||||
if(L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
L.client.eye = src
|
||||
L.loc = src
|
||||
L.forceMove(src)
|
||||
L.disabilities += MUTE
|
||||
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
intialTox = L.getToxLoss()
|
||||
@@ -76,12 +73,9 @@
|
||||
O.loc = src.loc
|
||||
|
||||
for(var/mob/living/M in src)
|
||||
M.loc = src.loc
|
||||
M.forceMove(loc)
|
||||
M.disabilities -= MUTE
|
||||
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
|
||||
/obj/structure/closet/statue/open()
|
||||
@@ -164,4 +158,4 @@ obj/structure/statue/angel
|
||||
icon_state = "angelseen"
|
||||
|
||||
obj/structure/statue/corgi
|
||||
icon_state = "corgi"
|
||||
icon_state = "corgi"
|
||||
|
||||
@@ -154,6 +154,10 @@
|
||||
src.attack_hand(CM)
|
||||
|
||||
|
||||
/obj/structure/morgue/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
/*
|
||||
* Morgue tray
|
||||
*/
|
||||
@@ -393,6 +397,10 @@
|
||||
to_chat(CM, "<span class='alert'>You attempt to slide yourself out of \the [src]...</span>")
|
||||
src.attack_hand(CM)
|
||||
|
||||
/obj/structure/crematorium/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
/*
|
||||
* Crematorium tray
|
||||
*/
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user