Skip to content

Commit

Permalink
Baselighting fixes/improvements (#16210)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lumipharon authored Jul 6, 2024
1 parent 1effd93 commit 91e48db
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion code/datums/gamemodes/hvh.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

/datum/game_mode/hvh/post_setup()
. = ..()
for(var/z_num in SSmapping.areas_in_z)
for(var/z_num in SSmapping.levels_by_trait(ZTRAIT_MARINE_MAIN_SHIP))
set_z_lighting(z_num)

//sets TGMC and SOM squads
Expand Down
3 changes: 2 additions & 1 deletion code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,9 @@
if(W.directional_opacity != old_directional_opacity)
W.reconsider_lights()

if(thisarea.lighting_effect)
if(thisarea.area_has_base_lighting)
W.add_overlay(thisarea.lighting_effect)
W.luminosity = 1

if(!W.smoothing_behavior == NO_SMOOTHING)
return W
Expand Down
9 changes: 2 additions & 7 deletions code/modules/lighting/lighting_area.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,8 @@
return ..()

/area/proc/update_base_lighting()
if(!area_has_base_lighting && (!base_lighting_alpha || !base_lighting_color))
return

if(!area_has_base_lighting)
add_base_lighting()
return
remove_base_lighting()
if(area_has_base_lighting)
remove_base_lighting()
if(base_lighting_alpha && base_lighting_color)
add_base_lighting()

Expand Down
5 changes: 2 additions & 3 deletions code/modules/mapping/map_template.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@
continue
if(istype(A, /obj/machinery/atmospherics))
atmos_machines += A
for(var/area/area AS in areas) //areas are init'd when the first turf is generated, some somethings in init are not done correctly
area.update_base_lighting()
area.reg_in_areas_in_z()

SSmapping.reg_in_areas_in_z(areas)
SSatoms.InitializeAtoms(atoms)
SSmachines.setup_template_powernets(cables)

Expand Down

0 comments on commit 91e48db

Please sign in to comment.