EnhancedNetwork / TownofHost-Enhanced

TOHE is the best Host-Only mod for anyone who wants to change their Among Us Experience!
https://tohe.weareten.ca
GNU General Public License v3.0
79 stars 68 forks source link

Improvements for DisableUseVentForVanilla #1195

Closed NikoCat233 closed 3 weeks ago

NikoCat233 commented 3 weeks ago

the old methods delays other dirty system types from updating when ventilation is dirty Though it has little influence on real game play, i still decide to patch shipstatus like what we have done to Networked PlayerInfo

  1. Move Serialize patch of shipstatus to shipstatus.cs and improve it so it wont delay other system types from updating
  2. CanUseVent used to use player.data.role.role == engineer, obviously it sucks. Changed to GetVNRole
  3. In IntroCutscene the old code stop adding LastVentId when it meets a "true". fixed that so last vent id is added to all needed players
  4. Before IntroCutscene got destoryed (game really starts), the old code is serializing Vents (before role get assigned). This may make the first 2 vents in Skeld unusable. Fixed by delaying updating the custom vents until intro is being played
NikoCat233 commented 3 weeks ago

Tested in local clients and custom regions. everything seems fine