Buck Rogers
Major Spacecadet
- Joined
- Feb 26, 2013
- Messages
- 368
- Reaction score
- 289
- Points
- 63
In the API there's a call for: SetAttenuation ( , , ), I think this controls power.
!vslAstrInfo.airlocks.at(0).open;
void FLEXUACS::clbkPostCreation ()
{
mdlAPI.clbkPostCreation();
for (size_t idx{}; idx < vslAstrInfo.stations.size(); ++idx)
{
if (!vslAstrInfo.stations.at(idx).astrInfo) continue;
const auto& astrInfo = *vslAstrInfo.stations.at(idx).astrInfo;
SetEmptyMass(GetEmptyMass() + astrInfo.mass);
SetStationMesh(idx, astrInfo.role, true); //show the mesh
}
}
void FLEXUACS::SetStationMesh(size_t stationIdx, std::string_view role, bool show)
{
switch (stationIdx)
{
case 0://left
// Show first station commander mesh
if (role == "Commander") SetMeshVisibilityMode(6, show ? MESHVIS_ALWAYS : MESHVIS_NEVER);
// Show first station pilot mesh
else if (role == "Pilot") SetMeshVisibilityMode(5, show ? MESHVIS_ALWAYS : MESHVIS_NEVER);
break;
case 1://right
// Show second station commander mesh
if (role == "Commander") SetMeshVisibilityMode(4, show ? MESHVIS_ALWAYS : MESHVIS_NEVER);
// Show second station pilot mesh
else if (role == "Pilot") SetMeshVisibilityMode(7, show ? MESHVIS_ALWAYS : MESHVIS_NEVER);
break;
}
}
if (key == OAPI_KEY_D && !KEYMOD_SHIFT(kstate) && KEYMOD_CONTROL(kstate) && !KEYMOD_ALT(kstate)) {
if (astrHUD.airlockIdx == 0) RevertADOOR1();
if (astrHUD.airlockIdx == 1) RevertADOOR2();
if (astrHUD.airlockIdx ==2) RevertDOOR1();
if (astrHUD.airlockIdx == 3) RevertDOOR2();
vslAstrInfo.airlocks.at(0).open = ADOOR1_proc >= 1;//LEFT
vslAstrInfo.airlocks.at(1).open = ADOOR2_proc >= 1;//RIGHT
vslAstrInfo.airlocks.at(2).open = DOOR1_proc >= 1;//LEFT
vslAstrInfo.airlocks.at(3).open = DOOR2_proc >= 1;//RIGHT
void MMSEV::clbkPostCreation(void)
{
mdlAPI.clbkPostCreation();
for (size_t idx{}; idx < vslAstrInfo.stations.size(); ++idx)
{
if (!vslAstrInfo.stations.at(idx).astrInfo) continue;
const auto& astrInfo = *vslAstrInfo.stations.at(idx).astrInfo;
SetEmptyMass(GetEmptyMass() + astrInfo.mass);
SetStationMesh(idx, astrInfo.role, true);
}
vslAstrInfo.airlocks.at(0).open = ADOOR1_proc >= 1;//LEFT
vslAstrInfo.airlocks.at(1).open = ADOOR2_proc >= 1;//RIGHT
vslAstrInfo.airlocks.at(2).open = DOOR1_proc >= 1;//LEFT
vslAstrInfo.airlocks.at(3).open = DOOR2_proc >= 1;//RIGHT
}
void MMSEV::SetStationMesh(size_t stationIdx, std::string_view role, bool show)
{
switch (stationIdx)
{
case 0://left
// Show first station commander mesh
if (role == "Commander") SetMeshVisibilityMode(4, show ? MESHVIS_ALWAYS : MESHVIS_NEVER);
// Show first station pilot mesh
else if (role == "Pilot") SetMeshVisibilityMode(5, show ? MESHVIS_ALWAYS : MESHVIS_NEVER);
break;
case 1://right
// Show second station commander mesh
if (role == "Commander") SetMeshVisibilityMode(4, show ? MESHVIS_ALWAYS : MESHVIS_NEVER);
// Show second station pilot mesh
else if (role == "Pilot") SetMeshVisibilityMode(5, show ? MESHVIS_ALWAYS : MESHVIS_NEVER);
break;
}
}
eva1_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitright1");
SetMeshVisibilityMode(AddMesh(eva1_mesh, &mesh1ofs), MESHVIS_NEVER );
eva2_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitleft1");
SetMeshVisibilityMode(AddMesh(eva2_mesh, &mesh1ofs), MESHVIS_NEVER);
void MMSEV::SetStationMesh(size_t stationIdx, std::string_view role, bool show)
{
sprintf(oapiDebugString(), "stationidx %d", stationIdx);
switch (stationIdx)
{
case -1://right
// Show first station commander mesh
SetMeshVisibilityMode(4, MESHVIS_NEVER);
SetMeshVisibilityMode(5, MESHVIS_NEVER);
// Show first station pilot mesh
break;
case 0://left
// Show first station commander mesh
SetMeshVisibilityMode(4, MESHVIS_EXTERNAL);
SetMeshVisibilityMode(5, MESHVIS_NEVER);
// Show first station pilot mesh
break;
case 1://right
// Show first station commander mesh
SetMeshVisibilityMode(4, MESHVIS_EXTERNAL);
SetMeshVisibilityMode(5, MESHVIS_EXTERNAL);
// Show first station pilot mesh
break;
break;
}
}
The lamp cargo has 5 lamps. The issue is that both packed and unpacked cargoes use the same name, which causes naming issues if another packed lamp cargo exists when unpacking. I should fix this in the next update.How many lamps are you supposed to get when unpacked? I'm getting cargolamp1-4, and lamp1, total 5. Maybe just a naming issue?
Yes. Use the astronaut API to make a custom astronaut. Implement the necessary methods as specified in the documents then implement any custom functionality you would like.Also. on the astronauts. Can they also be vessels? rathe than meshes
The reason I ask is so that we can use specialized eva guy like my shuttle guy with arm/leg animations,.....
Yes. UCSO is obsolete now.Sorry for my ignorance, does the UACS - Universal Astronaut and Cargo System include UCSO - Universal Cargo System for Orbiter? That is, does the UACS have all (or almost all features) as the UCSO and replace it?