boolean subtractResourcesForWeaponUpgrade(String weapon, int currentLevel){
	int resourcesToSubtract = 4;
	if(currentLevel == 2)
	    resourcesToSubtract = 5;
	if(currentLevel == 3){
	    Debug.warn(username + " tried to upgrade his " + weapon + ", but it is already level 3.");
	    return false;	    
	}
	if(weapon.equals("laser")){
	    if(rubidiumResources >= resourcesToSubtract){
		rubidiumResources -= resourcesToSubtract;
		return true;
	    }
	    else {
		Debug.warn("Tried to upgrade the laser, but not enough rubidium");
		return false;
	    }
	}
	if(weapon.equals("mortar")){
	    if(explosiumResources >= resourcesToSubtract){
		explosiumResources -= resourcesToSubtract;
		return true;
	    }
	    else {
		Debug.warn("Tried to upgrade the mortar, but not enough explosium");
		return false;
	    }
	}
	if(weapon.equals("droid")){
	    if(scrapResources >= resourcesToSubtract){
		scrapResources -= resourcesToSubtract;
		return true;
	    }
	    else {
		Debug.warn("Tried to upgrade the droid, but not enough scrap");
		return false;
	    }
	}
	return false;
    }