diff --git a/binaries/data/mods/official/entities/template_entity_script.js b/binaries/data/mods/official/entities/template_entity_script.js
index 395629e1dc..112cb13c9b 100644
--- a/binaries/data/mods/official/entities/template_entity_script.js
+++ b/binaries/data/mods/official/entities/template_entity_script.js
@@ -434,7 +434,7 @@ function entityDamage( damage, inflictor )
// Notify player.
if (this.traits.id.specific)
- console.write(this.traits.id.specific + " has earned " + this.traits.loot.xp + " upgrade points!");
+ console.write(inflictor.traits.id.specific + " has earned " + this.traits.loot.xp + " upgrade points!");
else
console.write("One of your units has earned " + this.traits.loot.xp + " upgrade points!");
@@ -467,13 +467,17 @@ function entityDamage( damage, inflictor )
{
switch( loot.toString().toUpperCase() )
{
- case "xp":
+ case "XP":
+ if ( this.actions.loot.xp ) console.write ("XP looting is not yet handled");
break;
default:
- // Give the inflictor his resources.
- getGUIGlobal().giveResources( loot.toString(), parseInt(pool[loot]) );
- // Notify player.
- console.write ("Spoils of war! " + pool[loot] + " " + loot.toString() + "!");
+ if ( this.actions.loot.resources )
+ {
+ // Give the inflictor his resources.
+ getGUIGlobal().giveResources( loot.toString(), parseInt(pool[loot]) );
+ // Notify player.
+ console.write ("Spoils of war! " + pool[loot] + " " + loot.toString() + "!");
+ }
break;
}
}
diff --git a/binaries/data/mods/official/entities/template_unit_infantry.xml b/binaries/data/mods/official/entities/template_unit_infantry.xml
index ff3a38eb0a..32339babaa 100644
--- a/binaries/data/mods/official/entities/template_unit_infantry.xml
+++ b/binaries/data/mods/official/entities/template_unit_infantry.xml
@@ -85,6 +85,11 @@
3000
+
+
+
+
+