Project Universal Astronaut and Cargo System (UACS)

Buck Rogers

Major Spacecadet
Joined
Feb 26, 2013
Messages
279
Reaction score
216
Points
43
In the API there's a call for: SetAttenuation ( , , ), I think this controls power.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
3 issues. I can figure out.
1. airlocks how to make all closed
!vslAstrInfo.airlocks.at(0).open;
2. make a airlock open/closed on a key

3 I know this is a bug. But how to show the guy in the vessel when they enter.
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; } }
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
Also is it possible to have a astronaut with a different specific module? I saw for cargo you could.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
On my vessel I have 4 airlocks. the open/close state is based off animation. But even though it says it is open no guy can get out and no error message??

open door for which airlock
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();
here the airlock open if door open
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 }
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
So here I should be seeing only 1 of the suit mesh. But both are seen,
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; } }
case UACS::ASTR_EGRS:
{
size_t stationIdx = static_cast<size_t>(context);
auto& astrInfo = *(vslAstrInfo.stations.at(stationIdx).astrInfo);

SetEmptyMass(GetEmptyMass() - astrInfo.mass);
SetStationMesh(stationIdx, astrInfo.role, false);

return 1;
}
SCn.
MMSEVUACS:MMSEVUACS
ASTR_STATION 1
ASTR_NAME John G.
ASTR_ROLE Pilot
ASTR_MASS 70.00
ASTR_OXYGEN 1.00
ASTR_FUEL 1.00
ASTR_ALIVE 1
ASTR_CLASSNAME UACS\Astronauts\Xemuredbroke
LIGHTF
SOLAR 0 0.0000
FDOORL 0 0.0000
FDOORR 0 0.0000
ADOORL 1 1.0000
ADOORR 1 1.0000
SOLP 2 0.0000 3 0.5000
CAM 1 1.0000
STATUS Landed Mars
POS -102.1971192 -7.0124952
HEADING 348.71
ALT 2.239
AROT 97.910 13.228 -12.322
AFCMODE 7
NAVFREQ 0 0
XPDR 0
END
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,636
Reaction score
2,613
Points
203
Location
Dallas, TX
Trying to figure this set stationmesh i have the crew mesh set as never not seen.
eva1_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitright1"); SetMeshVisibilityMode(AddMesh(eva1_mesh, &mesh1ofs), MESHVIS_NEVER ); eva2_mesh = oapiLoadMeshGlobal("MMSEVUACS/MMSEVsuitleft1"); SetMeshVisibilityMode(AddMesh(eva2_mesh, &mesh1ofs), MESHVIS_NEVER);
and then in set stationmesh
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; } }
If we load 2 crew both guy show up, great. eva 1 guy now only 1 guy shows, great. exit both then both guy show up:(
It looks like it is based off station index. i tried station index -1 for no crew.
 
Top