Genericises rotate() on objects. (#8430)

This commit is contained in:
Matt Atlas
2020-03-17 17:17:42 +01:00
committed by GitHub
parent d68a92f48b
commit 72c968eba6
24 changed files with 373 additions and 665 deletions
+1 -23
View File
@@ -7,6 +7,7 @@
desc = "Machine that charges a shield generator."
icon = 'icons/obj/machines/shielding.dmi'
icon_state = "capacitor"
obj_flags = OBJ_FLAG_ROTATABLE
var/active = 0
density = 1
var/stored_charge = 0 //not to be confused with power cell charge, this is in Joules
@@ -147,26 +148,3 @@
icon_state = "broke"
else
..()
/obj/machinery/shield_capacitor/verb/rotate()
set name = "Rotate capacitor clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored)
to_chat(usr, "It is fastened to the floor!")
return
if(config.ghost_interaction)
src.set_dir(turn(src.dir, -90))
return
else
if(istype(usr,/mob/living/simple_animal/rat))
return
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
src.set_dir(turn(src.dir, -90))
return
return