- Making single panned glass now checks if there is already a pane facing the default way and adjusts to face the nearest empty way in a counter-clockwise search direction. Should make placing windows easier
- Windows now have 'rotate clockwise' and 'rotate counter-clockwise' verbs
- Fixed window creation, a bug which my previous update made

MAPPING DEBUG TOOLS:
- Renamed all verbs in mapping to other names so they don't interfere with existing verbs when writing part of the command and pressing tab. (copied for previous update as this one actually fixes it)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1166 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2011-03-07 00:26:09 +00:00
parent be8c18ead5
commit a01379d654
3 changed files with 49 additions and 12 deletions
+28 -5
View File
@@ -27,10 +27,28 @@ SHARDS
if(!(win.ini_dir in cardinal))
usr << "\red Can't let you do that."
return 1
var/obj/window/W = new /obj/window( usr.loc, reinf )
if (directions.len)
W.dir = directions[1]
W.ini_dir = W.dir
var/dir_to_set = 2
//yes, this could probably be done better but hey... it works...
for(var/obj/window/WT in usr.loc)
if (WT.dir == dir_to_set)
dir_to_set = 4
for(var/obj/window/WT in usr.loc)
if (WT.dir == dir_to_set)
dir_to_set = 1
for(var/obj/window/WT in usr.loc)
if (WT.dir == dir_to_set)
dir_to_set = 8
for(var/obj/window/WT in usr.loc)
if (WT.dir == dir_to_set)
dir_to_set = 2
var/obj/window/W
if(reinf)
W = new /obj/window/reinforced( usr.loc, reinf )
W.state = 0
else
W = new /obj/window/basic( usr.loc, reinf )
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
if("full (2 sheets)")
@@ -39,7 +57,12 @@ SHARDS
if (locate(/obj/window) in usr.loc)
usr << "\red Can't let you do that."
return 1
var/obj/window/W = new /obj/window( usr.loc, reinf )
var/obj/window/W
if(reinf)
W = new /obj/window/reinforced( usr.loc, reinf )
W.state = 0
else
W = new /obj/window/basic( usr.loc, reinf )
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
+18 -4
View File
@@ -149,9 +149,6 @@
return
/obj/window/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/screwdriver))
if(reinf && state >= 1)
state = 3 - state
@@ -197,7 +194,7 @@
/obj/window/verb/rotate()
set name = "Rotate Window"
set name = "Rotate Window Counter-Clockwise"
set src in oview(1)
if (src.anchored)
@@ -213,6 +210,23 @@
src.ini_dir = src.dir
return
/obj/window/verb/revrotate()
set name = "Rotate Window Clockwise"
set src in oview(1)
if (src.anchored)
usr << "It is fastened to the floor; therefore, you can't rotate it!"
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
src.dir = turn(src.dir, 270)
update_nearby_tiles(need_rebuild=1)
src.ini_dir = src.dir
return
/obj/window/New(Loc,re=0)
..()