mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Reset view for operating table.
This commit is contained in:
@@ -102,27 +102,27 @@
|
|||||||
var/mob/living/L = O
|
var/mob/living/L = O
|
||||||
if(!istype(L) || L.locked_to || L == user)
|
if(!istype(L) || L.locked_to || L == user)
|
||||||
return
|
return
|
||||||
if (L.client)
|
|
||||||
L.client.perspective = EYE_PERSPECTIVE
|
take_victim(L, user)
|
||||||
L.client.eye = src
|
|
||||||
L.resting = 1
|
|
||||||
L.loc = src.loc
|
|
||||||
visible_message("<span class='warning'>[L] has been laid on the operating table by [user].</span>", 3)
|
|
||||||
for(var/obj/OO in src)
|
|
||||||
OO.loc = src.loc
|
|
||||||
src.add_fingerprint(user)
|
|
||||||
icon_state = "table2-active"
|
|
||||||
src.victim = L
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/optable/proc/check_victim()
|
/obj/machinery/optable/proc/check_victim()
|
||||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/optable/proc/check_victim() called tick#: [world.time]")
|
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/optable/proc/check_victim() called tick#: [world.time]")
|
||||||
if(locate(/mob/living/carbon/human, src.loc))
|
if (victim)
|
||||||
var/mob/M = locate(/mob/living/carbon/human, src.loc)
|
var/mob/living/carbon/human/H = locate() in src
|
||||||
if(M.lying)
|
|
||||||
src.victim = M
|
if (victim == H)
|
||||||
icon_state = "table2-active"
|
if (victim.lying)
|
||||||
return 1
|
if (victim.pulse)
|
||||||
src.victim = null
|
icon_state = "table2-active"
|
||||||
|
else
|
||||||
|
icon_state = "table2-idle"
|
||||||
|
|
||||||
|
return 1
|
||||||
|
|
||||||
|
victim.reset_view()
|
||||||
|
victim = null
|
||||||
|
|
||||||
icon_state = "table2-idle"
|
icon_state = "table2-idle"
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -131,25 +131,26 @@
|
|||||||
|
|
||||||
/obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob)
|
/obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob)
|
||||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/optable/proc/take_victim() called tick#: [world.time]")
|
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/optable/proc/take_victim() called tick#: [world.time]")
|
||||||
|
if (victim)
|
||||||
|
user << "<span class='bnotice'>The table is already occupied!</span>"
|
||||||
|
|
||||||
C.unlock_from()
|
C.unlock_from()
|
||||||
|
C.loc = src.loc
|
||||||
|
|
||||||
|
if (C.client)
|
||||||
|
C.client.perspective = EYE_PERSPECTIVE
|
||||||
|
C.client.eye = src
|
||||||
|
|
||||||
|
if (ishuman(C))
|
||||||
|
victim = C
|
||||||
|
C.resting = 1
|
||||||
|
|
||||||
if (C == user)
|
if (C == user)
|
||||||
user.visible_message("[user] climbs on the operating table.","You climb on the operating table.")
|
user.visible_message("[user] climbs on the operating table.","You climb on the operating table.")
|
||||||
else
|
else
|
||||||
visible_message("<span class='warning'>[C] has been laid on the operating table by [user].</span>", 3)
|
visible_message("<span class='warning'>[C] has been laid on the operating table by [user].</span>", 3)
|
||||||
if (C.client)
|
|
||||||
C.client.perspective = EYE_PERSPECTIVE
|
add_fingerprint(user)
|
||||||
C.client.eye = src
|
|
||||||
C.resting = 1
|
|
||||||
C.loc = src.loc
|
|
||||||
for(var/obj/O in src)
|
|
||||||
O.loc = src.loc
|
|
||||||
src.add_fingerprint(user)
|
|
||||||
if(ishuman(C))
|
|
||||||
var/mob/living/carbon/human/H = C
|
|
||||||
src.victim = H
|
|
||||||
icon_state = H.pulse ? "table2-active" : "table2-idle"
|
|
||||||
else
|
|
||||||
icon_state = "table2-idle"
|
|
||||||
|
|
||||||
/obj/machinery/optable/verb/climb_on()
|
/obj/machinery/optable/verb/climb_on()
|
||||||
set name = "Climb On Table"
|
set name = "Climb On Table"
|
||||||
@@ -160,11 +161,7 @@
|
|||||||
if(usr.stat || !ishuman(usr) || usr.locked_to || usr.restrained() || (usr.status_flags & FAKEDEATH))
|
if(usr.stat || !ishuman(usr) || usr.locked_to || usr.restrained() || (usr.status_flags & FAKEDEATH))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(src.victim)
|
take_victim(usr, usr)
|
||||||
usr << "<span class='notice'><B>The table is already occupied!</B></span>"
|
|
||||||
return
|
|
||||||
|
|
||||||
take_victim(usr,usr)
|
|
||||||
|
|
||||||
/obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob)
|
/obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob)
|
||||||
if(iswrench(W))
|
if(iswrench(W))
|
||||||
|
|||||||
Reference in New Issue
Block a user