From d261d33bab2a61c3cdae4dd512e3b0d4e16f45ca Mon Sep 17 00:00:00 2001 From: NoMonkey Date: Thu, 12 Jan 2006 10:15:20 +0000 Subject: [PATCH] This was SVN commit r3352. --- .../official/entities/template_entity_script.js | 16 ++++++++++------ .../official/entities/template_unit_infantry.xml | 5 +++++ 2 files changed, 15 insertions(+), 6 deletions(-) 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 + + + + +