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. no problem :)
     
  2. Thank you.
     
  3. xvv

    xvv

    Has anyone figured out a good way to have unlimited fuel for lights? I have an arena and only want unlimited fuel in that arena and not the entire map. Seems like it would need to be part of the Zones Manager...
     
  4. You don't need fuel for this to work. You won't be able to manually turn them on, but between the time you specify the lamp will light up.
     
  5. xvv

    xvv

    Ah, so simple. That makes sense, thanks.
     
  6. Thank you! <3
     
  7. I have the plugin Updated for me. I include the Ceilinglight
     
  8. This does not work after the XP-update. Anyone else?
     
  9. This update is no longer working after the 7/7 update. I really enjoy it; can you please update it? :)
     
  10. Could someone help me? I have not much expierience in coding those scripts.
    I would add the ceiling lights, may someone help me pls?
     
  11. i did it.. thanks ceilinglight.deploy was the needed...
     
  12. Please give the file where ceiling lights fixed
     
  13. I fixed the NightLantern Plugin. Ceiling lights are included ;)
     
  14. NightLantern | Page 5 | Oxide
    Fixed over two months ago by me
     
  15. So is this corrected and working since the XP update because I have not seen it working since then
     
  16. I have not tested it so please feel free to test the script I posted above
     
  17. Working fine for me, even after XP update.
     
  18. This works for me.

    Part of NightLantern.cs

    void OnItemDeployed(Deployer deployer, BaseEntity deployedEntity)
    {
    bool status = false;
    double currentTime = TOD_Sky.Instance.Cycle.Hour;

    if (deployedEntity.LookupShortPrefabName() == "lantern.deployed.prefab"
    || ( (deployedEntity.LookupShortPrefabName() == "jackolantern.happy.prefab") && includeJackOLanterns)
    || ( (deployedEntity.LookupShortPrefabName() == "jackolantern.angry.prefab") && includeJackOLanterns)
    || ( (deployedEntity.LookupShortPrefabName() == "campfire.prefab") && includeCampfires)
    || ( (deployedEntity.LookupShortPrefabName() == "ceilinglight.deployed.prefab") && includeCeilinglights)
    )
    {

    if ( currentTime < sunriseHour && isAutoTurnLanternsEnabled || currentTime >= sunsetHour && isAutoTurnLanternsEnabled )
    {
    status = true;
    }

    deployedEntity.SetFlag(BaseEntity.Flags.On, status);

    }
    }



    Nightlantern.json

    {
    "Settings": {
    "AutoTurnLanterns": true,
    "includeCampfires": false,
    "includeJackOLanterns": true,
    "includeCeilinglights": true,
    "sunriseHour": "7",
    "sunsetHour": "18"
    }
    }
     
  19. Hey guys this is also broken from today's update
    Cheers

    > oxide.reload NightLantern
    [Oxide] 08:00 [Error] NightLantern plugin failed to compile!
    [Oxide] 08:00 [Error] NightLantern.cs(131,26): error CS1061: Type `BaseOven' does not contain a definition for `LookupShortPrefabName' and no extension method `LookupShortPrefabName' of type `BaseOven' could be found. Are you missing an assembly reference?
     
  20. Today's update strikes again as Reckt has posted. Mine follows below:


    [Oxide] 16:04 [Error] NightLantern plugin failed to compile!
    [Oxide] 16:04 [Error] NightLantern.cs(129,26): error CS1061: Type `BaseOven' does not contain a definition for `LookupShortPrefabName' and no extension method `LookupShortPrefabName' of type `BaseOven' could be found. Are you missing an assembly reference?