Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for additional keywords in weapons' TipImage.
e.g
New supported keywords:
(This PR was made very quickly, so this is not a complete list of keywords that the vanilla game don't support. Feel free to mention other missing keywords)
To have multiple features with the same key, the keyword can be suffixed with numbers.
TipImage Callbacks
This feature allows the optional definiton of a
TipImageCallbacks
table for a weapon, which associates specific elements in the weapon'sTipImage
table to callback functions inTipImageCallbacks
.Example:
This example shows a
TipImageCallbacks
table with two custom callbacks that can be referenced by the weapon'sTipImage
; either by the same name or the name with a numbered suffix.Example Weapon:
In this example, the weapon "MySkill" has a
TipImage
table with aStuctureSmall
atPoint(2,1)
. When the tipimage is displayed in-game, theTipImageCallbacks.StuctureSmall
function will be called for theTipImage.StuctureSmall
element, causing a building with 2/2 health to be created atPoint(1,3)
on the game board.It also has a pair of
StructureDamaged
entries. When the tipimage is displayed in-game, theTipImageCallbacks.BuildingDamaged
function will be called for bothTipImage.StructureDamaged
andTipImage.StructureDamaged2
, causing a building with 1/2 health to be created atPoint(2,2)
andPoint(2,3)
on the game board.