-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modding: allow custom ResourcePortraits #8330
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Okay, so I did generification of almost all entities icons to account for moddable optional portraits with custom backgrounds. This includes:
Each of these instances now can have optional untinted portraits with custom background. This doesn't influence base game, so for modding convenience only. |
if player using resources portait mods, they can't know what resources type. luxury or bonus resources each item. |
fun getReligionPortrait(iconName: String, size: Float): Portrait { | ||
if (religionIconExists(iconName)) { | ||
return PortraitReligion(iconName, size) | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of 'else', since if the previous if was true it returns
Code looks ok, but I'll want some pics One screenshot, with a promoted unit selected and a city button visible, can probably contain almost all of these:
Only for Uniques do we need a screenshot of the tech table |
That's a modder's problem. He can make different portraits/add indicators to them to distinguish types. or as a last measure resort to using icons. |
That's good, but I was pretty sure that works since that's what you set out to do :) |
Idk how to resolve conflict tho. I pushed this at the same time with PromotionScreen rework and now it conflicts |
Conflicts have been resolved. |
Allow for mods to add optional ResourcePortraits with un-tinted background.
![image](https://user-images.githubusercontent.com/32207817/211177531-757e8568-3d59-4550-a3a7-1abfe77057a2.png)
Example: