NightLantern

Automatically turns ON and OFF lanterns after sunset and sunrise

Total Downloads: 20,603 - First Release: Jun 27, 2015 - Last Update: Jun 11, 2018

5/5, 52 likes
  1. InvalidOperationException: HashSet have been modified while it was iterated over
    System.Collections.Generic.HashSet`1+Enumerator[Oxide.Plugins.NightLantern+LightController].CheckState () System.Collections.Generic.HashSet`1+Enumerator[Oxide.Plugins.NightLantern+LightController].MoveNext () Oxide.Plugins.NightLantern+<ToggleAllLights>c__Iterator1.MoveNext () UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress)

    Not sure if this means anything? Plugin seems to be working fine........Just fyi I guess.
     
  2. Tiny bug in the code. line 184 does not have a return value, it should be added right after that line:
    return ConsumeType.JackOLantern;
    Code:
                    case "jackolantern.angry":
                        return ConsumeType.JackOLantern;
     
  3. @k1lly0u any chance you could add something like '/lantern all' that will turn on everything you have permissions to turn on?

    For instance, if I have permissions to turn on all lights automatically and I have no fuel requirements, I'll want to just turn them all on instead of using all commands. In the same way I might want to turn them all off.

    Thanks! Great plugin!
     
  4. Not getting any errors however firepit and fireplaces do not seem to be operational as they were. No Fuel req is used and everything else is working properly
     
  5. OK.....Cool......Thanks!
     
  6. I fixed the above bug, but I still get errors. Fireplaces, campfires, tunalamps dont work ,and not all of my ceiling lights work even in the same row of lights.
    here is the error:
    01:38 [Error] Failed to call hook 'Unload' on plugin 'NightLantern v2.0.9' (NullReferenceException: Object reference not set to an instance of an object)
    at Oxide.Plugins.NightLantern+LightController.ToggleLight (Boolean status) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.NightLantern.Unload () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.NightLantern.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
    01:38 [Info] Unloaded plugin NightLantern v2.0.9 by k1lly0u
    01:38 [Info] Loaded plugin NightLantern v2.0.9 by k1lly0u


    EDIT: Okay, now it works, just not all lights at the same time. Also when I toggle /lantern global, I get this error in console:

    InvalidOperationException: HashSet have been modified while it was iterated over

    I cant find the error in the logs, this is from console.

    Edit again: The last IOE error was not from toggle /lantern global so I don't know what it's from.
     
    Last edited by a moderator: Dec 17, 2017
  7. If you are running NoFuelRequirements as well you might need to do the following to get a clean reset:
    o.unload NightLantern
    o.unload NoFuelRequirements
    o.load NoFuelRequirements
    o.load NightLantern

    That might clear that up for you.
     
  8. I wasn't aware nofuelrequirement plugin was a thing. This plugin always worked without it. Is that other plugin now required?
     
  9. NoFuelRequirementsis not require but often used in conjunction with this. Sorry for assuming you had it as well.

    Are you running any other mod that might conflict, that affects fuel, lights, etc?
     
  10. I think the problem is fixed. The error may not be from this plugin. I tried to duplicate it by typing /lantern global, but it didn't happen again.
     
  11. after update plugin is not please update plugin ^ ^
     
  12. you might need to drop the json and do a o.reload NightLantern, edit the json to put back in your config and then once more o.reload NightLantern to pick up your changes.
     
  13. k1lly0u updated NightLantern with a new update entry:

    2.0.91


    [DOUBLEPOST=1514539448][/DOUBLEPOST]
    Doesn't need one, you can stack cases -> C# Case Example (Switch Case) - Dot Net Perls
     

  14. So you're saying the one return covers the .angry and .happy? Seemed when I added the guy's fix it started to work before.
    I'll try this new version unmodified for now.
     
  15. Does not work anymore . There is no error
    [DOUBLEPOST=1514542937][/DOUBLEPOST]All lights do not turn on. There is a small problem
     

    Attached Files:

    • 1.png
      1.png
      File size:
      1.7 MB
      Views:
      22
  16. k1lly0u updated NightLantern with a new update entry:

    2.0.92

     
  17. Receiving (04:32:39) | ArgumentOutOfRangeException: Argument is out of range.
     
  18. I would really appreciate having a command like this. I could also see a command /lantern <category> where <category> = lights, furnaces, etc.

    It would be greatly appreciated.
     
  19. Is this normal light shift


     
  20. Hi. In the updated version it is possible to set on/off of the grill? In the previous version of the grill does not turn on automatically.