RimWorld

RimWorld

JTZoneButtons
19 kommentarer
Rock5 2. dec. 2017 kl. 2:15 
I updated it for B18. You can find it here.

https://ludeon.com/forums/index.php?topic=37177.msg382039#msg382039
Fuglypump 26. nov. 2017 kl. 18:15 
Touchable can you please update your mods, you have a lot of great ones.
Rock5 16. nov. 2017 kl. 22:21 
Need Zone Buttons for A18. Please update :)
Stupid Dumb Lizard 2. okt. 2017 kl. 20:58 
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 kl. 15:01 
this doesnt play well with save storage and outfit settings mod
Its_juice 6. sep. 2017 kl. 22:25 
Muito bom. Obrigado.
cammillotto 25. aug. 2017 kl. 9:20 
any development on harmony integration? :-)
cammillotto 5. aug. 2017 kl. 12:31 
I confirm it conflicts with ReColor Stockpile & Growing Zones
hope you-ll implement Harony soon :-)
thanks Kiame for jumping in!
KiameV 5. aug. 2017 kl. 9:38 
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 kl. 9:38 
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 kl. 14:44 
@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
http://gtm.steamproxy.vip/sharedfiles/filedetails/?id=959789865&searchtext=color+zone
Touchable  [ophavsmand] 4. aug. 2017 kl. 7:13 
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 kl. 12:43 
can-t get the buttons to appear> amybe a conflict with a storage export mod (not yours)?
cammillotto 2. aug. 2017 kl. 6:16 
this is the best click-saving mod! thanks
Touchable  [ophavsmand] 15. juni 2017 kl. 4:19 
I get buttons for both, maybe try new game with just this mod enabled and see.
sdp0et 14. juni 2017 kl. 16:38 
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. juni 2017 kl. 2:35 
thank you !
DuckAndCower 6. juni 2017 kl. 17:50 
This is awesome. Might I recommend adding a picture, though? I almost scrolled right past it without a look.
ZakTheFallen 5. juni 2017 kl. 11:56 
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 :)