RimWorld

RimWorld

JTZoneButtons
19 Comments
Rock5 2 Dec, 2017 @ 2:15am 
I updated it for B18. You can find it here.

https://ludeon.com/forums/index.php?topic=37177.msg382039#msg382039
Fuglypump 26 Nov, 2017 @ 6:15pm 
Touchable can you please update your mods, you have a lot of great ones.
Rock5 16 Nov, 2017 @ 10:21pm 
Need Zone Buttons for A18. Please update :)
Stupid Dumb Lizard 2 Oct, 2017 @ 8:58pm 
I know it would probably be a pain in the ass, but it would be really cool if this mod synergised well or incorporated parts of these mods. They're all QoL mods for stockpiles, but they don't play well with each other. (Your mod JT Export is similar to Preset Filtered Zones. Maybe include some by default?)

ReColor Stockpile & Growing Zones

Preset Filtered Zones
SmokeDragon 19 Sep, 2017 @ 3:01pm 
this doesnt play well with save storage and outfit settings mod
Its_juice 6 Sep, 2017 @ 10:25pm 
Muito bom. Obrigado.
cammillotto 25 Aug, 2017 @ 9:20am 
any development on harmony integration? :-)
cammillotto 5 Aug, 2017 @ 12:31pm 
I confirm it conflicts with ReColor Stockpile & Growing Zones
hope you-ll implement Harony soon :-)
thanks Kiame for jumping in!
KiameV 5 Aug, 2017 @ 9:38am 
Yeah if you can use harmony your mods will be able to be used with other mods without as much conflict. https://github.com/pardeike/Harmony/wiki

If you want to see examples of how to use it most of my mods use harmony. One that's close to what you're doing is: https://github.com/KiameV/rimworld-SaveStorageSettings/blob/master/Source/Main.cs

Harmony Prefix is called before a method. Postfix is called after. A method can have both. Prefix can be either a void or boolean return. In the bool case returning false prevents any other Prefixes from running and also prevents the method being Prefixed from being called (a true override)

[HarmonyPatch(typeof(Zone_Stockpile), "GetGizmos")]
static class Patch_Zone_GetGizmos
{
static void Postfix(Zone_Stockpile __instance, ref IEnumerable<Gizmo> __result)
{
__result = GizmoUtil.AddSaveLoadGizmos(__result, "Zone_Stockpile", __instance.settings.filter);
}
}
KiameV 5 Aug, 2017 @ 9:38am 
This is saying that the class "Zone_Stockpile" method "GetGizmos" is being either Prefix or Postfix. Arguments can be "<class> __instance" which is equivalent to "this" but not within this's scope (so you wont see private methods and reflection will need to be used to invoke methods or get fields for non-public things). In Postfix "ref <method return type> __result" is the resulting object from the call. So in the case of gizmo's you'll probably do a postfix and add the new buttons to the returned list of gizmos.

In this example it's using GizmoUtil to add the new buttons to the list. GizmoUtil is here for reference too: https://github.com/KiameV/rimworld-SaveStorageSettings/blob/master/Source/GizmoUtil.cs
cammillotto 4 Aug, 2017 @ 2:44pm 
@modder: I deactivated Kiame Vivacity's Save Storage & Outfit Settings mod
butt still no buttons...
it migh also confilct zith this one: ReColor Stockpile & Growing Zones
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=959789865&searchtext=color+zone
Touchable  [author] 4 Aug, 2017 @ 7:13am 
Yea, conflicting with Kiame Vivacity's Save Storage & Outfit Settings mod. I'll have to start using Harmony, not sure when I'll learn to.
cammillotto 3 Aug, 2017 @ 12:43pm 
can-t get the buttons to appear> amybe a conflict with a storage export mod (not yours)?
cammillotto 2 Aug, 2017 @ 6:16am 
this is the best click-saving mod! thanks
Touchable  [author] 15 Jun, 2017 @ 4:19am 
I get buttons for both, maybe try new game with just this mod enabled and see.
sdp0et 14 Jun, 2017 @ 4:38pm 
I get the buttons for growing zones but not stockpiles. Currently this is last in my load order since I thought that would help. None of the other mods make claims about doing anything with stockpile buttons, but I can't be sure there's not a conflict without some further testing.
superresistant 12 Jun, 2017 @ 2:35am 
thank you !
DuckAndCower 6 Jun, 2017 @ 5:50pm 
This is awesome. Might I recommend adding a picture, though? I almost scrolled right past it without a look.
ZakTheFallen 5 Jun, 2017 @ 11:56am 
Ah yes... I need all the JT mods in A17. The zone buttons may be a small addition, but they're handy and weird to go without. Thanks for the update :)