Skip to content

Commit

Permalink
fixes some vehicle stuff, and some random code that ended up commented (
Browse files Browse the repository at this point in the history
#4281)

🆑
fix: vehicles no longer have two lights
fix: vehicles are now properly bright inside
/🆑
  • Loading branch information
harryob authored Aug 30, 2023
1 parent d4f9765 commit d31128f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
12 changes: 11 additions & 1 deletion code/controllers/subsystem/interior.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ SUBSYSTEM_DEF(interior)

var/list/bottom_left = reserved_area.bottom_left_coords

template.load(locate(bottom_left[1] + (INTERIOR_BORDER_SIZE / 2), bottom_left[2] + (INTERIOR_BORDER_SIZE / 2), bottom_left[3]), centered = FALSE)
var/list/bounds = template.load(locate(bottom_left[1] + (INTERIOR_BORDER_SIZE / 2), bottom_left[2] + (INTERIOR_BORDER_SIZE / 2), bottom_left[3]), centered = FALSE)

var/list/turfs = block( locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]))

var/list/areas = list()
for(var/turf/current_turf as anything in turfs)
areas |= current_turf.loc

for(var/area/current_area as anything in areas)
current_area.add_base_lighting()

interiors += interior
return reserved_area
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/doors/alarmlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
return ..()

/obj/structure/machinery/door/airlock/alarmlock/receive_signal(datum/signal/signal)
/*
..()
if(inoperable())
return

var/alarm_area = signal.data["zone"]
var/alert = signal.data["alert"]

var/area/our_area = get_area(src)

if(alarm_area == our_area.name)
switch(alert)
if("severe")
Expand All @@ -41,4 +42,3 @@
if("minor", "clear")
autoclose = 0
open()
*/
6 changes: 3 additions & 3 deletions code/modules/vehicles/multitile/multitile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,12 @@
lighting_holder.set_light_range(vehicle_light_range)
lighting_holder.set_light_power(vehicle_light_power)
lighting_holder.set_light_on(vehicle_light_range || vehicle_light_power)
else if(light_range)
set_light_on(TRUE)

light_pixel_x = -bound_x
light_pixel_y = -bound_y

if(light_range)
set_light_on(TRUE)

healthcheck()
update_icon()

Expand Down Expand Up @@ -444,6 +443,7 @@

/atom/movable/vehicle_light_holder
light_system = MOVABLE_LIGHT
mouse_opacity = MOUSE_OPACITY_TRANSPARENT

/atom/movable/vehicle_light_holder/Initialize(mapload, ...)
. = ..()
Expand Down

0 comments on commit d31128f

Please sign in to comment.