Opened 11 years ago

Closed 11 years ago

Last modified 5 years ago

#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 alpha123)

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)

tribute-notifications.patch (2.5 KB ) - added by alpha123 11 years ago.
tribute-insufficient-resources.patch (996 bytes ) - added by alpha123 11 years ago.
tribute-shift-click.patch (5.9 KB ) - added by alpha123 11 years ago.
tribute-shift-click.4.patch (6.8 KB ) - added by alpha123 11 years ago.
Someone remind me to think before editing patches manually next time.
tribute-insufficient-resources.2.patch (2.2 KB ) - added by alpha123 11 years ago.
Refactored to not use TrySubtractResources.

Download all attachments as: .zip

Change History (12)

by alpha123, 11 years ago

Attachment: tribute-notifications.patch added

by alpha123, 11 years ago

by alpha123, 11 years ago

Attachment: tribute-shift-click.patch added

comment:1 by alpha123, 11 years ago

Description: modified (diff)

comment:2 by leper, 11 years ago

In 13176:

Notify the player on receiving a tribute. Patch by alpha123. Refs #1839.

comment:3 by leper, 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 alpha123, 11 years ago

Attachment: tribute-shift-click.4.patch added

Someone remind me to think before editing patches manually next time.

comment:4 by leper, 11 years ago

In 13201:

Add shift-clicking to tribute multiples of 500. Patch by alpha123. Refs #1839.

by alpha123, 11 years ago

Refactored to not use TrySubtractResources.

comment:5 by leper, 11 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 13276:

Add notification for missing resources when tributing. Patch by alpha123. Fixes #1839.

comment:6 by leper, 11 years ago

Keywords: review removed

Thanks for the patch.

comment:7 by elexis, 5 years ago

In 23065:

Refactor diplomacy dialog to use object orientation paradigm using the class keyword, refs #5387.

Includes dilomacy colors, tribute buttons, spy request buttons, attack request buttons, minimap panel, idle worker button, ceasefire counter.
Differential Revision: https://code.wildfiregames.com/D2365

Use hotkey release event from rP19028 to remove input.js state and evil global nested closure hackery from rP13201, refs #1839, #3194.
Fixes masstribute selecitonchange issue subject of D1191.

Note: See TracTickets for help on using tickets.