Merge pull request #7493 from HeadyBucket/patch-2

Fix infinite glass exploit
This commit is contained in:
Fox McCloud
2017-06-09 18:00:32 -04:00
committed by GitHub
+6 -4
View File
@@ -122,6 +122,7 @@
fixture_type = "bulb"
sheets_refunded = 1
// the standard tube light fixture
/obj/machinery/light
name = "light fixture"
@@ -149,6 +150,7 @@
// this is used to calc the probability the light burns out
var/rigged = 0 // true if rigged to explode
var/lightmaterials = list(MAT_GLASS=100) //stores the materials the light is made of to stop infinite glass exploit
// the smaller bulb light fixture
@@ -305,6 +307,7 @@
brightness_range = L.brightness_range
brightness_power = L.brightness_power
brightness_color = L.brightness_color
lightmaterials = L.materials
on = has_power()
update()
@@ -472,6 +475,7 @@
L.brightness_range = brightness_range
L.brightness_power = brightness_power
L.brightness_color = brightness_color
L.materials = lightmaterials
// light item inherits the switchcount, then zero it
L.switchcount = switchcount
@@ -500,6 +504,7 @@
L.brightness_range = brightness_range
L.brightness_power = brightness_power
L.brightness_color = brightness_color
L.materials = lightmaterials
// light item inherits the switchcount, then zero it
L.switchcount = switchcount
@@ -596,7 +601,7 @@
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched
materials = list(MAT_METAL=60)
materials = list(MAT_GLASS=100)
var/rigged = 0 // true if rigged to explode
var/brightness_range = 2 //how much light it gives off
var/brightness_power = 1
@@ -608,7 +613,6 @@
icon_state = "ltube"
base_state = "ltube"
item_state = "c_tube"
materials = list(MAT_GLASS=100)
brightness_range = 8
/obj/item/weapon/light/tube/large
@@ -623,7 +627,6 @@
icon_state = "lbulb"
base_state = "lbulb"
item_state = "contvapour"
materials = list(MAT_GLASS=100)
brightness_range = 5
brightness_color = "#a0a080"
@@ -637,7 +640,6 @@
icon_state = "fbulb"
base_state = "fbulb"
item_state = "egg4"
materials = list(MAT_GLASS=100)
brightness_range = 5
// update the icon state and description of the light