Revises how Topic and NanoUI shares allowance-logic.

All mob-interaction logic now resides in nanointeraction.dm and is called by the base CanUseTopic().
Specifics for when objects allows mob-interaction can be specified by overriding CanUseTopic(), see machinery.dm.
This commit is contained in:
PsiOmega
2015-02-19 18:22:19 +01:00
parent 4e785f716a
commit ead0f31426
9 changed files with 169 additions and 137 deletions

View File

@@ -48,6 +48,10 @@ NanoBaseHelpers = function ()
round: function(number) {
return Math.round(number);
},
// Returns the number fixed to 1 decimal
fixed: function(number) {
return Math.round(number * 10) / 10;
},
// Round a number down to integer
floor: function(number) {
return Math.floor(number);