Code: Select all
this.shipWillDockWithStation = function (station)
{
if (system.techLevel == 0 && (station.hasRole ("coriolis") || station.hasRole ("dodecahedron") || station.hasRole ("icosahedron") || station.hasRole ("sfep_station"))) player.addMessageToArrivalReport(expandDescription("[dockmessage_0]"));
else
if (system.techLevel == 1 && (station.hasRole ("coriolis") || station.hasRole ("dodecahedron") || station.hasRole ("icosahedron") || station.hasRole ("sfep_station"))) player.addMessageToArrivalReport(expandDescription("[dockmessage_1]"));
// continues through all tech levels and then moves on to individual stations
if (station.hasRole ("rockhermit") || station.hasRole ("rockhermit-chaotic") || station.hasRole ("rockhermit-pirate")) player.addMessageToArrivalReport(expandDescription("[dockmessage_rock]"));
else
if (station.hasRole ("constore")) player.addMessageToArrivalReport(expandDescription("[dockmessage_store]"));
//the individual stations also continue
}
The code posted by phkb was very close to one of my previous attempts but mine lacked a few brackets which he kindly provided. It always seems to come down to the brackets, or the lack thereof. The testing and revamping phase can now begin. Thanks Again to phkb for pointing me in the right direction.