Class ShipWeaponsLocationFactory


  • @Component
    @Lazy
    @DependentInitialisation(StartNewGameBean.class)
    public class ShipWeaponsLocationFactory
    extends java.lang.Object
    Ship weapons location factory. Weapons locations are a list of weapon slots. They are either intended for 'small' or 'big' weapons. A big weapons take up a primary and a secondary slot, while small weapons can be placed in either.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2013 Created on Jun 1, 2013
    • Field Detail

      • unmarshaller

        @Autowired
        @Qualifier("jaxb2XmlModelMarshallerWeapon")
        private org.springframework.oxm.Unmarshaller unmarshaller
      • weaponLocations

        private ch.sahits.game.openpatrician.data.xmlmodel.weapon.WeaponLocations weaponLocations
    • Constructor Detail

      • ShipWeaponsLocationFactory

        public ShipWeaponsLocationFactory()
    • Method Detail

      • initilizeWeaponModel

        @PostConstruct
        private void initilizeWeaponModel()
      • getSourceFromFile

        private javax.xml.transform.Source getSourceFromFile​(java.lang.String fileName)
      • checkLevel

        private boolean checkLevel​(EShipUpgrade level,
                                   ch.sahits.game.openpatrician.data.xmlmodel.weapon.WeaponLocations.WeaponLocation location)
      • convert

        private java.util.List<IWeaponSlot> convert​(ch.sahits.game.openpatrician.data.xmlmodel.weapon.WeaponLocations.WeaponLocation weaponLocation)
      • convert

        private IWeaponSlot convert​(ch.sahits.game.openpatrician.data.xmlmodel.weapon.BasicSlot slot)