Minimum temperature doesn't workSolved
I have set
    "InterruptTPOnCold": false,
    "InterruptTPOnHot": false,​

and

    "MinimumTemp": -15.0,
    "MaximumTemp": 40.0,​

Yet it will still interrupt the teleport when it's -5 degrees.
If InterruptTPOnHurt is true, it will interrupt with the message "Your teleport was interrupted!"  This is handled by OnEntityTakeDamage(), for better or worse.

If too cold, "You're too cold to teleport!"
If too hot, "You're too hot to teleport!"
5ba5bf1da6b60.jpg rfc1920
If InterruptTPOnHurt is true, it will interrupt with the message "Your teleport was interrupted!"  This is handled by OnEntityTakeDamage(), for better or worse.

If too cold, "You're too cold to teleport!"
If too hot, "You're too hot to teleport!"

Not "OnHurt" but "OnCold"

there's a setting for minimum temp and maximum temp but they are not working. Or am I using it wrong?

I still want the teleport to be interrupted when they get hurt (by being shot, bleeding, falling etc) just not when cold.

I did not misunderstand.  What message are you getting?
5ba5bf1da6b60.jpg rfc1920
I did not misunderstand.  What message are you getting?

"The teleport was interrupted" on -5 etc eventhough it should be able to be as low as -15 degrees

That message is not from the temperature check, fwiw.  It means you are damaged enough for it to interrupt because InterruptTPOnHurt must be true.

As for that check in OnEntityTakeDamage(), it might be tweakable.  But, that code has not changed so far.
5ba5bf1da6b60.jpg rfc1920
That message is not from the temperature check, fwiw.  It means you are damaged enough for it to interrupt because InterruptTPOnHurt must be true.

As for that check in OnEntityTakeDamage(), it might be tweakable.  But, that code has not changed so far.

You might have noticed a similarity in this thread from 11 months ago (https://umod.org/community/n-teleportation/5007-teleporting-while-cold )

Indeed.  But, the message you are receiving has nothing to do with the plugin testing for being hot or cold.  It is seeing that you are receiving damage, which is the case when you are hot or cold or being shot, etc.
5ba5bf1da6b60.jpg rfc1920
Indeed.  But, the message you are receiving has nothing to do with the plugin testing for being hot or cold.  It is seeing that you are receiving damage, which is the case when you are hot or cold or being shot, etc.

So is it possible to set it up that you can still teleport with the minimum temperature of -15?

Until the code is adjusted, only by setting InterruptOnHurt to false.  Once again this is nothing new.  It's not working the way you want but it is not a bug.  I have several other problem bugs to fix but I have some ideas for adjusting this issue.
5ba5bf1da6b60.jpg rfc1920
Until the code is adjusted, only by setting InterruptOnHurt to false.  Once again this is nothing new.  It's not working the way you want but it is not a bug.  I have several other problem bugs to fix but I have some ideas for adjusting this issue.

So what do the settings minimum/maximum temperature do right now?

I was just looking through the versions.  In 1.0.26 and a few after that, the OnEntityTakeDamage() call did not take into account InterruptTPOnHurt.  So, it would have broken teleport if you were damaged in any way even in the versions from the old oxide site.  I added the check into 1.0.48 so that you could not have TP interrupted when hurt if you set this value to false.

The temp checks, monument, safe zone, etc. are all checked in CheckPlayer() and they work.  Unfortunately, the call to the Oxide global function OnEntityTakeDamage will still interrupt the teleport timer, perhaps on the first tick, if you are hurt.  This includes hot and cold.

I'm sure the goal was originally to not allow players to escape being shot at by teleporting away.  But, it is not specific and includes ALL damage types.  The drawback to adding more code there is that it gets called A LOT.  NoDecay has quite a bit of work do there as well, but at least checks only for the decay damage type.  This can cause the admin to get warnings about how long the function call is taking.

With any luck this can be done with a mask against the 20+ different damage types.

Merged post

New code added to 1.0.84.  This was added to the check during the countdown to see if their major damage is either hot or cold.  If it is not either one of those conditions, they could still be interrupted by getting shot, attacked by an animal, etc., if InterruptTPOnHurt is true.  The initial check was already working - this is called when they enter /town, /home, etc.
5ba5bf1da6b60.jpg rfc1920
I was just looking through the versions.  In 1.0.26 and a few after that, the OnEntityTakeDamage() call did not take into account InterruptTPOnHurt.  So, it would have broken teleport if you were damaged in any way even in the versions from the old oxide site.  I added the check into 1.0.48 so that you could not have TP interrupted when hurt if you set this value to false.

The temp checks, monument, safe zone, etc. are all checked in CheckPlayer() and they work.  Unfortunately, the call to the Oxide global function OnEntityTakeDamage will still interrupt the teleport timer, perhaps on the first tick, if you are hurt.  This includes hot and cold.

I'm sure the goal was originally to not allow players to escape being shot at by teleporting away.  But, it is not specific and includes ALL damage types.  The drawback to adding more code there is that it gets called A LOT.  NoDecay has quite a bit of work do there as well, but at least checks only for the decay damage type.  This can cause the admin to get warnings about how long the function call is taking.

With any luck this can be done with a mask against the 20+ different damage types.

Merged post

New code added to 1.0.84.  This was added to the check during the countdown to see if their major damage is either hot or cold.  If it is not either one of those conditions, they could still be interrupted by getting shot, attacked by an animal, etc., if InterruptTPOnHurt is true.  The initial check was already working - this is called when they enter /town, /home, etc.
MIycRcS.jpg

Unfortunately it still doesn't work with newest version

"InterruptTPOnCold": false,
"InterruptTPOnHot": false,​

"MinimumTemp": -15.0,
"MaximumTemp": 40.0,​
The temperature values won't be used if you don't set the Interrupts to true. 
5ba5bf1da6b60.jpg rfc1920
The temperature values won't be used if you don't set the Interrupts to true. 



DontInterruptTPOnCold should it be then?

Locked automatically