Qbox-project / qbx_radio

GNU General Public License v3.0
2 stars 12 forks source link

fix: increase/decrease radio buttons & feat: decimal frequency config #16

Closed TonybynMp4 closed 9 months ago

TonybynMp4 commented 9 months ago

Description

They shouldn't work when the radio is off! Also made the subfrequency check faster.

Checklist

BerkieBb commented 9 months ago

Simple thing you can do as well is instead of making config.decimalPlaces a boolean or number, just make it a number and use that to let them decide if it should be a whole number or a decimal number, then you can remove the ternary statement and just do local channel = qbx.math.round(tonumber(data.channel), config.decimalPlaces)

TonybynMp4 commented 9 months ago

Simple thing you can do as well is instead of making config.decimalPlaces a boolean or number, just make it a number and use that to let them decide if it should be a whole number or a decimal number, then you can remove the ternary statement and just do local channel = qbx.math.round(tonumber(data.channel), config.decimalPlaces)

I was trying to keep the current behavior, but if you prefer that i can add it real quick

BerkieBb commented 9 months ago

Simple thing you can do as well is instead of making config.decimalPlaces a boolean or number, just make it a number and use that to let them decide if it should be a whole number or a decimal number, then you can remove the ternary statement and just do local channel = qbx.math.round(tonumber(data.channel), config.decimalPlaces)

I was trying to keep the current behavior, but if you prefer that i can add it real quick

It wouldn't change behaviour, just what the user inputs

TonybynMp4 commented 9 months ago

It wouldn't change behaviour, just what the user inputs

Currently a player can add as many decimal places as they want so it would, but i guess it doesn't really matter much, sounds like something qbus overlooked.

BerkieBb commented 9 months ago

It wouldn't change behaviour, just what the user inputs

Currently a player can add as many decimal places as they want so it would, but i guess it doesn't really matter much, sounds like something qbus overlooked.

Ahh that's what you mean, yeah let the server owner/dev limit it