25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
644 B

  1. local PdkFunctions = {}
  2. ---
  3. -- 是否勾选了禁止使用道具和语音选项
  4. -- @return
  5. --
  6. function PdkFunctions.isForbidProp ()
  7. if not app.room or not app.room.roomInfo.nGameInfo then
  8. return false
  9. end
  10. local gameInfo = json.decode(app.room.roomInfo.nGameInfo)
  11. local forbidProp = gameInfo.forbidProp or 0
  12. return tonumber(forbidProp) > 0
  13. end
  14. -- todo
  15. function PdkFunctions.isForbidVoice ()
  16. if not app.room or not app.room.roomInfo.nGameInfo then
  17. return false
  18. end
  19. local gameInfo = json.decode(app.room.roomInfo.nGameInfo)
  20. local forbidVoice = gameInfo.forbidVoice or 0
  21. return tonumber(forbidVoice) > 0
  22. end
  23. return PdkFunctions