Merge pull request #1314 from SkyMarshal/Lighting

Ultralight, Sped up how fast fires burn and use fuel, Removed deletion logging (Speeds up world shudown),  added icon for welder fuel.
This commit is contained in:
SkyMarshal
2012-06-18 20:43:22 -07:00
55 changed files with 703 additions and 659 deletions
+4 -3
View File
@@ -125,8 +125,8 @@
G.process()
if(isturf(loc) && rand(1,1000) == 1) //0.1% chance of playing a scary sound to someone who's in complete darkness
var/turf/currentTurf = loc
if(!currentTurf.sd_lumcount)
var/turf/currentTurf = get_turf(src)
if(!max(currentTurf.ul_GetRed(), currentTurf.ul_GetGreen(), currentTurf.ul_GetBlue()))
playsound_local(src,pick(scarySounds),50, 1, -1)
src.moved_recently = max(0, moved_recently-1)
@@ -825,7 +825,8 @@
if(mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(istype(loc,/turf)) //else, there's considered to be no light
light_amount = min(10,loc:sd_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
var/turf/currentTurf = get_turf(src)
light_amount = min(10,max(currentTurf.ul_GetRed(), currentTurf.ul_GetGreen(), currentTurf.ul_GetBlue())) - 5 //hardcapped so it's not abused by having a ton of flashlights
if(nutrition < 500) //so they can't store nutrition to survive without light forever
nutrition += light_amount
if(light_amount > 0) //if there's enough light, heal
+1 -3
View File
@@ -673,9 +673,7 @@
return health
/mob/proc/UpdateLuminosity()
if(total_luminosity == last_luminosity) return 0//nothing to do here
last_luminosity = total_luminosity
sd_SetLuminosity(min(total_luminosity,7))//Current hardcode max at 7, should likely be a const somewhere else
ul_SetLuminosity(LuminosityRed, LuminosityGreen, LuminosityBlue)//Current hardcode max at 7, should likely be a const somewhere else
return 1
/mob/MouseDrop(mob/M as mob)
+2 -2
View File
@@ -55,8 +55,8 @@
var/obj/screen/gun/run/gun_run_icon = null
var/obj/screen/gun/mode/gun_setting_icon = null
var/total_luminosity = 0 //This controls luminosity for mobs, when you pick up lights and such this is edited. If you want the mob to use lights it must update its lum in its life proc or such. Note clamp this value around 7 or such to prevent massive light lag.
var/last_luminosity = 0
// var/total_luminosity = 0 //This controls luminosity for mobs, when you pick up lights and such this is edited. If you want the mob to use lights it must update its lum in its life proc or such. Note clamp this value around 7 or such to prevent massive light lag.
// var/last_luminosity = 0
/*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such.
+2 -2
View File
@@ -104,7 +104,7 @@
emote_hear = list("barks", "woofs", "yaps","pants")
emote_see = list("shakes its head", "shivers")
desc = "It's a corgi."
src.sd_SetLuminosity(0)
src.ul_SetLuminosity(0)
inventory_head.loc = src.loc
inventory_head = null
else
@@ -239,7 +239,7 @@
name = "Rudolph the Red-Nosed Corgi"
emote_hear = list("barks christmas songs", "yaps")
desc = "He has a very shiny nose."
src.sd_SetLuminosity(6)
src.ul_SetLuminosity(6)
if(/obj/item/clothing/head/cargosoft)
name = "Corgi Tech [real_name]"
speak = list("Needs a stamp!", "Request DENIED!", "Fill these out in triplicate!")