mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Fully refactors Chairs, Stools & Beds. Adds a few fun bits
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/obj/structure/stool/bed/chair/e_chair
|
||||
/obj/structure/chair/e_chair
|
||||
name = "electric chair"
|
||||
desc = "Looks absolutely SHOCKING!"
|
||||
icon_state = "echair0"
|
||||
@@ -6,9 +6,9 @@
|
||||
var/last_time = 1.0
|
||||
var/delay_time = 50
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/New()
|
||||
/obj/structure/chair/e_chair/New()
|
||||
..()
|
||||
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
|
||||
overlays += image('icons/obj/chairs.dmi', src, "echair_over", MOB_LAYER + 1, dir)
|
||||
spawn(2)
|
||||
if(isnull(part)) //This e-chair was not custom built
|
||||
part = new(src)
|
||||
@@ -19,11 +19,10 @@
|
||||
part2.master = part
|
||||
part.part1 = part1
|
||||
part.part2 = part2
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/chair/e_chair/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair(loc)
|
||||
var/obj/structure/chair/C = new /obj/structure/chair(loc)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
C.dir = dir
|
||||
part.loc = loc
|
||||
@@ -31,9 +30,8 @@
|
||||
part = null
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/verb/activate_e_chair()
|
||||
/obj/structure/chair/e_chair/verb/activate_e_chair()
|
||||
set name = "Activate Electric Chair"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
@@ -44,15 +42,13 @@
|
||||
return
|
||||
to_chat(usr, "<span class='notice'>You activate \the [src].</span>")
|
||||
shock()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/rotate()
|
||||
/obj/structure/chair/e_chair/rotate()
|
||||
..()
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
|
||||
return
|
||||
overlays += image('icons/obj/chairs.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/proc/shock()
|
||||
/obj/structure/chair/e_chair/proc/shock()
|
||||
if(last_time + delay_time > world.time)
|
||||
return
|
||||
last_time = world.time
|
||||
|
||||
Reference in New Issue
Block a user