Merge pull request #11135 from PsiOmegaDelta/dev

Dev
This commit is contained in:
PsiOmegaDelta
2015-09-18 09:01:40 +02:00
5 changed files with 48 additions and 31 deletions
+1 -1
View File
@@ -415,7 +415,7 @@ its easier to just keep the beam vertical.
return
src.germ_level = 0
if(istype(blood_DNA, /list))
blood_DNA.Cut()
blood_DNA = null
return 1
@@ -36,7 +36,9 @@
if(age >= seed.get_trait(TRAIT_MATURATION))
overlay_stage = seed.growth_stages
else
var/maturation = round(seed.get_trait(TRAIT_MATURATION)/seed.growth_stages)
var/maturation = seed.get_trait(TRAIT_MATURATION)/seed.growth_stages
if(maturation < 1)
maturation = 1
overlay_stage = maturation ? max(1,round(age/maturation)) : 1
var/ikey = "[seed.get_trait(TRAIT_PLANT_ICON)]-[overlay_stage]"
var/image/plant_overlay = plant_controller.plant_icon_cache["[ikey]-[seed.get_trait(TRAIT_PLANT_COLOUR)]"]
+29 -19
View File
@@ -1,3 +1,5 @@
//So much copypasta in this file, supposedly in the name of performance. If you change anything make sure to consider other places where the code may have been copied.
/datum/light_source
var/atom/top_atom
var/atom/source_atom
@@ -11,9 +13,10 @@
var/lum_g
var/lum_b
var/tmp/old_lum_r
var/tmp/old_lum_g
var/tmp/old_lum_b
//hold onto the actual applied lum values so we can undo them when the lighting changes
var/tmp/applied_lum_r
var/tmp/applied_lum_g
var/tmp/applied_lum_b
var/list/effect_str
var/list/effect_turf
@@ -107,11 +110,6 @@
if(light_range && light_power && !applied)
. = 1
if(. || source_atom.light_color != light_color)//Save the old lumcounts if we need to update, if the colour changed DO IT BEFORE we parse the colour and LOSE the old lumcounts!
old_lum_r = lum_r
old_lum_g = lum_g
old_lum_b = lum_b
if(source_atom.light_color != light_color)
light_color = source_atom.light_color
parse_light_color()
@@ -149,6 +147,12 @@
/datum/light_source/proc/apply_lum()
applied = 1
//Keep track of the last applied lum values so that the lighting can be reversed
applied_lum_r = lum_r
applied_lum_g = lum_g
applied_lum_b = lum_b
if(istype(source_turf))
FOR_DVIEW(var/turf/T, light_range, source_turf, INVISIBILITY_LIGHTING)
if(T.lighting_overlay)
@@ -164,9 +168,9 @@
effect_str += strength
T.lighting_overlay.update_lumcount(
lum_r * strength,
lum_g * strength,
lum_b * strength
applied_lum_r * strength,
applied_lum_g * strength,
applied_lum_b * strength
)
else
@@ -188,7 +192,11 @@
if(T.lighting_overlay)
var/str = effect_str[i]
T.lighting_overlay.update_lumcount(-str * old_lum_r, -str * old_lum_g, -str * old_lum_b)
T.lighting_overlay.update_lumcount(
-str * applied_lum_r,
-str * applied_lum_g,
-str * applied_lum_b
)
i++
@@ -218,9 +226,9 @@
effect_str += .
T.lighting_overlay.update_lumcount(
lum_r * .,
lum_g * .,
lum_b * .
applied_lum_r * .,
applied_lum_g * .,
applied_lum_b * .
)
else
@@ -241,7 +249,7 @@
if(T.lighting_overlay)
var/str = effect_str[idx]
T.lighting_overlay.update_lumcount(-str * lum_r, -str * lum_g, -str * lum_b)
T.lighting_overlay.update_lumcount(-str * applied_lum_r, -str * applied_lum_g, -str * applied_lum_b)
effect_turf.Cut(idx, idx + 1)
effect_str.Cut(idx, idx + 1)
@@ -279,10 +287,12 @@
effect_str[idx] = .
//Since the applied_lum values are what are (later) removed by remove_lum.
//Anything we apply to the lighting overlays HAS to match what remove_lum uses.
T.lighting_overlay.update_lumcount(
lum_r * .,
lum_g * .,
lum_b * .
applied_lum_r * .,
applied_lum_g * .,
applied_lum_b * .
)
#undef LUM_FALLOFF
+7 -2
View File
@@ -462,6 +462,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!MayRespawn(1))
return
var/turf/T = get_turf(src)
if(!T || (T.z in config.admin_levels))
src << "<span class='warning'>You may not spawn as a mouse on this Z-level.</span>"
return
var/timedifference = world.time - client.time_died_as_mouse
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
var/timedifference_text
@@ -477,8 +482,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/mob/living/simple_animal/mouse/host
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == src.z)
for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines)
if(!v.welded && v.z == T.z)
found_vents.Add(v)
if(found_vents.len)
vent_found = pick(found_vents)
@@ -422,21 +422,21 @@
if(dose < 1)
M.apply_effect(3, STUTTER)
M.make_dizzy(5)
if(prob(10))
if(prob(5))
M.emote(pick("twitch", "giggle"))
else if(dose < 2)
M.apply_effect(3, STUTTER)
M.make_jittery(10)
M.make_dizzy(10)
M.make_jittery(5)
M.make_dizzy(5)
M.druggy = max(M.druggy, 35)
if(prob(20))
M.emote(pick("twitch","giggle"))
if(prob(10))
M.emote(pick("twitch", "giggle"))
else
M.apply_effect(3, STUTTER)
M.make_jittery(20)
M.make_dizzy(20)
M.make_jittery(10)
M.make_dizzy(10)
M.druggy = max(M.druggy, 40)
if(prob(30))
if(prob(15))
M.emote(pick("twitch", "giggle"))
/datum/reagent/nicotine