mediumtent.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. class MediumTent extends TentBase
  2. {
  3. void MediumTent()
  4. {
  5. m_ToggleAnimations.Insert( new ToggleAnimations("EntranceO", "EntranceC", OPENING_0), 0 );
  6. m_ShowAnimationsWhenPitched.Insert( "Body" );
  7. //m_ShowAnimationsWhenPitched.Insert( "EntranceO" );
  8. m_ShowAnimationsWhenPitched.Insert( "Pack" );
  9. m_ShowAnimationsWhenPacked.Insert( "Inventory" );
  10. m_HalfExtents = Vector(0.8, 0.15, 1.3);
  11. }
  12. override void EEInit()
  13. {
  14. super.EEInit();
  15. }
  16. override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
  17. {
  18. super.OnItemLocationChanged(old_owner, new_owner);
  19. }
  20. override string GetSoundOpen()
  21. {
  22. return "MediumTent_Door_Open_SoundSet";
  23. }
  24. override string GetSoundClose()
  25. {
  26. return "MediumTent_Door_Close_SoundSet";
  27. }
  28. override bool HasClutterCutter()
  29. {
  30. return true;
  31. }
  32. override string GetClutterCutter()
  33. {
  34. return "MediumTentClutterCutter";
  35. }
  36. //================================================================
  37. // ADVANCED PLACEMENT
  38. //================================================================
  39. override void OnPlacementComplete( Man player, vector position = "0 0 0", vector orientation = "0 0 0" )
  40. {
  41. super.OnPlacementComplete( player, position, orientation );
  42. PlayerBase pb = PlayerBase.Cast( player );
  43. if ( GetGame().IsServer() )
  44. {
  45. if ( !m_ClutterCutter )
  46. {
  47. m_ClutterCutter = GetGame().CreateObjectEx( "MediumTentClutterCutter", pb.GetLocalProjectionPosition(), ECE_PLACE_ON_SURFACE );
  48. m_ClutterCutter.SetOrientation( pb.GetLocalProjectionOrientation() );
  49. }
  50. }
  51. }
  52. override string GetDeploySoundset()
  53. {
  54. return "placeMediumTent_SoundSet";
  55. }
  56. override string GetLoopDeploySoundset()
  57. {
  58. return "mediumtent_deploy_SoundSet";
  59. }
  60. };
  61. class MediumTent_Green extends MediumTent {};
  62. class MediumTent_Orange extends MediumTent {};
  63. //placing classes
  64. class MediumTentPlacing extends MediumTent {};
  65. class MediumTent_GreenPlacing extends MediumTentPlacing {};
  66. class MediumTent_OrangePlacing extends MediumTentPlacing {};