From 1b844606aa34434bb3744963ab50d644c85f59a5 Mon Sep 17 00:00:00 2001 From: wraitii Date: Mon, 12 Apr 2021 16:33:54 +0000 Subject: [PATCH] Implement mul_round in checkrefs. Missed in 19f600cfa2. In use since 2078abdcc4. This was SVN commit r25247. --- source/tools/entity/Entity.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/tools/entity/Entity.pm b/source/tools/entity/Entity.pm index d4aa4689bb..3074f221fa 100644 --- a/source/tools/entity/Entity.pm +++ b/source/tools/entity/Entity.pm @@ -99,6 +99,11 @@ sub apply_layer elsif ($op eq 'mul') { $base->{' content'} = $op1 * $op2; } + elsif ($op eq 'mul_round') { + # This is incorrect (floors instead of rounding) + # but for schema purposes it ought be fine. + $base->{' content'} = int($op1 * $op2); + } else { die "Invalid operator '$op'"; }