RPD refactor: part 2

This commit is contained in:
Citinited
2018-05-30 21:47:03 +01:00
parent ce42a6d952
commit 2ec3c797fd
13 changed files with 505 additions and 295 deletions
@@ -17,6 +17,14 @@
var/dpdir = 0 // directions as disposalpipe
var/base_state = "pipe-s"
/obj/structure/disposalconstruct/New(loc, pipe_type, direction)
..()
if(pipe_type)
ptype = pipe_type
if(dir)
dir = direction
update()
// update iconstate and dpdir due to dir and type
/obj/structure/disposalconstruct/proc/update()
var/flip = turn(dir, 180)
@@ -267,10 +275,7 @@
return
/obj/structure/disposalconstruct/rpd_act(mob/user, obj/item/rpd/our_rpd)
if(anchored)
to_chat(user, "<span class='notice'>[src] is bolted down!</span>")
return
else if(our_rpd.mode == RPD_ROTATE_MODE)
if(our_rpd.mode == RPD_ROTATE_MODE)
rotate()
else if(our_rpd.mode == RPD_FLIP_MODE)
flip()