#1839 closed enhancement (fixed)
[PATCH] Tribute enhancements
Reported by: | alpha123 | Owned by: | leper |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 13 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | leper | Patch: |
Description (last modified by )
A collection of miscellaneous small improvements to tributing.
tribute-notifications.patch: notifies the receiver of a tribute, "alpha123 has sent you 1000 food."
tribute-insufficient-resources.patch: notifies the sender of a tribute if they have insufficient resources. Actually, this patch is so trivial it removes more code than it adds. :P
tribute-shift-click.patch: allows for tributing to function a bit like unit training. Shift-click will tribute 500, shift-click-click will tribute 1000, etc. Also changes the tooltip for the tribute resource icons to be more informative, "Tribute 100 food to alpha123. Shift-click to tribute 500."
None of these patches depend on each other, so apply as many as you like.
All the patches should be applied from binaries/data/mods/public/.
Attachments (5)
Change History (12)
by , 11 years ago
Attachment: | tribute-notifications.patch added |
---|
by , 11 years ago
Attachment: | tribute-insufficient-resources.patch added |
---|
by , 11 years ago
Attachment: | tribute-shift-click.patch added |
---|
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
comment:3 by , 11 years ago
Insuffient resources patch:
I do remember why I didn't use TrySubtractResources(): It adds the resources to the used ones (which I'm not really sure if it should do this for tributes). I think we should factor out the message code (the if actually) and just pass GetNeededResources(amounts) to this new function (or just call it in there).
Shift click patch:
I'd add another hotkey for batch tributing. Do we need both tributeResource and flushTributing?
by , 11 years ago
Attachment: | tribute-shift-click.4.patch added |
---|
Someone remind me to think before editing patches manually next time.
by , 11 years ago
Attachment: | tribute-insufficient-resources.2.patch added |
---|
Refactored to not use TrySubtractResources.
In 13176: