mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Changes the operating table to be an actual table.
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
/obj/structure/optable
|
||||
name = "operating table"
|
||||
desc = "Used for advanced medical procedures."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "optable"
|
||||
density = 1
|
||||
anchored = 1
|
||||
can_buckle = 1
|
||||
buckle_lying = 1
|
||||
buckle_requires_restraints = 1
|
||||
var/mob/living/carbon/human/patient = null
|
||||
var/obj/machinery/computer/operating/computer = null
|
||||
|
||||
|
||||
/obj/structure/optable/New()
|
||||
for(var/dir in cardinal)
|
||||
computer = locate(/obj/machinery/computer/operating, get_step(src, dir))
|
||||
if(computer)
|
||||
computer.table = src
|
||||
break
|
||||
|
||||
|
||||
/obj/structure/optable/proc/check_patient()
|
||||
var/mob/M = locate(/mob/living/carbon/human, loc)
|
||||
if(M)
|
||||
if(M.resting)
|
||||
patient = M
|
||||
return 1
|
||||
else
|
||||
patient = null
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/optable/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(!G.confirm())
|
||||
return
|
||||
if(ismob(G.affecting))
|
||||
var/mob/M = G.affecting
|
||||
M.resting = 1
|
||||
M.loc = loc
|
||||
visible_message("<span class='notice'>[user] has laid [M] on [src].</span>")
|
||||
patient = M
|
||||
check_patient()
|
||||
qdel(W)
|
||||
return
|
||||
@@ -64,6 +64,17 @@
|
||||
new /obj/structure/table/glass(src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/silver))
|
||||
var/obj/item/stack/sheet/mineral/silver/S = I
|
||||
if(S.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one silver sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [S] to [src]...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
S.use(1)
|
||||
new /obj/structure/table/optable(src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/*
|
||||
* Wooden Frames
|
||||
|
||||
@@ -125,6 +125,14 @@
|
||||
if(!G.confirm())
|
||||
return 0
|
||||
G.affecting.loc = src.loc
|
||||
if(istype(src, /obj/structure/table/optable))
|
||||
var/obj/structure/table/optable/OT = src
|
||||
G.affecting.resting = 1
|
||||
visible_message("<span class='notice'>[G.assailant] has laid [G.affecting] on [src].</span>")
|
||||
OT.patient = G.affecting
|
||||
OT.check_patient()
|
||||
qdel(I)
|
||||
return 1
|
||||
G.affecting.Weaken(2)
|
||||
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
|
||||
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
|
||||
@@ -357,6 +365,43 @@
|
||||
user << text("<span class='notice'>You kick [src].</span>")
|
||||
return 1
|
||||
|
||||
/*
|
||||
* Surgery Tables
|
||||
*/
|
||||
|
||||
/obj/structure/table/optable
|
||||
name = "operating table"
|
||||
desc = "Used for advanced medical procedures."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "optable"
|
||||
buildstack = /obj/item/stack/sheet/mineral/silver
|
||||
smooth = SMOOTH_FALSE
|
||||
can_buckle = 1
|
||||
buckle_lying = 1
|
||||
buckle_requires_restraints = 1
|
||||
var/mob/living/carbon/human/patient = null
|
||||
var/obj/machinery/computer/operating/computer = null
|
||||
|
||||
/obj/structure/table/optable/New()
|
||||
..()
|
||||
for(var/dir in cardinal)
|
||||
computer = locate(/obj/machinery/computer/operating, get_step(src, dir))
|
||||
if(computer)
|
||||
computer.table = src
|
||||
break
|
||||
|
||||
/obj/structure/table/optable/proc/check_patient()
|
||||
var/mob/M = locate(/mob/living/carbon/human, loc)
|
||||
if(M)
|
||||
if(M.resting)
|
||||
patient = M
|
||||
return 1
|
||||
else
|
||||
patient = null
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Racks
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user