Skip to content

Commit

Permalink
Fixes vehicle lights not turning back on after it is fixed (#7404)
Browse files Browse the repository at this point in the history
# About the pull request

when vehicle health goes to 0 lights go off, but never turn back on,
this fixes it

# Explain why it's good for the game

having permanently broken lights is bad


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: vehicle light turns back on after the vehicle is fixed
/:cl:

Co-authored-by: vincibrv <[email protected]>
  • Loading branch information
cuberound and uuuuhuuuu authored Oct 27, 2024
1 parent 4f30b83 commit 29b1fa3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/modules/vehicles/multitile/multitile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@
//vehicle is dead, no more lights
if(health <= 0 && lighting_holder.light_range)
lighting_holder.set_light_on(FALSE)
else
if(!lighting_holder.light)
lighting_holder.set_light_on(TRUE)
update_icon()

/*
Expand Down
2 changes: 2 additions & 0 deletions code/modules/vehicles/multitile/multitile_interaction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@
return

health = min(health + max_hp/100 * (5 / amount_fixed_adjustment), max_hp)
if(!lighting_holder.light)
lighting_holder.set_light_on(TRUE)

if(WT)
WT.remove_fuel(1, user)
Expand Down

0 comments on commit 29b1fa3

Please sign in to comment.