Giter Club home page Giter Club logo

rw_architectsense's Introduction

RimWorld Alpha 18

Allows modders to combine buildables in subcategories.

Important

This is a functionality mod, it does nothing on its own This mod is intended to provide functionality to other modders, and does nothing without custom XML and/or C# code. If you're a modder, or want to try out subcategories, have a look at the Examples folder.

Features (for modders)

Architect Sense allows you to group designators for buildings and terrains (e.g. the buttons in the architect menu) together. It is simple to configure with DesignationSubCategoryDefs in XML (see the Examples folder), and also exposes a number of methods to handle dynamically creating categories, as well as finding and hiding individual designators.

Issues

Due to the extremely heavy-handed approach Erdelfs' MinePlan Designator uses to inject his designators, MinePlan Designator is incompatible with Architect Sense.

Contributors

  • NotFood: Several bugfixes, show cost preview on hover
  • notfood:

Think you found a bug?

Please read this guide before creating a bug report, and then create a bug report here

Older versions

All current and past versions of this mod can be downloaded from GitHub.

License

All original code in this mod is licensed under the MIT license. Do what you want, but give me credit. All original content (e.g. text, imagery, sounds) in this mod is licensed under the CC-BY-SA 4.0 license.

Parts of the code in this mod, and some content may be licensed by their original authors. If this is the case, the original author & license will either be given in the source code, or be in a LICENSE file next to the content. Please do not decompile my mods, but use the original source code available on GitHub, so license information in the source code is preserved.

Are you enjoying my mods?

Show your appreciation by buying me a coffee (or contribute towards a nice single malt).

Buy Me a Coffee

Version

This is version v0.18.0.3

rw_architectsense's People

Contributors

fluffierthanthou avatar karel-kroeze avatar notfood avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

rw_architectsense's Issues

Exception when loading Stuffed Floors

Hey there,

after your update I'm getting this exception on start:

Could not execute post-long-event action. Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Init ---> System.TypeLoadException: Could not load type 'ArchitectSense.DesignatorUtility' from assembly 'StuffedFloors'.
at StuffedFloors.Controller+Init..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor (intptr)
at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (RuntimeTypeHandle type) [0x00000] in :0
at Verse.StaticConstructorOnStartupUtility.CallAll () [0x00000] in :0
at Verse.PlayDataLoader.m__80F () [0x00000] in :0
at Verse.LongEventHandler.ExecuteToExecuteWhenFinished () [0x00000] in :0
Verse.Log:Error(String)
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()

Also Stuffed Floors don't work anymore (showing like 60 icons instead of 20).

Regards,
Stefan

Look into making changes to designators permanent

A number of mods use an extremely heavy-handed approach to injecting designators, calling ResolveAllReferences() on all designation categories, wiping out ArchitectSenses' changes in the process.

Many of these mods are made by (or updated by) erdelf, but he has refused to fix his code.

Float menu visible after click on category.

RW_ArchitectSense/Source/ArchitectSense/Designator_SubCategory.cs
Find.WindowStack.FloatMenu?.Close(false); SelectedItem.ProcessInput(ev);
I think this lines should be swapped.

Stretched icons

Sometimes icons stretch when the underlying building has a long graphic image. It doesn't seem to be respecting the uiIconPath, instead it's using the long texPath which doesn't fit.

Here is a small mod that reproduces the issue.
StretchingTest.zip

Error On Load

Loader exceptions: => System.TypeLoadException: Could not load type 'HugsLib.ModBase' from assembly 'HugsLib, Version=0.16.0.0, Culture=neutral, PublicKeyToken=null'. => System.TypeLoadException: Could not load type '<>c__DisplayClass10_0' from assembly 'ArchitectSense, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Not sure what this error means, any way you could help me out?

Hide Categories

I am new to modding and I made a mod for personal use to move mod items to another category under a subcategory using architect sense. Now that the original category is empty, I do not know how to hide the original. Is there an option that I can use to hide the category or can Architect Sense automatically hide a category if it is empty.
I did this to mods like Vegetable Garden to put the brewery stuff in a sub category under production, and some other mods in a similar way.
I tried patching to remove the original category, but then Architect Sense does not find them and the items are just hidden. The debug for the subcategory says "did not have any (resolved) contents! Skipping."

doing reflection on null instance in DesignatorUtility.HideDesignator()?

[HugsLib] StuffedFloors caused an exception during OnDefsLoaded: System.Reflection.TargetException: Non-static field requires a target
  at System.Reflection.MonoField.GetValue (System.Object obj) [0x00000] in <filename unknown>:0 
  at ArchitectSense.DesignatorUtility.HideDesignator (RimWorld.Designator_Build des, Verse.DesignationCategoryDef cat) [0x00000] in <filename unknown>:0 
  at ArchitectSense.DesignatorUtility.HideDesignator (Verse.BuildableDef def) [0x00000] in <filename unknown>:0 
  at StuffedFloors.Controller.DefsLoaded () [0x00000] in <filename unknown>:0 
  at HugsLib.HugsLibController.OnDefsLoaded () [0x00000] in <filename unknown>:0 

Full log: https://gist.github.com/HugsLibRecordKeeper/1cc6018f481c19810c5d61c36b94f484, reporter thinks a power armor upgrade mod that adds a material Modificarum is the cause.

margin between subitems / manual designator placement / Inherit label/description from first designator

Great idea, though the mod is unusable right now on A17 IMO.

Issues:

  1. Spacing of submenu items is too small (see picture)
  2. The recipe info pane (recipe/ingredients/description box above the main menu) always shows the first item (see picture - still shows campfire info when Nutrient Paste Dispenser is being hovered)
  3. Not possible to make categories appear first with uncategorized items after (or is it? I tried order -9999 but that just put it in the middle)
  4. Would be nice if the omission of label and/or description will instead inherit from the first item inside the menu (not a big deal but would be nice).

I could probably look at 1 (might be as simple as changing that hard-coded margin at https://github.com/FluffierThanThou/RW_ArchitectSense/blob/master/Source/ArchitectSense/FloatMenu_Subcategory.cs#L112) and maybe number 4 but 2 - the important one - is beyond me.

clipboard01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.