rem: getGUIGlobal().giveResources(evt.target.traits.supply.type.toString(), parseInt(gather_amt)); 
add: getGUIGlobal().giveResources(s.type.toString(), parseInt(gather_amt));   if( s.curr == 0 ) { evt.target.kill(); } 
context: function entityEventGather( evt ){	if (this.actions.gather.resource[evt.target.traits.supply.type][evt.target.traits.supply.subtype])		gather_amt = parseInt( this.actions.gather.resource[evt.target.traits.supply.type][evt.target.traits.supply.subtype] );	else		gather_amt = parseInt( this.actions.gather.resource[evt.target.traits.supply.type] );	if( evt.target.traits.supply.max > 0 )	{		if( evt.target.traits.supply.curr <= gather_amt )		{			gather_amt = evt.target.traits.supply.curr;			evt.target.kill();		}		// Remove amount from target.		evt.target.traits.supply.curr -= gather_amt;		// Add extracted resources to player's resource pool.		getGUIGlobal().giveResources(evt.target.traits.supply.type.toString(), parseInt(gather_amt));	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/c6c006d4fe66743bdc399a80e96340a90ca4203c/template_entity_script.js/buggy/binaries/data/mods/official/entities/template_entity_script.js