Merge pull request #3552 from Citadel-Station-13/upstream-merge-31355

[MIRROR] Code Consistency: luminosity --> light_range
This commit is contained in:
LetterJay
2017-10-23 03:44:46 -04:00
committed by GitHub
8 changed files with 75 additions and 77 deletions
+67 -68
View File
@@ -1,72 +1,71 @@
// the light switch
// can have multiple per area
// can also operate on non-loc area through "otherarea" var
/obj/machinery/light_switch
name = "light switch"
icon = 'icons/obj/power.dmi'
icon_state = "light1"
// the light switch
// can have multiple per area
// can also operate on non-loc area through "otherarea" var
/obj/machinery/light_switch
name = "light switch"
icon = 'icons/obj/power.dmi'
icon_state = "light1"
anchored = TRUE
desc = "Make dark."
var/on = TRUE
var/area/area = null
var/otherarea = null
// luminosity = 1
/obj/machinery/light_switch/Initialize()
var/area/area = null
var/otherarea = null
/obj/machinery/light_switch/Initialize()
. = ..()
area = get_area(src)
if(otherarea)
area = locate(text2path("/area/[otherarea]"))
if(!name)
name = "light switch ([area.name])"
on = area.lightswitch
updateicon()
/obj/machinery/light_switch/proc/updateicon()
if(stat & NOPOWER)
icon_state = "light-p"
else
if(on)
icon_state = "light1"
else
icon_state = "light0"
/obj/machinery/light_switch/examine(mob/user)
..()
to_chat(user, "It is [on? "on" : "off"].")
/obj/machinery/light_switch/attack_paw(mob/user)
src.attack_hand(user)
/obj/machinery/light_switch/attack_hand(mob/user)
on = !on
for(var/area/A in area.related)
A.lightswitch = on
A.updateicon()
for(var/obj/machinery/light_switch/L in A)
L.on = on
L.updateicon()
area.power_change()
/obj/machinery/light_switch/power_change()
if(!otherarea)
if(powered(LIGHT))
stat &= ~NOPOWER
else
stat |= NOPOWER
updateicon()
/obj/machinery/light_switch/emp_act(severity)
if(!(stat & (BROKEN|NOPOWER)))
power_change()
..()
area = get_area(src)
if(otherarea)
area = locate(text2path("/area/[otherarea]"))
if(!name)
name = "light switch ([area.name])"
on = area.lightswitch
updateicon()
/obj/machinery/light_switch/proc/updateicon()
if(stat & NOPOWER)
icon_state = "light-p"
else
if(on)
icon_state = "light1"
else
icon_state = "light0"
/obj/machinery/light_switch/examine(mob/user)
..()
to_chat(user, "It is [on? "on" : "off"].")
/obj/machinery/light_switch/attack_paw(mob/user)
src.attack_hand(user)
/obj/machinery/light_switch/attack_hand(mob/user)
on = !on
for(var/area/A in area.related)
A.lightswitch = on
A.updateicon()
for(var/obj/machinery/light_switch/L in A)
L.on = on
L.updateicon()
area.power_change()
/obj/machinery/light_switch/power_change()
if(!otherarea)
if(powered(LIGHT))
stat &= ~NOPOWER
else
stat |= NOPOWER
updateicon()
/obj/machinery/light_switch/emp_act(severity)
if(!(stat & (BROKEN|NOPOWER)))
power_change()
..()
+1 -1
View File
@@ -73,7 +73,7 @@
flags_1 = CONDUCT_1 | NODROP_1 | DROPDEL_1
slot_flags = null
block_chance = 0 //RNG WON'T HELP YOU NOW, PANSY
luminosity = 3
light_range = 3
attack_verb = list("brutalized", "eviscerated", "disemboweled", "hacked", "carved", "cleaved") //ONLY THE MOST VISCERAL ATTACK VERBS
var/notches = 0 //HOW MANY PEOPLE HAVE BEEN SLAIN WITH THIS BLADE
var/obj/item/disk/nuclear/nuke_disk //OUR STORED NUKE DISK
+2 -2
View File
@@ -109,7 +109,7 @@
icon_state = "t_mushroom"
name = "numerous mushrooms"
desc = "A large number of mushrooms, some of which have long, fleshy stems. They're radiating light!"
luminosity = 1
light_range = 1
harvested_name = "tiny mushrooms"
harvested_desc = "A few tiny mushrooms around larger stumps. You can already see them growing back."
harvest = /obj/item/reagent_containers/food/snacks/grown/ash_flora/mushroom_stem
@@ -190,7 +190,7 @@
desc = "A long mushroom stem. It's slightly glowing."
list_reagents = list("tinlux" = 2, "vitamin" = 1, "space_drugs" = 1)
icon_state = "mushroom_stem"
luminosity = 1
light_range = 1
seed = /obj/item/seeds/lavaland/ember
/obj/item/reagent_containers/food/snacks/grown/ash_flora/cactus_fruit
@@ -194,7 +194,7 @@
desc = "Happy to light your way."
icon = 'icons/obj/lighting.dmi'
icon_state = "orb"
luminosity = 7
light_range = 7
layer = ABOVE_ALL_MOB_LAYER
//Red/Blue Cubes
@@ -5,7 +5,7 @@
icon = 'icons/mob/aibots.dmi'
layer = MOB_LAYER
gender = NEUTER
luminosity = 3
light_range = 3
stop_automated_movement = 1
wander = 0
healable = 0
-1
View File
@@ -78,7 +78,6 @@
powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
var/malfhack = 0 //New var for my changes to AI malf. --NeoFite
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
// luminosity = 1
var/has_electronics = 0 // 0 - none, 1 - plugged in, 2 - secured by screwdriver
var/overload = 1 //used for the Blackout malf module
var/beenhit = 0 // used for counting how many times it has been hit, used for Aliens at the moment
@@ -9,7 +9,7 @@
density = FALSE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
use_power = NO_POWER_USE
luminosity = 4
light_range = 4
layer = ABOVE_OBJ_LAYER
var/obj/machinery/field/generator/FG1 = null
var/obj/machinery/field/generator/FG2 = null
@@ -8,7 +8,7 @@
anchored = TRUE
density = TRUE
layer = MASSIVE_OBJ_LAYER
luminosity = 6
light_range = 6
appearance_flags = 0
var/current_size = 1
var/allowed_size = 1
@@ -278,7 +278,7 @@
desc = "[initial(desc)] It glows fiercely with inner fire."
name = "supermatter-charged [initial(name)]"
consumedSupermatter = 1
luminosity = 10
set_light(10)
return