Files
Paradise/code/game/objects/structures/fullwindow.dm
2016-04-21 21:35:53 -04:00

108 lines
3.4 KiB
Plaintext

/obj/structure/window/full
sheets = 2
dir=SOUTHWEST
level = 3
/obj/structure/window/full/CheckExit(atom/movable/O as mob|obj, target as turf)
return 1
/obj/structure/window/full/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
return 0
/obj/structure/window/full/is_fulltile()
return 1
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
/obj/structure/window/full/update_icon()
//A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
//this way it will only update full-tile ones
//This spawn is here so windows get properly updated when one gets deleted.
spawn(2)
if(!src) return
if(!is_fulltile())
return
var/junction = 0 //will be used to determine from which side the window is connected to other windows
if(anchored)
for(var/obj/structure/window/full/W in orange(src,1))
if(W.anchored && W.density) //Only counts anchored, not-destroyed full-tile windows.
if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src
junction |= get_dir(src,W)
icon_state = "[basestate][junction]"
return
/obj/structure/window/full/basic
desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."
icon_state = "window"
basestate = "window"
/obj/structure/window/full/plasmabasic
name = "plasma window"
desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
basestate = "plasmawindow"
icon_state = "plasmawindow"
shardtype = /obj/item/weapon/shard/plasma
glasstype = /obj/item/stack/sheet/plasmaglass
health = 120
/obj/structure/window/full/plasmareinforced
name = "reinforced plasma window"
desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof."
basestate = "plasmarwindow"
icon_state = "plasmarwindow"
shardtype = /obj/item/weapon/shard/plasma
glasstype = /obj/item/stack/sheet/plasmaglass
reinf = 1
health = 160
/obj/structure/window/full/reinforced
name = "reinforced window"
desc = "It looks rather strong. Might take a few good hits to shatter it."
icon_state = "rwindow"
basestate = "rwindow"
health = 40
reinf = 1
/obj/structure/window/full/reinforced/tinted
name = "tinted window"
desc = "It looks rather strong and opaque. Might take a few good hits to shatter it."
icon_state = "twindow"
basestate = "twindow"
opacity = 1
/obj/structure/window/full/reinforced/tinted/frosted
name = "frosted window"
desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window."
icon_state = "fwindow"
basestate = "fwindow"
health = 30
/obj/structure/window/full/shuttle
name = "shuttle window"
desc = "It looks rather strong. Might take a few good hits to shatter it."
icon = 'icons/obj/podwindows.dmi'
icon_state = "window"
basestate = "window"
health = 160
reinf = 1
/obj/structure/window/full/shuttle/New()
..()
color = null
/obj/structure/window/full/shuttle/update_icon() //icon_state has to be set manually
return
/obj/structure/window/full/shuttle/shuttleRotate(rotation)
..()
var/matrix/M = transform
M.Turn(rotation)
transform = M
/obj/structure/window/full/shuttle/dark
icon = 'icons/turf/shuttle.dmi'
icon_state = "window5"
basestate = "window5"