Fixes #6702 and cleanup

Makes reinforced glass a subtype of glass, cleans up window creation copypasta.
Cleaned up window initialization leaking outside of the window constructor.
Removes unnecessary init_dir var from windows.
This commit is contained in:
mwerezak
2014-11-12 16:03:23 -05:00
committed by mwerezak
parent 57110b4059
commit ab2b4608e0
19 changed files with 121 additions and 196 deletions

View File

@@ -89,7 +89,7 @@
/datum/autolathe/recipe/rglass /datum/autolathe/recipe/rglass
name = "reinforced glass sheets" name = "reinforced glass sheets"
path = /obj/item/stack/sheet/rglass path = /obj/item/stack/sheet/glass/reinforced
category = "General" category = "General"
is_stack = 1 is_stack = 1

View File

@@ -87,8 +87,8 @@
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc ) var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
A.amount = 5 A.amount = 5
if(istype(P, /obj/item/stack/sheet/rglass)) if(istype(P, /obj/item/stack/sheet/glass/reinforced))
var/obj/item/stack/sheet/rglass/RG = P var/obj/item/stack/sheet/glass/reinforced/RG = P
if (RG.get_amount() < 2) if (RG.get_amount() < 2)
user << "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>" user << "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>"
return return
@@ -161,7 +161,7 @@
icon_state = "3b" icon_state = "3b"
else else
icon_state = "3" icon_state = "3"
new /obj/item/stack/sheet/rglass( loc, 2 ) new /obj/item/stack/sheet/glass/reinforced( loc, 2 )
return return
if(istype(P, /obj/item/weapon/screwdriver)) if(istype(P, /obj/item/weapon/screwdriver))
@@ -388,4 +388,4 @@ That prevents a few funky behaviors.
U << "\red <b>ERROR</b>: \black [A_T.name] data core is corrupted. Unable to install." U << "\red <b>ERROR</b>: \black [A_T.name] data core is corrupted. Unable to install."
else else
U << "\red <b>ERROR</b>: \black AI flush is in progress, cannot execute transfer protocol." U << "\red <b>ERROR</b>: \black AI flush is in progress, cannot execute transfer protocol."
return return

View File

@@ -18,6 +18,8 @@
matter = list("glass" = 3750) matter = list("glass" = 3750)
origin_tech = "materials=1" origin_tech = "materials=1"
var/created_window = /obj/structure/window/basic var/created_window = /obj/structure/window/basic
var/is_reinforced = 0
var/list/construction_options = list("One Direction", "Full Window")
/obj/item/stack/sheet/glass/cyborg /obj/item/stack/sheet/glass/cyborg
name = "glass" name = "glass"
@@ -32,19 +34,24 @@
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user) /obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
..() ..()
if(istype(W,/obj/item/stack/cable_coil)) if(!is_reinforced)
var/obj/item/stack/cable_coil/CC = W if(istype(W,/obj/item/stack/cable_coil))
if (get_amount() < 1 || CC.get_amount() < 5) var/obj/item/stack/cable_coil/CC = W
user << "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass.</span>" if (get_amount() < 1 || CC.get_amount() < 5)
return user << "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass.</span>"
CC.use(5) return
use(1)
user << "<span class='notice'>You attach wire to the [name].</span>" CC.use(5)
new /obj/item/stack/light_w(user.loc) use(1)
else if(istype(W, /obj/item/stack/rods)) user << "<span class='notice'>You attach wire to the [name].</span>"
var/obj/item/stack/rods/V = W new /obj/item/stack/light_w(user.loc)
if (V.get_amount() >= 1 && get_amount() >= 1) else if(istype(W, /obj/item/stack/rods))
var/obj/item/stack/sheet/rglass/RG = new (user.loc) var/obj/item/stack/rods/V = W
if (V.get_amount() < 1 || get_amount() < 1)
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass.</span>"
return
var/obj/item/stack/sheet/glass/reinforced/RG = new (user.loc)
RG.add_fingerprint(user) RG.add_fingerprint(user)
RG.add_to_stacks(user) RG.add_to_stacks(user)
var/obj/item/stack/sheet/glass/G = src var/obj/item/stack/sheet/glass/G = src
@@ -54,11 +61,6 @@
G.use(1) G.use(1)
if (!G && replace) if (!G && replace)
user.put_in_hands(RG) user.put_in_hands(RG)
else
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass.</span>"
return
else
return ..()
/obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob) /obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0 if(!user || !src) return 0
@@ -66,9 +68,9 @@
if(!user.IsAdvancedToolUser()) if(!user.IsAdvancedToolUser())
user << "\red You don't have the dexterity to do this!" user << "\red You don't have the dexterity to do this!"
return 0 return 0
var/title = "Sheet-Glass" var/title = "Sheet-[name]"
title += " ([src.amount] sheet\s left)" title += " ([src.amount] sheet\s left)"
switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null)) switch(input(title, "What would you like to construct?") in (construction_options + "Cancel"))
if("One Direction") if("One Direction")
if(!src) return 1 if(!src) return 1
if(src.loc != user) return 1 if(src.loc != user) return 1
@@ -81,7 +83,7 @@
user << "\red There are too many windows in this location." user << "\red There are too many windows in this location."
return 1 return 1
directions-=win.dir directions-=win.dir
if(!(win.ini_dir in cardinal)) if(!(win.dir in cardinal))
user << "\red Can't let you do that." user << "\red Can't let you do that."
return 1 return 1
@@ -95,113 +97,22 @@
if(!found) if(!found)
dir_to_set = direction dir_to_set = direction
break break
var/obj/structure/window/W new created_window( user.loc, dir_to_set, 1 )
W = new created_window( user.loc, 0 )
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1) src.use(1)
if("Full Window") if("Full Window")
if(!src) return 1 if(!src) return 1
if(src.loc != user) return 1 if(src.loc != user) return 1
if(src.amount < 2) if(src.amount < 4)
user << "\red You need more glass to do that." user << "\red You need more glass to do that."
return 1 return 1
if(locate(/obj/structure/window) in user.loc) if(locate(/obj/structure/window) in user.loc)
user << "\red There is a window in the way." user << "\red There is a window in the way."
return 1 return 1
var/obj/structure/window/W new created_window( user.loc, SOUTHWEST, 1 )
W = new created_window( user.loc, 0 ) src.use(4)
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
src.use(2)
return 0
/*
* Reinforced glass sheets
*/
/obj/item/stack/sheet/rglass
name = "reinforced glass"
desc = "Glass which seems to have rods or something stuck in them."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
matter = list("metal" = 1875,"glass" = 3750)
origin_tech = "materials=2"
/obj/item/stack/sheet/rglass/cyborg
name = "reinforced glass"
desc = "Glass which seems to have rods or something stuck in them."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/rglass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
user << "\red You don't have the dexterity to do this!"
return 0
var/title = "Sheet Reinf. Glass"
title += " ([src.amount] sheet\s left)"
switch(input(title, "Would you like full tile glass a one direction glass pane or a windoor?") in list("One Direction", "Full Window", "Windoor", "Cancel"))
if("One Direction")
if(!src) return 1
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
var/i = 0
for (var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
user << "\red There are too many windows in this location."
return 1
directions-=win.dir
if(!(win.ini_dir in cardinal))
user << "\red Can't let you do that."
return 1
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
var/dir_to_set = 2
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
var/found = 0
for(var/obj/structure/window/WT in user.loc)
if(WT.dir == direction)
found = 1
if(!found)
dir_to_set = direction
break
var/obj/structure/window/W
W = new /obj/structure/window/reinforced( user.loc, 1 )
W.state = 0
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
if("Full Window")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 2)
user << "\red You need more glass to do that."
return 1
if(locate(/obj/structure/window) in user.loc)
user << "\red There is a window in the way."
return 1
var/obj/structure/window/W
W = new /obj/structure/window/reinforced( user.loc, 1 )
W.state = 0
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
src.use(2)
if("Windoor") if("Windoor")
if(!is_reinforced) return 1
if(!src || src.loc != user) return 1 if(!src || src.loc != user) return 1
if(isturf(user.loc) && locate(/obj/structure/windoor_assembly/, user.loc)) if(isturf(user.loc) && locate(/obj/structure/windoor_assembly/, user.loc))
@@ -216,31 +127,33 @@
user << "\red You need more glass to do that." user << "\red You need more glass to do that."
return 1 return 1
var/obj/structure/windoor_assembly/WD new /obj/structure/windoor_assembly(user.loc, user.dir, 1)
WD = new /obj/structure/windoor_assembly(user.loc)
WD.state = "01"
WD.anchored = 0
src.use(5) src.use(5)
switch(user.dir)
if(SOUTH)
WD.dir = SOUTH
WD.ini_dir = SOUTH
if(EAST)
WD.dir = EAST
WD.ini_dir = EAST
if(WEST)
WD.dir = WEST
WD.ini_dir = WEST
else//If the user is facing northeast. northwest, southeast, southwest or north, default to north
WD.dir = NORTH
WD.ini_dir = NORTH
else
return 1
return 0 return 0
/*
* Reinforced glass sheets
*/
/obj/item/stack/sheet/glass/reinforced
name = "reinforced glass"
desc = "Glass which has been reinforced with metal rods."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
matter = list("metal" = 1875,"glass" = 3750)
origin_tech = "materials=2"
created_window = /obj/structure/window/reinforced
is_reinforced = 1
construction_options = list("One Direction", "Full Window", "Windoor")
/obj/item/stack/sheet/glass/reinforced/cyborg
name = "reinforced glass"
desc = "Glass which has been reinforced with metal rods."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
/* /*
* Phoron Glass sheets * Phoron Glass sheets
@@ -254,9 +167,6 @@
origin_tech = "materials=3;phorontech=2" origin_tech = "materials=3;phorontech=2"
created_window = /obj/structure/window/phoronbasic created_window = /obj/structure/window/phoronbasic
/obj/item/stack/sheet/glass/phoronglass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/glass/phoronglass/attackby(obj/item/W, mob/user) /obj/item/stack/sheet/glass/phoronglass/attackby(obj/item/W, mob/user)
..() ..()
if( istype(W, /obj/item/stack/rods) ) if( istype(W, /obj/item/stack/rods) )
@@ -279,13 +189,11 @@
*/ */
/obj/item/stack/sheet/glass/phoronrglass /obj/item/stack/sheet/glass/phoronrglass
name = "reinforced phoron glass" name = "reinforced phoron glass"
desc = "Phoron glass which seems to have rods or something stuck in them." desc = "Phoron glass which has been reinforced with metal rods."
singular_name = "reinforced phoron glass sheet" singular_name = "reinforced phoron glass sheet"
icon_state = "sheet-phoronrglass" icon_state = "sheet-phoronrglass"
matter = list("glass" = 7500,"metal" = 1875) matter = list("glass" = 7500,"metal" = 1875)
origin_tech = "materials=4;phorontech=2" origin_tech = "materials=4;phorontech=2"
created_window = /obj/structure/window/phoronreinforced created_window = /obj/structure/window/phoronreinforced
is_reinforced = 1
/obj/item/stack/sheet/glass/phoronrglass/attack_self(mob/user as mob)
construct_window(user)

View File

@@ -159,7 +159,7 @@ obj/structure/door_assembly
if(do_after(user, 40)) if(do_after(user, 40))
if(!src || !WT.isOn()) return if(!src || !WT.isOn()) return
user << "\blue You welded the glass panel out!" user << "\blue You welded the glass panel out!"
new /obj/item/stack/sheet/rglass(src.loc) new /obj/item/stack/sheet/glass/reinforced(src.loc)
glass = 0 glass = 0
else if(!anchored) else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.") user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
@@ -239,7 +239,7 @@ obj/structure/door_assembly
var/obj/item/stack/sheet/S = W var/obj/item/stack/sheet/S = W
if (S) if (S)
if (S.get_amount() >= 1) if (S.get_amount() >= 1)
if(istype(S, /obj/item/stack/sheet/rglass)) if(istype(S, /obj/item/stack/sheet/glass/reinforced))
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.") user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass) if(do_after(user, 40) && !glass)
@@ -303,4 +303,4 @@ obj/structure/door_assembly
name = "Wired " name = "Wired "
if(2) if(2)
name = "Near Finished " name = "Near Finished "
name += "[glass == 1 ? "Window " : ""][istext(glass) ? "[glass] Airlock" : base_name] Assembly" name += "[glass == 1 ? "Window " : ""][istext(glass) ? "[glass] Airlock" : base_name] Assembly"

View File

@@ -123,8 +123,8 @@
return return
//window placing begin //window placing begin
else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass)) else if(istype(W,/obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/ST = W var/obj/item/stack/sheet/glass/ST = W
var/dir_to_set = 1 var/dir_to_set = 1
if(loc == user.loc) if(loc == user.loc)
dir_to_set = user.dir dir_to_set = user.dir
@@ -153,16 +153,10 @@
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting. if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
user << "<span class='notice'>There is already a window facing this way there.</span>" user << "<span class='notice'>There is already a window facing this way there.</span>"
return return
var/wtype = ST.created_window
if (ST.use(1)) if (ST.use(1))
var/obj/structure/window/WD var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1)
if(istype(W, /obj/item/stack/sheet/rglass))
WD = new/obj/structure/window/reinforced(loc) //reinforced window
else
WD = new/obj/structure/window/basic(loc) //normal window
WD.dir = dir_to_set
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
user << "<span class='notice'>You place the [WD] on [src].</span>" user << "<span class='notice'>You place the [WD] on [src].</span>"
WD.update_icon() WD.update_icon()
return return

View File

@@ -18,7 +18,6 @@ obj/structure/windoor_assembly
density = 0 density = 0
dir = NORTH dir = NORTH
var/ini_dir
var/obj/item/weapon/airlock_electronics/electronics = null var/obj/item/weapon/airlock_electronics/electronics = null
//Vars to help with the icon's name //Vars to help with the icon's name
@@ -26,9 +25,17 @@ obj/structure/windoor_assembly
var/secure = "" //Whether or not this creates a secure windoor var/secure = "" //Whether or not this creates a secure windoor
var/state = "01" //How far the door assembly has progressed in terms of sprites var/state = "01" //How far the door assembly has progressed in terms of sprites
obj/structure/windoor_assembly/New(dir=NORTH) obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0)
..() ..()
src.ini_dir = src.dir if(constructed)
state = "01"
anchored = 0
switch(start_dir)
if(NORTH, SOUTH, EAST, WEST)
dir = start_dir
else //If the user is facing northeast. northwest, southeast, southwest or north, default to north
dir = NORTH
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
obj/structure/windoor_assembly/Del() obj/structure/windoor_assembly/Del()
@@ -70,7 +77,7 @@ obj/structure/windoor_assembly/Del()
if(do_after(user, 40)) if(do_after(user, 40))
if(!src || !WT.isOn()) return if(!src || !WT.isOn()) return
user << "\blue You dissasembled the windoor assembly!" user << "\blue You dissasembled the windoor assembly!"
new /obj/item/stack/sheet/rglass(get_turf(src), 5) new /obj/item/stack/sheet/glass/reinforced(get_turf(src), 5)
if(secure) if(secure)
new /obj/item/stack/rods(get_turf(src), 4) new /obj/item/stack/rods(get_turf(src), 4)
del(src) del(src)
@@ -270,7 +277,6 @@ obj/structure/windoor_assembly/Del()
if(src.state != "01") if(src.state != "01")
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
src.ini_dir = src.dir
update_icon() update_icon()
return return

View File

@@ -8,7 +8,6 @@
anchored = 1.0 anchored = 1.0
flags = ON_BORDER flags = ON_BORDER
var/health = 14.0 var/health = 14.0
var/ini_dir = null
var/state = 2 var/state = 2
var/reinf = 0 var/reinf = 0
var/basestate var/basestate
@@ -16,7 +15,6 @@
// var/silicate = 0 // number of units of silicate // var/silicate = 0 // number of units of silicate
// var/icon/silicateIcon = null // the silicated icon // var/icon/silicateIcon = null // the silicated icon
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj) /obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
//Tasers and the like should not damage windows. //Tasers and the like should not damage windows.
@@ -62,11 +60,16 @@
if(reinf) new /obj/item/stack/rods( loc) if(reinf) new /obj/item/stack/rods( loc)
del(src) del(src)
//TODO: Make full windows a separate type of window.
//Once a full window, it will always be a full window, so there's no point
//having the same type for both.
/obj/structure/window/proc/is_full_window()
return (dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) /obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSGLASS)) if(istype(mover) && mover.checkpass(PASSGLASS))
return 1 return 1
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST) if(is_full_window())
return 0 //full tile window, you can't move into it! return 0 //full tile window, you can't move into it!
if(get_dir(loc, target) == dir) if(get_dir(loc, target) == dir)
return !density return !density
@@ -255,7 +258,6 @@
dir = turn(dir, 90) dir = turn(dir, 90)
// updateSilicate() // updateSilicate()
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
ini_dir = dir
return return
@@ -272,7 +274,6 @@
dir = turn(dir, 270) dir = turn(dir, 270)
// updateSilicate() // updateSilicate()
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
ini_dir = dir
return return
@@ -292,18 +293,19 @@
*/ */
/obj/structure/window/New(Loc,re=0) /obj/structure/window/New(Loc, start_dir=null, constructed=0)
..() ..()
// if(re) reinf = re //player-constructed windows
if (constructed)
ini_dir = dir anchored = 0
if (start_dir)
dir = start_dir
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
update_nearby_icons() update_nearby_icons()
return
/obj/structure/window/Del() /obj/structure/window/Del()
density = 0 density = 0
@@ -314,6 +316,7 @@
/obj/structure/window/Move() /obj/structure/window/Move()
var/ini_dir = dir
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
..() ..()
dir = ini_dir dir = ini_dir
@@ -412,6 +415,13 @@
health = 40 health = 40
reinf = 1 reinf = 1
/obj/structure/window/New(Loc, constructed=0)
..()
//player-constructed windows
if (constructed)
state = 0
/obj/structure/window/reinforced/tinted /obj/structure/window/reinforced/tinted
name = "tinted window" name = "tinted window"
desc = "It looks rather strong and opaque. Might take a few good hits to shatter it." desc = "It looks rather strong and opaque. Might take a few good hits to shatter it."

View File

@@ -515,7 +515,8 @@
if (!( AM.anchored )) if (!( AM.anchored ))
var/t = get_dir(src, AM) var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window)) if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t)) for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0 now_pushing = 0
return return

View File

@@ -147,7 +147,8 @@
if (!( AM.anchored )) if (!( AM.anchored ))
var/t = get_dir(src, AM) var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window)) if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t)) for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0 now_pushing = 0
return return

View File

@@ -414,7 +414,8 @@
else else
if (pulling) if (pulling)
if (istype(pulling, /obj/structure/window)) if (istype(pulling, /obj/structure/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST) var/obj/structure/window/W = pulling
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T))) for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
stop_pulling() stop_pulling()
if (pulling) if (pulling)

View File

@@ -584,7 +584,8 @@ var/list/robot_verbs_default = list(
if (!AM.anchored) if (!AM.anchored)
var/t = get_dir(src, AM) var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window)) if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t)) for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0 now_pushing = 0
return return

View File

@@ -167,7 +167,7 @@
stacktypes = list( stacktypes = list(
/obj/item/stack/sheet/metal = 50, /obj/item/stack/sheet/metal = 50,
/obj/item/stack/sheet/plasteel = 10, /obj/item/stack/sheet/plasteel = 10,
/obj/item/stack/sheet/rglass = 50, /obj/item/stack/sheet/glass/reinforced = 50,
/obj/item/stack/rods = 50 /obj/item/stack/rods = 50
) )
@@ -188,7 +188,7 @@
stacktypes = list( stacktypes = list(
/obj/item/stack/sheet/metal = 50, /obj/item/stack/sheet/metal = 50,
/obj/item/stack/sheet/glass = 50, /obj/item/stack/sheet/glass = 50,
/obj/item/stack/sheet/rglass = 50, /obj/item/stack/sheet/glass/reinforced = 50,
/obj/item/stack/cable_coil = 50, /obj/item/stack/cable_coil = 50,
/obj/item/stack/rods = 15, /obj/item/stack/rods = 15,
/obj/item/stack/tile/plasteel = 15 /obj/item/stack/tile/plasteel = 15
@@ -217,7 +217,7 @@
M.amount = 50 M.amount = 50
src.modules += M src.modules += M
var/obj/item/stack/sheet/rglass/cyborg/R = new /obj/item/stack/sheet/rglass/cyborg(src) var/obj/item/stack/sheet/glass/reinforced/cyborg/R = new (src)
R.amount = 50 R.amount = 50
src.modules += R src.modules += R
@@ -400,7 +400,7 @@
stacktypes = list( stacktypes = list(
/obj/item/stack/sheet/wood = 1, /obj/item/stack/sheet/wood = 1,
/obj/item/stack/sheet/mineral/plastic = 1, /obj/item/stack/sheet/mineral/plastic = 1,
/obj/item/stack/sheet/rglass = 5, /obj/item/stack/sheet/glass/reinforced = 5,
/obj/item/stack/tile/wood = 5, /obj/item/stack/tile/wood = 5,
/obj/item/stack/rods = 15, /obj/item/stack/rods = 15,
/obj/item/stack/tile/plasteel = 15, /obj/item/stack/tile/plasteel = 15,

View File

@@ -80,7 +80,8 @@
if (!( AM.anchored )) if (!( AM.anchored ))
var/t = get_dir(src, AM) var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window)) if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t)) for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0 now_pushing = 0
return return

View File

@@ -351,7 +351,8 @@
if (!( AM.anchored )) if (!( AM.anchored ))
var/t = get_dir(src, AM) var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window)) if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t)) for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0 now_pushing = 0
return return

View File

@@ -41,7 +41,8 @@
if (!( AM.anchored )) if (!( AM.anchored ))
var/t = get_dir(src, AM) var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window)) if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t)) for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0 now_pushing = 0
return return

View File

@@ -230,7 +230,7 @@ var/list/solars_list = list()
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
return 1 return 1
if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass)) if(istype(W, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/S = W var/obj/item/stack/sheet/S = W
if(S.use(2)) if(S.use(2))
glass_type = W.type glass_type = W.type

View File

@@ -235,7 +235,7 @@
possible_spawns += /obj/item/stack/sheet/metal possible_spawns += /obj/item/stack/sheet/metal
possible_spawns += /obj/item/stack/sheet/plasteel possible_spawns += /obj/item/stack/sheet/plasteel
possible_spawns += /obj/item/stack/sheet/glass possible_spawns += /obj/item/stack/sheet/glass
possible_spawns += /obj/item/stack/sheet/rglass possible_spawns += /obj/item/stack/sheet/glass/reinforced
possible_spawns += /obj/item/stack/sheet/mineral/phoron possible_spawns += /obj/item/stack/sheet/mineral/phoron
possible_spawns += /obj/item/stack/sheet/mineral/gold possible_spawns += /obj/item/stack/sheet/mineral/gold
possible_spawns += /obj/item/stack/sheet/mineral/silver possible_spawns += /obj/item/stack/sheet/mineral/silver

View File

@@ -48,7 +48,7 @@
M.amount = 50 M.amount = 50
src.modules += M src.modules += M
var/obj/item/stack/sheet/rglass/G = new /obj/item/stack/sheet/rglass(src) var/obj/item/stack/sheet/glass/reinforced/G = new (src)
G.amount = 50 G.amount = 50
src.modules += G src.modules += G

View File

@@ -170,7 +170,7 @@ proc/check_craftlathe_recipe(var/list/param_recipe)
CRAFT_ITEMS += new/datum/craftlathe_item("METAL","Metal",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/metal) CRAFT_ITEMS += new/datum/craftlathe_item("METAL","Metal",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/metal)
CRAFT_ITEMS += new/datum/craftlathe_item("R METAL","Reinforced Metal",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/r_metal) CRAFT_ITEMS += new/datum/craftlathe_item("R METAL","Reinforced Metal",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/r_metal)
CRAFT_ITEMS += new/datum/craftlathe_item("GLASS","Glass",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/glass) CRAFT_ITEMS += new/datum/craftlathe_item("GLASS","Glass",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/glass)
CRAFT_ITEMS += new/datum/craftlathe_item("R GLASS","Reinforced Glass",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/rglass) CRAFT_ITEMS += new/datum/craftlathe_item("R GLASS","Reinforced Glass",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/glass/reinforced)
CRAFT_ITEMS += new/datum/craftlathe_item("GOLD","Gold",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/gold) CRAFT_ITEMS += new/datum/craftlathe_item("GOLD","Gold",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/gold)
CRAFT_ITEMS += new/datum/craftlathe_item("SILVER","Silver",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/silver) CRAFT_ITEMS += new/datum/craftlathe_item("SILVER","Silver",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/silver)
CRAFT_ITEMS += new/datum/craftlathe_item("DIAMOND","Diamond",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/diamond) CRAFT_ITEMS += new/datum/craftlathe_item("DIAMOND","Diamond",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/diamond)
@@ -230,4 +230,4 @@ proc/check_craftlathe_recipe(var/list/param_recipe)
return return