mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Standardize windows.
Conflicts: code/WorkInProgress/buildmode.dm code/game/machinery/doors/airlock.dm code/game/objects/items/stacks/sheets/glass.dm code/game/objects/items/weapons/twohanded.dm code/game/objects/structures/window.dm code/modules/mining/mine_items.dm code/modules/mob/living/carbon/metroid/metroid.dm code/modules/mob/living/simple_animal/constructs.dm code/modules/mob/living/simple_animal/friendly/corgi.dm
This commit is contained in:
@@ -199,7 +199,7 @@ move an amendment</a> to the drawing.</p>
|
||||
for (var/obj/structure/window/W in T2)
|
||||
if(turn(dir,180) == W.dir)
|
||||
return BORDER_BETWEEN
|
||||
if (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST))
|
||||
if (W.is_fulltile())
|
||||
return BORDER_2NDTILE
|
||||
for(var/obj/machinery/door/window/D in T2)
|
||||
if(turn(dir,180) == D.dir)
|
||||
@@ -224,7 +224,7 @@ move an amendment</a> to the drawing.</p>
|
||||
for (var/dir in cardinal)
|
||||
var/skip = 0
|
||||
for (var/obj/structure/window/W in T)
|
||||
if(dir == W.dir || (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST)))
|
||||
if(dir == W.dir || (W.is_fulltile()))
|
||||
skip = 1; break
|
||||
if (skip) continue
|
||||
for(var/obj/machinery/door/window/D in T)
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
icon_state = "sheet-glass"
|
||||
g_amt = 3750
|
||||
origin_tech = "materials=1"
|
||||
var/created_window = /obj/structure/window/basic
|
||||
var/full_window = /obj/structure/window/full/basic
|
||||
|
||||
|
||||
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
|
||||
@@ -70,7 +72,7 @@
|
||||
user << "\red There are too many windows in this location."
|
||||
return 1
|
||||
directions-=win.dir
|
||||
if(!(win.ini_dir in cardinal))
|
||||
if(win.is_fulltile())
|
||||
user << "\red Can't let you do that."
|
||||
return 1
|
||||
|
||||
@@ -97,13 +99,10 @@
|
||||
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."
|
||||
if(locate(/obj/structure/window/full) in user.loc)
|
||||
user << "\red There is a full window in the way."
|
||||
return 1
|
||||
var/obj/structure/window/W
|
||||
W = new /obj/structure/window/basic( user.loc, 0 )
|
||||
W.dir = SOUTHWEST
|
||||
W.ini_dir = SOUTHWEST
|
||||
var/obj/structure/window/W = new full_window( user.loc, 0 )
|
||||
W.anchored = 0
|
||||
src.use(2)
|
||||
return 0
|
||||
@@ -152,7 +151,7 @@
|
||||
user << "\red There are too many windows in this location."
|
||||
return 1
|
||||
directions-=win.dir
|
||||
if(!(win.ini_dir in cardinal))
|
||||
if(win.is_fulltile())
|
||||
user << "\red Can't let you do that."
|
||||
return 1
|
||||
|
||||
@@ -181,7 +180,7 @@
|
||||
if(src.amount < 2)
|
||||
user << "\red You need more glass to do that."
|
||||
return 1
|
||||
if(locate(/obj/structure/window) in user.loc)
|
||||
if(locate(/obj/structure/window/full) in user.loc)
|
||||
user << "\red There is a window in the way."
|
||||
return 1
|
||||
var/obj/structure/window/W
|
||||
@@ -331,8 +330,11 @@
|
||||
icon_state = "sheet-plasmaglass"
|
||||
g_amt = 7500
|
||||
origin_tech = "materials=3;plasma=2"
|
||||
var/created_window = /obj/structure/window/plasmabasic
|
||||
var/full_window = /obj/structure/window/full/plasmabasic
|
||||
|
||||
/obj/item/stack/sheet/plasmaglass/attack_self(mob/user as mob)
|
||||
|
||||
/obj/item/stack/sheet/glass/plasmaglass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
|
||||
/obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user)
|
||||
@@ -419,67 +421,9 @@
|
||||
g_amt = 7500
|
||||
m_amt = 1875
|
||||
origin_tech = "materials=4;plasma=2"
|
||||
var/created_window = /obj/structure/window/plasmareinforced
|
||||
var/full_window = /obj/structure/window/full/plasmareinforced
|
||||
|
||||
/obj/item/stack/sheet/plasmarglass/attack_self(mob/user as mob)
|
||||
|
||||
/obj/item/stack/sheet/glass/plasmarglass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
|
||||
/obj/item/stack/sheet/plasmarglass/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 Plasma Reinf. Glass"
|
||||
title += " ([src.amount] sheet\s left)"
|
||||
switch(input(title, "Would you like full tile glass or a one direction glass pane?") in list("One Direction", "Full Window", "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/plasmareinforced( 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/plasmareinforced( user.loc, 1 )
|
||||
W.state = 0
|
||||
W.dir = SOUTHWEST
|
||||
W.ini_dir = SOUTHWEST
|
||||
W.anchored = 0
|
||||
src.use(2)
|
||||
else
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -161,16 +161,16 @@ obj/item/weapon/twohanded/
|
||||
if(!proximity) return
|
||||
..()
|
||||
if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit
|
||||
if(istype(A,/obj/structure/window)) //should just make a window.Break() proc but couldn't bother with it
|
||||
|
||||
if(istype(A,/obj/structure/window))
|
||||
var/pdiff=performWallPressureCheck(A.loc)
|
||||
if(pdiff>0)
|
||||
message_admins("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(A.loc)]!")
|
||||
log_admin("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([user.ckey]) at [A.loc]!")
|
||||
var/obj/structure/window/W = A
|
||||
|
||||
new /obj/item/weapon/shard( W.loc )
|
||||
if(W.reinf) new /obj/item/stack/rods( W.loc)
|
||||
|
||||
if (W.dir == SOUTHWEST)
|
||||
new /obj/item/weapon/shard( W.loc )
|
||||
if(W.reinf) new /obj/item/stack/rods( W.loc)
|
||||
del(A)
|
||||
W.destroy()
|
||||
else
|
||||
del(A)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user