From 47f0b47c465e0f53e091ae2ff40ddc515472bb0c Mon Sep 17 00:00:00 2001 From: Atlantis Date: Mon, 27 Jul 2015 13:49:12 +0200 Subject: [PATCH] Borosilicate windows - This is the second part of my PR that added phoron windows to protect the SM core from fires - Borosilicate windows are heat resistant versions of regular glass windows. This PR renames them (from phoron windows/phoron glass/etc.) and adjusts the fire resistances - They are no longer completely fireproof. Instead, all window types have fire resistance variables - maximal safe temperature and amount of damage taken if temperature exceeds this limit. - Regular: 100C, Regular Reinforced: 750C, Borosilicate: 2000C, Borosilicate Reinforced: 4000C. - Adds alloying recipe to make borosilicate glass. 2 sand + 1 platinum alloy. --- code/game/objects/structures/window.dm | 36 +++++++++++++---------- code/modules/materials/material_sheets.dm | 13 ++++---- code/modules/materials/materials.dm | 11 ++++--- code/modules/mining/alloys.dm | 10 ++++++- html/changelogs/Atlantis-PR-10336.yml | 7 +++++ 5 files changed, 49 insertions(+), 28 deletions(-) create mode 100644 html/changelogs/Atlantis-PR-10336.yml diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 1fec557b8d..365c88cf22 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -8,6 +8,8 @@ anchored = 1.0 flags = ON_BORDER var/maxhealth = 14.0 + var/maximal_heat = T0C + 100 // Maximal heat before this window begins taking damage from fire + var/damage_per_fire_tick = 2.0 // Amount of damage per fire tick. Regular windows are not fireproof so they might as well break quickly. var/health var/ini_dir = null var/state = 2 @@ -388,8 +390,8 @@ return /obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > T0C + 800) - hit(round(exposed_volume / 100), 0) + if(exposed_temperature > maximal_heat) + hit(damage_per_fire_tick, 0) ..() @@ -399,44 +401,46 @@ icon_state = "window" basestate = "window" glasstype = /obj/item/stack/material/glass - + maximal_heat = T0C + 100 + damage_per_fire_tick = 2.0 + maxhealth = 12.0 /obj/structure/window/phoronbasic name = "phoron window" - desc = "A phoron-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through." + desc = "A borosilicate alloy window. It seems to be quite strong." basestate = "phoronwindow" icon_state = "phoronwindow" shardtype = /obj/item/weapon/material/shard/phoron glasstype = /obj/item/stack/material/glass/phoronglass - maxhealth = 120 - -/obj/structure/window/phoronbasic/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > T0C + 32000) - hit(round(exposed_volume / 1000), 0) - ..() + maximal_heat = T0C + 2000 + damage_per_fire_tick = 1.0 + maxhealth = 40.0 /obj/structure/window/phoronreinforced - name = "reinforced phoron window" - desc = "A phoron-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic phoron windows are insanely fireproof." + name = "reinforced borosilicate window" + desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong." basestate = "phoronrwindow" icon_state = "phoronrwindow" shardtype = /obj/item/weapon/material/shard/phoron glasstype = /obj/item/stack/material/glass/phoronrglass reinf = 1 - maxhealth = 160 + maximal_heat = T0C + 4000 + damage_per_fire_tick = 1.0 // This should last for 80 fire ticks if the window is not damaged at all. The idea is that borosilicate windows have something like ablative layer that protects them for a while. + maxhealth = 80.0 -/obj/structure/window/phoronreinforced/fire_act(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" - maxhealth = 40 + maxhealth = 40.0 reinf = 1 + maximal_heat = T0C + 750 + damage_per_fire_tick = 2.0 glasstype = /obj/item/stack/material/glass/reinforced + /obj/structure/window/New(Loc, constructed=0) ..() diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index 4d4f6033e6..e999a30a79 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -191,12 +191,15 @@ default_type = "reinforced glass" /obj/item/stack/material/glass/phoronglass - name = "phoron glass" - singular_name = "phoron glass sheet" + name = "borosilicate glass" + desc = "This sheet is special platinum-glass alloy designed to withstand large temperatures" + singular_name = "borosilicate glass sheet" icon_state = "sheet-phoronglass" - default_type = "phoron glass" + default_type = "borosilicate glass" /obj/item/stack/material/glass/phoronrglass - name = "reinforced phoron glass" + name = "reinforced borosilicate glass" + desc = "This sheet is special platinum-glass alloy designed to withstand large temperatures. It is reinforced with few rods." + singular_name = "reinforced borosilicate glass sheet" icon_state = "sheet-phoronrglass" - default_type = "reinforced phoron glass" + default_type = "reinforced borosilicate glass" diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 49ddcfa300..3f77f5fe57 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -438,21 +438,20 @@ var/list/name_to_material rod_product = null /material/glass/phoron - name = "phoron glass" + name = "borosilicate glass" stack_type = /obj/item/stack/material/glass/phoronglass flags = MATERIAL_BRITTLE - ignition_point = PHORON_MINIMUM_BURN_TEMPERATURE+300 - integrity = 200 // idk why but phoron windows are strong, so. + integrity = 100 icon_colour = "#FC2BC5" - stack_origin_tech = list(TECH_MATERIAL = 3, TECH_PHORON = 2) + stack_origin_tech = list(TECH_MATERIAL = 4) created_window = /obj/structure/window/phoronbasic wire_product = null rod_product = /obj/item/stack/material/glass/phoronrglass /material/glass/phoron/reinforced - name = "reinforced phoron glass" + name = "reinforced borosilicate glass" stack_type = /obj/item/stack/material/glass/phoronrglass - stack_origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 2) + stack_origin_tech = list(TECH_MATERIAL = 5) composite_material = list() //todo created_window = /obj/structure/window/phoronreinforced hardness = 40 diff --git a/code/modules/mining/alloys.dm b/code/modules/mining/alloys.dm index 9461c1e6b9..dc1a471c6a 100644 --- a/code/modules/mining/alloys.dm +++ b/code/modules/mining/alloys.dm @@ -24,4 +24,12 @@ "coal" = 1, "hematite" = 1 ) - product = /obj/item/stack/material/steel \ No newline at end of file + product = /obj/item/stack/material/steel + +/datum/alloy/borosilicate + metaltag = "borosilicate glass" + requires = list( + "platinum" = 1, + "sand" = 2 + ) + product = /obj/item/stack/material/glass/phoronglass \ No newline at end of file diff --git a/html/changelogs/Atlantis-PR-10336.yml b/html/changelogs/Atlantis-PR-10336.yml new file mode 100644 index 0000000000..f041e8d89e --- /dev/null +++ b/html/changelogs/Atlantis-PR-10336.yml @@ -0,0 +1,7 @@ +author: Atlantis + +delete-after: True + +changes: + - rscadd: "Converted phoron glass to borosilicate glass, adjusted heat resistances accordingly, got rid of copypaste fire code. Fire resistance is now handled by variables so completely fireproof windows are possible with varedit." + - rscadd: "Windows take fire damage when heat exceeds 100C regular windows, 750C reinforced regular, 2000C borosilicate and 4000C reinforced borosilicate. For comparsions, reinforced walls begin taking damage around 6000."