Reminder for self mostly.
Now the officertype pictures are handled in the interface file like this:
These pictures can be added to the officertypes object which there now is and can be read in the interface. This way its also a lot easier to add other officertypes etc.
Edit: also I think the prisoned picture doesn't work at the moment if I look at the code...
Now the officertype pictures are handled in the interface file like this:
Code:
if ( IsCompanion(xi_refCharacter) ) SetNewPicture("TYPEPICT", "interfaces\blank_ship.tga"); // changed after build 11 by KAM
if ( IsOfficer(xi_refCharacter) ) //SetNewPicture("TYPEPICT", "interfaces\kam_isofficer.tga"); // changed after build 11 by KAM
{
if(CheckAttribute(xi_refCharacter,"quest.officertype"))
{
switch (xi_refCharacter.quest.officertype)
{
// KK -->
case OFFIC_TYPE_BOATSWAIN: SetNewPicture("TYPEPICT", "interfaces\order.tga"); break;
case OFFIC_TYPE_ABORDAGE: SetNewPicture("TYPEPICT", "interfaces\fighter.tga"); break;
case OFFIC_TYPE_RANDCHAR: SetNewPicture("TYPEPICT", "interfaces\fighter.tga"); break;
case OFFIC_TYPE_CANNONEER: SetNewPicture("TYPEPICT", "interfaces\gunner.tga"); break;
case OFFIC_TYPE_QMASTER: SetNewPicture("TYPEPICT", "interfaces\quartermaster.tga"); break;
case OFFIC_TYPE_NAVIGATOR: SetNewPicture("TYPEPICT", "interfaces\navigator.tga"); break;
case OFFIC_TYPE_FIRSTMATE: SetNewPicture("TYPEPICT", "interfaces\officer.tga"); break;
case OFFIC_TYPE_CARPENTER: SetNewPicture("TYPEPICT", "interfaces\carpenter.tga"); break;
case OFFIC_TYPE_DOCTOR: SetNewPicture("TYPEPICT", "interfaces\doctor.tga"); break;
// <-- KK
}
}
}
if ( IsOfficerCompanion(xi_refCharacter) ) SetNewPicture("TYPEPICT", "interfaces\kam_isofficercompanion.tga"); // changed after build 11 by KAM
if ( IsOnShoreLeave(xi_refCharacter) ) SetNewPicture("TYPEPICT", "interfaces\kam_isonshoreleave.tga"); // added after build 11 by KAM
if ( IsOfficerOnShoreLeave(xi_refCharacter) ) SetNewPicture("TYPEPICT", "interfaces\kam_isofficeronshoreleave.tga"); // added after build 11 by KAM
if ( IsPrisoner(xi_refCharacter) ) // KK
{
SetNewPicture("TYPEPICT", "interfaces\isprisoned.tga"); // added by MAXIMUS
if(CheckAttribute(xi_refCharacter,"quest.officertype")) // added by MAXIMUS
{
switch (xi_refCharacter.quest.officertype)
{
// KK -->
case OFFIC_TYPE_BOATSWAIN: SetNewPicture("TYPEPICT1", "interfaces\order.tga"); break;
case OFFIC_TYPE_ABORDAGE: SetNewPicture("TYPEPICT1", "interfaces\fighter.tga"); break;
case OFFIC_TYPE_RANDCHAR: SetNewPicture("TYPEPICT1", "interfaces\fighter.tga"); break;
case OFFIC_TYPE_CANNONEER: SetNewPicture("TYPEPICT1", "interfaces\gunner.tga"); break;
case OFFIC_TYPE_QMASTER: SetNewPicture("TYPEPICT1", "interfaces\quartermaster.tga"); break;
case OFFIC_TYPE_NAVIGATOR: SetNewPicture("TYPEPICT1", "interfaces\navigator.tga"); break;
case OFFIC_TYPE_FIRSTMATE: SetNewPicture("TYPEPICT1", "interfaces\officer.tga"); break;
case OFFIC_TYPE_CARPENTER: SetNewPicture("TYPEPICT1", "interfaces\carpenter.tga"); break;
case OFFIC_TYPE_DOCTOR: SetNewPicture("TYPEPICT1", "interfaces\doctor.tga"); break;
case OFFIC_TYPE_TRADER: SetNewPicture("TYPEPICT1", "interfaces\trader.tga"); break;
// <-- KK
}
}
}
These pictures can be added to the officertypes object which there now is and can be read in the interface. This way its also a lot easier to add other officertypes etc.
Edit: also I think the prisoned picture doesn't work at the moment if I look at the code...