mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Makes windows less invulnerable.
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
var/maximal_heat = T0C + 100 // Maximal heat before this window begins taking damage from fire
|
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/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/health
|
||||||
|
var/force_threshold = 0
|
||||||
var/ini_dir = null
|
var/ini_dir = null
|
||||||
var/state = 2
|
var/state = 2
|
||||||
var/reinf = 0
|
var/reinf = 0
|
||||||
@@ -313,9 +314,9 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
|
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
|
||||||
if(reinf) damage *= 0.5
|
if(damage < force_threshold || force_threshold < 0)
|
||||||
if(damage < 5)
|
|
||||||
return
|
return
|
||||||
|
if(reinf) damage *= 0.5
|
||||||
take_damage(damage)
|
take_damage(damage)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -452,13 +453,14 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/structure/window/basic
|
/obj/structure/window/basic
|
||||||
desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."
|
desc = "It looks thin and flimsy. A few knocks with... almost anything, really should shatter it."
|
||||||
icon_state = "window"
|
icon_state = "window"
|
||||||
basestate = "window"
|
basestate = "window"
|
||||||
glasstype = /obj/item/stack/material/glass
|
glasstype = /obj/item/stack/material/glass
|
||||||
maximal_heat = T0C + 100
|
maximal_heat = T0C + 100
|
||||||
damage_per_fire_tick = 2.0
|
damage_per_fire_tick = 2.0
|
||||||
maxhealth = 12.0
|
maxhealth = 12.0
|
||||||
|
force_threshold = 3
|
||||||
|
|
||||||
/obj/structure/window/phoronbasic
|
/obj/structure/window/phoronbasic
|
||||||
name = "phoron window"
|
name = "phoron window"
|
||||||
@@ -470,6 +472,7 @@
|
|||||||
maximal_heat = T0C + 2000
|
maximal_heat = T0C + 2000
|
||||||
damage_per_fire_tick = 1.0
|
damage_per_fire_tick = 1.0
|
||||||
maxhealth = 40.0
|
maxhealth = 40.0
|
||||||
|
force_threshold = 5
|
||||||
|
|
||||||
/obj/structure/window/phoronbasic/full
|
/obj/structure/window/phoronbasic/full
|
||||||
dir = SOUTHWEST
|
dir = SOUTHWEST
|
||||||
@@ -486,6 +489,7 @@
|
|||||||
maximal_heat = T0C + 4000
|
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.
|
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
|
maxhealth = 80.0
|
||||||
|
force_threshold = 10
|
||||||
|
|
||||||
/obj/structure/window/phoronreinforced/full
|
/obj/structure/window/phoronreinforced/full
|
||||||
dir = SOUTHWEST
|
dir = SOUTHWEST
|
||||||
@@ -501,6 +505,7 @@
|
|||||||
maximal_heat = T0C + 750
|
maximal_heat = T0C + 750
|
||||||
damage_per_fire_tick = 2.0
|
damage_per_fire_tick = 2.0
|
||||||
glasstype = /obj/item/stack/material/glass/reinforced
|
glasstype = /obj/item/stack/material/glass/reinforced
|
||||||
|
force_threshold = 6
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/window/New(Loc, constructed=0)
|
/obj/structure/window/New(Loc, constructed=0)
|
||||||
@@ -528,6 +533,7 @@
|
|||||||
icon_state = "fwindow"
|
icon_state = "fwindow"
|
||||||
basestate = "fwindow"
|
basestate = "fwindow"
|
||||||
maxhealth = 30
|
maxhealth = 30
|
||||||
|
force_threshold = 5
|
||||||
|
|
||||||
/obj/structure/window/shuttle
|
/obj/structure/window/shuttle
|
||||||
name = "shuttle window"
|
name = "shuttle window"
|
||||||
@@ -539,6 +545,7 @@
|
|||||||
reinf = 1
|
reinf = 1
|
||||||
basestate = "w"
|
basestate = "w"
|
||||||
dir = 5
|
dir = 5
|
||||||
|
force_threshold = 7
|
||||||
|
|
||||||
/obj/structure/window/reinforced/polarized
|
/obj/structure/window/reinforced/polarized
|
||||||
name = "electrochromic window"
|
name = "electrochromic window"
|
||||||
|
|||||||
Reference in New Issue
Block a user