All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.rpgframework.genericrpg.chargen.AEquipmentController Maven / Gradle / Ivy

The newest version!
package de.rpgframework.genericrpg.chargen;

import de.rpgframework.character.RuleSpecificCharacterObject;
import de.rpgframework.genericrpg.data.IAttribute;
import de.rpgframework.genericrpg.items.CarriedItem;
import de.rpgframework.genericrpg.items.CarryMode;
import de.rpgframework.genericrpg.items.IUsageMode;
import de.rpgframework.genericrpg.items.IVariantMode;
import de.rpgframework.genericrpg.items.ItemConfiguration;
import de.rpgframework.genericrpg.items.PieceOfGear;
import de.rpgframework.genericrpg.items.AlternateUsage;
import de.rpgframework.genericrpg.items.PieceOfGearVariant;

/**
 * @author prelle
 *
 */
public class AEquipmentController,B extends AlternateUsage,I extends PieceOfGear> {

	protected RuleSpecificCharacterObject model;
	
	//-------------------------------------------------------------------
	protected  AEquipmentController(RuleSpecificCharacterObject model) {
		this.model = model;
	}

	//-------------------------------------------------------------------
	public CarriedItem equip(I item, ItemConfiguration config) {
		// TODO Auto-generated constructor stub
		CarriedItem carried = new CarriedItem(item, config.getVariant(), CarryMode.CARRIED);
		carried.setDecisions(config.getDecisions());
		
		model.addCarriedItem(carried);
		
		return carried;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy