Smooth tables added

Tables now automatically determine which direction and sprite they'll use. They will connect to any adjacent table unless there is a window between them (regular, reinforced, tinted, whichever)

To achieve this I had to reverse all sprite directions in the dmi file, this means that on the dreammaker map, every single table piece faces the exact opposite way. I will fix this on monday but can't at the moment. There are no issues on the map tho as all the dirs get recalculated at map load and whenever an adjacent (cardinal or diagonal) table is created or deleted.

Ingame I removed the annoying CORNER/SIDE/ALONE, EAST/WEST/N... blabla menu as it determines this by itself now.

So yeah, smooth tables.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1583 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2011-05-14 17:10:19 +00:00
parent b03a4c2594
commit cea7302b08
4 changed files with 171 additions and 91 deletions
@@ -18,21 +18,7 @@ RACK PARTS
del(src)
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
var/state = input(user, "What type of table?", "Assembling Table", null) in list( "sides", "corners", "alone" )
var/direct = SOUTH
var/i_state
if(state == "alone")
i_state = "table"
else if (state == "corners")
direct = input(user, "Direction?", "Assembling Table", null) in list( "NORTHWEST", "NORTHEAST", "SOUTHWEST", "SOUTHEAST" )
i_state = "tabledir"
else if (state == "sides")
direct = input(user, "Direction?", "Assembling Table", null) in list( "NORTH", "EAST", "SOUTH", "WEST" )
i_state = "tabledir"
var/obj/table/T = new /obj/table( user.loc )
T.icon_state = i_state
T.dir = text2dir(direct)
T.add_fingerprint(user)
new /obj/table( user.loc )
del(src)
return
@@ -45,21 +31,7 @@ RACK PARTS
del(src)
/obj/item/weapon/table_parts/wood/attack_self(mob/user as mob)
var/state = input(user, "What type of table?", "Assembling Table", null) in list( "sides", "corners", "alone" )
var/direct = SOUTH
var/i_state
if(state == "alone")
i_state = "woodtable"
else if (state == "corners")
direct = input(user, "Direction?", "Assembling Table", null) in list( "NORTHWEST", "NORTHEAST", "SOUTHWEST", "SOUTHEAST" )
i_state = "woodentable"
else if (state == "sides")
direct = input(user, "Direction?", "Assembling Table", null) in list( "NORTH", "EAST", "SOUTH", "WEST" )
i_state = "woodentable"
var/obj/table/T = new /obj/table/woodentable( user.loc )
T.icon_state = i_state
T.dir = text2dir(direct)
T.add_fingerprint(user)
new /obj/table/woodentable( user.loc )
del(src)
return
@@ -73,21 +45,7 @@ RACK PARTS
del(src)
/obj/item/weapon/table_parts/reinforced/attack_self(mob/user as mob)
var/state = input(user, "What type of table?", "Assembling Table", null) in list( "sides", "corners", "alone" )
var/direct = SOUTH
var/i_state
if(state == "alone")
i_state = "reinf_table"
else if (state == "corners")
direct = input(user, "Direction?", "Assembling Table", null) in list( "NORTHWEST", "NORTHEAST", "SOUTHWEST", "SOUTHEAST" )
i_state = "reinf_tabledir"
else if (state == "sides")
direct = input(user, "Direction?", "Assembling Table", null) in list( "NORTH", "EAST", "SOUTH", "WEST" )
i_state = "reinf_tabledir"
var/obj/table/reinforced/T = new /obj/table/reinforced( user.loc )
T.icon_state = i_state
T.dir = text2dir(direct)
T.add_fingerprint(user)
new /obj/table/reinforced( user.loc )
del(src)
return