Startoad's plasma windows commit, I'm doing the github stuff for it.

3677121b51
This commit is contained in:
Iamgoofball
2013-11-01 18:53:45 -07:00
parent f2302c0669
commit a75492d26b
7 changed files with 287 additions and 21 deletions

View File

@@ -11,6 +11,8 @@
var/ini_dir = null
var/state = 0
var/reinf = 0
var/basestate
var/shardtype = /obj/item/weapon/shard
// var/silicate = 0 // number of units of silicate
// var/icon/silicateIcon = null // the silicated icon
@@ -219,11 +221,11 @@
var/index = null
index = 0
while(index < 2)
new /obj/item/weapon/shard(loc)
new shardtype(loc)
if(reinf) new /obj/item/stack/rods(loc)
index++
else
new /obj/item/weapon/shard(loc)
new shardtype(loc)
if(reinf) new /obj/item/stack/rods(loc)
del(src)
return
@@ -282,19 +284,9 @@
/obj/structure/window/New(Loc,re=0)
..()
if(re) reinf = re
// if(re) reinf = re
ini_dir = dir
if(reinf)
icon_state = "rwindow"
desc = "A reinforced window."
name = "reinforced window"
state = 2*anchored
health = 40
if(opacity)
icon_state = "twindow"
else
icon_state = "window"
update_nearby_tiles(need_rebuild=1)
update_nearby_icons()
@@ -354,12 +346,12 @@
if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src
junction |= get_dir(src,W)
if(opacity)
icon_state = "twindow[junction]"
icon_state = "[basestate][junction]"
else
if(reinf)
icon_state = "rwindow[junction]"
icon_state = "[basestate][junction]"
else
icon_state = "window[junction]"
icon_state = "[basestate][junction]"
return
@@ -371,18 +363,53 @@
/obj/structure/window/basic
desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."
icon_state = "window"
basestate = "window"
/obj/structure/window/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
health = 120
/obj/structure/window/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 32000)
hit(round(exposed_volume / 1000), 0)
..()
/obj/structure/window/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
reinf = 1
health = 160
/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
/obj/structure/window/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/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/reinforced/tinted/frosted
name = "frosted window"
icon_state = "fwindow"
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