diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index a7e6d57bb3..b37825a4d4 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -2,6 +2,8 @@
* Contains:
* Glass sheets
* Reinforced glass sheets
+ * Plasma Glass Sheets
+ * Reinforced Plasma Glass Sheets (AKA Holy fuck strong windows)
* Glass shards - TODO: Move this into code/game/object/item/weapons
*/
@@ -293,3 +295,176 @@
H.UpdateDamageIcon()
H.updatehealth()
..()
+
+
+
+
+/*
+ * Plasma Glass sheets
+ */
+/obj/item/stack/sheet/plasmaglass
+ name = "plasma glass"
+ desc = "A very strong and very resistant sheet of a plasma-glass alloy."
+ singular_name = "glass sheet"
+ icon_state = "sheet-plasmaglass"
+ g_amt = 7500
+ origin_tech = "materials=3;plasma=2"
+
+/obj/item/stack/sheet/plasmaglass/attack_self(mob/user as mob)
+ construct_window(user)
+
+/obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user)
+ ..()
+ if( istype(W, /obj/item/stack/rods) )
+ var/obj/item/stack/rods/V = W
+ var/obj/item/stack/sheet/plasmarglass/RG = new (user.loc)
+ RG.add_fingerprint(user)
+ RG.add_to_stacks(user)
+ V.use(1)
+ var/obj/item/stack/sheet/glass/G = src
+ src = null
+ var/replace = (user.get_inactive_hand()==G)
+ G.use(1)
+ if (!G && !RG && replace)
+ user.put_in_hands(RG)
+ else
+ return ..()
+
+/obj/item/stack/sheet/plasmaglass/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-PlasmaGlass"
+ title += " ([src.amount] sheet\s left)"
+ switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null))
+ 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/plasmabasic( user.loc, 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/plasmabasic( user.loc, 0 )
+ W.dir = SOUTHWEST
+ W.ini_dir = SOUTHWEST
+ W.anchored = 0
+ src.use(2)
+ return 0
+
+/*
+ * Reinforced plasma glass sheets
+ */
+/obj/item/stack/sheet/plasmarglass
+ name = "reinforced plasma glass"
+ desc = "Plasma glass which seems to have rods or something stuck in them."
+ singular_name = "reinforced plasma glass sheet"
+ icon_state = "sheet-plasmarglass"
+ g_amt = 7500
+ m_amt = 1875
+ origin_tech = "materials=4;plasma=2"
+
+/obj/item/stack/sheet/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
\ No newline at end of file
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 24a9866a54..7d1041aaab 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -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"
\ No newline at end of file
+ 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
\ No newline at end of file
diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm
index ac206cf1b8..58964710bf 100644
--- a/code/modules/mining/machine_processing.dm
+++ b/code/modules/mining/machine_processing.dm
@@ -298,9 +298,25 @@
new /obj/item/stack/sheet/mineral/clown(output.loc)
else
on = 0
+ if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
+ if (ore_glass > 0 && ore_plasma > 0)
+ ore_glass--;
+ ore_plasma--;
+ new /obj/item/stack/sheet/plasmaglass(output.loc)
+ else
+ on = 0
+ if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
+ if (ore_glass > 0 && ore_plasma > 0 && ore_iron > 0)
+ ore_glass--;
+ ore_iron--;
+ ore_plasma--;
+ new /obj/item/stack/sheet/plasmarglass(output.loc)
+ else
+ on = 0
continue
//THESE TWO ARE CODED FOR URIST TO USE WHEN HE GETS AROUND TO IT.
//They were coded on 18 Feb 2012. If you're reading this in 2015, then firstly congratulations on the world not ending on 21 Dec 2012 and secondly, Urist is apparently VERY lazy. ~Errorage
+ //Iamgoofball here, this comment I'm typing right now was made in 11/1/2013. If you're reading this in 2020, then please let me know if the world has gone into a nuclear apocalypse. Also Urist has been tried and hung for how lazy he was. That and he was jaywalking.
/*if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
if (ore_uranium >= 2 && ore_diamond >= 1)
ore_uranium -= 2
@@ -380,34 +396,42 @@
if (O)
if (istype(O,/obj/item/weapon/ore/iron))
ore_iron++;
+ O.loc = null
del(O)
continue
if (istype(O,/obj/item/weapon/ore/glass))
ore_glass++;
+ O.loc = null
del(O)
continue
if (istype(O,/obj/item/weapon/ore/diamond))
ore_diamond++;
+ O.loc = null
del(O)
continue
if (istype(O,/obj/item/weapon/ore/plasma))
ore_plasma++
+ O.loc = null
del(O)
continue
if (istype(O,/obj/item/weapon/ore/gold))
ore_gold++
+ O.loc = null
del(O)
continue
if (istype(O,/obj/item/weapon/ore/silver))
ore_silver++
+ O.loc = null
del(O)
continue
if (istype(O,/obj/item/weapon/ore/uranium))
ore_uranium++
+ O.loc = null
del(O)
continue
if (istype(O,/obj/item/weapon/ore/clown))
ore_clown++
+ O.loc = null
del(O)
continue
O.loc = src.output.loc
diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm
index 46a37dae54..a0571ce419 100644
--- a/code/modules/mining/machine_stacking.dm
+++ b/code/modules/mining/machine_stacking.dm
@@ -42,6 +42,10 @@
dat += text("Reinforced Glass: [machine.ore_rglass] Release
")
if(machine.ore_plasma)
dat += text("Plasma: [machine.ore_plasma] Release
")
+ if(machine.ore_plasmaglass)
+ dat += text("Plasma Glass: [machine.ore_plasmaglass] Release
")
+ if(machine.ore_plasmarglass)
+ dat += text("Reinforced Plasma Glass: [machine.ore_plasmarglass] Release
")
if(machine.ore_gold)
dat += text("Gold: [machine.ore_gold] Release
")
if(machine.ore_silver)
@@ -83,6 +87,18 @@
G.amount = machine.ore_plasma
G.loc = machine.output.loc
machine.ore_plasma = 0
+ if ("plasmaglass")
+ if (machine.ore_plasmaglass > 0)
+ var/obj/item/stack/sheet/plasmaglass/G = new /obj/item/stack/sheet/plasmaglass
+ G.amount = machine.ore_plasmaglass
+ G.loc = machine.output.loc
+ machine.ore_plasmaglass = 0
+ if ("plasmarglass")
+ if (machine.ore_plasmarglass > 0)
+ var/obj/item/stack/sheet/plasmarglass/G = new /obj/item/stack/sheet/plasmarglass
+ G.amount = machine.ore_plasmarglass
+ G.loc = machine.output.loc
+ machine.ore_plasmarglass = 0
if ("uranium")
if (machine.ore_uranium > 0)
var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium
@@ -195,6 +211,8 @@
var/ore_silver = 0;
var/ore_diamond = 0;
var/ore_plasma = 0;
+ var/ore_plasmaglass = 0;
+ var/ore_plasmarglass = 0;
var/ore_iron = 0;
var/ore_uranium = 0;
var/ore_clown = 0;
@@ -263,6 +281,14 @@
ore_rglass+= O:amount
del(O)
continue
+ if (istype(O,/obj/item/stack/sheet/plasmaglass))
+ ore_plasmaglass+= O:amount
+ del(O)
+ continue
+ if (istype(O,/obj/item/stack/sheet/plasmarglass))
+ ore_plasmarglass+= O:amount
+ del(O)
+ continue
if (istype(O,/obj/item/stack/sheet/plasteel))
ore_plasteel+= O:amount
del(O)
@@ -349,6 +375,18 @@
G.loc = output.loc
ore_rglass -= stack_amt
return
+ if (ore_plasmaglass >= stack_amt)
+ var/obj/item/stack/sheet/plasmaglass/G = new /obj/item/stack/sheet/plasmaglass
+ G.amount = stack_amt
+ G.loc = output.loc
+ ore_plasmaglass -= stack_amt
+ return
+ if (ore_plasmarglass >= stack_amt)
+ var/obj/item/stack/sheet/plasmarglass/G = new /obj/item/stack/sheet/plasmarglass
+ G.amount = stack_amt
+ G.loc = output.loc
+ ore_plasmarglass -= stack_amt
+ return
if (ore_plasteel >= stack_amt)
var/obj/item/stack/sheet/plasteel/G = new /obj/item/stack/sheet/plasteel
G.amount = stack_amt
diff --git a/code/modules/research/xenoarchaeology/finds/finds_misc.dm b/code/modules/research/xenoarchaeology/finds/finds_misc.dm
index 64184ec0b6..249e334e3e 100644
--- a/code/modules/research/xenoarchaeology/finds/finds_misc.dm
+++ b/code/modules/research/xenoarchaeology/finds/finds_misc.dm
@@ -1,8 +1,10 @@
/obj/item/weapon/shard/plasma
name = "plasma shard"
+ desc = "A shard of plasma glass. Considerably tougher then normal glass shards. Apparently not tough enough to be a window."
+ force = 8.0
+ throwforce = 15.0
icon_state = "plasmalarge"
-
/obj/item/weapon/shard/plasma/New()
src.icon_state = pick("plasmalarge", "plasmamedium", "plasmasmall")
@@ -24,14 +26,14 @@
if ( istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
- var/obj/item/stack/sheet/mineral/plasma/NG = new (user.loc)
- for (var/obj/item/stack/sheet/mineral/plasma/G in user.loc)
+ var/obj/item/stack/sheet/plasmaglass/NG = new (user.loc)
+ for (var/obj/item/stack/sheet/plasmaglass/G in user.loc)
if(G==NG)
continue
if(G.amount>=G.max_amount)
continue
G.attackby(NG, user)
- usr << "You add the newly-formed plasma to the stack. It now contains [NG.amount] sheets."
+ usr << "You add the newly-formed plasma glass to the stack. It now contains [NG.amount] sheets."
//SN src = null
del(src)
return
diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi
index 3ecb07ea6a..0a85b397fd 100644
Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ
diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi
index 7e261d90e1..157cdc37a0 100644
Binary files a/icons/obj/structures.dmi and b/icons/obj/structures.dmi differ