Project Zomboid

Project Zomboid

240 ratings
[B42] Lantern Fix
2
4
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
128.842 KB
Jun 8 @ 10:37am
Jun 8 @ 6:24pm
3 Change Notes ( view )

Subscribe to download
[B42] Lantern Fix

Description
This mod adds the ability to light the new vanilla lanterns introduced in B42 unstable.
Currently, the base game allows you to light them only while equipped. This mod lets you light them on ground or any surface.

To show the option to light, right click on one of the following 3 lantern types:

- Hurricane lantern
- Propane lantern
- Improvised lantern

Make sure to have a lighter in your inventory before you try to light a hurricane lantern.

This mod also fixes the refill recipe. It requires 1L of gasoline to completely fill a hurricane lantern. The recipe needs at least 1L to work, but it will consume less if the lantern already had some fuel.

In order to avoid wasting a lighter too many times, a lit hurricane lantern can be kept in your inventory and will automatically turn on when equipped or dropped. Unfortunately, due to limitations, you can't do the same using the place option.

Keep in mind that some of these features are likely to be added in a future update by PZ devs, so I'm not extending it further nor am I adding multiplayer support.

> Known issues:

- Auto Logging crashes when gathering logs.
-- Solution: if you have Bodily Functions (0.12.3) load it after Lantern Fix.

Workshop ID: 3495594275
Mod ID: LanternFix
Popular Discussions View All (2)
1
Jul 2 @ 8:11am
Lanterns arnt as cool as candles
[12FN]Night Monkey
0
6 hours ago
PINNED: Bug Reports
NamelessDude77
65 Comments
Ziodyne967 1 hour ago 
Dang, I just tried it with the mod off. Can't turn the lantern on while it's unequipped and on the ground again. I liked using lanterns when I have to go out camping on the side of the road, so this mod was really good. At least I dont get errors every time I right-click now. Just gotta wait until all the mods update, as usual.
Ziodyne967 1 hour ago 
huh, there appears to be an issue with the mod. Did the devs integrate this into the main game like they did with resizing map symbols? Either way, every time I right click, the game gives me an error.
Calamity 2 hours ago 
is this compatible with lantern mods?
卷毛Jed 5 hours ago 
Additionally, this issue occurs with other actions as well, not just this mod, and it may have been caused by the latest update.
卷毛Jed 5 hours ago 
Thank you for your reply. Right-clicking the “Cigarette” on my character to “Smoke” will trigger the error. The error message is as follows:[B42] Lantern Fix Error:
function: findLanterns -- LanternFix_main.lua line 36
Triggered by: Right-clicking a world object
Error: Object tried to call nil
NamelessDude77  [author] 5 hours ago 
@卷毛Jed does right clicking in the inventory trigger the error? I'm still unable to reproduce this. I'll see if the code used in that function has changed tomorrow, I'm very tired now.
卷毛Jed 6 hours ago 
After the newest Project Zomboid B42 patch, smoking a cigarette triggers a Lua error related to [B42] Lantern Fix. When I right‑click to smoke, the error pops up: function: findLanterns -- file: LanternFix_main.lua line #36 | java.lang.RuntimeException: Object tried to call nil in findLanterns. Game version: B42 latest patch. Other mods: [list here or “None besides Lantern Fix”]. Hope this helps identify the issue.
NamelessDude77  [author] 6 hours ago 
@Codemonkey3 just checked it, but no issues on my side with my current set of mods. You can post your stack trace in the bugs discussion so I can see what it could be.
Codemonkey3 7 hours ago 
There appears to be some sort of conflict with the newest patch. Right clicking the ground creates a lua error regarding it.
MrFrengLitch Jul 29 @ 7:41pm 
Thanks for the fix @NamelessDude77

I had the same issue where errors would pop when trying to pick stuff on the ground. I had the deactivate and reactivate each mod one by one and figured out the errors popped only when the lantern fix mod was enabled. So I came here and read your comment and it worked! No more errors. Thanks.