Files
Bubberstation/code/game/objects/structures/electricchair.dm
SkyratBot 6250754697 [MIRROR] At first i thought that i was being forced to add a feature 🤮 but then i realized i was being encouraged to refactor 😄. Electrified chair is now a component instead of a failure (#3801)
* At first i thought that i was being forced to add a feature 🤮 but then i realized i was being encouraged to refactor 😄. Electrified chair is now a component instead of a failure (#57117)

* At first i thought that i was being forced to add a feature 🤮 but then i realized i was being encouraged to refactor 😄. Electrified chair is now a component instead of a failure

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-03-03 14:19:19 +00:00

23 lines
778 B
Plaintext

/obj/structure/chair/e_chair
name = "electric chair"
desc = "Looks absolutely SHOCKING!"
icon_state = "echair0"
var/last_time = 1
item_chair = null
/obj/structure/chair/e_chair/Initialize()
. = ..()
var/obj/item/assembly/shock_kit/stored_kit = new(contents)
var/image/export_to_component = image('icons/obj/chairs.dmi', loc, "echair_over")
AddComponent(/datum/component/electrified_buckle, (SHOCK_REQUIREMENT_ITEM | SHOCK_REQUIREMENT_LIVE_CABLE | SHOCK_REQUIREMENT_SIGNAL_RECEIVED_TOGGLE), stored_kit, list(export_to_component))
/obj/structure/chair/e_chair/attackby(obj/item/W, mob/user, params)
if(W.tool_behaviour == TOOL_WRENCH)
var/obj/structure/chair/C = new /obj/structure/chair(loc)
W.play_tool_sound(src)
C.setDir(dir)
qdel(src)
return
. = ..()