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 -14
View File
@@ -9,6 +9,7 @@
name = "mining drill head"
desc = "A large industrial drill. Its bore does not penetrate deep enough to access the sublevels."
icon_state = "mining_drill"
obj_flags = OBJ_FLAG_ROTATABLE
var/braces_needed = 2
var/list/supports = list()
var/supported = FALSE
@@ -459,17 +460,3 @@
connected.supports -= src
connected.check_supports()
connected = null
/obj/machinery/mining/brace/verb/rotate()
set name = "Rotate"
set category = "Object"
set src in oview(1)
if(usr.stat) return
if (src.anchored)
to_chat(usr, "It is anchored in place!")
return FALSE
src.set_dir(turn(src.dir, 90))
return TRUE
+3 -13
View File
@@ -1100,25 +1100,15 @@ var/list/total_extraction_beacons = list()
desc = "A finely chiselled sculpting block, it is ready to be your canvas."
icon = 'icons/obj/mining.dmi'
icon_state = "sculpting_block"
density = 1
opacity = 1
density = TRUE
opacity = TRUE
anchored = 0
obj_flags = OBJ_FLAG_ROTATABLE
var/sculpted = 0
var/mob/living/T
var/times_carved = 0
var/last_struck = 0
/obj/structure/sculpting_block/verb/rotate()
set name = "Rotate"
set category = "Object"
set src in oview(1)
if (src.anchored || usr:stat)
to_chat(usr, "It is fastened to the floor!")
return 0
src.set_dir(turn(src.dir, 90))
return 1
/obj/structure/sculpting_block/attackby(obj/item/C as obj, mob/user as mob)
if (C.iswrench())