Ludeon Forums

RimWorld => Releases => Mods => Outdated => Topic started by: Zhentar on October 23, 2016, 01:01:21 AM

Title: [A15] [A16] Auto Flick Designation Sun Lamps
Post by: Zhentar on October 23, 2016, 01:01:21 AM
A16 Download Link: https://github.com/Zhentar/AutoFlicker/releases/download/v1.1/AutoFlicker.zip

A15 Download Link: https://drive.google.com/open?id=0B_iRcVI-TJMZb1JKenRzeTZyVmM

This mod adds an "Auto Flick" option to Sun Lamps and Switches. When enabled, they will automatically designate themselves to be flicked on in the morning (around 5:30, a little bit before plants finish resting), and to be flicked off at night (19:12, when plants start resting).

How is this mod different from other time of day switch mods? It aims to be a Vanilla-friendly micromanagement reduction. Because the actual flicking is still pawn performed, it does not give you any new capabilities or labor reductions that were not already available to a reasonably attentive player. But more importantly, because it is purely pawn powered (presumably using the same timekeeping device they use to follow work/rest schedules), it does not need to be research gated; it is available to your Tundra/Ice Sheet colony on Day 1.

Also, the flick designation is added via a CompProperty that could be used by other mods for other devices (and different hardcoded on/off times are supported).

License: MIT License
Source: https://github.com/Zhentar/AutoFlicker
Title: Re: [A15] Auto Flick Designation Sun Lamps
Post by: skullywag on October 23, 2016, 05:31:46 PM
Nicely done, great way of handling this, makes your pawns seem less dumb.
Title: Re: [A15] Auto Flick Designation Sun Lamps
Post by: merthsoft on October 23, 2016, 05:55:06 PM
Oh, that's a really cool idea... Would you mind if I incorporated that into my Time-of-day switch mod?
Title: Re: [A15] Auto Flick Designation Sun Lamps
Post by: kaptain_kavern on October 23, 2016, 11:56:27 PM
This one goes right to my QoL list right now ;P

Thanks for the mod
Title: Re: [A15] Auto Flick Designation Sun Lamps
Post by: Zhentar on October 26, 2016, 11:08:16 PM
Oh, that's a really cool idea... Would you mind if I incorporated that into my Time-of-day switch mod?

Not at all. Unfortunately, I don't have the source available to post now like I had meant to; that will have to wait until this weekend (hopefully I can remember).
Title: Re: [A15] Auto Flick Designation Sun Lamps
Post by: Zhentar on November 05, 2016, 04:31:11 PM
Finally got around to publishing the source :)
Title: Re: [A15] Auto Flick Designation Sun Lamps
Post by: Awe on November 09, 2016, 08:12:22 AM
Thanks. Very useful.
Title: Re: [A15] Auto Flick Designation Sun Lamps
Post by: mugenzebra on November 12, 2016, 04:58:14 AM
Awesome! This is exactly what I need to save power while plants rest. Thank you!
Title: Re: [A15] Auto Flick Designation Sun Lamps
Post by: Ashardalon411 on November 12, 2016, 05:39:30 AM
Nice, and technicaly compatible with "24h plants" (gived via tilled soil) but gameplay's not compatible:
together the plants will just die.
Title: Re: [A15] Auto Flick Designation Sun Lamps
Post by: mugenzebra on November 13, 2016, 05:08:29 AM
Perhaps hydroponics also need to have this functionality.
Title: Re: [A15] Auto Flick Designation Sun Lamps
Post by: Arigas on December 19, 2016, 11:39:04 PM
This took me entire too long to find on here :P
Title: Re: [A15] [A16] Auto Flick Designation Sun Lamps
Post by: Zhentar on December 23, 2016, 01:21:47 AM
Bump for A16 update
Title: Re: [A15] [A16] Auto Flick Designation Sun Lamps
Post by: alsoandanswer on December 25, 2016, 06:37:39 AM
Not working, unfortunately. The button for autoflicking is not showing up.

It's at the top of my mod loading list.

I restarted rimworld, and even started a new colony but it didn't work.
Title: Re: [A15] [A16] Auto Flick Designation Sun Lamps
Post by: Zhentar on December 25, 2016, 10:52:07 AM
Top of the mod list is the lowest priority. Do you have any other sun lamp mods?
Title: Re: [A15] [A16] Auto Flick Designation Sun Lamps
Post by: alsoandanswer on December 25, 2016, 11:17:27 AM
oh poopbaskets, it's reverse?

oh man no wonder my mods are in a mess
Title: Re: [A15] [A16] Auto Flick Designation Sun Lamps
Post by: hwfanatic on December 27, 2016, 03:56:53 AM
The position on the list determines load order, not priority. The next item on the list will always override the previous one, if they define the same things.

Many thanks for your work. I'm always looking for good vanilla-friendly mods.
Title: Re: [A15] [A16] Auto Flick Designation Sun Lamps
Post by: hwfanatic on January 19, 2017, 02:04:23 PM
This mod introduces a small bug/exploit. I've narrowed it down using -quicktest, disabling one by one.

Namely, the sun lamp doesn't check for grid connectivity after being reinstalled, like it does in Core.

To reproduce,  install a sunlamp and then have your pawn move it to a place that has no grid. It will keep lighting the new area even though ti is actually not connected and definitely not drawing any power (exploitable). Saving and loading the game fixes the issue, but you can just keep doing it to be honest.

(http://i.imgur.com/X3MsTJ4.png)
Title: Re: [A15] [A16] Auto Flick Designation Sun Lamps
Post by: FreyaMaluk on January 30, 2017, 06:58:57 PM
got this log info at restarting the game

Mod AutoFlicker has incorrectly formatted target version 'Unknown'. For the current version, write: <targetVersion>0.16.1393</targetVersion>
Verse.Log:Error(String)
Verse.Log:ErrorOnce(String, Int32)
Verse.ModMetaData:Init()
Verse.ModMetaData:.ctor(String)
Verse.ModLister:RebuildModList()
Verse.ModLister:.cctor()
Verse.<>c__Iterator1EA:MoveNext()
Verse.<>c__Iterator1EA:MoveNext()
System.Collections.Generic.List`1:AddEnumerable(IEnumerable`1)
System.Collections.Generic.List`1:.ctor(IEnumerable`1)
System.Linq.Enumerable:ToList(IEnumerable`1)
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.Root:<Start>m__735()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__733()
Title: Re: [A15] [A16] Auto Flick Designation Sun Lamps
Post by: Hans Lemurson on January 31, 2017, 01:20:15 PM
This mod works great for me and does exactly what I had hoped it would:  Saves me annoying micro-work without fundamentally altering the game.

I could pause the game twice every day and issue massive switch-flicking orders for all my sunlamps, but it's a major pain in the butt and I keep forgetting and wasting valuable power.

Also I like how it signifies "night-time" when my pawns turn out all the lights and go to bed.