Enhanced Flashlight

by grfwoot

Replaces the default flashlight with a better, more realistic version, now with train and car lights. Updated for .17

Tweaks
4 years ago
0.16 - 0.17
9

b Error after enabling mod

4 years ago

I noticed "[Edit : Broken yet, structure has changed, will work on it in the next days]" on the Information tab of the mod and figured that this is the error to which the note is referring, but wanted to make sure this was noted somewhere in case this wasn't related.

Upon enabling mod I get:

Failed to load mods: EnhancedFlashlight/data.lua:1: attempt to index field 'player' (a nil value)
stack traceback:
EnhancedFlashlight/data.lua:1: in main chunk

Thanks for this, I'm currently a user of Light Cone, but love the idea of enabling this for vehicles too!

4 years ago
(updated 4 years ago)

Yup, I get the same error too, seems the devs have changed how player and vehicle entities are refered to in the scripts since I last updated the mod about a year and a half ago, so I'll have to work on it when I get the time, sorry about it :)

4 years ago
(updated 4 years ago)

Realizing that this hadn't been updated to 0.17 at all, I looked into this a bit.

I think the issue is the "player" to "character" rename from... ~0.17.35 or so. Given that, I opened data.lua and changed line 1:

data.raw["player"]["player"].light =
to
data.raw["character"]["character"].light =

No more error. Tested in-game with the tank; seems to work just fine.

4 years ago

Thank you very much, I'll update it following your advice :)

New response