Merge remote-tracking branch 'Virgo_Master/master'

This commit is contained in:
Rykka
2019-09-27 14:37:30 -06:00
8 changed files with 5282 additions and 1092 deletions
@@ -1,4 +1,12 @@
/proc/generate_tracer_between_points(datum/point/starting, datum/point/ending, beam_type, color, qdel_in = 5, light_range = 2, light_color_override, light_intensity = 1, instance_key) //Do not pass z-crossing points as that will not be properly (and likely will never be properly until it's absolutely needed) supported!
/datum/beam_components_cache
var/list/beam_components = list()
/datum/beam_components_cache/Destroy()
for(var/component in beam_components)
qdel(component)
return ..()
/proc/generate_tracer_between_points(datum/point/starting, datum/point/ending, datum/beam_components_cache/beam_components, beam_type, color, qdel_in = 5, light_range = 2, light_color_override, light_intensity = 1, instance_key) //Do not pass z-crossing points as that will not be properly (and likely will never be properly until it's absolutely needed) supported!
if(!istype(starting) || !istype(ending) || !ispath(beam_type))
return
var/datum/point/midpoint = point_midpoint_points(starting, ending)
@@ -21,10 +29,9 @@
for(var/obj/effect/projectile_lighting/PL in T)
if(PL.owner == instance_key)
continue tracing_line
QDEL_IN(new /obj/effect/projectile_lighting(T, light_color_override, light_range, light_intensity, instance_key), qdel_in > 0? qdel_in : 5)
beam_components.beam_components += new /obj/effect/projectile_lighting(T, light_color_override, light_range, light_intensity, instance_key)
line = null
if(qdel_in)
QDEL_IN(PB, qdel_in)
beam_components.beam_components += PB
/obj/effect/projectile/tracer
name = "beam"
+2 -1
View File
@@ -65,7 +65,8 @@
var/sound = get_sfx("thunder")
for(var/mob/M in player_list)
if((P && M.z in P.expected_z_levels) || M.z == T.z)
M.playsound_local(get_turf(M), soundin = sound, vol = 70, vary = FALSE, is_global = TRUE)
if(M.is_preference_enabled(/datum/client_preference/weather_sounds))
M.playsound_local(get_turf(M), soundin = sound, vol = 70, vary = FALSE, is_global = TRUE)
if(cosmetic) // Everything beyond here involves potentially damaging things. If we don't want to do that, stop now.
return
+6 -6
View File
@@ -44,6 +44,7 @@
var/tracer_type
var/muzzle_type
var/impact_type
var/datum/beam_components_cache/beam_components
//Fancy hitscan lighting effects!
var/hitscan_light_intensity = 1.5
@@ -432,7 +433,6 @@
if(hitscan)
finalize_hitscan_and_generate_tracers()
STOP_PROCESSING(SSprojectiles, src)
cleanup_beam_segments()
qdel(trajectory)
return ..()
@@ -456,10 +456,11 @@
/obj/item/projectile/proc/generate_hitscan_tracers(cleanup = TRUE, duration = 5, impacting = TRUE)
if(!length(beam_segments))
return
beam_components = new
if(tracer_type)
var/tempref = "\ref[src]"
for(var/datum/point/p in beam_segments)
generate_tracer_between_points(p, beam_segments[p], tracer_type, color, duration, hitscan_light_range, hitscan_light_color_override, hitscan_light_intensity, tempref)
generate_tracer_between_points(p, beam_segments[p], beam_components, tracer_type, color, duration, hitscan_light_range, hitscan_light_color_override, hitscan_light_intensity, tempref)
if(muzzle_type && duration > 0)
var/datum/point/p = beam_segments[1]
var/atom/movable/thing = new muzzle_type
@@ -469,7 +470,7 @@
thing.transform = M
thing.color = color
thing.set_light(muzzle_flash_range, muzzle_flash_intensity, muzzle_flash_color_override? muzzle_flash_color_override : color)
QDEL_IN(thing, duration)
beam_components.beam_components += thing
if(impacting && impact_type && duration > 0)
var/datum/point/p = beam_segments[beam_segments[beam_segments.len]]
var/atom/movable/thing = new impact_type
@@ -479,9 +480,8 @@
thing.transform = M
thing.color = color
thing.set_light(impact_light_range, impact_light_intensity, impact_light_color_override? impact_light_color_override : color)
QDEL_IN(thing, duration)
if(cleanup)
cleanup_beam_segments()
beam_components.beam_components += thing
QDEL_IN(beam_components, duration)
//Returns true if the target atom is on our current turf and above the right layer
//If direct target is true it's the originally clicked target.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+31
View File
@@ -182,6 +182,37 @@
name = "\improper Surface Triage"
/area/tether/surfacebase/medical/first_aid_west
name = "\improper First Aid West"
/area/tether/surfacebase/medical/chemistry
name = "\improper Surface Chemistry"
lightswitch = 0
/area/tether/surfacebase/medical/resleeving
name = "\improper Surface Resleeving"
lightswitch = 0
/area/tether/surfacebase/medical/surgery
name = "\improper Surface Surgery"
lightswitch = 0
/area/tether/surfacebase/medical/patient_a
name = "\improper Surface Patient Room A"
lightswitch = 0
/area/tether/surfacebase/medical/patient_b
name = "\improper Surface Patient Room B"
lightswitch = 0
/area/tether/surfacebase/medical/patient_c
name = "\improper Surface Patient Room C"
lightswitch = 0
/area/tether/surfacebase/medical/lowerhall
name = "\improper Surface Medical Lower Hall"
/area/tether/surfacebase/medical/storage
name = "\improper Surface Medical Storage"
lightswitch = 0
/area/tether/surfacebase/medical/paramed
name = "\improper Surface Paramedic Closet"
lightswitch = 0
/area/tether/surfacebase/medical/breakroom
name = "\improper Surface Medical Break Room"
lightswitch = 0
/area/tether/surfacebase/medical/maints
name = "\improper Mining Upper Maintenance"
/area/tether/surfacebase/security
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB