Merge pull request #11899 from kingofkosmos/altclickrotatepipe

Alt-click to rotate stuff
This commit is contained in:
Razharas
2015-09-24 01:59:04 +03:00
11 changed files with 129 additions and 7 deletions
@@ -1,6 +1,6 @@
/obj/structure/stool/bed/chair/e_chair
name = "electric chair"
desc = "Looks absolutely SHOCKING!"
desc = "Looks absolutely SHOCKING!\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "echair0"
var/obj/item/assembly/shock_kit/part = null
var/last_time = 1
@@ -1,6 +1,6 @@
/obj/structure/stool/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
name = "chair"
desc = "You sit in this. Either by will or force."
desc = "You sit in this. Either by will or force.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "chair"
buckle_lying = 0 //you sit in a chair, not lay
burn_state = -1 //Not Burnable
@@ -72,6 +72,15 @@
return
spin()
/obj/structure/stool/bed/chair/AltClick(mob/user)
..()
if(!user.canUseTopic(user))
user << "<span class='warning'>You can't do that right now!</span>"
return
if(!in_range(src, user))
return
else
rotate()
// Chair types
/obj/structure/stool/bed/chair/wood
@@ -98,7 +107,7 @@
/obj/structure/stool/bed/chair/comfy
name = "comfy chair"
desc = "It looks comfy."
desc = "It looks comfy.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "comfychair"
color = rgb(255,255,255)
burn_state = 0 //Burnable
@@ -9,6 +9,10 @@
layer = 3.1 //same as the built tube
anchored = 0
/obj/structure/c_transit_tube/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
//wrapper for turn that changes the transit tube formatted icon_state instead of the dir
/obj/structure/c_transit_tube/proc/tube_turn(angle)
var/list/badtubes = list("W-E", "W-E-Pass", "S-N", "S-N-Pass", "SW-NE", "SE-NW")
@@ -50,6 +54,16 @@
tube_turn(-90)
/obj/structure/c_transit_tube/AltClick(mob/user)
..()
if(!user.canUseTopic(user))
user << "<span class='warning'>You can't do that right now!</span>"
return
if(!in_range(src, user))
return
else
rotate()
/obj/structure/c_transit_tube/verb/rotate_ccw()
set name = "Rotate Tube CCW"
set category = "Object"
@@ -27,6 +27,10 @@
var/secure = 0 //Whether or not this creates a secure windoor
var/state = "01" //How far the door assembly has progressed
/obj/structure/windoor_assembly/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
/obj/structure/windoor_assembly/New(dir=NORTH)
..()
ini_dir = dir
@@ -323,6 +327,16 @@
update_icon()
return
/obj/structure/windoor_assembly/AltClick(mob/user)
..()
if(!user.canUseTopic(user))
user << "<span class='warning'>You can't do that right now!</span>"
return
if(!in_range(src, user))
return
else
revrotate()
//Flips the windoor assembly, determines whather the door opens to the left or the right
/obj/structure/windoor_assembly/verb/flip()
set name = "Flip Windoor Assembly"
+13
View File
@@ -21,6 +21,10 @@
var/image/crack_overlay
can_be_unanchored = 1
/obj/structure/window/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
/obj/structure/window/New(Loc,re=0)
..()
health = maxhealth
@@ -342,6 +346,15 @@
add_fingerprint(usr)
return
/obj/structure/window/AltClick(mob/user)
..()
if(!user.canUseTopic(user))
user << "<span class='warning'>You can't do that right now!</span>"
return
if(!in_range(src, user))
return
else
revrotate()
/*
/obj/structure/window/proc/updateSilicate() what do you call a syndicate silicon?